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

Go to the source code of this file.

Namespaces

namespace  mod
 

Local Library of functions for module scorm.


Functions

 workshop_upgrade_prepare_20_tables ()
 workshop_upgrade_module_instances ()
 workshop_upgrade_transform_instance (stdClass $old)
 workshop_upgrade_submissions ()
 workshop_upgrade_transform_submission (stdClass $old, $newworkshopid, array $legacyteachers)
 workshop_upgrade_submission_id_mappings ()
 workshop_upgrade_legacy_teacher_weights ()
 workshop_upgrade_assessments ()
 workshop_upgrade_transform_assessment (stdClass $old, $newsubmissionid, array $legacyteachers, $legacyteacherweight, $ofexample)
 workshop_upgrade_assessment_id_mappings ()
 workshop_upgrade_element_id_mappings ($strategy)

Function Documentation

Returns the list of new assessment ids

Returns:
array (int)oldid => (int)newid

Definition at line 425 of file upgradelib.php.

Here is the caller graph for this function:

Copies all assessments from workshop_assessments_old to workshop_assessments. Can be called after all submissions were migrated.

Returns:
void

Definition at line 333 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the list of new element (dimension) ids

Parameters:
string$strategythe name of strategy subplugin that the element was migrated into
Returns:
array (int)workshopid => array (int)elementno => stdclass ->(int)newid {->(string)type} {->(int)maxscore}

Definition at line 444 of file upgradelib.php.

Here is the caller graph for this function:

Returns the list of teacherweight values as were set in legacy workshop instances

Returns:
array (int)oldid => (int)teacherweight

Definition at line 312 of file upgradelib.php.

Here is the caller graph for this function:

Copies the records from workshop_old into workshop table

Returns:
void

Definition at line 152 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Prepares the inital workshop 2.0 core tables

Definition at line 30 of file upgradelib.php.

Here is the caller graph for this function:

Returns the list of new submission instances ids

Returns:
array (int)oldid => (int)newid

Definition at line 294 of file upgradelib.php.

Here is the caller graph for this function:

Copies records from workshop_submissions_old into workshop_submissions. Can be called after all workshop module instances were correctly migrated and new ids are filled in workshop_old

Returns:
void

Definition at line 233 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

workshop_upgrade_transform_assessment ( stdClass $  old,
newsubmissionid,
array legacyteachers,
legacyteacherweight,
ofexample 
)

Given a record from workshop_assessments_old, returns record to be stored in workshop_assessment

Parameters:
stdClass$oldrecord from workshop_assessments_old,
int$newsubmissionidnew submission id
array$legacyteachers(int)userid => notused the list of legacy workshop teachers for the submission's workshop
int$legacyteacherweightweight of teacher's assessment in legacy workshop
bool$ofexampleis this the assessment of an example submission?
Returns:
stdClass

Definition at line 374 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Given a record containing data from 1.9 workshop table, returns object containing data as should be saved in 2.0 workshop table

Parameters:
stdClass$oldrecord from 1.9 workshop table
Returns:
stdClass

Definition at line 176 of file upgradelib.php.

Here is the caller graph for this function:

workshop_upgrade_transform_submission ( stdClass $  old,
newworkshopid,
array legacyteachers 
)

Given a record from 1.x workshop_submissions_old, returns data for 2.0 workshop_submissions

Parameters:
stdClass$old
int$newworkshopidnew workshop id
array$legacyteachers$userid => notused the list of legacy workshop teachers for the submission's workshop
Returns:
stdClass

Definition at line 264 of file upgradelib.php.

Here is the caller graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations