Skip to content

Commit

Permalink
Merge branch 'wip-mdl-33455' of git://github.com/rajeshtaneja/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Aparup Banerjee committed Jun 5, 2012
2 parents c770311 + a1a2cc5 commit 2330cf7
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions backup/moodle2/restore_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,18 @@ protected function process_grade_grade($data) {
$data->itemid = $this->get_new_parentid('grade_item');

$data->userid = $this->get_mappingid('user', $data->userid, NULL);
$data->usermodified = $this->get_mappingid('user', $data->usermodified, NULL);
$data->locktime = $this->apply_date_offset($data->locktime);
// TODO: Ask, all the rest of locktime/exported... work with time... to be rolled?
$data->overridden = $this->apply_date_offset($data->overridden);
$data->timecreated = $this->apply_date_offset($data->timecreated);
$data->timemodified = $this->apply_date_offset($data->timemodified);

$newitemid = $DB->insert_record('grade_grades', $data);
//$this->set_mapping('grade_grade', $oldid, $newitemid);
if (!is_null($data->userid)) {
$data->usermodified = $this->get_mappingid('user', $data->usermodified, NULL);
$data->locktime = $this->apply_date_offset($data->locktime);
// TODO: Ask, all the rest of locktime/exported... work with time... to be rolled?
$data->overridden = $this->apply_date_offset($data->overridden);
$data->timecreated = $this->apply_date_offset($data->timecreated);
$data->timemodified = $this->apply_date_offset($data->timemodified);

$newitemid = $DB->insert_record('grade_grades', $data);
} else {
debugging("Mapped user id not found for grade item id '{$data->itemid}'");
}
}
protected function process_grade_category($data) {
global $DB;
Expand Down

0 comments on commit 2330cf7

Please sign in to comment.