fossunited/mon_school

Gamification

Opened this issue · 11 comments

We need to create a score for every student to encourage them to make progress in the course and also help mentors to see how the students are performing.

Tasks

  • create a Student Score doctype with the fields email, cohort, subgroup, executions, exercises, sketches, score
  • a progress page for each subgroup with score for every user
  • compute daily active users per subgroup and cohort (also weekly active users) - @nikochiko
  • compute #executions and #exercise-submissions
  • Show the score on nav bar
  • Page to show score activity (Student Score Activity)

Doctypes

  • Student Activity
  • Student Score Activity
  • Student Score
  • Cohort Daily User Activity

Server Scripts

  • Code Run -> Student Activity
  • Exercise Submission -> Student Activity
  • LMS Sketch -> Student Activity
  • Student Activity -> Student Score Activity
  • Student Score Activity -> Student Score
  • Student Activity -> Cohort Daily user Activity

Formula for computing score

bool(executions) + bool(sketches) * 5 + bool(exercises) * 4 + exercises

This is updated on every execution, sketch creation, new exercise submission.

Active User

If a person has a code run or a sketch or exercise submission, he/she is considered active.

We need a doctype: Cohort Daily User Activity

  • email
  • course
  • cohort
  • subgroup
  • date

unique(email, cohort, date)

on new-execution or new-exercision-submission, or new-sketch:
ensure (email, cohort, date) entry exist.

Score Activity

As a student I should be able to see all the activity that gave me score.

  • there should be a web page that lists all the activities that contributed to my score

For example:

  • ★1 Good job! you solve exercise 1.2.
  • ★5 Yay! You've created your first sketch!
  • ★5 Yay! You solved your first exercise!
  • ★1 Congratulations! You executed some code on mon school for the first time!

@nikochiko do you think it would be good to have a doctype Course Activity that tracks every code execution, exercise submission and creating sketches? This could be the source for Cohort Daily User Activity and Student Score Activity. What do you think?

This will save us from adding multiple server scripts for Cohort Daily User Activity and Student Score Activity.

Yes that would make sense. +1

Are Code Runs always part of a course or can it be run independently as well?

Code Run can happen as part of a sketch also.

Course Activity will track only the activity by the logged in users of a course. Activity from the guests is not captures as part of this. @nikochiko sounds alright?

Yes. That sounds good.
Another thought I was having was about a generic type of student activity, and then that could be in a course or not. We can obtain our desired stats using different SQL queries on that type. Something like the way GitHub uses events.

Another thought I was having was about a generic type of student activity, and then that could be in a course or not. We can obtain our desired stats using different SQL queries on that type. Something like the way GitHub uses events.

I think this makes sense. We can't capture the course information when creating sketches.

So what fields should be there?

  • User
  • Activity Type -- execution, exercision-submission.new, exercise-submission.update, sketch.new, sketch.update
  • Exercise
  • Sketch
  • Execution: Code Run

Anything else?

A timestamp perhaps? But we get that automatically with Frappe.
I think we would also need information about whether this was run as part of a cohort or not. Does it make sense to have a field for that?

Activity is generic and and not related to a cohort. The Student Score Activity etc. will take the Cohort etc. into consideration. For example, the Student Score Activity will be created only the user is part of a cohort.

Eventually, we'll have to move this additional computation to the task queue so that this won't block the critical path.

Student Activity is ready and live! @nikochiko