From: tjhunt Date: Wed, 26 Nov 2008 08:55:24 +0000 (+0000) Subject: Yay! found a global variable that was not being used anywhere. Kill! Kill! X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=24ada7b2b616aa0820e4e886773964f21d846eb6;p=moodle.git Yay! found a global variable that was not being used anywhere. Kill! Kill! --- diff --git a/lib/questionlib.php b/lib/questionlib.php index 6d05e41def..52d45587d2 100644 --- a/lib/questionlib.php +++ b/lib/questionlib.php @@ -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 .= ',';