Permalink
Browse files

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

…te/moodle into MOODLE_23_STABLE
  • Loading branch information...
2 parents 7dc5965 + 2e83fee commit c2217f57d0000e2d131b799f15397a94bc19dd3e @danpoltawski danpoltawski committed Apr 8, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 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 c2217f5

Please sign in to comment.