Permalink
Browse files

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

  • Loading branch information...
1 parent 4c61fcd commit 54abf6df70f3fd96fad0960e939ac6c08f208a27 @mudrd8mz mudrd8mz committed Oct 24, 2012
@@ -105,6 +105,8 @@ public function process_workshop($data, $raw) {
$this->currentworkshop['instructreviewers'] = '';
$this->currentworkshop['instructreviewersformat'] = FORMAT_HTML;
$this->currentworkshop['latesubmissions'] = 0;
+ $this->currentworkshop['conclusion'] = '';
+ $this->currentworkshop['conclusionformat'] = FORMAT_HTML;
foreach (array('submissionend', 'submissionstart', 'assessmentend', 'assessmentstart') as $field) {
if (!array_key_exists($field, $this->currentworkshop)) {
@@ -55,7 +55,8 @@ protected function define_structure() {
'usepeerassessment', 'useselfassessment', 'grade', 'gradinggrade',
'strategy', 'evaluation', 'gradedecimals', 'nattachments',
'latesubmissions', 'maxbytes', 'examplesmode', 'submissionstart',
- 'submissionend', 'assessmentstart', 'assessmentend'));
+ 'submissionend', 'assessmentstart', 'assessmentend',
+ 'conclusion', 'conclusionformat'));
// assessment forms definition
$this->add_subplugin_structure('workshopform', $workshop, true);
@@ -194,6 +195,7 @@ protected function define_structure() {
$workshop->annotate_files('mod_workshop', 'intro', null); // no itemid used
$workshop->annotate_files('mod_workshop', 'instructauthors', null); // no itemid used
$workshop->annotate_files('mod_workshop', 'instructreviewers', null); // no itemid used
+ $workshop->annotate_files('mod_workshop', 'conclusion', null); // no itemid used
$examplesubmission->annotate_files('mod_workshop', 'submission_content', 'id');
$examplesubmission->annotate_files('mod_workshop', 'submission_attachment', 'id');
@@ -55,7 +55,7 @@ static public function define_decode_contents() {
$contents = array();
$contents[] = new restore_decode_content('workshop',
- array('intro', 'instructauthors', 'instructreviewers'), 'workshop');
+ array('intro', 'instructauthors', 'instructreviewers', 'conclusion'), 'workshop');
$contents[] = new restore_decode_content('workshop_submissions',
array('content', 'feedbackauthor'), 'workshop_submission');
$contents[] = new restore_decode_content('workshop_assessments',
@@ -212,6 +212,7 @@ protected function after_execute() {
$this->add_related_files('mod_workshop', 'intro', null);
$this->add_related_files('mod_workshop', 'instructauthors', null);
$this->add_related_files('mod_workshop', 'instructreviewers', null);
+ $this->add_related_files('mod_workshop', 'conclusion', null);
// Add example submission related files, matching by 'workshop_examplesubmission' itemname
$this->add_related_files('mod_workshop', 'submission_content', 'workshop_examplesubmission');

0 comments on commit 54abf6d

Please sign in to comment.