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

Go to the source code of this file.

Namespaces

namespace  workshopform

Functions

 workshopform_accumulative_upgrade_legacy ()
 workshopform_accumulative_upgrade_element (stdclass $old, array $newscaleids, $newworkshopid)
 workshopform_accumulative_upgrade_grade (stdclass $old, $newassessmentid, stdclass $newdimensioninfo)
 workshopform_accumulative_upgrade_legacy_needed ()
 workshopform_accumulative_upgrade_scales ()

Function Documentation

workshopform_accumulative_upgrade_element ( stdclass $  old,
array newscaleids,
newworkshopid 
)

Transforms a given record from workshop_elements_old into an object to be saved into workshopform_accumulative

Parameters:
stdClass$oldlegacy record from workshop_elements_old
array$newscaleidsmapping from old scale types into new standard ones
int$newworkshopidid of the new workshop instance that replaced the previous one
Returns:
stdclass to be saved in workshopform_accumulative

Definition at line 101 of file upgradelib.php.

Here is the caller graph for this function:

workshopform_accumulative_upgrade_grade ( stdclass $  old,
newassessmentid,
stdclass $  newdimensioninfo 
)

Transforms given grade record

Parameters:
stdClass$old
int$newassessmentid
stdClass$newdimensioninfo
Returns:
stdclass

Definition at line 144 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:

Check if the the migration from legacy workshop 1.9 is needed

Returns:
bool

Definition at line 166 of file upgradelib.php.

Here is the caller graph for this function:

Creates new standard (global) scales to replace the legacy workshop ones

In workshop 1.x, scale field in workshop_elements had the following meaning: 0 | 2 point Yes/No scale 1 | 2 point Present/Absent scale 2 | 2 point Correct/Incorrect scale 3 | 3 point Good/Poor scale 4 | 4 point Excellent/Very Poor scale 5 | 5 point Excellent/Very Poor scale 6 | 7 point Excellent/Very Poor scale 7 | Score out of 10 8 | Score out of 20 9 | Score out of 100

Returns:
array (int)oldscale => (int)newscaleid

Definition at line 193 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations