Merge branch 'MDL-31432_messaging_popup' of git://github.com/andyjdavis/moodle
[moodle.git] / question / type / upgrade.txt
blob056112ef972cc05ff91deb0ad724d7f74d05b97b
1 This files describes API changes for question type plugins.
3 === 2.0 ===
5 * Lots of changes due to all the API changes in Moodle 2.0.
7 * This plugin type now supports cron in the standard way. If required, Create a
8   lib.php file containing
9 function qtype_mypluginname_cron() {};
12 === 2.1 ===
14 * Lots of API changes due to the new question engine. See
15 http://docs.moodle.org/dev/Developing_a_Question_Type#Converting_a_Moodle_2.0_question_type
18 === 2.2 ===
20 * The XML import/export base class has had some minor API changes. The
21   - write_combined_feedback method now requires that you pass the questionid and
22     contextid. (MDL-29058)
23   - calls to the import_hints and import_answer methods now should pass the question
24     text format as the last argument, to be used as a default if necessary. (MDL-29739)
25   If you do not upgrade your code, it will not break, but there will be PHP
26   warnings, and it the export will not work 100% correctly.
28 * The old
29     public function requires_qtypes()
30 method is no more. Instead use the ->dependencies facility in version.php. E.g.
31 $plugin->dependencies = array(
32     'qtype_numerical' => 2011102700,
35 * The plugin name and related strings used to be defined in language strings
36 called the same thing as the format, for example:
38 $string['addingdescription'] = 'Adding a Description';
39 $string['description'] = 'Description';
40 $string['description_help'] = 'A description is not really a question type. It simply enables text to be displayed without requiring any answers, similar to a label on the course page.
41 $string['description_link'] = 'A description is not really a question type. It simply enables text to be displayed without requiring any answers, similar to a label on the course page.
42 $string['descriptionsummary'] = '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.';
43 $string['editingdescription'] = 'Editing a Description';
45 All these need to be changed to use the standard string name pluginname, as for
46 other plugin types, and similar for the other strings.
48 $string['pluginname'] = 'Description';
49 $string['pluginname_help'] = 'A description is not really a question type. It simply enables text to be displayed without requiring any answers, similar to a label on the course page.
50 $string['pluginname_link'] = 'A description is not really a question type. It simply enables text to be displayed without requiring any answers, similar to a label on the course page.
51 $string['pluginnameadding'] = 'Adding a Description';
52 $string['pluginnameediting'] = 'Editing a Description';
53 $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.';
55 The old strings will continue to work, but only until Moodle 2.3 is released.
57 * If you are using the facilities provided by overriding the extra_answer_fields
58   or questionid_column_name methods, then you must change these to be public
59   methods. (This is required so that backup and restore can be made to work
60   automatically. MDL-24408, MDL-25617, MDL-30562)
62 === 2.3 ===
64 * Support for backwards-compatible string names dropped. MDL-30120. (See under 2.2 above.)