mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-40420: timemodified field update when lesson_page is updated
This commit is contained in:
parent
07bbbcf174
commit
9ac3d68648
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user