MDL-23479 backup - now restoring workshop logs, thanks David for support!
authorEloy Lafuente <stronk7@moodle.org>
Fri, 12 Nov 2010 16:15:26 +0000 (16:15 +0000)
committerEloy Lafuente <stronk7@moodle.org>
Fri, 12 Nov 2010 16:15:26 +0000 (16:15 +0000)
mod/workshop/backup/moodle2/restore_workshop_activity_task.class.php

index d55b01a..1f942f7 100644 (file)
@@ -89,7 +89,41 @@ class restore_workshop_activity_task extends restore_activity_task {
 
         $rules[] = new restore_log_rule('workshop', 'add', 'view.php?id={course_module}', '{workshop}');
         $rules[] = new restore_log_rule('workshop', 'update', 'view.php?id={course_module}', '{workshop}');
-        $rules[] = new restore_log_rule('workshop', 'view', 'view.php?id={course_module}', '[name]');
+        $rules[] = new restore_log_rule('workshop', 'view', 'view.php?id={course_module}', '{workshop}');
+
+        $rules[] = new restore_log_rule('workshop', 'add assessment',
+                       'assessment.php?asid={workshop_assessment}', '{workshop_submission}');
+        $rules[] = new restore_log_rule('workshop', 'update assessment',
+                       'assessment.php?asid={workshop_assessment}', '{workshop_submission}');
+
+        $rules[] = new restore_log_rule('workshop', 'add reference assessment',
+                       'exassessment.php?asid={workshop_referenceassessment}', '{workshop_examplesubmission}');
+        $rules[] = new restore_log_rule('workshop', 'update reference assessment',
+                       'exassessment.php?asid={workshop_referenceassessment}', '{workshop_examplesubmission}');
+
+        $rules[] = new restore_log_rule('workshop', 'add example assessment',
+                       'exassessment.php?asid={workshop_exampleassessment}', '{workshop_examplesubmission}');
+        $rules[] = new restore_log_rule('workshop', 'update example assessment',
+                       'exassessment.php?asid={workshop_exampleassessment}', '{workshop_examplesubmission}');
+
+        $rules[] = new restore_log_rule('workshop', 'view submission',
+                       'submission.php?cmid={course_module}&id={workshop_submission}', '{workshop_submission}');
+        $rules[] = new restore_log_rule('workshop', 'add submission',
+                       'submission.php?cmid={course_module}&id={workshop_submission}', '{workshop_submission}');
+        $rules[] = new restore_log_rule('workshop', 'update submission',
+                       'submission.php?cmid={course_module}&id={workshop_submission}', '{workshop_submission}');
+
+        $rules[] = new restore_log_rule('workshop', 'view example',
+                       'exsubmission.php?cmid={course_module}&id={workshop_examplesubmission}', '{workshop_examplesubmission}');
+        $rules[] = new restore_log_rule('workshop', 'add example',
+                       'exsubmission.php?cmid={course_module}&id={workshop_examplesubmission}', '{workshop_examplesubmission}');
+        $rules[] = new restore_log_rule('workshop', 'update example',
+                       'exsubmission.php?cmid={course_module}&id={workshop_examplesubmission}', '{workshop_examplesubmission}');
+
+        $rules[] = new restore_log_rule('workshop', 'update aggregate grades', 'view.php?id={course_module}', '{workshop}');
+        $rules[] = new restore_log_rule('workshop', 'update switch phase', 'view.php?id={course_module}', '[phase]');
+        $rules[] = new restore_log_rule('workshop', 'update clear aggregated grades', 'view.php?id={course_module}', '{workshop}');
+        $rules[] = new restore_log_rule('workshop', 'update clear assessments', 'view.php?id={course_module}', '{workshop}');
 
         return $rules;
     }