From 072db71c90a880ab60c8eebce41c13cde92f7101 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 18 Mar 2012 18:33:54 +0100 Subject: [PATCH] MDL-32094 fix question related E_STRICT problems --- question/behaviour/deferredcbm/behaviour.php | 4 ++-- question/behaviour/immediatecbm/behaviour.php | 4 ++-- question/engine/bank.php | 2 +- question/engine/questionattempt.php | 4 ++-- question/type/calculated/edit_calculated_form.php | 4 ++-- question/type/calculatedmulti/edit_calculatedmulti_form.php | 4 ++-- question/type/multianswer/questiontype.php | 2 +- question/type/numerical/edit_numerical_form.php | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/question/behaviour/deferredcbm/behaviour.php b/question/behaviour/deferredcbm/behaviour.php index 1c6bcf2e2d1..f1aa74fef76 100644 --- a/question/behaviour/deferredcbm/behaviour.php +++ b/question/behaviour/deferredcbm/behaviour.php @@ -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'); } diff --git a/question/behaviour/immediatecbm/behaviour.php b/question/behaviour/immediatecbm/behaviour.php index a188c2c871a..b8515b241e2 100644 --- a/question/behaviour/immediatecbm/behaviour.php +++ b/question/behaviour/immediatecbm/behaviour.php @@ -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'); } diff --git a/question/engine/bank.php b/question/engine/bank.php index 5a3118b98ee..2864f048af9 100644 --- a/question/engine/bank.php +++ b/question/engine/bank.php @@ -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; } diff --git a/question/engine/questionattempt.php b/question/engine/questionattempt.php index bde5115d062..e0cd71e8dec 100644 --- a/question/engine/questionattempt.php +++ b/question/engine/questionattempt.php @@ -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.'); } diff --git a/question/type/calculated/edit_calculated_form.php b/question/type/calculated/edit_calculated_form.php index 76dc6cd7288..a7af2824803 100644 --- a/question/type/calculated/edit_calculated_form.php +++ b/question/type/calculated/edit_calculated_form.php @@ -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; } diff --git a/question/type/calculatedmulti/edit_calculatedmulti_form.php b/question/type/calculatedmulti/edit_calculatedmulti_form.php index ff2b9864355..0ac528bb33f 100644 --- a/question/type/calculatedmulti/edit_calculatedmulti_form.php +++ b/question/type/calculatedmulti/edit_calculatedmulti_form.php @@ -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; } diff --git a/question/type/multianswer/questiontype.php b/question/type/multianswer/questiontype.php index 3dc969aa496..5196bd5ffa2 100644 --- a/question/type/multianswer/questiontype.php +++ b/question/type/multianswer/questiontype.php @@ -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, diff --git a/question/type/numerical/edit_numerical_form.php b/question/type/numerical/edit_numerical_form.php index 2775ef0b8d5..24ec05c440f 100644 --- a/question/type/numerical/edit_numerical_form.php +++ b/question/type/numerical/edit_numerical_form.php @@ -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; }