Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/workshop/form/rubric/db/upgradelib.php File Reference

Go to the source code of this file.

Namespaces

namespace  workshopform

Functions

 workshopform_rubric_upgrade_legacy ()
 workshopform_rubric_upgrade_legacy_criterion ()
 workshopform_rubric_upgrade_legacy_rubric ()
 workshopform_rubric_upgrade_criterion_level (stdclass $old, $newdimensionid)
 workshopform_rubric_upgrade_rubric_level (stdclass $old, $newdimensionid)
 workshopform_rubric_upgrade_legacy_needed ()
 workshopform_rubric_upgrade_weight ($oldweight)

Function Documentation

workshopform_rubric_upgrade_criterion_level ( stdclass $  old,
newdimensionid 
)

Transforms given record from workshop_elements_old into an object to be saved into workshopform_rubric_levels

This is used during Criterion 1.9 -> Rubric 2.0 conversion

Parameters:
stdClass$oldlegacy record from workshop_elements_old
int$newdimensionidid of the new workshopform_rubric dimension record to be linked to
Returns:
stdclass to be saved in workshopform_rubric_levels

Definition at line 239 of file upgradelib.php.

Here is the caller graph for this function:

Check if there are some legacy workshop 1.x data to be migrated and upgrade them

This must be called after workshop core migration has finished so that all assessments are already upgraded and tables are correctly renamed.

Definition at line 33 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Upgrades legacy workshops using criterion grading strategy

Definition at line 45 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Check if the the migration from legacy workshop 1.9 is needed

Returns:
bool

Definition at line 271 of file upgradelib.php.

Here is the caller graph for this function:

Upgrades legacy workshops using rubric grading strategy

Definition at line 131 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

workshopform_rubric_upgrade_rubric_level ( stdclass $  old,
newdimensionid 
)

Transforms given record into an object to be saved into workshopform_rubric_levels

This is used during Rubric 1.9 -> Rubric 2.0 conversion

Parameters:
stdClass$oldlegacy record from joined workshop_elements_old + workshop_rubrics_old
int$newdimensionidid of the new workshopform_rubric dimension record to be linked to
Returns:
stdclass to be saved in workshopform_rubric_levels

Definition at line 257 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters:
$oldweightindex in legacy $WORKSHOP_EWEIGHTS
Returns:
int new weight

Definition at line 292 of file upgradelib.php.

Here is the caller graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations