diff --git a/backup/moodle2/restore_pdfannotator_stepslib.php b/backup/moodle2/restore_pdfannotator_stepslib.php index 607bef6..b8a855f 100644 --- a/backup/moodle2/restore_pdfannotator_stepslib.php +++ b/backup/moodle2/restore_pdfannotator_stepslib.php @@ -43,24 +43,25 @@ protected function define_structure() { $paths = array(); - $userinfo = $this->get_setting_value('userinfo'); // Is 0 //TODO is not used. + $userinfo = $this->get_setting_value('userinfo'); $paths[] = new restore_path_element('pdfannotator', '/activity/pdfannotator'); - $paths[] = new restore_path_element('pdfannotator_annotation', - '/activity/pdfannotator/annotations/annotation'); + if($userinfo) { + $paths[] = new restore_path_element('pdfannotator_annotation', + '/activity/pdfannotator/annotations/annotation'); - $paths[] = new restore_path_element('pdfannotator_subscription', - '/activity/pdfannotator/annotations/annotation/subscriptions/subscription'); - $paths[] = new restore_path_element('pdfannotator_comment', - '/activity/pdfannotator/annotations/annotation/comments/comment'); - - $paths[] = new restore_path_element('pdfannotator_vote', - '/activity/pdfannotator/annotations/annotation/comments/comment/votes/vote'); - $paths[] = new restore_path_element('pdfannotator_report', - '/activity/pdfannotator/annotations/annotation/comments/comment/reports/report'); + $paths[] = new restore_path_element('pdfannotator_subscription', + '/activity/pdfannotator/annotations/annotation/subscriptions/subscription'); + $paths[] = new restore_path_element('pdfannotator_comment', + '/activity/pdfannotator/annotations/annotation/comments/comment'); + $paths[] = new restore_path_element('pdfannotator_vote', + '/activity/pdfannotator/annotations/annotation/comments/comment/votes/vote'); + $paths[] = new restore_path_element('pdfannotator_report', + '/activity/pdfannotator/annotations/annotation/comments/comment/reports/report'); + } // Return the paths wrapped into standard activity structure. return $this->prepare_activity_structure($paths); } diff --git a/version.php b/version.php index 0ee23a8..f8fbf94 100644 --- a/version.php +++ b/version.php @@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'mod_pdfannotator'; -$plugin->version = 2021112900; -$plugin->release = 'PDF Annotator v1.4 release 10'; +$plugin->version = 2021113000; +$plugin->release = 'PDF Annotator v1.4 release 11'; $plugin->requires = 2021051700; $plugin->maturity = MATURITY_STABLE;