question engine: MDL-17651 this context is not used anywhere, so remove it.
authortjhunt <tjhunt>
Thu, 15 Jan 2009 05:15:38 +0000 (05:15 +0000)
committertjhunt <tjhunt>
Thu, 15 Jan 2009 05:15:38 +0000 (05:15 +0000)
(There was a bug in the get_context_instance call.)

question/type/questiontype.php

index b0ead0faa3606a35ec8404a80256419df6aa0fa6..9785f71ab0f294a2891214d1a7e6d54cf829ed19 100644 (file)
@@ -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 {