Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-26399 restore - fix oracle/mssql problems

  • Loading branch information...
commit d84fe4c8a6db79adf8fd0f0523cfed8714772b9a 1 parent d911c72
Eloy Lafuente (stronk7) stronk7 authored

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. +6 6 backup/moodle2/restore_stepslib.php
12 backup/moodle2/restore_stepslib.php
@@ -660,8 +660,8 @@ public function process_group($data) {
660 660 $params = array('courseid' => $this->get_courseid(), 'grname' => $data->name);
661 661 if (!empty($data->description)) {
662 662 $description_clause = ' AND ' .
663   - $DB->sql_compare_text('description') . ' = ' . $DB->sql_compare_text(':desc');
664   - $params['desc'] = $data->description;
  663 + $DB->sql_compare_text('description') . ' = ' . $DB->sql_compare_text(':description');
  664 + $params['description'] = $data->description;
665 665 }
666 666 if (!$groupdb = $DB->get_record_sql("SELECT *
667 667 FROM {groups}
@@ -708,8 +708,8 @@ public function process_grouping($data) {
708 708 $params = array('courseid' => $this->get_courseid(), 'grname' => $data->name);
709 709 if (!empty($data->description)) {
710 710 $description_clause = ' AND ' .
711   - $DB->sql_compare_text('description') . ' = ' . $DB->sql_compare_text(':desc');
712   - $params['desc'] = $data->description;
  711 + $DB->sql_compare_text('description') . ' = ' . $DB->sql_compare_text(':description');
  712 + $params['description'] = $data->description;
713 713 }
714 714 if (!$groupingdb = $DB->get_record_sql("SELECT *
715 715 FROM {groupings}
@@ -1786,7 +1786,7 @@ protected function process_grade_item($data) {
1786 1786 $data->timecreated = $this->apply_date_offset($data->timecreated);
1787 1787 $data->timemodified = $this->apply_date_offset($data->timemodified);
1788 1788
1789   - $gradeitem = new grade_item($data);
  1789 + $gradeitem = new grade_item($data, false);
1790 1790 $gradeitem->insert('restore');
1791 1791
1792 1792 //sortorder is automatically assigned when inserting. Re-instate the previous sortorder
@@ -1809,7 +1809,7 @@ protected function process_grade_grade($data) {
1809 1809 // TODO: Ask, all the rest of locktime/exported... work with time... to be rolled?
1810 1810 $data->overridden = $this->apply_date_offset($data->overridden);
1811 1811
1812   - $grade = new grade_grade($data);
  1812 + $grade = new grade_grade($data, false);
1813 1813 $grade->insert('restore');
1814 1814 // no need to save any grade_grade mapping
1815 1815 }

0 comments on commit d84fe4c

Please sign in to comment.
Something went wrong with that request. Please try again.