Skip to content

Commit

Permalink
implement userinfo backup functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
HDonath authored and Friederike-cil committed Dec 2, 2021
1 parent f7ea85a commit cb0f8d9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
25 changes: 13 additions & 12 deletions backup/moodle2/restore_pdfannotator_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_pdfannotator';
$plugin->version = 2021082600;
$plugin->release = 'PDF Annotator v1.4 release 8';
$plugin->version = 2021113000;
$plugin->release = 'PDF Annotator v1.4 release 11';
$plugin->requires = 2016112900;
$plugin->maturity = MATURITY_STABLE;

0 comments on commit cb0f8d9

Please sign in to comment.