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

don't change timestamp of comments when importing a pdfannotator

parent 8d13325c
No related branches found
No related tags found
No related merge requests found
......@@ -66,8 +66,8 @@ class restore_pdfannotator_activity_structure_step extends restore_activity_stru
$data = (object)$data;
$oldid = $data->id;
$data->course = $this->get_courseid();
$data->timecreated = $this->apply_date_offset($data->timecreated);
$data->timemodified = $this->apply_date_offset($data->timemodified);
$data->timecreated = time();
$data->timemodified = time();
$newitemid = $DB->insert_record('pdfannotator', $data); // Insert the pdfannotator record.
......@@ -84,9 +84,6 @@ class restore_pdfannotator_activity_structure_step extends restore_activity_stru
$data->pdfannotatorid = $this->get_new_parentid('pdfannotator');
$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);
$this->set_mapping('pdfannotator_annotation', $oldid, $newitemid);
......@@ -116,9 +113,6 @@ class restore_pdfannotator_activity_structure_step extends restore_activity_stru
$data->annotationid = $this->get_new_parentid('pdfannotator_annotation');
$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);
$newitemid = $DB->insert_record('pdfannotator_comments', $data);
......@@ -149,7 +143,7 @@ class restore_pdfannotator_activity_structure_step extends restore_activity_stru
$data->commentid = $this->get_new_parentid('pdfannotator_comment');
$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.
$newitemid = $DB->insert_record('pdfannotator_reports', $data);
......
......@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'mod_pdfannotator'; // Full name of the plugin (used for diagnostics).
$plugin->version = 2021012600; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2021020300; // The current module version (Date: YYYYMMDDXX).
$plugin->release = 'PDF Annotator v1.4 release 5';
$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