mirror of
https://github.com/moodle/moodle.git
synced 2025-07-24 15:51:56 +02:00
MDL-40404 Libraries: Deprecated get_parent_contextid()
This commit is contained in:
@@ -441,8 +441,13 @@ function question_delete_course_category($category, $newcategory, $feedback=true
|
||||
$questionids = $DB->get_records_menu('question',
|
||||
array('category'=>$category->id), '', 'id, 1');
|
||||
if (!empty($questionids)) {
|
||||
$parentcontextid = false;
|
||||
$parentcontext = $context->get_parent_context();
|
||||
if ($parentcontext) {
|
||||
$parentcontextid = $parentcontext->id;
|
||||
}
|
||||
if (!$rescueqcategory = question_save_from_deletion(
|
||||
array_keys($questionids), get_parent_contextid($context),
|
||||
array_keys($questionids), $parentcontextid,
|
||||
print_context_name($context), $rescueqcategory)) {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user