diff --git a/question/type/questiontypebase.php b/question/type/questiontypebase.php index 5e76deb5fdb..ba8858dea47 100644 --- a/question/type/questiontypebase.php +++ b/question/type/questiontypebase.php @@ -165,7 +165,7 @@ class question_type { * If you use extra_question_fields, overload this function to return question id field name * in case you table use another name for this column */ - protected function questionid_column_name() { + public function questionid_column_name() { return 'questionid'; } @@ -176,7 +176,7 @@ class question_type { * * @return mixed array as above, or null to tell the base class to do nothing. */ - protected function extra_answer_fields() { + public function extra_answer_fields() { return null; } diff --git a/question/type/shortanswer/questiontype.php b/question/type/shortanswer/questiontype.php index b43e3ee59c6..ff9df64f763 100644 --- a/question/type/shortanswer/questiontype.php +++ b/question/type/shortanswer/questiontype.php @@ -42,7 +42,7 @@ class qtype_shortanswer extends question_type { return array('question_shortanswer', 'answers', 'usecase'); } - protected function questionid_column_name() { + public function questionid_column_name() { return 'question'; } diff --git a/question/type/upgrade.txt b/question/type/upgrade.txt index aaf22130601..acaacd322a1 100644 --- a/question/type/upgrade.txt +++ b/question/type/upgrade.txt @@ -38,3 +38,8 @@ $string['pluginnameediting'] = 'Editing a Description'; $string['pluginnamesummary'] = 'This is not actually a question. Instead it is a way to add some instructions, rubric or other content to the activity. This is similar to the way that labels can be used to add content to the course page.'; The old strings will continue to work, but only until Moodle 2.3 is released. + +* If you are using the facilities provided by overriding the extra_answer_fields + or questionid_column_name methods, then you must change these to be public + methods. (This is required so that backup and restore can be made to work + automatically. MDL-24408, MDL-25617, MDL-30562)