See Release Notes
Long Term Support Release
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: | 187 lines (7 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
moodle1_workshopform_rubric_handler:: (8 methods):
on_elements_start()
process_legacy_element()
process_legacy_rubric()
on_elements_end()
convert_legacy_criterion_elements()
convert_legacy_rubric_elements()
workshopform_rubric_upgrade_rubric_level()
workshopform_rubric_upgrade_weight()
Class: moodle1_workshopform_rubric_handler - X-Ref
Conversion handler for the rubric grading strategy dataon_elements_start() X-Ref |
Prepare to gather legacy elements info for a new workshop instance |
process_legacy_element(array $data, array $raw) X-Ref |
Processes one <ELEMENT> param: array $data legacy element data param: array $raw raw element data |
process_legacy_rubric($data, $raw) X-Ref |
Processes one <RUBRIC> |
on_elements_end() X-Ref |
Processes gathered elements and rubrics |
convert_legacy_criterion_elements() X-Ref |
Processes gathered elements coming from the legacy criterion strategy Legacy criterion strategy is converted to a rubric with single rubric item and the layout set to 'list'. |
convert_legacy_rubric_elements() X-Ref |
Processes gathered elements coming from the legacy rubric strategy |
workshopform_rubric_upgrade_rubric_level(stdclass $old, $newdimensionid) X-Ref |
Transforms given record into an object to be saved into workshopform_rubric_levels This is used during Rubric 1.9 -> Rubric 2.0 conversion param: stdClass $old legacy record from joined workshop_elements_old + workshop_rubrics_old param: int $newdimensionid id of the new workshopform_rubric dimension record to be linked to return: stdclass to be saved in workshopform_rubric_levels |
workshopform_rubric_upgrade_weight($oldweight) X-Ref |
Given old workshop element weight, returns the weight multiplier Negative weights are not supported any more and are replaced with weight = 0. Legacy workshop did not store the raw weight but the index in the array of weights (see $WORKSHOP_EWEIGHTS in workshop 1.x). workshop 2.0 uses integer weights only (0-16) so all previous weights are multiplied by 4. param: $oldweight index in legacy $WORKSHOP_EWEIGHTS return: int new weight |