Permalink
Browse files

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

…te/moodle into MOODLE_24_STABLE
  • Loading branch information...
2 parents 0852e56 + 7a257bb commit 99a66861b748450f42bb12f3aedc9d109ee547b8 @danpoltawski danpoltawski committed Apr 8, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 backup/moodle2/restore_stepslib.php
View
5 backup/moodle2/restore_stepslib.php
@@ -150,6 +150,11 @@ protected function process_grade_item($data) {
if ($data->itemtype=='manual') {
// manual grade items store category id in categoryid
$data->categoryid = $this->get_mappingid('grade_category', $data->categoryid, NULL);
+ // if mapping failed put in course's grade category
+ if (NULL == $data->categoryid) {
+ $coursecat = grade_category::fetch_course_category($this->get_courseid());
+ $data->categoryid = $coursecat->id;
+ }
} else if ($data->itemtype=='course') {
// course grade item stores their category id in iteminstance
$coursecat = grade_category::fetch_course_category($this->get_courseid());

0 comments on commit 99a6686

Please sign in to comment.