-
Bug
-
Resolution: Fixed
-
Major
-
3.11
-
MOODLE_311_STABLE
-
MOODLE_311_STABLE
-
MDL-71401-master-3 -
It appears that custom completion conditions are caching, because we only refresh the data in the cache when overall activity completion is reached. A few examples of where thisĀ can be reproduced are as follows:
mod_scorm
- Set a limit of 1 attempt on the activity.
- Log in as a student and go through the activity.
- The "Do all parts of this activity" completion condition will display as "failed".
- Clear caches.
- Refresh the page and the "Do all parts of this activity" completion condition will display as "done" (expected behaviour).
mod_forum
- Set completion conditions for minimum discussions, posts and replies (1 for each).
- Meet those requirements as a student.
- See that the relevant completion conditions still show as "to do" status.
- Clear caches.
- Refresh the page and those conditions will now display as "done".
mod_glossary
- Set "Student must create entries [ 1 ]".
- Log in as a student and add an entry.
- The "Make entries: 1" completion condition will display as "todo".
- Clear caches.
- Refresh the page and the "Make entries: 1" completion condition will display as "done" (expected behaviour).
After further investigation, it appears this would affect any activities with custom completion conditions, where it's possible for a student to have completed some, but not all conditions. I also noticed that forum was missing a call to update the cache when discussions are created, which also need correcting for this to work correctly.
To automate tests for this, some extra completion status checks can be added to the relevant behats which landed as part of MDL-71162.
- Discovered while testing
-
MDL-71162 Write remaining Behat tests for activities with completion conditions
-
- Closed
-