MDL-32094 fix question related E_STRICT problems

This commit is contained in:
Petr Skoda 2012-03-18 18:33:54 +01:00
parent e7755fc627
commit 072db71c90
8 changed files with 14 additions and 14 deletions

View File

@ -82,13 +82,13 @@ class qbehaviour_deferredcbm extends qbehaviour_deferredfeedback {
}
}
protected function is_same_response($pendingstep) {
protected function is_same_response(question_attempt_step $pendingstep) {
return parent::is_same_response($pendingstep) &&
$this->qa->get_last_behaviour_var('certainty') ==
$pendingstep->get_behaviour_var('certainty');
}
protected function is_complete_response($pendingstep) {
protected function is_complete_response(question_attempt_step $pendingstep) {
return parent::is_complete_response($pendingstep) &&
$pendingstep->has_behaviour_var('certainty');
}

View File

@ -80,13 +80,13 @@ class qbehaviour_immediatecbm extends qbehaviour_immediatefeedback {
}
}
protected function is_same_response($pendingstep) {
protected function is_same_response(question_attempt_step $pendingstep) {
return parent::is_same_response($pendingstep) &&
$this->qa->get_last_behaviour_var('certainty') ==
$pendingstep->get_behaviour_var('certainty');
}
protected function is_complete_response($pendingstep) {
protected function is_complete_response(question_attempt_step $pendingstep) {
return parent::is_complete_response($pendingstep) &&
$pendingstep->has_behaviour_var('certainty');
}

View File

@ -324,7 +324,7 @@ abstract class question_bank {
self::$testdata[$question->id] = $question;
}
protected function ensure_fraction_options_initialised() {
protected static function ensure_fraction_options_initialised() {
if (!is_null(self::$fractionoptions)) {
return;
}

View File

@ -1277,10 +1277,10 @@ class question_attempt_with_restricted_history extends question_attempt {
protected function add_step(question_attempt_step $step) {
coding_exception('Cannot modify a question_attempt_with_restricted_history.');
}
public function process_action($submitteddata, $timestamp = null, $userid = null) {
public function process_action($submitteddata, $timestamp = null, $userid = null, $existingstepid = null) {
coding_exception('Cannot modify a question_attempt_with_restricted_history.');
}
public function start($preferredbehaviour, $variant, $submitteddata = array(), $timestamp = null, $userid = null) {
public function start($preferredbehaviour, $variant, $submitteddata = array(), $timestamp = null, $userid = null, $existingstepid = null) {
coding_exception('Cannot modify a question_attempt_with_restricted_history.');
}

View File

@ -162,8 +162,8 @@ class qtype_calculated_edit_form extends qtype_numerical_edit_form {
return $question;
}
protected function data_preprocessing_answers($question) {
$question = parent::data_preprocessing_answers($question);
protected function data_preprocessing_answers($question, $withanswerfiles = false) {
$question = parent::data_preprocessing_answers($question, $withanswerfiles);
if (empty($question->options->answers)) {
return $question;
}

View File

@ -194,8 +194,8 @@ class qtype_calculatedmulti_edit_form extends question_edit_form {
return $question;
}
protected function data_preprocessing_answers($question) {
$question = parent::data_preprocessing_answers($question);
protected function data_preprocessing_answers($question, $withanswerfiles = false) {
$question = parent::data_preprocessing_answers($question, $withanswerfiles);
if (empty($question->options->answers)) {
return $question;
}

View File

@ -190,7 +190,7 @@ class qtype_multianswer extends question_type {
parent::delete_question($questionid, $contextid);
}
protected function initialise_question_instance($question, $questiondata) {
protected function initialise_question_instance(question_definition $question, $questiondata) {
parent::initialise_question_instance($question, $questiondata);
$bits = preg_split('/\{#(\d+)\}/', $question->questiontext,

View File

@ -174,8 +174,8 @@ class qtype_numerical_edit_form extends question_edit_form {
return $question;
}
protected function data_preprocessing_answers($question) {
$question = parent::data_preprocessing_answers($question);
protected function data_preprocessing_answers($question, $withanswerfiles = false) {
$question = parent::data_preprocessing_answers($question, $withanswerfiles);
if (empty($question->options->answers)) {
return $question;
}