MDL-20636 Remove all references to global $QTYPES.

Except in the question types that have not yet been converted to the new question engine.
This commit is contained in:
Tim Hunt
2011-02-24 15:29:07 +00:00
parent 446166a628
commit d649fb0221
21 changed files with 429 additions and 445 deletions
-16
View File
@@ -41,22 +41,6 @@ class questionlib_test extends UnitTestCase {
public static $includecoverage = array('lib/questionlib.php');
function test_question_sort_qtype_array() {
$config = new stdClass();
$config->multichoice_sortorder = '1';
$config->calculated_sortorder = '2';
$qtypes = array(
'frog' => 'toad',
'calculated' => 'newt',
'multichoice' => 'eft',
);
$this->assertEqual(question_sort_qtype_array($qtypes), array(
'multichoice' => 'eft',
'calculated' => 'newt',
'frog' => 'toad',
));
}
function test_question_reorder_qtypes() {
$this->assertEqual(question_reorder_qtypes(array('t1' => '', 't2' => '', 't3' => ''), 't1', +1),
array(0 => 't2', 1 => 't1', 2 => 't3'));