Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

New fields in version 2004092700.

  • Loading branch information...
commit 3903e0729b6f2ef145118d17a0ec82df0acc1e12 1 parent ac87e23
rkingdon authored
Showing with 8 additions and 0 deletions.
  1. +4 −0 mod/workshop/backuplib.php
  2. +4 −0 mod/workshop/restorelib.php
View
4 mod/workshop/backuplib.php
@@ -53,6 +53,7 @@ function workshop_backup_mods($bf,$preferences) {
fwrite ($bf,full_tag("MODTYPE",4,false,"workshop"));
fwrite ($bf,full_tag("NAME",4,false,$workshop->name));
fwrite ($bf,full_tag("DESCRIPTION",4,false,$workshop->description));
+ fwrite ($bf,full_tag("WTYPE",4,false,$workshop->wtype));
fwrite ($bf,full_tag("NELEMENTS",4,false,$workshop->nelements));
fwrite ($bf,full_tag("NATTACHMENTS",4,false,$workshop->nattachments));
fwrite ($bf,full_tag("PHASE",4,false,$workshop->phase));
@@ -74,6 +75,8 @@ function workshop_backup_mods($bf,$preferences) {
fwrite ($bf,full_tag("TIMEMODIFIED",4,false,$workshop->timemodified));
fwrite ($bf,full_tag("TEACHERWEIGHT",4,false,$workshop->teacherweight));
fwrite ($bf,full_tag("SHOWLEAGUETABLE",4,false,$workshop->showleaguetable));
+ fwrite ($bf,full_tag("USEPASSWORD",4,false,$workshop->usepassword));
+ fwrite ($bf,full_tag("PASSWORD",4,false,$workshop->password));
//Now we backup workshop elements
$status = backup_workshop_elements($bf,$preferences,$workshop->id);
//if we've selected to backup users info, then execute backup_workshop_submisions
@@ -186,6 +189,7 @@ function backup_workshop_submissions ($bf,$preferences,$workshop) {
fwrite ($bf,full_tag("RELIABILITYGRADE",6,false,$wor_sub->reliabilitygrade));
fwrite ($bf,full_tag("GRADINGGRADE",6,false,$wor_sub->gradinggrade));
fwrite ($bf,full_tag("FINALGRADE",6,false,$wor_sub->finalgrade));
+ fwrite ($bf,full_tag("LATE",6,false,$wor_sub->late));
//Now we backup workshop assessments
$status = backup_workshop_assessments($bf,$preferences,$workshop,$wor_sub->id);
//End submission
View
4 mod/workshop/restorelib.php
@@ -56,6 +56,7 @@ function workshop_restore_mods($mod,$restore) {
$workshop->course = $restore->course_id;
$workshop->name = backup_todb($info['MOD']['#']['NAME']['0']['#']);
$workshop->description = backup_todb($info['MOD']['#']['DESCRIPTION']['0']['#']);
+ $workshop->wtype = backup_todb($info['MOD']['#']['WTYPE']['0']['#']);
$workshop->nelements = backup_todb($info['MOD']['#']['NELEMENTS']['0']['#']);
$workshop->nattachments = backup_todb($info['MOD']['#']['NATTACHMENTS']['0']['#']);
$workshop->phase = backup_todb($info['MOD']['#']['PHASE']['0']['#']);
@@ -77,6 +78,8 @@ function workshop_restore_mods($mod,$restore) {
$workshop->timemodified = backup_todb($info['MOD']['#']['TIMEMODIFIED']['0']['#']);
$workshop->teacherweight = backup_todb($info['MOD']['#']['TEACHERWEIGHT']['0']['#']);
$workshop->showleaguetable = backup_todb($info['MOD']['#']['SHOWLEAGUETABLE']['0']['#']);
+ $workshop->usepassword = backup_todb($info['MOD']['#']['USEPASSWORD']['0']['#']);
+ $workshop->password = backup_todb($info['MOD']['#']['PASSWORD']['0']['#']);
//The structure is equal to the db, so insert the workshop
$newid = insert_record ("workshop",$workshop);
@@ -238,6 +241,7 @@ function workshop_submissions_restore_mods($old_workshop_id, $new_workshop_id,$i
$submission->reliabilitygrade = backup_todb($sub_info['#']['RELIABILITYGRADE']['0']['#']);
$submission->gradinggrade = backup_todb($sub_info['#']['GRADINGGRADE']['0']['#']);
$submission->finalgrade = backup_todb($sub_info['#']['FINALGRADE']['0']['#']);
+ $submission->late = backup_todb($sub_info['#']['LATE']['0']['#']);
//We have to recode the userid field
$user = backup_getid($restore->backup_unique_code,"user",$olduserid);
Please sign in to comment.
Something went wrong with that request. Please try again.