MDL-40404 Libraries: Deprecated get_parent_contextid()

This commit is contained in:
Rajesh Taneja
2013-07-04 12:59:06 +08:00
parent 766fd0d92f
commit 7f5b51c4e6
12 changed files with 35 additions and 37 deletions

View File

@@ -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;
}