MDL-20636 Rename questiontype.php to questiontypebase.php. Also some conde-checker issues.

This commit is contained in:
Tim Hunt 2011-05-17 16:46:57 +01:00
parent 8200ccd66f
commit afe24f850b
12 changed files with 19 additions and 15 deletions

View File

@ -35,7 +35,7 @@
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/question/engine/lib.php');
require_once($CFG->dirroot . '/question/type/questiontype.php');
require_once($CFG->dirroot . '/question/type/questiontypebase.php');

View File

@ -30,7 +30,7 @@
defined('MOODLE_INTERNAL') || die();
require_once(dirname(__FILE__) . '/../type/questiontype.php');
require_once(dirname(__FILE__) . '/../type/questiontypebase.php');
/**

View File

@ -33,7 +33,7 @@ require_once(dirname(__FILE__) . '/states.php');
require_once(dirname(__FILE__) . '/datalib.php');
require_once(dirname(__FILE__) . '/renderer.php');
require_once(dirname(__FILE__) . '/bank.php');
require_once(dirname(__FILE__) . '/../type/questiontype.php');
require_once(dirname(__FILE__) . '/../type/questiontypebase.php');
require_once(dirname(__FILE__) . '/../type/questionbase.php');
require_once(dirname(__FILE__) . '/../type/rendererbase.php');
require_once(dirname(__FILE__) . '/../behaviour/behaviourbase.php');

View File

@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die();
* @copyright 2007 Jamie Pratt me@jamiep.org
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_edit_calculated_form extends question_edit_form {
class qtype_calculated_edit_form extends question_edit_form {
/**
* Handle to the question type for this question.
*

View File

@ -157,14 +157,16 @@ class qtype_match_qe2_attempt_updater extends question_qtype_attempt_updater {
$this->choiceorder = array_keys($this->choices);
shuffle($this->choiceorder);
$this->flippedchoiceorder = array_combine(array_values($this->choiceorder), array_keys($this->choiceorder));
$this->flippedchoiceorder = array_combine(
array_values($this->choiceorder), array_keys($this->choiceorder));
$data['_stemorder'] = implode(',', $this->stemorder);
$data['_choiceorder'] = implode(',', $this->choiceorder);
}
public function supply_missing_first_step_data(&$data) {
throw new coding_exception('qtype_match_updater::supply_missing_first_step_data not tested');
public function supply_missing_first_step_data($data) {
throw new coding_exception('qtype_match_updater::supply_missing_first_step_data ' .
'not tested');
$data['_stemorder'] = array_keys($this->stems);
$data['_choiceorder'] = shuffle(array_keys($this->choices));
}

View File

@ -93,7 +93,8 @@ class qtype_multichoice_qe2_attempt_updater extends question_qtype_attempt_updat
$bits = array();
foreach ($responses as $response) {
if (array_key_exists($response, $this->question->options->answers)) {
$bits[] = $this->to_text($this->question->options->answers[$response]->answer);
$bits[] = $this->to_text(
$this->question->options->answers[$response]->answer);
} else {
$this->logger->log_assumption("Dealing with a place where the
student selected a choice that was later deleted for

View File

@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/question/type/numerical/questiontype.php');
*/
class qtype_numerical_test extends UnitTestCase {
public static $includecoverage = array(
'question/type/questiontype.php',
'question/type/questiontypebase.php',
'question/type/numerical/questiontype.php'
);

View File

@ -218,7 +218,8 @@ class question_type {
'/edit_' . $this->name() . '_form.php';
if (!is_readable($definitionfile) || !is_file($definitionfile)) {
throw new coding_exception($this->plugin_name() .
' is missing the definition of its editing formin file ' . $definitionfile . '.');
' is missing the definition of its editing formin file ' .
$definitionfile . '.');
}
require_once($definitionfile);
$classname = $this->plugin_name() . '_edit_form';

View File

@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/question/type/shortanswer/questiontype.php');
*/
class qtype_shortanswer_test extends UnitTestCase {
public static $includecoverage = array(
'question/type/questiontype.php',
'question/type/questiontypebase.php',
'question/type/shortanswer/questiontype.php',
);

View File

@ -26,7 +26,7 @@
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/question/type/questiontype.php');
require_once($CFG->dirroot . '/question/type/questiontypebase.php');
/**

View File

@ -26,7 +26,7 @@
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/question/type/questiontype.php');
require_once($CFG->dirroot . '/question/type/questiontypebase.php');
/**
@ -36,5 +36,5 @@ require_once($CFG->dirroot . '/question/type/questiontype.php');
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_type_test extends UnitTestCase {
public static $includecoverage = array('question/type/questiontype.php');
public static $includecoverage = array('question/type/questiontypebase.php');
}

View File

@ -26,7 +26,7 @@
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/question/type/shortanswer/questiontype.php');
require_once($CFG->dirroot . '/question/type/shortanswer/truefalsetype.php');
/**