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

Displaying and selecting dates throughout Moodle should allow the use of multiple calendars

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.4, 2.3.7, 2.4, 2.5
    • Fix Version/s: 2.6
    • Component/s: Calendar
    • Labels:
    • Environment:
      cross platform
    • Testing Instructions:
      Hide

      To tester - this looks like a lot, but it really isn't. The steps have been broken down.

      Test 1 - Check all PHPUnit tests pass.
      1. Run phpunit tests and ensure there are no errors.
      Test 2 - Check that installing and updating create expected database columns.
      1. Perform a fresh install and an upgrade to the latest integration branch.
      2. Check that there is a new column in the user and course table called 'calendartype' for both the fresh install and upgrade.
      3. Make sure that the default value for the course is blank and the default for the user is 'gregorian' for both the fresh install and upgrade.
      Test 3 - Test that the calendar does not display when there is no other Calendar type besides 'Gregorian'.
      1. Log in as an administrator.
      2. Visit the edit profile page, ensure there is no field with the label 'Preferred calendar'.
      3. Visit a course settings page, ensure there is no field with the label 'Force calendar' under 'Appearance'.
      Test 4 - Test the 'Date/Time' user profile field works as expected.
      1. Log in as an administrator.
      2. Visit <yoursite>/user/profile/index.php
      3. Click to add a 'Date/Time' field.
      4. Set the 'Short name' and 'name' field to whatever you like.
      5. Set the 'Start year' to 1950.
      6. Set the 'End year' to 2020.
      7. Click to save changes.
      8. Run the command "git clone https://github.com/markn86/moodle-calendartype_hijri.git hijri" in the folder calendar/type.
      9. Visit the admin/index.php page to install the new plugin.
      10. Visit the edit profile page and ensure there is a field with the label 'Preferred calendar'.
      11. Ensure this field contains the options 'Gregorian' and 'Hijri'.
      12. Scroll down to 'Other fields' and check that the 'Date/Time' field you created earlier is listed there.
      13. Enable this field and check that it is displaying today's date.
      14. Change the date to 16th August 2013.
      15. Scroll back up and change the preferred calendar to 'Hijri'.
      16. Save the user profile page.
      17. On the next page check that the 'Date/Time' user profile field is listed and says '10 Shawwāl 1434' (the day may be a 9 depending on your location).
      18. Click to edit your profile again and check that this date is also displayed in the select boxes then save.
      19. Click to edit your profile again and change 'Preferred calendar' back to 'Gregorian' then save.
      20. Click to edit your profile again and check it displays '16th August 2013'.
      21. Click to edit your profile again and change 'Preferred calendar' back to 'Hijri' then save.
      22. Visit <yoursite>/user/profile/index.php.
      23. Click to edit the profile field you created.
      24. Check that the 'Short name' is set to '1369'.
      25. Check that the 'End year' is set to '1441'.
      26. Click 'Save changes'.
      27. Click to edit the profile field you created.
      28. Check that the 'Short name' is set to '1369'.
      29. Check that the 'End year' is set to '1441'.
      30. Visit the edit profile page and change 'Preferred calendar' back to 'Gregorian'.
      31. Visit the settings for the profile field you created.
      32. Check that the 'Short name' is set to '1950'.
      33. Check that the 'End year' is set to '2020'.
      Test 5 - Test dates are saved correctly.
      1. Log in as an administrator.
      2. Visit the edit profile page and set 'Preferred calendar' to 'Hijri'.
      3. Visit a course and create an assignment.
      4. Set the name and description to whatever you want and save.
      5. Go back to edit your profile and change 'Preferred calendar' to 'Gregorian'.
      6. Click to view the assignment and check that dates displayed are today's date.
      Test 6 - Test that the course calendar setting takes preference.
      1. Log in as a student.
      2. Go to edit your profile and set the 'Preferred calendar' to 'Hijri'.
      3. As an administrator do the same to your profile.
      4. As an administrator visit the course settings for a course that student belongs to and set 'Force calendar' to 'Gregorian'.
      5. Visit that course and create an assignment and ensure the dates you can select are in Gregorian.
      6. Click on the assignment as the student and ensure the dates are displayed in Gregorian.
      7. Change the course setting 'Force calendar' to 'Do not force'.
      8. Repeat steps 5-6 but instead check the dates are in Hijri.
      Test 7 - Test that uninstalling the calendar does not break everything.
      1. Log in as an administrator.
      2. Visit the edit profile page and set your 'Preferred calendar' to 'Hijri'.
      3. Do the same as a student.
      4. Visit a course and set 'Force calendar' to 'Hijri'.
      5. As the admin visit <yoursite>/admin/plugins.php and scroll down to 'Calendar types'.
      6. Check that you cannot uninstall the Gregorian calendar type.
      7. Click to uninstall the Hijri calendar.
      8. Once you see the screen saying that it was successful remove the directory calendar/type/hijri.
      9. Click on continue.
      10. Visit your profile page and ensure dates are shown in Gregorian with no warnings.
      11. Visit the course page and ensure dates are shown in Gregorian with no warnings.
      Show
      To tester - this looks like a lot, but it really isn't. The steps have been broken down. Test 1 - Check all PHPUnit tests pass. Run phpunit tests and ensure there are no errors. Test 2 - Check that installing and updating create expected database columns. Perform a fresh install and an upgrade to the latest integration branch. Check that there is a new column in the user and course table called 'calendartype' for both the fresh install and upgrade. Make sure that the default value for the course is blank and the default for the user is 'gregorian' for both the fresh install and upgrade. Test 3 - Test that the calendar does not display when there is no other Calendar type besides 'Gregorian'. Log in as an administrator. Visit the edit profile page, ensure there is no field with the label 'Preferred calendar'. Visit a course settings page, ensure there is no field with the label 'Force calendar' under 'Appearance'. Test 4 - Test the 'Date/Time' user profile field works as expected. Log in as an administrator. Visit <yoursite>/user/profile/index.php Click to add a 'Date/Time' field. Set the 'Short name' and 'name' field to whatever you like. Set the 'Start year' to 1950. Set the 'End year' to 2020. Click to save changes. Run the command "git clone https://github.com/markn86/moodle-calendartype_hijri.git hijri" in the folder calendar/type. Visit the admin/index.php page to install the new plugin. Visit the edit profile page and ensure there is a field with the label 'Preferred calendar'. Ensure this field contains the options 'Gregorian' and 'Hijri'. Scroll down to 'Other fields' and check that the 'Date/Time' field you created earlier is listed there. Enable this field and check that it is displaying today's date. Change the date to 16th August 2013. Scroll back up and change the preferred calendar to 'Hijri'. Save the user profile page. On the next page check that the 'Date/Time' user profile field is listed and says '10 Shawwāl 1434' (the day may be a 9 depending on your location). Click to edit your profile again and check that this date is also displayed in the select boxes then save. Click to edit your profile again and change 'Preferred calendar' back to 'Gregorian' then save. Click to edit your profile again and check it displays '16th August 2013'. Click to edit your profile again and change 'Preferred calendar' back to 'Hijri' then save. Visit <yoursite>/user/profile/index.php. Click to edit the profile field you created. Check that the 'Short name' is set to '1369'. Check that the 'End year' is set to '1441'. Click 'Save changes'. Click to edit the profile field you created. Check that the 'Short name' is set to '1369'. Check that the 'End year' is set to '1441'. Visit the edit profile page and change 'Preferred calendar' back to 'Gregorian'. Visit the settings for the profile field you created. Check that the 'Short name' is set to '1950'. Check that the 'End year' is set to '2020'. Test 5 - Test dates are saved correctly. Log in as an administrator. Visit the edit profile page and set 'Preferred calendar' to 'Hijri'. Visit a course and create an assignment. Set the name and description to whatever you want and save. Go back to edit your profile and change 'Preferred calendar' to 'Gregorian'. Click to view the assignment and check that dates displayed are today's date. Test 6 - Test that the course calendar setting takes preference. Log in as a student. Go to edit your profile and set the 'Preferred calendar' to 'Hijri'. As an administrator do the same to your profile. As an administrator visit the course settings for a course that student belongs to and set 'Force calendar' to 'Gregorian'. Visit that course and create an assignment and ensure the dates you can select are in Gregorian. Click on the assignment as the student and ensure the dates are displayed in Gregorian. Change the course setting 'Force calendar' to 'Do not force'. Repeat steps 5-6 but instead check the dates are in Hijri. Test 7 - Test that uninstalling the calendar does not break everything. Log in as an administrator. Visit the edit profile page and set your 'Preferred calendar' to 'Hijri'. Do the same as a student. Visit a course and set 'Force calendar' to 'Hijri'. As the admin visit <yoursite>/admin/plugins.php and scroll down to 'Calendar types'. Check that you cannot uninstall the Gregorian calendar type. Click to uninstall the Hijri calendar. Once you see the screen saying that it was successful remove the directory calendar/type/hijri. Click on continue. Visit your profile page and ensure dates are shown in Gregorian with no warnings. Visit the course page and ensure dates are shown in Gregorian with no warnings.
    • Difficulty:
      Difficult
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-18375_master
    • Sprint:
      BACKEND Sprint 4
    • Story Points (Obsolete):
      100
    • Sprint:
      BACKEND Sprint 4

      Description

      I implemented a patch to add the capability of working with other calendar systems than just Gregorian.
      I'll provide the instructions to apply the patch in following post

        Gliffy Diagrams

        1. foodle_calendar241.txt
          101 kB
          Shamim Rezaie
        2. patch.txt
          49 kB
          Shamim Rezaie
        3. patch.txt
          48 kB
          Shamim Rezaie
        1. calendar_block_bug.png
          9 kB

          Issue Links

            Activity

            rezaie9 Shamim Rezaie created issue -
            rezaie9 Shamim Rezaie made changes -
            Field Original Value New Value
            Attachment patch.txt [ 16372 ]
            rezaie9 Shamim Rezaie made changes -
            Attachment calendar_system.zip [ 16373 ]
            rezaie9 Shamim Rezaie made changes -
            Description I implemented a patch to add the capability of working with other calendar systems than just Gregorian.
            I'll provide the instructions to apply the path in following post
            I implemented a patch to add the capability of working with other calendar systems than just Gregorian.
            I'll provide the instructions to apply the patch in following post
            rezaie9 Shamim Rezaie made changes -
            Summary Multi Calendar support [patch] Multi Calendar support
            koen Koen Roggemans made changes -
            Link This issue will help resolve MDL-7149 [ MDL-7149 ]
            rezaie9 Shamim Rezaie made changes -
            Attachment patch.txt [ 19731 ]
            rezaie9 Shamim Rezaie made changes -
            Attachment calendar_system.zip [ 16373 ]
            rezaie9 Shamim Rezaie made changes -
            Attachment patch.txt [ 19731 ]
            rezaie9 Shamim Rezaie made changes -
            Attachment patch.txt [ 19738 ]
            halfblod mjsaei made changes -
            Link This issue is a clone of MDL-22722 [ MDL-22722 ]
            dougiamas Martin Dougiamas made changes -
            Fix Version/s 2.1 [ 10370 ]
            dougiamas Martin Dougiamas made changes -
            Workflow jira [ 30858 ] MDL Workflow [ 44552 ]
            dougiamas Martin Dougiamas made changes -
            Workflow MDL Workflow [ 44552 ] MDL Full Workflow [ 72925 ]
            dougiamas Martin Dougiamas made changes -
            Fix Version/s 2.1.1 [ 10750 ]
            Fix Version/s 2.1 [ 10370 ]
            dougiamas Martin Dougiamas made changes -
            Fix Version/s 2.1.2 [ 10851 ]
            Fix Version/s 2.1.1 [ 10750 ]
            stronk7 Eloy Lafuente (stronk7) made changes -
            Fix Version/s 2.1.3 [ 11251 ]
            Fix Version/s 2.1.2 [ 10851 ]
            dougiamas Martin Dougiamas made changes -
            Assignee Martin Dougiamas [ dougiamas ] moodle.com [ moodle.com ]
            stronk7 Eloy Lafuente (stronk7) made changes -
            Fix Version/s 2.1.4 [ 11452 ]
            Fix Version/s 2.1.3 [ 11251 ]
            stronk7 Eloy Lafuente (stronk7) made changes -
            Fix Version/s 2.1.5 [ 11553 ]
            Fix Version/s 2.1.4 [ 11452 ]
            sisnet39 sisnet39 made changes -
            Link This issue is a clone of MDL-22722 [ MDL-22722 ]
            stronk7 Eloy Lafuente (stronk7) made changes -
            Fix Version/s 2.1.6 [ 12052 ]
            Fix Version/s 2.1.5 [ 11553 ]
            stronk7 Eloy Lafuente (stronk7) made changes -
            Fix Version/s 2.1.7 [ 12161 ]
            Fix Version/s 2.1.6 [ 12052 ]
            stronk7 Eloy Lafuente (stronk7) made changes -
            Fix Version/s 2.1.8 [ 12351 ]
            Fix Version/s 2.1.7 [ 12161 ]
            stronk7 Eloy Lafuente (stronk7) made changes -
            Fix Version/s 2.1.9 [ 12371 ]
            Fix Version/s 2.1.8 [ 12351 ]
            stronk7 Eloy Lafuente (stronk7) made changes -
            Fix Version/s 2.1.10 [ 12455 ]
            Fix Version/s 2.1.9 [ 12371 ]
            rezaie9 Shamim Rezaie made changes -
            Attachment foodle_calendar241.txt [ 31612 ]
            danmarsden Dan Marsden made changes -
            Labels patch
            danmarsden Dan Marsden made changes -
            Affects Version/s 2.4.3 [ 12569 ]
            danmarsden Dan Marsden made changes -
            Fix Version/s Future Dev [ 12153 ]
            Fix Version/s 2.1.10 [ 12455 ]
            danmarsden Dan Marsden made changes -
            Link This issue is duplicated by MDL-39502 [ MDL-39502 ]
            salvetore Michael de Raadt made changes -
            Summary [patch] Multi Calendar support Multi Calendar support
            Priority Minor [ 4 ] Major [ 3 ]
            Labels patch patch triaged
            dougiamas Martin Dougiamas made changes -
            Fix Version/s BACKEND [ 12582 ]
            dougiamas Martin Dougiamas made changes -
            Rank Ranked lower
            moodle.com moodle.com made changes -
            Story Points 100
            moodle.com moodle.com made changes -
            Rank Ranked higher
            salvetore Michael de Raadt made changes -
            Sprint BACKEND Sprint 1 [ 2 ]
            markn Mark Nelson made changes -
            Assignee moodle.com [ moodle.com ] Mark Nelson [ markn ]
            markn Mark Nelson made changes -
            Status Open [ 1 ] Development in progress [ 3 ]
            markn Mark Nelson made changes -
            markn Mark Nelson made changes -
            Affects Version/s 2.5 [ 12452 ]
            Affects Version/s 2.4 [ 12255 ]
            Affects Version/s 2.3.7 [ 12574 ]
            Affects Version/s 2.4.3 [ 12569 ]
            Difficulty Easy [ 10023 ] Difficult [ 10025 ]
            salvetore Michael de Raadt made changes -
            Sprint BACKEND Sprint 1 [ 2 ]
            salvetore Michael de Raadt made changes -
            Rank Ranked higher
            markn Mark Nelson made changes -
            rezaie9 Shamim Rezaie made changes -
            salvetore Michael de Raadt made changes -
            Sprint BACKEND Sprint 2 [ 4 ]
            rezaie9 Shamim Rezaie made changes -
            Assignee Mark Nelson [ markn ] Shamim Rezaie [ rezaie9 ]
            rezaie9 Shamim Rezaie made changes -
            Assignee Shamim Rezaie [ rezaie9 ] Mark Nelson [ markn ]
            salvetore Michael de Raadt made changes -
            Rank Ranked lower
            salvetore Michael de Raadt made changes -
            Sprint BACKEND Sprint 2 [ 4 ]
            salvetore Michael de Raadt made changes -
            Rank Ranked higher
            salvetore Michael de Raadt made changes -
            Rank Ranked higher
            salvetore Michael de Raadt made changes -
            Sprint BACKEND Sprint 3 [ 6 ]
            markn Mark Nelson made changes -
            Status Development in progress [ 3 ] Waiting for peer review [ 10012 ]
            fred Frédéric Massart made changes -
            Peer reviewer fred
            markn Mark Nelson made changes -
            Testing Instructions To tester - this looks like a lot, but it really isn't. The steps have been broken down.

            h3. Test 1 - Check all PHPUnit tests pass.

            # Run phpunit tests and ensure there are no errors.

            h3. Test 2 - Check that installing and updating create expected database columns.

            # Perform a fresh install and an upgrade to the latest integration branch.
            # Check that there is a new column in the user and course table called 'calendartype' for both the fresh install and upgrade.
            # Make sure that the default value for the course is blank and the default for the user is 'gregorian' for both the fresh install and upgrade.

            h3. Test 3 - Test that the calendar does not display when there is no other Calendar type besides 'Gregorian'.

            # Log in as an administrator.
            # Visit the edit profile page, ensure there is *no* field with the label 'Preferred calendar'.
            # Visit a course settings page, ensure there is *no* field with the label 'Force calendar' under 'Appearance'.

            h3. Test 4 - Test the 'Date/Time' user profile field works as expected.

            # Log in as an administrator.
            # Visit <yoursite>/user/profile/index.php
            # Click to add a 'Date/Time' field.
            # Set the 'Short name' and 'name' field to whatever you like.
            # Set the 'Start year' to 1950.
            # Set the 'End year' to 2020.
            # Click to save changes.
            # Run the command "git clone https://github.com/markn86/moodle-calendartype_hijri.git hijri" in the folder calendar/type.
            # Visit the admin/index.php page to install the new plugin.
            # Visit the edit profile page and ensure there is a field with the label 'Preferred calendar'.
            # Ensure this field contains the options 'Gregorian' and 'Hijri'.
            # Scroll down to 'Other fields' and check that the 'Date/Time' field you created earlier is listed there.
            # Enable this field and check that it is displaying today's date.
            # Change the date to 16th August 2013.
            # Scroll back up and change the preferred calendar to 'Hijri'.
            # Save the user profile page.
            # On the next page check that the 'Date/Time' user profile field is listed and says '10 Shawwāl 1434' (the day may be a 9 depending on your location).
            # Click to edit your profile again and check that this date is also displayed in the select boxes then save.
            # Click to edit your profile again and change 'Preferred calendar' back to 'Gregorian' then save.
            # Click to edit your profile again and check it displays '16th August 2013'.
            # Click to edit your profile again and change 'Preferred calendar' back to 'Hijri' then save.
            # Visit <yoursite>/user/profile/index.php.
            # Click to edit the profile field you created.
            # Check that the 'Short name' is set to '1369'.
            # Check that the 'End year' is set to '1441'.
            # Click 'Save changes'.
            # Click to edit the profile field you created.
            # Check that the 'Short name' is set to '1369'.
            # Check that the 'End year' is set to '1441'.
            # Visit the edit profile page and change 'Preferred calendar' back to 'Gregorian'.
            # Visit the settings for the profile field you created.
            # Check that the 'Short name' is set to '1950'.
            # Check that the 'End year' is set to '2020'.

            h3. Test 5 - Test dates are saved correctly.

            # Log in as an administrator.
            # Visit the edit profile page and set 'Preferred calendar' to 'Hijri'.
            # Visit a course and create an assignment.
            # Set the name and description to whatever you want and save.
            # Go back to edit your profile and change 'Preferred calendar' to 'Gregorian'.
            # Click to view the assignment and check that dates displayed are today's date.

            h3 Test 6 - Test that the course calendar setting takes preference.

            # Log in as a student.
            # Go to edit your profile and set the 'Preferred calendar' to 'Hijri'.
            # As an administrator do the same to your profile.
            # As an administrator visit the course settings for a course that student belongs to and set 'Force calendar' to 'Gregorian'.
            # Visit that course and create an assignment and ensure the dates you can select are in Gregorian.
            # Click on the assignment as the student and ensure the dates are displayed in Gregorian.
            # Change the course setting 'Force calendar' to 'Do not force'.
            # Repeat steps 5-6 but instead check the dates are in Hijri.

            h3 Test 7 - Test that uninstalling the calendar does not break everything.

            # Log in as an administrator.
            # Visit the edit profile page and set your 'Preferred calendar' to 'Hijri'.
            # Do the same as a student.
            # Visit a course and set 'Force calendar' to 'Hijri'.
            # As the admin visit <yoursite>/admin/plugins.php and scroll down to 'Calendar types'.
            # Check that you cannot uninstall the Gregorian calendar type.
            # Click to uninstall the Hijri calendar.
            # Once you see the screen saying that it was successful remove the directory calendar/type/hijri.
            # Click on continue.
            # Visit your profile page and ensure dates are shown in Gregorian with no warnings.
            # Visit the course page and ensure dates are shown in Gregorian with no warnings.
            markn Mark Nelson made changes -
            Testing Instructions To tester - this looks like a lot, but it really isn't. The steps have been broken down.

            h3. Test 1 - Check all PHPUnit tests pass.

            # Run phpunit tests and ensure there are no errors.

            h3. Test 2 - Check that installing and updating create expected database columns.

            # Perform a fresh install and an upgrade to the latest integration branch.
            # Check that there is a new column in the user and course table called 'calendartype' for both the fresh install and upgrade.
            # Make sure that the default value for the course is blank and the default for the user is 'gregorian' for both the fresh install and upgrade.

            h3. Test 3 - Test that the calendar does not display when there is no other Calendar type besides 'Gregorian'.

            # Log in as an administrator.
            # Visit the edit profile page, ensure there is *no* field with the label 'Preferred calendar'.
            # Visit a course settings page, ensure there is *no* field with the label 'Force calendar' under 'Appearance'.

            h3. Test 4 - Test the 'Date/Time' user profile field works as expected.

            # Log in as an administrator.
            # Visit <yoursite>/user/profile/index.php
            # Click to add a 'Date/Time' field.
            # Set the 'Short name' and 'name' field to whatever you like.
            # Set the 'Start year' to 1950.
            # Set the 'End year' to 2020.
            # Click to save changes.
            # Run the command "git clone https://github.com/markn86/moodle-calendartype_hijri.git hijri" in the folder calendar/type.
            # Visit the admin/index.php page to install the new plugin.
            # Visit the edit profile page and ensure there is a field with the label 'Preferred calendar'.
            # Ensure this field contains the options 'Gregorian' and 'Hijri'.
            # Scroll down to 'Other fields' and check that the 'Date/Time' field you created earlier is listed there.
            # Enable this field and check that it is displaying today's date.
            # Change the date to 16th August 2013.
            # Scroll back up and change the preferred calendar to 'Hijri'.
            # Save the user profile page.
            # On the next page check that the 'Date/Time' user profile field is listed and says '10 Shawwāl 1434' (the day may be a 9 depending on your location).
            # Click to edit your profile again and check that this date is also displayed in the select boxes then save.
            # Click to edit your profile again and change 'Preferred calendar' back to 'Gregorian' then save.
            # Click to edit your profile again and check it displays '16th August 2013'.
            # Click to edit your profile again and change 'Preferred calendar' back to 'Hijri' then save.
            # Visit <yoursite>/user/profile/index.php.
            # Click to edit the profile field you created.
            # Check that the 'Short name' is set to '1369'.
            # Check that the 'End year' is set to '1441'.
            # Click 'Save changes'.
            # Click to edit the profile field you created.
            # Check that the 'Short name' is set to '1369'.
            # Check that the 'End year' is set to '1441'.
            # Visit the edit profile page and change 'Preferred calendar' back to 'Gregorian'.
            # Visit the settings for the profile field you created.
            # Check that the 'Short name' is set to '1950'.
            # Check that the 'End year' is set to '2020'.

            h3. Test 5 - Test dates are saved correctly.

            # Log in as an administrator.
            # Visit the edit profile page and set 'Preferred calendar' to 'Hijri'.
            # Visit a course and create an assignment.
            # Set the name and description to whatever you want and save.
            # Go back to edit your profile and change 'Preferred calendar' to 'Gregorian'.
            # Click to view the assignment and check that dates displayed are today's date.

            h3 Test 6 - Test that the course calendar setting takes preference.

            # Log in as a student.
            # Go to edit your profile and set the 'Preferred calendar' to 'Hijri'.
            # As an administrator do the same to your profile.
            # As an administrator visit the course settings for a course that student belongs to and set 'Force calendar' to 'Gregorian'.
            # Visit that course and create an assignment and ensure the dates you can select are in Gregorian.
            # Click on the assignment as the student and ensure the dates are displayed in Gregorian.
            # Change the course setting 'Force calendar' to 'Do not force'.
            # Repeat steps 5-6 but instead check the dates are in Hijri.

            h3 Test 7 - Test that uninstalling the calendar does not break everything.

            # Log in as an administrator.
            # Visit the edit profile page and set your 'Preferred calendar' to 'Hijri'.
            # Do the same as a student.
            # Visit a course and set 'Force calendar' to 'Hijri'.
            # As the admin visit <yoursite>/admin/plugins.php and scroll down to 'Calendar types'.
            # Check that you cannot uninstall the Gregorian calendar type.
            # Click to uninstall the Hijri calendar.
            # Once you see the screen saying that it was successful remove the directory calendar/type/hijri.
            # Click on continue.
            # Visit your profile page and ensure dates are shown in Gregorian with no warnings.
            # Visit the course page and ensure dates are shown in Gregorian with no warnings.
            To tester - this looks like a lot, but it really isn't. The steps have been broken down.

            h5. Test 1 - Check all PHPUnit tests pass.

            # Run phpunit tests and ensure there are no errors.

            h5. Test 2 - Check that installing and updating create expected database columns.

            # Perform a fresh install and an upgrade to the latest integration branch.
            # Check that there is a new column in the user and course table called 'calendartype' for both the fresh install and upgrade.
            # Make sure that the default value for the course is blank and the default for the user is 'gregorian' for both the fresh install and upgrade.

            h5. Test 3 - Test that the calendar does not display when there is no other Calendar type besides 'Gregorian'.

            # Log in as an administrator.
            # Visit the edit profile page, ensure there is *no* field with the label 'Preferred calendar'.
            # Visit a course settings page, ensure there is *no* field with the label 'Force calendar' under 'Appearance'.

            h5. Test 4 - Test the 'Date/Time' user profile field works as expected.

            # Log in as an administrator.
            # Visit <yoursite>/user/profile/index.php
            # Click to add a 'Date/Time' field.
            # Set the 'Short name' and 'name' field to whatever you like.
            # Set the 'Start year' to 1950.
            # Set the 'End year' to 2020.
            # Click to save changes.
            # Run the command "git clone https://github.com/markn86/moodle-calendartype_hijri.git hijri" in the folder calendar/type.
            # Visit the admin/index.php page to install the new plugin.
            # Visit the edit profile page and ensure there is a field with the label 'Preferred calendar'.
            # Ensure this field contains the options 'Gregorian' and 'Hijri'.
            # Scroll down to 'Other fields' and check that the 'Date/Time' field you created earlier is listed there.
            # Enable this field and check that it is displaying today's date.
            # Change the date to 16th August 2013.
            # Scroll back up and change the preferred calendar to 'Hijri'.
            # Save the user profile page.
            # On the next page check that the 'Date/Time' user profile field is listed and says '10 Shawwāl 1434' (the day may be a 9 depending on your location).
            # Click to edit your profile again and check that this date is also displayed in the select boxes then save.
            # Click to edit your profile again and change 'Preferred calendar' back to 'Gregorian' then save.
            # Click to edit your profile again and check it displays '16th August 2013'.
            # Click to edit your profile again and change 'Preferred calendar' back to 'Hijri' then save.
            # Visit <yoursite>/user/profile/index.php.
            # Click to edit the profile field you created.
            # Check that the 'Short name' is set to '1369'.
            # Check that the 'End year' is set to '1441'.
            # Click 'Save changes'.
            # Click to edit the profile field you created.
            # Check that the 'Short name' is set to '1369'.
            # Check that the 'End year' is set to '1441'.
            # Visit the edit profile page and change 'Preferred calendar' back to 'Gregorian'.
            # Visit the settings for the profile field you created.
            # Check that the 'Short name' is set to '1950'.
            # Check that the 'End year' is set to '2020'.

            h5. Test 5 - Test dates are saved correctly.

            # Log in as an administrator.
            # Visit the edit profile page and set 'Preferred calendar' to 'Hijri'.
            # Visit a course and create an assignment.
            # Set the name and description to whatever you want and save.
            # Go back to edit your profile and change 'Preferred calendar' to 'Gregorian'.
            # Click to view the assignment and check that dates displayed are today's date.

            h5. Test 6 - Test that the course calendar setting takes preference.

            # Log in as a student.
            # Go to edit your profile and set the 'Preferred calendar' to 'Hijri'.
            # As an administrator do the same to your profile.
            # As an administrator visit the course settings for a course that student belongs to and set 'Force calendar' to 'Gregorian'.
            # Visit that course and create an assignment and ensure the dates you can select are in Gregorian.
            # Click on the assignment as the student and ensure the dates are displayed in Gregorian.
            # Change the course setting 'Force calendar' to 'Do not force'.
            # Repeat steps 5-6 but instead check the dates are in Hijri.

            h5. Test 7 - Test that uninstalling the calendar does not break everything.

            # Log in as an administrator.
            # Visit the edit profile page and set your 'Preferred calendar' to 'Hijri'.
            # Do the same as a student.
            # Visit a course and set 'Force calendar' to 'Hijri'.
            # As the admin visit <yoursite>/admin/plugins.php and scroll down to 'Calendar types'.
            # Check that you cannot uninstall the Gregorian calendar type.
            # Click to uninstall the Hijri calendar.
            # Once you see the screen saying that it was successful remove the directory calendar/type/hijri.
            # Click on continue.
            # Visit your profile page and ensure dates are shown in Gregorian with no warnings.
            # Visit the course page and ensure dates are shown in Gregorian with no warnings.
            fred Frédéric Massart made changes -
            Original Estimate 0 minutes [ 0 ]
            Remaining Estimate 0 minutes [ 0 ]
            Status Waiting for peer review [ 10012 ] Peer review in progress [ 10013 ]
            fred Frédéric Massart made changes -
            Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
            salvetore Michael de Raadt made changes -
            Sprint BACKEND Sprint 3 [ 6 ] BACKEND Sprint 5 [ 8 ]
            markn Mark Nelson made changes -
            Status Development in progress [ 3 ] Waiting for integration review [ 10010 ]
            damyon Damyon Wiese made changes -
            Currently in integration Yes [ 10041 ]
            damyon Damyon Wiese made changes -
            Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
            Integrator damyon
            damyon Damyon Wiese made changes -
            Status Integration review in progress [ 10004 ] Reopened [ 4 ]
            cibot CiBoT made changes -
            Status Reopened [ 4 ] Reopened [ 4 ]
            Currently in integration Yes [ 10041 ]
            markn Mark Nelson made changes -
            Status Reopened [ 4 ] Waiting for integration review [ 10010 ]
            samhemelryk Sam Hemelryk made changes -
            Integrator damyon
            Currently in integration Yes [ 10041 ]
            damyon Damyon Wiese made changes -
            Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
            Integrator damyon
            damyon Damyon Wiese made changes -
            Labels patch triaged cime patch triaged
            damyon Damyon Wiese made changes -
            Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
            Fix Version/s 2.6 [ 12579 ]
            Fix Version/s Future Dev [ 12153 ]
            Fix Version/s BACKEND [ 12582 ]
            abgreeve Adrian Greeve made changes -
            Link This issue has been marked as being related by MDL-41664 [ MDL-41664 ]
            dmonllao David Monllaó made changes -
            Tester andyjdavis
            andyjdavis Andrew Davis made changes -
            Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
            andyjdavis Andrew Davis made changes -
            Link This issue testing discovered MDL-41721 [ MDL-41721 ]
            andyjdavis Andrew Davis made changes -
            Status Testing in progress [ 10011 ] Tested [ 10006 ]
            damyon Damyon Wiese made changes -
            Status Tested [ 10006 ] Closed [ 6 ]
            Resolution Fixed [ 1 ]
            Currently in integration Yes [ 10041 ]
            Integration date 13/Sep/13
            rezaie9 Shamim Rezaie made changes -
            Comment [ A bug has been introduced during the code refactoring. No matter what the user's choice is, the calendar block shows days based on the Gregorian calendar type.

            Please see the screenshot I attached. As you can see in the attached picture, the calendar block claims that it is displaying Shawwāl 1434, but the fact is that it is displaying September 2013. ]
            rezaie9 Shamim Rezaie made changes -
            Attachment calendar_block_bug.png [ 34583 ]
            markn Mark Nelson made changes -
            Link This issue has a non-specific relationship to MDL-41792 [ MDL-41792 ]
            markn Mark Nelson made changes -
            Epic Link MDL-41866 [ 69725 ]
            markn Mark Nelson made changes -
            Summary Multi Calendar support Displaying dates (not the calendar block) and selecting dates around
            markn Mark Nelson made changes -
            Summary Displaying dates (not the calendar block) and selecting dates around Displaying and selecting dates throughout Moodle should make use of the calendar type system
            markn Mark Nelson made changes -
            Summary Displaying and selecting dates throughout Moodle should make use of the calendar type system Displaying and selecting dates throughout Moodle should allow the use of multiple calendars
            stronk7 Eloy Lafuente (stronk7) made changes -
            Labels cime patch triaged patch triaged
            skodak Petr Skoda made changes -
            Link This issue caused a regression MDL-44742 [ MDL-44742 ]
            skodak Petr Skoda made changes -
            Link This issue caused a regression MDL-44742 [ MDL-44742 ]

              People

              • Votes:
                138 Vote for this issue
                Watchers:
                48 Start watching this issue

                Dates

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

                  Agile