question engine: MDL-17651 this context is not used anywhere, so remove it.
(There was a bug in the get_context_instance call.)
This commit is contained in:
@@ -902,15 +902,6 @@ class default_questiontype {
|
||||
global $CFG;
|
||||
$isgraded = question_state_is_graded($state->last_graded);
|
||||
|
||||
// Get the context we should use to check permissions.
|
||||
if (!empty($cmoptions->id)) {
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cmoptions->id);
|
||||
} else if (!empty($cmoptions->course)) {
|
||||
$context = get_context_instance(CONTEXT_COURSE, $cmoptions->course);
|
||||
} else {
|
||||
$context = null;
|
||||
}
|
||||
|
||||
if (isset($question->randomquestionid)) {
|
||||
$actualquestionid = $question->randomquestionid;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user