Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'MDL-37676_24_STABLE' of git://github.com/appalachiansta…

…te/moodle into MOODLE_24_STABLE
  • Loading branch information...
commit 99a66861b748450f42bb12f3aedc9d109ee547b8 2 parents 0852e56 + 7a257bb
Dan Poltawski authored April 08, 2013

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

  1. 5  backup/moodle2/restore_stepslib.php
5  backup/moodle2/restore_stepslib.php
@@ -150,6 +150,11 @@ protected function process_grade_item($data) {
150 150
         if ($data->itemtype=='manual') {
151 151
             // manual grade items store category id in categoryid
152 152
             $data->categoryid = $this->get_mappingid('grade_category', $data->categoryid, NULL);
  153
+            // if mapping failed put in course's grade category
  154
+            if (NULL == $data->categoryid) {
  155
+                $coursecat = grade_category::fetch_course_category($this->get_courseid());
  156
+                $data->categoryid = $coursecat->id;
  157
+            }
153 158
         } else if ($data->itemtype=='course') {
154 159
             // course grade item stores their category id in iteminstance
155 160
             $coursecat = grade_category::fetch_course_category($this->get_courseid());

0 notes on commit 99a6686

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