MDL-40420: timemodified field update when lesson_page is updated

This commit is contained in:
prateeksachan 2013-07-17 07:22:37 +05:30
parent 07bbbcf174
commit 9ac3d68648
6 changed files with 6 additions and 0 deletions

View File

@ -2119,6 +2119,7 @@ abstract class lesson_page extends lesson_base {
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 File

@ -107,6 +107,7 @@ class lesson_page_type_endofbranch extends lesson_page {
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 File

@ -76,6 +76,7 @@ class lesson_page_type_endofcluster extends lesson_page {
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 File

@ -131,6 +131,7 @@ class lesson_page_type_essay extends lesson_page {
$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 File

@ -297,6 +297,7 @@ class lesson_page_type_matching extends lesson_page {
$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 File

@ -157,6 +157,7 @@ class lesson_page_type_truefalse extends lesson_page {
$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);