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

Current week not updating after section drag-and-drop

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3, 2.4.1, 2.5
    • Fix Version/s: 2.3.8, 2.4.5, 2.5.1, 2.6
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide

      You may need to purge the caches because JS files were changed

      1. Open the course in weekly format, make sure that the course start is recent, so you have a highlighted the current section.
      2. Move the 'current' section somewhere up or down, on the dropping the replacement section of the current week should be highlighted.
      3. Move some section in replacement of the 'current', on the dropping the new section in the current week should be highlighted.
      4. Move section that was earlier than current to the position later than current and vice versa, make sure the current week is highlighted
      5. Change course start date to be far in the past or in the future (so there is no section highlighted as current)
      6. Make sure drag&drop moving of sections works fine

      Note that solution for 2.3 is different (because of different API) and unfortunately does not work well when there are hidden sections present.

      Show
      You may need to purge the caches because JS files were changed Open the course in weekly format, make sure that the course start is recent, so you have a highlighted the current section. Move the 'current' section somewhere up or down, on the dropping the replacement section of the current week should be highlighted. Move some section in replacement of the 'current', on the dropping the new section in the current week should be highlighted. Move section that was earlier than current to the position later than current and vice versa, make sure the current week is highlighted Change course start date to be far in the past or in the future (so there is no section highlighted as current) Make sure drag&drop moving of sections works fine Note that solution for 2.3 is different (because of different API) and unfortunately does not work well when there are hidden sections present.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-33546-master

      Description

      When moving a section in a course using the Weekly format, if you move the section highlighted as current (according to the date) or if you move sections around the current week, the highlighting of the current week sticks with the original section rather than adjusting to match the section that contains the current date.

      Replication steps:

      1. Create a course and set the format to Weekly format (or use an existing course and switch it)
      2. Ensure the range of time covered by the course includes the current date
      3. The section relevant to the current date should be highlighted; drag this section to a new location
      4. Refresh the course page
      5. Move sections around the currently highlighted section causing the section dates to adjust

      Expected result: the highlighting of the current section changes to highlight the section relevant to the section containing the current date
      Actual result: the highlighting sticks to the previously highlighted section

      After refreshing the course page, the highlighting corrects itself.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    8/Jul/13