Merge branch 'MDL-83920-main' of https://github.com/lucaboesch/moodle

This commit is contained in:
Huong Nguyen 2024-12-10 09:22:42 +07:00
commit 158649ff5f
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A

View File

@ -1024,6 +1024,7 @@ class qformat_default {
// Did we actually process anything? Then continue path for following error checks.
if ($count==0) {
$contextid = $DB->get_field('question_categories', 'contextid', ['id' => $this->category->id]);
$context = context::instance_by_id($contextid);
$continuepath = "{$CFG->wwwroot}/question/bank/exportquestions/export.php?cmid={$context->instanceid}";
throw new \moodle_exception('noquestions', 'question', $continuepath);