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

Javascript should use user timezone when calculating midnight for event categorising

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.3
    • 3.3
    • Blocks
    • MOODLE_33_STABLE
    • MOODLE_33_STABLE
    • MDL-58536-master
    • Hide

      I'm going to assume this testing is being done by someone in the Australia/Perth timezone (UTC+8) and that the computer they are testing on is configured to be in the Australia/Perth timezone.

      Testing setup

      1. Ensure you moodle site has it's timezone set to Australia/Perth
      2. Create 2 users, s1 and s2, and set their timezones to be Australia/Perth and Australia/Melbourne respectively.
      3. Create a course
      4. Create an assignment (assignment 1) with a due date set to 11:30pm today
      5. Create an assignment (assignment 2) with a due date set to 11:30pm 15 days ago (making it overdue)

      Matching timezone test

      1. Log in as s1 (the student set to Australia/Perth)
      2. View your dashboard
      3. You should see an event for assignment 1 due today and it should be under the "today" section in the sort by dates view
      4. You should not see the overdue event for assignment 2 because it's more than 14 days old
      5. Click the sort by courses view
      6. You should see the events categorised the same way

      Special future man test

      1. Log in as s2 (the student set to Australia/Melbourne)
      2. View your dashboard
      3. You should see the event for assignment 1 in the "next 7 days" section (and the date should show as tomorrow) in the sort by dates view
      4. You should see the overdue event for assignment 2 in the "recently overdue" section (and the date should be some time 14 days ago rather than 11:30pm 15 days ago)
      5. Click the sort by courses view
      6. You should see the events categorised the same way

      Repeat the tests on both the boost and clean themes

      Show
      I'm going to assume this testing is being done by someone in the Australia/Perth timezone (UTC+8) and that the computer they are testing on is configured to be in the Australia/Perth timezone. Testing setup Ensure you moodle site has it's timezone set to Australia/Perth Create 2 users, s1 and s2, and set their timezones to be Australia/Perth and Australia/Melbourne respectively. Create a course Create an assignment (assignment 1) with a due date set to 11:30pm today Create an assignment (assignment 2) with a due date set to 11:30pm 15 days ago (making it overdue) Matching timezone test Log in as s1 (the student set to Australia/Perth) View your dashboard You should see an event for assignment 1 due today and it should be under the "today" section in the sort by dates view You should not see the overdue event for assignment 2 because it's more than 14 days old Click the sort by courses view You should see the events categorised the same way Special future man test Log in as s2 (the student set to Australia/Melbourne) View your dashboard You should see the event for assignment 1 in the "next 7 days" section (and the date should show as tomorrow) in the sort by dates view You should see the overdue event for assignment 2 in the "recently overdue" section (and the date should be some time 14 days ago rather than 11:30pm 15 days ago) Click the sort by courses view You should see the events categorised the same way Repeat the tests on both the boost and clean themes

      The event list categorisation into today, next 7 days, next 30 days, etc should use the moodle user midnight calculations which take into account the user's timezone otherwise it can result in incorrect categorisations in the front end.

            ryanwyllie Ryan Wyllie
            ryanwyllie Ryan Wyllie
            cameron1729 cameron1729
            Andrew Lyons Andrew Lyons
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.