Yay! found a global variable that was not being used anywhere. Kill! Kill!
This commit is contained in:
+2
-13
@@ -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 .= ',';
|
||||
|
||||
Reference in New Issue
Block a user