Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-40386

timemodified in mdl_book_chapters doesn't auto-update

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.4.6, 2.5.2
    • Component/s: Book
    • Labels:
    • Testing Instructions:
      Hide

      1. Create a new book module.
      Add an activity > Book
      2. Fill details for chapter.
      3. Save.
      4. Edit the title/content of the chapter.
      See the "timemodified" field of that chapter in mdl_book_chapters database table.

      Expected Result: timemodified > timecreated
      Actual Result: timemodified = timecreated

      Show
      1. Create a new book module. Add an activity > Book 2. Fill details for chapter. 3. Save. 4. Edit the title/content of the chapter. See the "timemodified" field of that chapter in mdl_book_chapters database table. Expected Result: timemodified > timecreated Actual Result: timemodified = timecreated
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:

      Description

      While updating certain chapters within a book module, I noticed that the timemodified field of those chapters and that book weren't being updated in the database's mdl_book_chapters and mdl_book tables respectively.

      I guess, if a chapter if updated, the timemodified fields of both the book and chapter should be updated.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            xan Prateek Sachan added a comment - - edited

            Please cherry-pick for the rest Stable Moodle versions.

            [Edit]: I've provided the fix for timemodified field in book_chapters only (on update of chapters), as I'm not sure whether updating timemodified field of book is a good approach or not.

            Show
            xan Prateek Sachan added a comment - - edited Please cherry-pick for the rest Stable Moodle versions. [Edit] : I've provided the fix for timemodified field in book_chapters only (on update of chapters), as I'm not sure whether updating timemodified field of book is a good approach or not.
            Hide
            nebgor Aparup Banerjee added a comment -

            looks good Prateek! sending for integration.

            Michael, can we assign this issue to Prateek ?

            Show
            nebgor Aparup Banerjee added a comment - looks good Prateek! sending for integration. Michael, can we assign this issue to Prateek ?
            Hide
            salvetore Michael de Raadt added a comment -

            Yes, we can.

            The testing instructions could be expanded.

            Prateek:

            I have added you to the jira-developers group. You are now able to edit issues, assign issues to yourself and submit issues for peer review. For more details, please see http://docs.moodle.org/dev/Tracker_guide#Tracker_groups_and_permissions

            Thanks for your efforts.

            Show
            salvetore Michael de Raadt added a comment - Yes, we can. The testing instructions could be expanded. Prateek: I have added you to the jira-developers group. You are now able to edit issues, assign issues to yourself and submit issues for peer review. For more details, please see http://docs.moodle.org/dev/Tracker_guide#Tracker_groups_and_permissions Thanks for your efforts.
            Hide
            xan Prateek Sachan added a comment -

            Thanks Aparup and Michael.

            I've edited the Testing Instructions for clarity.

            Show
            xan Prateek Sachan added a comment - Thanks Aparup and Michael. I've edited the Testing Instructions for clarity.
            Hide
            damyon Damyon Wiese added a comment - - edited

            Thanks Prateek - one thing to note is to make sure you fill out the Repository URL field in the tracker. This makes the integrators life easier when we have lots of repositories/patches to look at.

            Also the branch name should just be the name of the branch - not the url.

            Show
            damyon Damyon Wiese added a comment - - edited Thanks Prateek - one thing to note is to make sure you fill out the Repository URL field in the tracker. This makes the integrators life easier when we have lots of repositories/patches to look at. Also the branch name should just be the name of the branch - not the url.
            Hide
            damyon Damyon Wiese added a comment -

            Thanks for working on this Prateek,

            I've integrated this to 24, 25 and master branches.

            Show
            damyon Damyon Wiese added a comment - Thanks for working on this Prateek, I've integrated this to 24, 25 and master branches.
            Hide
            xan Prateek Sachan added a comment -

            Thanks Damyon. I'll remember the things you've pointed out.

            Show
            xan Prateek Sachan added a comment - Thanks Damyon. I'll remember the things you've pointed out.
            Hide
            dmonllao David Monllaó added a comment -

            It passes. Tested in 24, 25 and master

            Show
            dmonllao David Monllaó added a comment - It passes. Tested in 24, 25 and master
            Hide
            damyon Damyon Wiese added a comment -

            a single bug fix
            a drop in a waterfall
            hear the mighty roar

            Thanks for your contribution!

            Show
            damyon Damyon Wiese added a comment - a single bug fix a drop in a waterfall hear the mighty roar Thanks for your contribution!

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Sep/13