Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-35421 Support the new conclusion field in backup and restore

  • Loading branch information...
commit 54abf6df70f3fd96fad0960e939ac6c08f208a27 1 parent 4c61fcd
David Mudrák authored October 24, 2012
2  mod/workshop/backup/moodle1/lib.php
@@ -105,6 +105,8 @@ public function process_workshop($data, $raw) {
105 105
         $this->currentworkshop['instructreviewers']         = '';
106 106
         $this->currentworkshop['instructreviewersformat']   = FORMAT_HTML;
107 107
         $this->currentworkshop['latesubmissions']           = 0;
  108
+        $this->currentworkshop['conclusion']                = '';
  109
+        $this->currentworkshop['conclusionformat']          = FORMAT_HTML;
108 110
 
109 111
         foreach (array('submissionend', 'submissionstart', 'assessmentend', 'assessmentstart') as $field) {
110 112
             if (!array_key_exists($field, $this->currentworkshop)) {
4  mod/workshop/backup/moodle2/backup_workshop_stepslib.php
@@ -55,7 +55,8 @@ protected function define_structure() {
55 55
             'usepeerassessment', 'useselfassessment', 'grade', 'gradinggrade',
56 56
             'strategy', 'evaluation', 'gradedecimals', 'nattachments',
57 57
             'latesubmissions', 'maxbytes', 'examplesmode', 'submissionstart',
58  
-            'submissionend', 'assessmentstart', 'assessmentend'));
  58
+            'submissionend', 'assessmentstart', 'assessmentend',
  59
+            'conclusion', 'conclusionformat'));
59 60
 
60 61
         // assessment forms definition
61 62
         $this->add_subplugin_structure('workshopform', $workshop, true);
@@ -194,6 +195,7 @@ protected function define_structure() {
194 195
         $workshop->annotate_files('mod_workshop', 'intro', null); // no itemid used
195 196
         $workshop->annotate_files('mod_workshop', 'instructauthors', null); // no itemid used
196 197
         $workshop->annotate_files('mod_workshop', 'instructreviewers', null); // no itemid used
  198
+        $workshop->annotate_files('mod_workshop', 'conclusion', null); // no itemid used
197 199
 
198 200
         $examplesubmission->annotate_files('mod_workshop', 'submission_content', 'id');
199 201
         $examplesubmission->annotate_files('mod_workshop', 'submission_attachment', 'id');
2  mod/workshop/backup/moodle2/restore_workshop_activity_task.class.php
@@ -55,7 +55,7 @@ static public function define_decode_contents() {
55 55
         $contents = array();
56 56
 
57 57
         $contents[] = new restore_decode_content('workshop',
58  
-                          array('intro', 'instructauthors', 'instructreviewers'), 'workshop');
  58
+                          array('intro', 'instructauthors', 'instructreviewers', 'conclusion'), 'workshop');
59 59
         $contents[] = new restore_decode_content('workshop_submissions',
60 60
                           array('content', 'feedbackauthor'), 'workshop_submission');
61 61
         $contents[] = new restore_decode_content('workshop_assessments',
1  mod/workshop/backup/moodle2/restore_workshop_stepslib.php
@@ -212,6 +212,7 @@ protected function after_execute() {
212 212
         $this->add_related_files('mod_workshop', 'intro', null);
213 213
         $this->add_related_files('mod_workshop', 'instructauthors', null);
214 214
         $this->add_related_files('mod_workshop', 'instructreviewers', null);
  215
+        $this->add_related_files('mod_workshop', 'conclusion', null);
215 216
 
216 217
         // Add example submission related files, matching by 'workshop_examplesubmission' itemname
217 218
         $this->add_related_files('mod_workshop', 'submission_content', 'workshop_examplesubmission');

0 notes on commit 54abf6d

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