]> git.mjollnir.org Git - moodle.git/commitdiff
Yay! found a global variable that was not being used anywhere. Kill! Kill!
authortjhunt <tjhunt>
Wed, 26 Nov 2008 08:55:24 +0000 (08:55 +0000)
committertjhunt <tjhunt>
Wed, 26 Nov 2008 08:55:24 +0000 (08:55 +0000)
lib/questionlib.php

index 6d05e41defdba53b45d8575a6b34e90c82d5c622..52d45587d20e183313329242b7f7ab2b962a9058 100644 (file)
@@ -122,16 +122,11 @@ define('QUESTION_FLAGSEDITABLE', 2);
 /// QTYPES INITIATION //////////////////
 // These variables get initialised via calls to question_register_questiontype
 // as the question type classes are included.
-global $QTYPES, $QTYPE_MANUAL, $QTYPE_EXCLUDE_FROM_RANDOM;
+global $QTYPES, $QTYPE_EXCLUDE_FROM_RANDOM;
 /**
  * Array holding question type objects
  */
 $QTYPES = array();
-/**
- * String in the format "'type1','type2'" that can be used in SQL clauses like
- * "WHERE q.type IN ($QTYPE_MANUAL)".
- */
-$QTYPE_MANUAL = '';
 /**
  * String in the format "'type1','type2'" that can be used in SQL clauses like
  * "WHERE q.type NOT IN ($QTYPE_EXCLUDE_FROM_RANDOM)".
@@ -144,16 +139,10 @@ $QTYPE_EXCLUDE_FROM_RANDOM = '';
  * @param object $qtype An instance of the new question type class.
  */
 function question_register_questiontype($qtype) {
-    global $QTYPES, $QTYPE_MANUAL, $QTYPE_EXCLUDE_FROM_RANDOM;
+    global $QTYPES, $QTYPE_EXCLUDE_FROM_RANDOM;
 
     $name = $qtype->name();
     $QTYPES[$name] = $qtype;
-    if ($qtype->is_manual_graded()) {
-        if ($QTYPE_MANUAL) {
-            $QTYPE_MANUAL .= ',';
-        }
-        $QTYPE_MANUAL .= "'$name'";
-    }
     if (!$qtype->is_usable_by_random()) {
         if ($QTYPE_EXCLUDE_FROM_RANDOM) {
             $QTYPE_EXCLUDE_FROM_RANDOM .= ',';