0. Enable activity completion at site level and in a test course.
1. Create a new forum. Set completion tracking to 'when conditions are met', tick both 'require view' and 'require posts' (leaving the latter at default value 1), and save and return to course.
2. Turn editing off.
- Note that the forum now shows an unticked box.
3. Start a new discussion in the forum, with any text and name.
4. Go back to the course page.
- Note that the forum now shows a ticked box.
5. Edit forum settings again. This time, just change the forum name e.g. by adding '2' to the end. Hit 'save and display'.
EXPECTED: The forum is renamed.
BEFORE FIX: The form reloads with an error message 'When you select automatic completion, you must also enable at least one requirement (below).'
6. Edit forum settings again. Look in the completion settings.
EXPECTED: The 'require posts' and 'view' tickboxes, which are currently disabled because completion is locked, should nevertheless still be ticked.
BEFORE FIX: The tickboxes are unticked - completion options were saved even though completion was not unlocked.
THE FOLLOWING TEST STEPS NEED TO BE REPEATED FOR THESE MODULES:
- assign (in Moodle 2.4+ only)
- choice
- feedback (make visible in site settings if not showing)
- forum
- glossary
- scorm
(This is to test that I didn't break the saving of custom completion rule fields when the data isn't locked.)
7. Create an instance of the module. Enable automatic completion, and tick all the automatic completion option boxes. (In the case of forum and glossary, you must also turn on the 'Aggregate type' option under 'Ratings' as otherwise the grade completion will cause an error. For SCORM I used an example SCORM package from http://www.xquestion.com/Examples.html.) Save and display.
8. Edit settings. Verify that all the boxes are ticked. Now untick all the boxes except 'require view', save and display.
9. Edit settings. Verify that the boxes (except require view) are now unticked. (Note: Completion will probably now be locked because you've viewed it, but this doesn't matter as you can still tell if the boxes are ticked or not.)