This files describes API changes for question type plugins.

=== 2.5 ===

* There have been some tweaks to the helper class that is used to right
  walkthrough tests. You should not have to change your code, but you might
  like to take a look at some of the new helper methods available. In particular,
  if you had any code that did
  $this->process_submission(array('-finish' => 1));
  you should change that to
  $this->finish();


=== 2.3.5 / 2.4.2 / 2.5 ===

* The special value question_attempt::PARAM_CLEANHTML_FILES that could be used
  in the get_expected_data method was renamed to question_attempt::PARAM_RAW_FILES
  in order to fix a bug. We failed to think this throught, and so did not realised
  that this might break some question types. If this affected your question type,
  please accept our apologies. Details in MDL-37847.


=== 2.3 ===

* Support for backwards-compatible string names dropped. MDL-30120. (See under 2.2 below.)
* If you are overriding export_to_xml and import_from_xml to provide Moodle XML format
  import and export, then you will probably get PHP strict syntax notices in developer
  debug mode until you change the method signature to include qformat_xml $format.
  That is, you need to specify the argument type.
* qtype_xxx_pluginfile() is now given the 7th parameter (hopefully the last
  one) that contains additional options for the file serving. The array should
  be re-passed to question_pluginfile() as is.


=== 2.2 ===

* The XML import/export base class has had some minor API changes. The
  - write_combined_feedback method now requires that you pass the questionid and
    contextid. (MDL-29058)
  - calls to the import_hints and import_answer methods now should pass the question
    text format as the last argument, to be used as a default if necessary. (MDL-29739)
  If you do not upgrade your code, it will not break, but there will be PHP
  warnings, and it the export will not work 100% correctly.

* The old
    public function requires_qtypes()
method is no more. Instead use the ->dependencies facility in version.php. E.g.
$plugin->dependencies = array(
    'qtype_numerical' => 2011102700,
);

* The plugin name and related strings used to be defined in language strings
called the same thing as the format, for example:

$string['addingdescription'] = 'Adding a Description';
$string['description'] = 'Description';
$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.
$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.
$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.';
$string['editingdescription'] = 'Editing a Description';

All these need to be changed to use the standard string name pluginname, as for
other plugin types, and similar for the other strings.

$string['pluginname'] = 'Description';
$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.
$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.
$string['pluginnameadding'] = 'Adding a Description';
$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)


=== 2.1 ===

* Lots of API changes due to the new question engine. See
http://docs.moodle.org/dev/Developing_a_Question_Type#Converting_a_Moodle_2.0_question_type


=== 2.0 ===

* Lots of changes due to all the API changes in Moodle 2.0.

* This plugin type now supports cron in the standard way. If required, Create a
  lib.php file containing
function qtype_mypluginname_cron() {};
