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-37078-m24' of git://github.com/sammarshallou/moodle…

… into MOODLE_24_STABLE
  • Loading branch information...
commit 503325ddcb833bd5890fa14e99ef42c0b2e2e06e 2 parents 41575c5 + 9789d82
Dan Poltawski danpoltawski authored
6 backup/moodle2/restore_stepslib.php
@@ -1268,11 +1268,11 @@ public function after_restore() {
1268 1268 $sectionid = $this->get_task()->get_sectionid();
1269 1269
1270 1270 // Get data object for current section availability (if any).
1271   - $data = $DB->get_record('course_sections_availability',
1272   - array('coursesectionid' => $sectionid), 'id, sourcecmid, gradeitemid', IGNORE_MISSING);
  1271 + $records = $DB->get_records('course_sections_availability',
  1272 + array('coursesectionid' => $sectionid), 'id, sourcecmid, gradeitemid');
1273 1273
1274 1274 // If it exists, update mappings.
1275   - if ($data) {
  1275 + foreach ($records as $data) {
1276 1276 // Only update mappings for entries which are created by this restore.
1277 1277 // Otherwise, when you restore to an existing course, it will mess up
1278 1278 // existing section availability entries.
2  lib/conditionlib.php
@@ -942,7 +942,7 @@ public function is_available(&$information, $grabthelot=false, $userid=0, $modin
942 942 if (empty($modinfo->cms[$cmid])) {
943 943 global $PAGE;
944 944 if (isset($PAGE) && strpos($PAGE->pagetype, 'course-view-')===0) {
945   - debugging("Warning: activity {$this->cm->id} '{$this->cm->name}' has condition " .
  945 + debugging("Warning: activity {$this->item->id} '{$this->item->name}' has condition " .
946 946 "on deleted activity $cmid (to get rid of this message, edit the named activity)");
947 947 }
948 948 continue;

0 comments on commit 503325d

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