mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
MDL-32094 fix question related E_STRICT problems
This commit is contained in:
parent
e7755fc627
commit
072db71c90
@ -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');
|
||||
}
|
||||
|
@ -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');
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.');
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user