MDL-47494 gapselect: Add lots of missing public/protected/private.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Wed, 23 Mar 2011 16:22:25 +0000 (16:22 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Wed, 23 Mar 2011 16:22:25 +0000 (16:22 +0000)
question/type/gapselect/backup/moodle2/restore_qtype_gapselect_plugin.class.php
question/type/gapselect/edit_form_base.php
question/type/gapselect/edit_gapselect_form.php
question/type/gapselect/questiontype.php
question/type/gapselect/questiontypebase.php

index 34dbf81..4adaa9c 100755 (executable)
@@ -124,7 +124,7 @@ class restore_qtype_gapselect_plugin extends restore_qtype_plugin {
     /**
      * Return the contents of this qtype to be processed by the links decoder
      */
-    static public function define_decode_contents() {
+    public static function define_decode_contents() {
 
         $contents = array();
 
index 21d5afe..be88241 100755 (executable)
@@ -92,7 +92,7 @@ class qtype_gapselect_edit_form_base extends question_edit_form {
      * definition_inner adds all specific fields to the form.
      * @param object $mform (the form being built).
      */
-    function definition_inner($mform) {
+    protected function definition_inner($mform) {
         global $CFG;
 
         //add the answer (choice) fields to the form
@@ -242,7 +242,7 @@ class qtype_gapselect_edit_form_base extends question_edit_form {
         return false;
     }
 
-    function qtype() {
+    public function qtype() {
         return '';
     }
 }
\ No newline at end of file
index 4c57e27..e8274a6 100755 (executable)
@@ -40,7 +40,7 @@ class qtype_gapselect_edit_form extends qtype_gapselect_edit_form_base {
     // HTML tags allowed in answers (choices).
     protected $allowedhtmltags = array();
 
-    function qtype() {
+    public function qtype() {
         return 'gapselect';
     }
 }
index 8bc86c6..1bb69fa 100755 (executable)
@@ -57,7 +57,7 @@ class qtype_gapselect extends qtype_gapselect_base {
         return 'selectgroup';
     }
 
-    function import_from_xml($data, $question, $format, $extra=null) {
+    public function import_from_xml($data, $question, $format, $extra=null) {
         if (!isset($data['@']['type']) || $data['@']['type'] != 'gapselect') {
             return false;
         }
@@ -98,7 +98,7 @@ class qtype_gapselect extends qtype_gapselect_base {
         return $question;
     }
 
-    function export_to_xml($question, $format, $extra = null) {
+    public function export_to_xml($question, $format, $extra = null) {
         $output = '';
 
         $output .= '    <shuffleanswers>' . $question->options->shuffleanswers . "</shuffleanswers>\n";
index 65662dc..c670923 100755 (executable)
@@ -308,7 +308,7 @@ abstract class qtype_gapselect_base extends question_type {
         return $parts;
     }
 
-    function move_files($questionid, $oldcontextid, $newcontextid) {
+    public function move_files($questionid, $oldcontextid, $newcontextid) {
         parent::move_files($questionid, $oldcontextid, $newcontextid);
 
         $fs = get_file_storage();