-
Bug
-
Resolution: Fixed
-
Minor
-
4.1.5, 4.2.2
-
MOODLE_401_STABLE, MOODLE_402_STABLE
-
MOODLE_402_STABLE, MOODLE_403_STABLE
-
MDL-79091-MOODLE_403_STABLE -
-
When you create a badge that requires two activities to be completed in order to earn it and then delete these two activities, the task "Award badges" (core\task\badges_cron_task) fails with:
Execute scheduled task: Award badges (core\task\badges_cron_task)
|
... started 17:15:58. Current memory use 3.4 MB.
|
Started reviewing available badges.
|
Processing badge "Badge mit fehlenden Voraussetzungen"...
|
... used 18 dbqueries
|
... used 0.13122606277466 seconds
|
Scheduled task failed: Award badges (core\task\badges_cron_task),Invalid course module ID: 5585
|
Backtrace:
|
* line 2242 of /lib/modinfolib.php: call to course_modinfo->get_cm()
|
* line 1049 of /lib/completionlib.php: call to cm_info::create()
|
* line 204 of /badges/criteria/award_criteria_activity.php: call to completion_info->get_data()
|
* line 536 of /badges/classes/badge.php: call to award_criteria_activity->review()
|
* line 82 of /lib/classes/task/badges_cron_task.php: call to core_badges\badge->review_all_criteria()
|
* line 263 of /lib/cronlib.php: call to core\task\badges_cron_task->execute()
|
* line 167 of /admin/cli/scheduled_task.php: call to cron_run_inner_scheduled_task()
|
Since the task just fails and doesn't continue with the other badges, you can have one badge with invalid criteria preventing all other badges from being awarded. Letting the task fail is good in that it brings the problem of invalid criteria to the attention of admins. But in my opinion it shouldn't prevent other badges with correctly setup criteria from being awarded.