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

The calendar itself should display dates depending on the calendar type used

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6, BACKEND
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide
      Prerequisite
      1. Run the command "git clone https://github.com/markn86/moodle-calendartype_test.git test" in the folder calendar/type.
      2. Go through the installation process on your Moodle site.
      3. Visit <yoursite>/admin/settings.php?section=calendar and set calendar_exportlookback and calendar_exportlookahead to 365 days.

      Note: The test calendar is 2 years, 2 months, 2 days, 2 hours and 2 minutes in the future.

      Test 1 - Check all PHPUnit tests pass.
      1. Run phpunit tests and ensure there are no errors.
      Test 2 - Check the Behat tests pass.
      1. Run the Behat tests with the tag @core_calendar and ensure it all passes.
      Test 3 - Browse the calendar.
      1. Log into your site as an administrator.
      2. Click on the link to the current month in the calendar block.
      3. Browse back and forth between the months in the current year, making sure you can browse between years when you reach the start/end of the current year, and check that all the months have the correct number of days.
      4. Edit your profile and set your 'Preferred calendar' to 'Test'.
      5. Visit the front page.
      6. The date displayed in the calendar block should now read 2 years, 2 months and 2 days ahead of today's date. It is unlikely this will be tested at the end of the month, but if it is, it is important to realise the 2 days matters as it will tick over to the next month.
      7. Repeat step 3.
      Test 4 - Creating events with the Gregorian calendar.
      1. Edit your profile and set your 'Preferred calendar' to 'Gregorian'.
      2. Click on the link to the current month in the calendar block.
      3. Click on 'New event'.
      4. Create an event with the title as today's date and click 'Save changes'.
      5. Ensure the event is saved in the correct location.
      6. Repeat the last three steps creating a bunch of events, one at the start of a month, one at the end and a few around the place throughout the whole year. You should name the title of the event to the date you set it to to easily test this.
      7. Export the calendar for 'This week', 'This month', 'Recent and next 60 days' and the 'Custom range'. Check that these files have the correct events listed in these date ranges and make sure that the DT* fields in this file list Gregorian dates.
      8. Edit your profile and set your 'Preferred calendar' to 'Test'.
      9. Browse the calendar for that year and check each event you created is now shown as 2 years, 2 months and 2 days ahead and that when you click on the event name you are taken to the day where it occurs.
      10. Export the calendar for 'This week', 'This month', 'Recent and next 60 days' and the 'Custom range'. Check that these files have the correct events listed in these date ranges and make sure that the DT* fields in this file list Gregorian dates. Save these files somewhere.
      11. Remove all events.
      Test 5 - Creating events with the Test calendar.
      1. Edit your profile and set your 'Preferred calendar' to 'Test'.
      2. Click on the link to the current month in the calendar block.
      3. Click on 'New event'.
      4. Create an event with the title as today's date (for this calendar which is 2 years, 2 months, 2 days ahead) and click 'Save changes'.
      5. Ensure the event is saved in the correct location.
      6. Repeat the last three steps creating a bunch of events, one at the start of a month, one at the end and a few around the place throughout the whole year. You should name the title of the event to the date you set it to to easily test this.
      7. Export the calendar for 'This week', 'This month', 'Recent and next 60 days' and the 'Custom range'. Check that these files have the correct events listed in these date ranges and make sure that the DT* fields in this file list Gregorian dates.
      8. Edit your profile and set your 'Preferred calendar' to 'Gregorian'.
      9. Browse the calendar for that year and check that the dates are now 2 years, 2 months, 2 days behind and that when you click on the event name you are taken to the day where it occurs.
      10. Export the calendar for 'This week', 'This month', 'Recent and next 60 days' and the 'Custom range'. Check that these files have the correct events listed in these date ranges and make sure that the DT* fields in this file list Gregorian dates. Save these files somewhere.
      11. Remove all events.
      Test 6 - Deleting/editing events using the Gregorian calendar.
      1. Edit your profile and set your 'Preferred calendar' to 'Test'.
      2. Create an event.
      3. Edit your profile and set your 'Preferred calendar' to 'Gregorian'.
      4. Go to the location of the event.
      5. Check that you can update this event successfully.
      6. Check that you can delete this event successfully.
      Test 7 - Deleting/editing events using the Test calendar.
      1. Edit your profile and set your 'Preferred calendar' to 'Gregorian'.
      2. Create an event.
      3. Edit your profile and set your 'Preferred calendar' to 'Test'.
      4. Go to the location of the event.
      5. Check that you can update this event successfully.
      6. Check that you can delete this event successfully.
      Test 8 - Test importing events.
      1. Import the files from the last two tests and browse through the calendar again using both 'Gregorian' and 'Test' and check the events show at the correct location.
      Test 9 - The upcoming events block
      1. Make sure that the upcoming events are correct and that you can click on them for both calendars.
      Show
      Prerequisite Run the command "git clone https://github.com/markn86/moodle-calendartype_test.git test" in the folder calendar/type. Go through the installation process on your Moodle site. Visit <yoursite>/admin/settings.php?section=calendar and set calendar_exportlookback and calendar_exportlookahead to 365 days. Note: The test calendar is 2 years, 2 months, 2 days, 2 hours and 2 minutes in the future. Test 1 - Check all PHPUnit tests pass. Run phpunit tests and ensure there are no errors. Test 2 - Check the Behat tests pass. Run the Behat tests with the tag @core_calendar and ensure it all passes. Test 3 - Browse the calendar. Log into your site as an administrator. Click on the link to the current month in the calendar block. Browse back and forth between the months in the current year, making sure you can browse between years when you reach the start/end of the current year, and check that all the months have the correct number of days. Edit your profile and set your 'Preferred calendar' to 'Test'. Visit the front page. The date displayed in the calendar block should now read 2 years, 2 months and 2 days ahead of today's date. It is unlikely this will be tested at the end of the month, but if it is, it is important to realise the 2 days matters as it will tick over to the next month. Repeat step 3. Test 4 - Creating events with the Gregorian calendar. Edit your profile and set your 'Preferred calendar' to 'Gregorian'. Click on the link to the current month in the calendar block. Click on 'New event'. Create an event with the title as today's date and click 'Save changes'. Ensure the event is saved in the correct location. Repeat the last three steps creating a bunch of events, one at the start of a month, one at the end and a few around the place throughout the whole year. You should name the title of the event to the date you set it to to easily test this. Export the calendar for 'This week', 'This month', 'Recent and next 60 days' and the 'Custom range'. Check that these files have the correct events listed in these date ranges and make sure that the DT* fields in this file list Gregorian dates. Edit your profile and set your 'Preferred calendar' to 'Test'. Browse the calendar for that year and check each event you created is now shown as 2 years, 2 months and 2 days ahead and that when you click on the event name you are taken to the day where it occurs. Export the calendar for 'This week', 'This month', 'Recent and next 60 days' and the 'Custom range'. Check that these files have the correct events listed in these date ranges and make sure that the DT* fields in this file list Gregorian dates. Save these files somewhere. Remove all events. Test 5 - Creating events with the Test calendar. Edit your profile and set your 'Preferred calendar' to 'Test'. Click on the link to the current month in the calendar block. Click on 'New event'. Create an event with the title as today's date (for this calendar which is 2 years, 2 months, 2 days ahead) and click 'Save changes'. Ensure the event is saved in the correct location. Repeat the last three steps creating a bunch of events, one at the start of a month, one at the end and a few around the place throughout the whole year. You should name the title of the event to the date you set it to to easily test this. Export the calendar for 'This week', 'This month', 'Recent and next 60 days' and the 'Custom range'. Check that these files have the correct events listed in these date ranges and make sure that the DT* fields in this file list Gregorian dates. Edit your profile and set your 'Preferred calendar' to 'Gregorian'. Browse the calendar for that year and check that the dates are now 2 years, 2 months, 2 days behind and that when you click on the event name you are taken to the day where it occurs. Export the calendar for 'This week', 'This month', 'Recent and next 60 days' and the 'Custom range'. Check that these files have the correct events listed in these date ranges and make sure that the DT* fields in this file list Gregorian dates. Save these files somewhere. Remove all events. Test 6 - Deleting/editing events using the Gregorian calendar. Edit your profile and set your 'Preferred calendar' to 'Test'. Create an event. Edit your profile and set your 'Preferred calendar' to 'Gregorian'. Go to the location of the event. Check that you can update this event successfully. Check that you can delete this event successfully. Test 7 - Deleting/editing events using the Test calendar. Edit your profile and set your 'Preferred calendar' to 'Gregorian'. Create an event. Edit your profile and set your 'Preferred calendar' to 'Test'. Go to the location of the event. Check that you can update this event successfully. Check that you can delete this event successfully. Test 8 - Test importing events. Import the files from the last two tests and browse through the calendar again using both 'Gregorian' and 'Test' and check the events show at the correct location. Test 9 - The upcoming events block Make sure that the upcoming events are correct and that you can click on them for both calendars.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-41792_master
    • Story Points:
      100
    • Sprint:
      BACKEND Sprint 6

      Description

      With the introduction of MDL-18375 we need the calendar to display the dates in the format defined by the calendar type being used, not just Gregorian.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              markn Mark Nelson
              Reporter:
              markn Mark Nelson
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Damyon Wiese
              Tester:
              Rossiani Wijaya
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              25 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13