From 2f373db92bee0de2fdd5172a3135eb8ea1a9d0be Mon Sep 17 00:00:00 2001 From: Juan Leyva Date: Wed, 6 Sep 2017 12:36:42 +0200 Subject: [PATCH] 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. --- mod/book/lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/book/lib.php b/mod/book/lib.php index c3bd4d0bd2a..78dccab7922 100644 --- a/mod/book/lib.php +++ b/mod/book/lib.php @@ -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;