weekly release 2.3dev (on-sync version 22_STABLE)
[moodle.git] / question / type / upgrade.txt
CommitLineData
78fc17eb
TH
1This files describes API changes for question type plugins.
2
3=== 2.2 ===
4
5* The XML import/export base class has had some minor API changes. The
6 - write_combined_feedback method now requires that you pass the questionid and
7 contextid. (MDL-29058)
8 - calls to the import_hints and import_answer methods now should pass the question
9 text format as the last argument, to be used as a default if necessary. (MDL-29739)
10 If you do not upgrade your code, it will not break, but there will be PHP
11 warnings, and it the export will not work 100% correctly.
12
226b3124
TH
13* The old
14 public function requires_qtypes()
15method is no more. Instead use the ->dependencies facility in version.php. E.g.
16$plugin->dependencies = array(
17 'qtype_numerical' => 2011102700,
18);
19
20* The plugin name and related strings used to be defined in language strings
21called the same thing as the format, for example:
22
23$string['addingdescription'] = 'Adding a Description';
24$string['description'] = 'Description';
25$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.
26$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.
27$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.';
28$string['editingdescription'] = 'Editing a Description';
29
30All these need to be changed to use the standard string name pluginname, as for
31other plugin types, and similar for the other strings.
32
33$string['pluginname'] = 'Description';
34$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.
35$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.
36$string['pluginnameadding'] = 'Adding a Description';
37$string['pluginnameediting'] = 'Editing a Description';
38$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.';
39
40The old strings will continue to work, but only until Moodle 2.3 is released.