Skip to content

Commit

Permalink
MDL-27395 Improved detection of the course grade_category on restore
Browse files Browse the repository at this point in the history
Note this was applied months ago to 21 and master (MDL-28152),
but due to one miss-interpretation by this integrator (stronk7),
I missed to backport it to 20_STABLE where the problem was
also reproducible.

So, here it is, the fix is trivial, safe and proved to work.
  • Loading branch information
mudrd8mz authored and stronk7 committed Jan 22, 2012
1 parent 2d5dc5f commit 3e26be8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backup/moodle2/restore_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ protected function process_grade_category($data) {
//get the already created course level grade category
$category = new stdclass();
$category->courseid = $this->get_courseid();
$category->parent = null;

$coursecategory = $DB->get_record('grade_categories', (array)$category);
if (!empty($coursecategory)) {
Expand Down

0 comments on commit 3e26be8

Please sign in to comment.