MDL-34549 libraries: Replace get_context_instance_by_id() by context::instance_by_id()

This commit is contained in:
Ankit Agarwal
2012-08-24 11:30:10 +08:00
parent d71c486507
commit d197ea4300
61 changed files with 92 additions and 92 deletions
+3 -3
View File
@@ -128,7 +128,7 @@ class qformat_default {
debugging('You shouldn\'t call setCategory after setQuestions');
}
$this->category = $category;
$this->importcontext = get_context_instance_by_id($this->category->contextid);
$this->importcontext = context::instance_by_id($this->category->contextid);
}
/**
@@ -500,10 +500,10 @@ class qformat_default {
}
if ($this->contextfromfile && $contextid !== false) {
$context = get_context_instance_by_id($contextid);
$context = context::instance_by_id($contextid);
require_capability('moodle/question:add', $context);
} else {
$context = get_context_instance_by_id($this->category->contextid);
$context = context::instance_by_id($this->category->contextid);
}
$this->importcontext = $context;