Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Provides support for the conversion of moodle1 backup to the moodle2 format

Copyright: 2011 David Mudrak <david@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 131 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

moodle1_workshopform_numerrors_handler:: (4 methods):
  on_elements_start()
  process_legacy_element()
  on_elements_end()
  workshopform_numerrors_upgrade_element()


Class: moodle1_workshopform_numerrors_handler  - X-Ref

Conversion handler for the numerrors grading strategy data

on_elements_start()   X-Ref
New workshop instance is being processed


process_legacy_element(array $data, array $raw)   X-Ref
Converts <ELEMENT> into <workshopform_numerrors_dimension> and stores it for later writing

param: array $data legacy element data
param: array $raw raw element data
return: array to be written to workshop.xml

on_elements_end()   X-Ref
Writes gathered mappings and dimensions


workshopform_numerrors_upgrade_element(stdclass $old, $newworkshopid)   X-Ref
Transforms a given record from workshop_elements_old into an object to be saved into workshopform_numerrors

param: stdClass $old legacy record from workshop_elements_old
param: int $newworkshopid id of the new workshop instance that replaced the previous one
return: stdclass to be saved in workshopform_numerrors