Skip to content
Snippets Groups Projects
Commit 91dfad23 authored by Friederike Schwager's avatar Friederike Schwager
Browse files

don't change timestamp of comments when importing a pdfannotator

parent b255c857
Branches
No related tags found
No related merge requests found
...@@ -66,8 +66,8 @@ class restore_pdfannotator_activity_structure_step extends restore_activity_stru ...@@ -66,8 +66,8 @@ class restore_pdfannotator_activity_structure_step extends restore_activity_stru
$data = (object)$data; $data = (object)$data;
$oldid = $data->id; $oldid = $data->id;
$data->course = $this->get_courseid(); $data->course = $this->get_courseid();
$data->timecreated = $this->apply_date_offset($data->timecreated); $data->timecreated = time();
$data->timemodified = $this->apply_date_offset($data->timemodified); $data->timemodified = time();
$newitemid = $DB->insert_record('pdfannotator', $data); // Insert the pdfannotator record. $newitemid = $DB->insert_record('pdfannotator', $data); // Insert the pdfannotator record.
...@@ -84,9 +84,6 @@ class restore_pdfannotator_activity_structure_step extends restore_activity_stru ...@@ -84,9 +84,6 @@ class restore_pdfannotator_activity_structure_step extends restore_activity_stru
$data->pdfannotatorid = $this->get_new_parentid('pdfannotator'); $data->pdfannotatorid = $this->get_new_parentid('pdfannotator');
$data->userid = $this->get_mappingid('user', $data->userid); $data->userid = $this->get_mappingid('user', $data->userid);
$data->timecreated = $this->apply_date_offset($data->timecreated);
$data->timemodified = $this->apply_date_offset($data->timemodified);
$newitemid = $DB->insert_record('pdfannotator_annotations', $data); $newitemid = $DB->insert_record('pdfannotator_annotations', $data);
$this->set_mapping('pdfannotator_annotation', $oldid, $newitemid); $this->set_mapping('pdfannotator_annotation', $oldid, $newitemid);
...@@ -116,9 +113,6 @@ class restore_pdfannotator_activity_structure_step extends restore_activity_stru ...@@ -116,9 +113,6 @@ class restore_pdfannotator_activity_structure_step extends restore_activity_stru
$data->annotationid = $this->get_new_parentid('pdfannotator_annotation'); $data->annotationid = $this->get_new_parentid('pdfannotator_annotation');
$data->userid = $this->get_mappingid('user', $data->userid); $data->userid = $this->get_mappingid('user', $data->userid);
$data->timecreated = $this->apply_date_offset($data->timecreated);
$data->timemodified = $this->apply_date_offset($data->timemodified);
$data->pdfannotatorid = $this->get_mappingid('pdfannotator', $data->pdfannotatorid); $data->pdfannotatorid = $this->get_mappingid('pdfannotator', $data->pdfannotatorid);
$newitemid = $DB->insert_record('pdfannotator_comments', $data); $newitemid = $DB->insert_record('pdfannotator_comments', $data);
...@@ -149,7 +143,7 @@ class restore_pdfannotator_activity_structure_step extends restore_activity_stru ...@@ -149,7 +143,7 @@ class restore_pdfannotator_activity_structure_step extends restore_activity_stru
$data->commentid = $this->get_new_parentid('pdfannotator_comment'); $data->commentid = $this->get_new_parentid('pdfannotator_comment');
$data->userid = $this->get_mappingid('user', $data->userid); $data->userid = $this->get_mappingid('user', $data->userid);
$data->timecreated = $this->apply_date_offset($data->timecreated); // $data->timecreated = $this->apply_date_offset($data->timecreated);
$data->pdfannotatorid = $this->get_mappingid('pdfannotator', $data->pdfannotatorid); // Params: 1. Object class as defined in structure, 2. attribute&/column name. $data->pdfannotatorid = $this->get_mappingid('pdfannotator', $data->pdfannotatorid); // Params: 1. Object class as defined in structure, 2. attribute&/column name.
$newitemid = $DB->insert_record('pdfannotator_reports', $data); $newitemid = $DB->insert_record('pdfannotator_reports', $data);
......
...@@ -25,6 +25,6 @@ ...@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
$plugin->component = 'mod_pdfannotator'; // Full name of the plugin (used for diagnostics). $plugin->component = 'mod_pdfannotator'; // Full name of the plugin (used for diagnostics).
$plugin->version = 2021020201; // The current module version (Date: YYYYMMDDXX). $plugin->version = 2021020300; // The current module version (Date: YYYYMMDDXX).
$plugin->release = 'PDF Annotator v1.4 release 5'; $plugin->release = 'PDF Annotator v1.4 release 5';
$plugin->requires = 2016112900; // Requires this Moodle version. $plugin->requires = 2016112900; // Requires this Moodle version.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment