Moodle
  1. Moodle
  2. MDL-32238

Toggling the hide icon does not update the timemodified column in the course table.

    Details

    • Testing Instructions:
      Hide
      1. Add a few courses if you dont have already
      2. Goto site admin>courses>add/edit courses> click on a category
      3. From the list of courses displayed hide a course
      4. check in your database to make sure the 'timemodified' field is updated for this course (table mdl_course)
      5. Now unhide the course and make sure 'timemodified' is updated again
      Show
      Add a few courses if you dont have already Goto site admin>courses>add/edit courses> click on a category From the list of courses displayed hide a course check in your database to make sure the 'timemodified' field is updated for this course (table mdl_course) Now unhide the course and make sure 'timemodified' is updated again
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-32238-master
    • Rank:
      39019

      Description

      When viewing the list of courses in the category screen, you are given the option to hide or show a course. Clicking on this icon does not update the timemodified column for the course record, however editing the course using the course settings and updating the 'Availability' option will modify the timemodified column. This is required for a cron job I am writing which should only process courses that have been modified after a given time range.

        Activity

        Hide
        Michael de Raadt added a comment -

        Thanks for reporting that, Mark.

        Feel free to work on that with us and push it up to peer review if you like. You might want put a partner label on it.

        Show
        Michael de Raadt added a comment - Thanks for reporting that, Mark. Feel free to work on that with us and push it up to peer review if you like. You might want put a partner label on it.
        Show
        Kanika Goyal added a comment - Hi, Here is a patch for this issue. Please review it. for master - https://github.com/kanikagoyal/moodle/compare/master...master_MDL-32238_toggling_hide_icon_timemodified_not_updated for MOODLE_22_STABLE - https://github.com/kanikagoyal/moodle/compare/MOODLE_22_STABLE...m22_MDL-32238_toggling_hide_icon_timemodified_not_updated for MOODLE_21_STABLE - https://github.com/kanikagoyal/moodle/compare/MOODLE_21_STABLE...m21_MDL-32238_toggling_hide_icon_timemodified_not_updated Please let me know if any changes are required. Thanks, Kanika
        Hide
        Ankit Agarwal added a comment -

        Hi Kanika,
        Thanks for the patch. Looks great.
        Can you update your patch to use update_record once instead of using set_field multiple times.. will help us save a couple of DB calls.

        Rest looks good.
        Thanks

        Show
        Ankit Agarwal added a comment - Hi Kanika, Thanks for the patch. Looks great. Can you update your patch to use update_record once instead of using set_field multiple times.. will help us save a couple of DB calls. Rest looks good. Thanks
        Hide
        Ankit Agarwal added a comment -

        Sending for peer-review
        Thanks

        Show
        Ankit Agarwal added a comment - Sending for peer-review Thanks
        Hide
        Rossiani Wijaya added a comment -

        Hi Ankit,

        This looks good. Thanks.

        Show
        Rossiani Wijaya added a comment - Hi Ankit, This looks good. Thanks.
        Hide
        Ankit Agarwal added a comment -

        Thanks for the review.
        Sending for integration
        Thanks

        Show
        Ankit Agarwal added a comment - Thanks for the review. Sending for integration Thanks
        Hide
        Eloy Lafuente (stronk7) added a comment -

        The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

        TIA and ciao

        Show
        Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
        Hide
        Sam Hemelryk added a comment -

        Thanks Kanika + others. This has been integrated now

        Show
        Sam Hemelryk added a comment - Thanks Kanika + others. This has been integrated now
        Hide
        Andrew Davis added a comment -

        Works as described in master, 2.2 and 2.1. Passing.

        Show
        Andrew Davis added a comment - Works as described in master, 2.2 and 2.1. Passing.
        Hide
        Eloy Lafuente (stronk7) added a comment -
        UPDATE tracker_issues
           SET status = 'Closed',
              comment = 'Thanks!'
        WHEN participants = 'Did a gorgeous work'
        

        This landed upstream some hours ago (some - me - developer fell slept in the sofa yesterday before spamming this).

        Show
        Eloy Lafuente (stronk7) added a comment - UPDATE tracker_issues SET status = 'Closed', comment = 'Thanks!' WHEN participants = 'Did a gorgeous work' This landed upstream some hours ago (some - me - developer fell slept in the sofa yesterday before spamming this).

          People

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

            Dates

            • Created:
              Updated:
              Resolved: