-
Bug
-
Resolution: Fixed
-
Minor
-
3.7.2
-
MOODLE_37_STABLE
-
MOODLE_37_STABLE, MOODLE_38_STABLE
-
The scheduled task \qtype_random\task\remove_unused_questions fails due to missing record in mdl_context.
The CLI fix_orphaned_question_categories also fails on this error, which is to be expected with an orphaned category!
The failure is due to the event creation on delete questions.
-----------------------------------------------------------------------------
Full error:
Execute scheduled task: Remove unused random questions (qtype_random\task\remove_unused_questions)
|
... used 5097 dbqueries
|
... used 8.9891879558563 seconds
|
Scheduled task failed: Remove unused random questions (qtype_random\task\remove_unused_questions),Can't find data record in database table context.
|
Debug info:
|
SELECT * FROM \{context} WHERE id = ?
|
[array (
|
0 => '2040510',
|
)]
|
Backtrace:
|
* line 1538 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
|
* line 5191 of /lib/accesslib.php: call to moodle_database->get_record()
|
* line 221 of /lib/classes/event/base.php: call to context::instance_by_id()
|
* line 125 of /lib/classes/event/question_base.php: call to core\event\base::create()
|
* line 385 of /lib/questionlib.php: call to core\event\question_base::create_from_question_instance()
|
* line 61 of /question/type/random/classes/task/remove_unused_questions.php: call to question_delete_question()
|
* line 157 of /admin/tool/task/cli/schedule_task.php: call to qtype_random\task\remove_unused_questions->execute()
|
- has been marked as being related by
-
MDL-79073 fix_orphaned_question_categories.php --fix trigger an exception
-
- Closed
-