MDL-60025 mod_book: Return correct values for chapters update time

Instead returning the time when the chapter was created or modified we
were returning the time when the book was created or modified.
This commit is contained in:
Juan Leyva
2017-09-06 12:38:27 +02:00
parent 77a6a09950
commit 2f373db92b
+2 -2
View File
@@ -576,8 +576,8 @@ function book_export_contents($cm, $baseurl) {
$chapterindexfile['filesize'] = 0;
$chapterindexfile['fileurl'] = moodle_url::make_webservice_pluginfile_url(
$context->id, 'mod_book', 'chapter', $chapter->id, '/', 'index.html')->out(false);
$chapterindexfile['timecreated'] = $book->timecreated;
$chapterindexfile['timemodified'] = $book->timemodified;
$chapterindexfile['timecreated'] = $chapter->timecreated;
$chapterindexfile['timemodified'] = $chapter->timemodified;
$chapterindexfile['content'] = format_string($chapter->title, true, array('context' => $context));
$chapterindexfile['sortorder'] = 0;
$chapterindexfile['userid'] = null;