diff --git a/question/type/questiontype.php b/question/type/questiontype.php index b0ead0faa36..9785f71ab0f 100644 --- a/question/type/questiontype.php +++ b/question/type/questiontype.php @@ -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 {