From ee4edb506b146fb2b3faadd73dbfce78afd24740 Mon Sep 17 00:00:00 2001 From: M Kassaei Date: Thu, 10 Jan 2019 10:54:50 +0000 Subject: [PATCH] MDL-79863 qtype_ordering: method_exists() not needed anymore in edit_ordering_form.php --- question/type/ordering/edit_ordering_form.php | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/question/type/ordering/edit_ordering_form.php b/question/type/ordering/edit_ordering_form.php index 04a59c7b724..0dc46b35e38 100644 --- a/question/type/ordering/edit_ordering_form.php +++ b/question/type/ordering/edit_ordering_form.php @@ -140,14 +140,10 @@ class qtype_ordering_edit_form extends question_edit_form { $this->adjust_html_editors($mform, $name); // Adding feedback fields (=Combined feedback). - if (method_exists($this, 'add_combined_feedback_fields')) { - $this->add_combined_feedback_fields(false); - } - + $this->add_combined_feedback_fields(false); + // Adding interactive settings (=Multiple tries). - if (method_exists($this, 'add_interactive_settings')) { - $this->add_interactive_settings(false, false); - } + $this->add_interactive_settings(false, false); } /** @@ -292,18 +288,13 @@ class qtype_ordering_edit_form extends question_edit_form { public function data_preprocessing($question) { $question = parent::data_preprocessing($question); - if (method_exists($this, 'data_preprocessing_answers')) { - $question = $this->data_preprocessing_answers($question, true); - } + $question = $this->data_preprocessing_answers($question, true); // Preprocess feedback. - if (method_exists($this, 'data_preprocessing_combined_feedback')) { - $question = $this->data_preprocessing_combined_feedback($question); - } - if (method_exists($this, 'data_preprocessing_hints')) { - $question = $this->data_preprocessing_hints($question, false, false); - } - + $question = $this->data_preprocessing_combined_feedback($question); + + $question = $this->data_preprocessing_hints($question, false, false); + // Preprocess answers and fractions. $question->answer = array(); $question->fraction = array();