Skip to content

Commit

Permalink
MDL-40420: timemodified field update when lesson_page is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
prateeksachan committed Jul 17, 2013
1 parent 07bbbcf commit 9ac3d68
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions mod/lesson/locallib.php
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions mod/lesson/pagetypes/endofbranch.php
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions mod/lesson/pagetypes/endofcluster.php
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions mod/lesson/pagetypes/essay.php
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions mod/lesson/pagetypes/matching.php
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions mod/lesson/pagetypes/truefalse.php
Expand Up @@ -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);

Expand Down

0 comments on commit 9ac3d68

Please sign in to comment.