Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added new fields to backup/restore

  • Loading branch information...
commit b9aa56891245c6d05eb3675b92fcd9c2b9ddc726 1 parent a06f988
stronk7 authored
Showing with 4 additions and 0 deletions.
  1. +2 −0  mod/exercise/backuplib.php
  2. +2 −0  mod/exercise/restorelib.php
View
2  mod/exercise/backuplib.php
@@ -65,6 +65,8 @@ function exercise_backup_mods($bf,$preferences) {
fwrite ($bf,full_tag("GRADE",4,false,$exercise->grade));
fwrite ($bf,full_tag("GRADINGGRADE",4,false,$exercise->gradinggrade));
fwrite ($bf,full_tag("SHOWLEAGUETABLE",4,false,$exercise->showleaguetable));
+ fwrite ($bf,full_tag("USEPASSWORD",4,false,$exercise->usepassword));
+ fwrite ($bf,full_tag("PASSWORD",4,false,$exercise->password));
//Now we backup exercise elements
$status = backup_exercise_elements($bf,$preferences,$exercise->id);
//Now we backup any teacher submissions (these are an integral part of the exercise)
View
2  mod/exercise/restorelib.php
@@ -68,6 +68,8 @@ function exercise_restore_mods($mod,$restore) {
$exercise->grade = backup_todb($info['MOD']['#']['GRADE']['0']['#']);
$exercise->gradinggrade = backup_todb($info['MOD']['#']['GRADINGGRADE']['0']['#']);
$exercise->showleaguetable = backup_todb($info['MOD']['#']['SHOWLEAGUETABLE']['0']['#']);
+ $exercise->usepassword = backup_todb($info['MOD']['#']['USEPASSWORD']['0']['#']);
+ $exercise->password = backup_todb($info['MOD']['#']['PASSWORD']['0']['#']);
//The structure is equal to the db, so insert the exercise
$newid = insert_record ("exercise",$exercise);
Please sign in to comment.
Something went wrong with that request. Please try again.