MDL-68944 mod_workshop: Workshop skips scheduled allocation
This commit is contained in:
@@ -53,7 +53,6 @@ class cron_task extends \core\task\scheduled_task {
|
||||
|
||||
mtrace(' processing workshop subplugins ...');
|
||||
|
||||
// Now when the scheduled allocator had a chance to do its job.
|
||||
// Check if there are some workshops to switch into the assessment phase.
|
||||
$workshops = $DB->get_records_select("workshop",
|
||||
"phase = 20 AND phaseswitchassessment = 1 AND submissionend > 0 AND submissionend < ?", [$now]);
|
||||
@@ -72,10 +71,11 @@ class cron_task extends \core\task\scheduled_task {
|
||||
'context' => $workshop->context,
|
||||
'courseid' => $workshop->course->id,
|
||||
'other' => [
|
||||
'workshopphase' => $workshop->phase
|
||||
'targetworkshopphase' => $workshop->phase,
|
||||
'previousworkshopphase' => \workshop::PHASE_SUBMISSION,
|
||||
]
|
||||
];
|
||||
$event = \mod_workshop\event\phase_switched::create($params);
|
||||
$event = \mod_workshop\event\phase_automatically_switched::create($params);
|
||||
$event->trigger();
|
||||
|
||||
// Disable the automatic switching now so that it is not executed again by accident.
|
||||
|
||||
Reference in New Issue
Block a user