Merge branch 'wip-MDL-59523-master-fix' of git://github.com/abgreeve/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 2 Aug 2017 02:47:52 +0000 (10:47 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 2 Aug 2017 02:47:52 +0000 (10:47 +0800)
mod/scorm/lib.php
mod/wiki/lib.php
mod/workshop/lib.php

index dc20f0b..620d71e 100644 (file)
@@ -834,6 +834,7 @@ function scorm_reset_userdata($data) {
     // Any changes to the list of dates that needs to be rolled should be same during course restore and course reset.
     // See MDL-9367.
     shift_course_mod_dates('scorm', array('timeopen', 'timeclose'), $data->timeshift, $data->courseid);
+    $status[] = array('component' => $componentstr, 'item' => get_string('datechanged'), 'error' => false);
 
     return $status;
 }
index 0a187a6..1da396e 100644 (file)
@@ -234,6 +234,7 @@ function wiki_reset_userdata($data) {
     // Any changes to the list of dates that needs to be rolled should be same during course restore and course reset.
     // See MDL-9367.
     shift_course_mod_dates('wiki', array('editbegin', 'editend'), $data->timeshift, $data->courseid);
+    $status[] = array('component' => $componentstr, 'item' => get_string('datechanged'), 'error' => false);
 
     return $status;
 }
index 63cd369..ba47324 100644 (file)
@@ -1894,25 +1894,27 @@ function workshop_reset_userdata(stdClass $data) {
     // See MDL-9367.
     shift_course_mod_dates('workshop', array('submissionstart', 'submissionend', 'assessmentstart', 'assessmentend'),
         $data->timeshift, $data->courseid);
+    $status = array();
+    $status[] = array('component' => get_string('modulenameplural', 'workshop'), 'item' => get_string('datechanged'),
+        'error' => false);
 
     if (empty($data->reset_workshop_submissions)
             and empty($data->reset_workshop_assessments)
             and empty($data->reset_workshop_phase) ) {
         // Nothing to do here.
-        return array();
+        return $status;
     }
 
     $workshoprecords = $DB->get_records('workshop', array('course' => $data->courseid));
 
     if (empty($workshoprecords)) {
         // What a boring course - no workshops here!
-        return array();
+        return $status;
     }
 
     require_once($CFG->dirroot . '/mod/workshop/locallib.php');
 
     $course = $DB->get_record('course', array('id' => $data->courseid), '*', MUST_EXIST);
-    $status = array();
 
     foreach ($workshoprecords as $workshoprecord) {
         $cm = get_coursemodule_from_instance('workshop', $workshoprecord->id, $course->id, false, MUST_EXIST);