mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-37078-master' of git://github.com/sammarshallou/moodle
This commit is contained in:
commit
06ae410844
2 changed files with 4 additions and 4 deletions
|
@ -1268,11 +1268,11 @@ class restore_section_structure_step extends restore_structure_step {
|
||||||
$sectionid = $this->get_task()->get_sectionid();
|
$sectionid = $this->get_task()->get_sectionid();
|
||||||
|
|
||||||
// Get data object for current section availability (if any).
|
// Get data object for current section availability (if any).
|
||||||
$data = $DB->get_record('course_sections_availability',
|
$records = $DB->get_records('course_sections_availability',
|
||||||
array('coursesectionid' => $sectionid), 'id, sourcecmid, gradeitemid', IGNORE_MISSING);
|
array('coursesectionid' => $sectionid), 'id, sourcecmid, gradeitemid');
|
||||||
|
|
||||||
// If it exists, update mappings.
|
// If it exists, update mappings.
|
||||||
if ($data) {
|
foreach ($records as $data) {
|
||||||
// Only update mappings for entries which are created by this restore.
|
// Only update mappings for entries which are created by this restore.
|
||||||
// Otherwise, when you restore to an existing course, it will mess up
|
// Otherwise, when you restore to an existing course, it will mess up
|
||||||
// existing section availability entries.
|
// existing section availability entries.
|
||||||
|
|
|
@ -942,7 +942,7 @@ abstract class condition_info_base {
|
||||||
if (empty($modinfo->cms[$cmid])) {
|
if (empty($modinfo->cms[$cmid])) {
|
||||||
global $PAGE;
|
global $PAGE;
|
||||||
if (isset($PAGE) && strpos($PAGE->pagetype, 'course-view-')===0) {
|
if (isset($PAGE) && strpos($PAGE->pagetype, 'course-view-')===0) {
|
||||||
debugging("Warning: activity {$this->cm->id} '{$this->cm->name}' has condition " .
|
debugging("Warning: activity {$this->item->id} '{$this->item->name}' has condition " .
|
||||||
"on deleted activity $cmid (to get rid of this message, edit the named activity)");
|
"on deleted activity $cmid (to get rid of this message, edit the named activity)");
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue