-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.2.5
-
MOODLE_402_STABLE
While reviewing and testing MDL-79091, I faced this issue. The patch in MDL-79091 only fixes the problem with the cron.
Steps to reproduce
- Login as admin.
- Create a course.
- Add 2 quizzes with Activity completion set to "View the activity"
- Add a Badge and set Criteria to "Activity completion", ticking both quizzes and changing This criterion is complete when ALL the activities.
- Enable the badge.
- Remove the 2 quizzes from the course.
- Completely remove the quizzes from the site, running the "course_delete_modules" ad-hoc task in "Site Administration > Server > Ad hoc tasks".
- Go to the course page and access "More > Badges > Manage badges".
- Check the Criteria displays some "Warning: This activity is no longer available" messages.
- Disable the badge.
- Enable the badge.
- Click the Continue button.
Expected result
As the criteria are not valid, the badge should remain disabled.
Current result
The following exception is displayed: "Invalid course module ID: xxxx". When you're back to the Manage badges page, it has been enabled:
- Discovered while testing
-
MDL-79091 Award badges task fails when badge requires multiple deleted activities
- Closed
- has to be done after
-
MDL-80665 UX review - Error when enabling a badge with invalid course module ids
- Closed
- will be (partly) resolved by
-
MDL-81149 Show warning before deleting a module with completion value used
- Open