Browse Source

Backup/restore consider types of sessions

MOODLE_23_STABLE
Artem Andreev 15 years ago
parent
commit
6747ad01d6
  1. 1
      backuplib.php
  2. 5
      restorelib.php

1
backuplib.php

@ -108,6 +108,7 @@
//Print contents
fwrite ($bf,full_tag('ID',6,false,$item->id));
fwrite ($bf,full_tag('COURSEID',6,false,$item->courseid));
fwrite ($bf,full_tag('GROUPID',6,false,$item->groupid));
fwrite ($bf,full_tag('SESSDATE',6,false,$item->sessdate));
fwrite ($bf,full_tag('DURATION',6,false,$item->duration));
fwrite ($bf,full_tag('TIMEMODIFIED',6,false,$item->timemodified));

5
restorelib.php

@ -67,6 +67,11 @@
//Now, build the attforblock_SESSIONS record structure
$stat->courseid = $restore->course_id;
$stat->groupid = backup_todb($stat_info['#']['GROUPID']['0']['#']);
$group = restore_group_getid($restore, $stat->groupid);
if ($group) {
$stat->groupid = $group->new_id;
}
// $stat->creator = backup_todb($stat_info['#']['CREATOR']['0']['#']);
$stat->sessdate = backup_todb($stat_info['#']['SESSDATE']['0']['#']);
$stat->timemodified = backup_todb($stat_info['#']['TIMEMODIFIED']['0']['#']);

Loading…
Cancel
Save