FMCorz / moodle-block_xp

A gamification plugin for Moodle allowing students to gain experience points and level up.
https://levelup.plus/?ref=github
150 stars 41 forks source link

When Time required between identical actions is 0, it looks to ignore Max actions in time frame #103

Closed kiratskitizing closed 4 years ago

kiratskitizing commented 4 years ago

Steps to replicate:

  1. Create a course.
  2. Enrol a student.
  3. Turn editing on.
  4. Add an Assignment activity.
  5. Add a Level Up! block.
  6. Click Settings for the Level Up! block and use the following: Settings Tab / Section: Cheat guard Enable cheat guard: Yes Max. actions in time frame: 1 per 10 minutes Time required between identical actions: 0 minutes Save the new values

Rules Tab 1 points are earned when: Any of the conditions are true: The event is Assignment: Course module viewed. --- Delete the rest. So you can only have 1 point and nothing else. Save the new values.

  1. Log in as the student user.
  2. Visit the course and take note your xp.
  3. Visit the assignment activity to view it.
  4. Go back to the course page and take note your xp. Noticed that it has increased.
  5. Revisit the assignment activity.
  6. Go back to the course page and take note your xp. Compare this to step 10 results, and noticed that it has increased again. Comments: It looks like when Time required between identical actions is set to 0 minutes, then the Max actions in time frame which is 1 per 10 minutes is ignored.

Replication number 2.

  1. Create another course.
  2. Enrol a student.
  3. Turn editing on.
  4. Add an Assignment activity.
  5. Add a Level Up! block.
  6. Click Settings for the Level Up! block and use the following: Settings Tab / Section: Cheat guard Enable cheat guard: Yes Max. actions in time frame: 1 per 30 seconds Time required between identical actions: 1 minutes Save the new values

Rules Tab 1 points are earned when: Any of the conditions are true: The event is Assignment: Course module viewed. --- Delete the rest. So you can only have 1 point and nothing else. Save the new values.

  1. Log in as the student user
  2. Visit the course and take note your xp.
  3. Visit the assignment activity to view it.
  4. Go back to the course page and noticed that it has increased.
  5. Immediately (less than 30 seconds), visit the assignment again.
  6. Refresh the course page. Notice it does not increase. Comments. This is expected as it is in the 1 minute Time required between identical actions and within the setting Max.actions in time frame of 1 per 30 seconds.
FMCorz commented 4 years ago

Thanks for the detailed report @jebarviabb, we'll look into it!