Permalink
Browse files

MDL-40420: timemodified field update when lesson_page is updated

  • Loading branch information...
1 parent 07bbbcf commit 9ac3d68648112a2912abba4e093a42046e039b8e @prateeksachan prateeksachan committed Jul 17, 2013
View
1 mod/lesson/locallib.php
@@ -2119,6 +2119,7 @@ public function update($properties, $context = null, $maxbytes = null) {
if ($maxbytes === null) {
$maxbytes = get_user_max_upload_file_size($context);
}
+ $properties->timemodified = time();
$properties = file_postupdate_standard_editor($properties, 'contents', array('noclean'=>true, 'maxfiles'=>EDITOR_UNLIMITED_FILES, 'maxbytes'=>$maxbytes), $context, 'mod_lesson', 'page_contents', $properties->id);
$DB->update_record("lesson_pages", $properties);
View
1 mod/lesson/pagetypes/endofbranch.php
@@ -107,6 +107,7 @@ public function update($properties, $context = null, $maxbytes = null) {
if (empty($properties->qoption)) {
$properties->qoption = '0';
}
+ $properties->timemodified = time();
$properties = file_postupdate_standard_editor($properties, 'contents', array('noclean'=>true, 'maxfiles'=>EDITOR_UNLIMITED_FILES, 'maxbytes'=>$PAGE->course->maxbytes), context_module::instance($PAGE->cm->id), 'mod_lesson', 'page_contents', $properties->id);
$DB->update_record("lesson_pages", $properties);
View
1 mod/lesson/pagetypes/endofcluster.php
@@ -76,6 +76,7 @@ public function update($properties, $context = null, $maxbytes = null) {
if (empty($properties->qoption)) {
$properties->qoption = '0';
}
+ $properties->timemodified = time();
$properties = file_postupdate_standard_editor($properties, 'contents', array('noclean'=>true, 'maxfiles'=>EDITOR_UNLIMITED_FILES, 'maxbytes'=>$PAGE->course->maxbytes), context_module::instance($PAGE->cm->id), 'mod_lesson', 'page_contents', $properties->id);
$DB->update_record("lesson_pages", $properties);
View
1 mod/lesson/pagetypes/essay.php
@@ -131,6 +131,7 @@ public function update($properties, $context = null, $maxbytes = null) {
$answers = $this->get_answers();
$properties->id = $this->properties->id;
$properties->lessonid = $this->lesson->id;
+ $properties->timemodified = time();
$properties = file_postupdate_standard_editor($properties, 'contents', array('noclean'=>true, 'maxfiles'=>EDITOR_UNLIMITED_FILES, 'maxbytes'=>$PAGE->course->maxbytes), context_module::instance($PAGE->cm->id), 'mod_lesson', 'page_contents', $properties->id);
$DB->update_record("lesson_pages", $properties);
View
1 mod/lesson/pagetypes/matching.php
@@ -297,6 +297,7 @@ public function update($properties, $context = null, $maxbytes = null) {
$answers = $this->get_answers();
$properties->id = $this->properties->id;
$properties->lessonid = $this->lesson->id;
+ $properties->timemodified = time();
$properties = file_postupdate_standard_editor($properties, 'contents', array('noclean'=>true, 'maxfiles'=>EDITOR_UNLIMITED_FILES, 'maxbytes'=>$PAGE->course->maxbytes), context_module::instance($PAGE->cm->id), 'mod_lesson', 'page_contents', $properties->id);
$DB->update_record("lesson_pages", $properties);
View
1 mod/lesson/pagetypes/truefalse.php
@@ -157,6 +157,7 @@ public function update($properties, $context = null, $maxbytes = null) {
$answers = $this->get_answers();
$properties->id = $this->properties->id;
$properties->lessonid = $this->lesson->id;
+ $properties->timemodified = time();
$properties = file_postupdate_standard_editor($properties, 'contents', array('noclean'=>true, 'maxfiles'=>EDITOR_UNLIMITED_FILES, 'maxbytes'=>$PAGE->course->maxbytes), context_module::instance($PAGE->cm->id), 'mod_lesson', 'page_contents', $properties->id);
$DB->update_record("lesson_pages", $properties);

0 comments on commit 9ac3d68

Please sign in to comment.