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 Nov 30, 2021
1 parent 2c4329d commit d9d8769
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 = 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;

0 comments on commit d9d8769

Please sign in to comment.