Moodle
  1. Moodle
  2. MDL-27242

Restrict Access by time as well as day

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.2
    • Component/s: Activity completion
    • Labels:
      None
    • Testing Instructions:
      Hide

      You must have enabled availability support at system level for all tests.

      Some background: This change does not affect the logic about whether users are permitted to access/see activities, which was always based on time values in seconds. The change only affects how the settings are edited and displayed. That's why this test does not include 'can the user access...' type steps.

      Test upgrade step:

      1. Before running the system upgrade, ensure that you have some activities with an 'available until' date set, for example to 14 October. (Which means they will be available until 14 October at 23:59:59.)
      2. Run the system upgrade and go back to the course

      • Verify that that the activity still displays as available until 14 October.
        3. Edit the activity.
      • Verify that the 'until' date now shows as 15 October 00:00

      Editing change

      4. Add a new activity (any kind) on the course.

      • Verify that the available from/until dates are both disabled.
      • Verify that the value for these dates is 0:00 on current day. (This allows users to more easily take advantage of the 'shorthand' date-only display.)

      Test display change

      5. Add a number of activities with the following from/to dates and verify that the text is the same as given here. I have written them in the format [from date] to [to date] = [expected text]. The result may vary in specific details based on your time format - this is the spectacularly horrible format that, I think, is Moodle default. (01:05 PM? Really? I think you mean 1.05 pm, if you must insist in not using 24-hour clock... anyhow, separate issue.)

      a. 14 Oct 13:05 to 17 Oct 12:10 = Available from 14 October 2011, 01:05 PM to 17 October 2011, 12:10 PM.
      b. 14 Oct 0:00 to 17 Oct 12:10 = Available from 14 October 2011 to 17 October 2011, 12:10 PM.
      c.14 Oct 13:05 to 18 Oct 0:00 = Available from 14 October 2011, 01:05 PM to 17 October 2011.'
      d. 14 Oct 0:00 to 18 Oct 0:00 = Available from 14 October 2011 to 17 October 2011.
      e. 14 Oct 0:00 to 15 Oct 0:00 = Available on 14 October 2011.
      f. 14 Oct 13:05 to 15 Oct 0:00 = Available from 14 October 2011, 01:05 PM to 15 October 2011, 12:00 AM.
      g. 14 Oct 0:00 to 14 Oct 12:05 = Available from 14 October 2011, 12:00 AM to 14 October 2011, 12:05 PM.
      h. 14 Oct 13:05 to [disabled] = Available from 14 October 2011, 01:05 PM.
      i. 14 Oct 0:00 to [disabled] = Available from 14 October 2011.
      j. [disabled] to 14 Oct 13:05 = Available until 14 October 2011, 01:05 PM.
      k [disabled] to 15 Oct 0:00 = Available until 14 October 2011.

      (yes I did this during development - I found it quickest to add labels.)

      Show
      You must have enabled availability support at system level for all tests. Some background: This change does not affect the logic about whether users are permitted to access/see activities, which was always based on time values in seconds. The change only affects how the settings are edited and displayed. That's why this test does not include 'can the user access...' type steps. Test upgrade step: 1. Before running the system upgrade, ensure that you have some activities with an 'available until' date set, for example to 14 October. (Which means they will be available until 14 October at 23:59:59.) 2. Run the system upgrade and go back to the course Verify that that the activity still displays as available until 14 October. 3. Edit the activity. Verify that the 'until' date now shows as 15 October 00:00 Editing change 4. Add a new activity (any kind) on the course. Verify that the available from/until dates are both disabled. Verify that the value for these dates is 0:00 on current day. (This allows users to more easily take advantage of the 'shorthand' date-only display.) Test display change 5. Add a number of activities with the following from/to dates and verify that the text is the same as given here. I have written them in the format [from date] to [to date] = [expected text] . The result may vary in specific details based on your time format - this is the spectacularly horrible format that, I think, is Moodle default. (01:05 PM? Really? I think you mean 1.05 pm, if you must insist in not using 24-hour clock... anyhow, separate issue.) a. 14 Oct 13:05 to 17 Oct 12:10 = Available from 14 October 2011, 01:05 PM to 17 October 2011, 12:10 PM. b. 14 Oct 0:00 to 17 Oct 12:10 = Available from 14 October 2011 to 17 October 2011, 12:10 PM. c.14 Oct 13:05 to 18 Oct 0:00 = Available from 14 October 2011, 01:05 PM to 17 October 2011.' d. 14 Oct 0:00 to 18 Oct 0:00 = Available from 14 October 2011 to 17 October 2011. e. 14 Oct 0:00 to 15 Oct 0:00 = Available on 14 October 2011. f. 14 Oct 13:05 to 15 Oct 0:00 = Available from 14 October 2011, 01:05 PM to 15 October 2011, 12:00 AM. g. 14 Oct 0:00 to 14 Oct 12:05 = Available from 14 October 2011, 12:00 AM to 14 October 2011, 12:05 PM. h. 14 Oct 13:05 to [disabled] = Available from 14 October 2011, 01:05 PM. i. 14 Oct 0:00 to [disabled] = Available from 14 October 2011. j. [disabled] to 14 Oct 13:05 = Available until 14 October 2011, 01:05 PM. k [disabled] to 15 Oct 0:00 = Available until 14 October 2011. (yes I did this during development - I found it quickest to add labels.)
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-27242-master
    • Rank:
      16922

      Description

      Several users have requested that the Restrict Access allow both a day and a time to be specified, rather than just a day, for both Allow Access From and Allow Access Until, for all resources and activities.

        Issue Links

          Activity

          Eddie Naidu created issue -
          Martin Dougiamas made changes -
          Field Original Value New Value
          Workflow MDL Workflow [ 69378 ] MDL Full Workflow [ 76403 ]
          Charles Fulton made changes -
          Link This issue will help resolve MDL-19862 [ MDL-19862 ]
          Sam Marshall made changes -
          Link This issue will help resolve MDL-29422 [ MDL-29422 ]
          Sam Marshall made changes -
          Link This issue will help resolve MDL-28992 [ MDL-28992 ]
          Sam Marshall made changes -
          Status Open [ 1 ] Waiting for integration review [ 10010 ]
          Pull Master Diff URL https://github.com/sammarshallou/moodle/compare/master...MDL-27242-master
          Pull Master Branch MDL-27242-master
          Pull from Repository git://github.com/sammarshallou/moodle.git
          Fix Version/s 2.2 [ 10656 ]
          Testing Instructions You must have enabled availability support at system level for all tests.

          Some background: This change does not affect the logic about whether users are permitted to access/see activities, which was always based on time values in seconds. The change only affects how the settings are edited and displayed. That's why this test does not include 'can the user access...' type steps.

          Test upgrade step:

          1. Before running the system upgrade, ensure that you have some activities with an 'available until' date set, for example to 14 October. (Which means they will be available until 14 October at 23:59:59.)
          2. Run the system upgrade and go back to the course
          - Verify that that the activity still displays as available until 14 October.
          3. Edit the activity.
          - Verify that the 'until' date now shows as 15 October 00:00

          Editing change

          4. Add a new activity (any kind) on the course.
          - Verify that the available from/until dates are both disabled.
          - Verify that the value for these dates is 0:00 on current day. (This allows users to more easily take advantage of the 'shorthand' date-only display.)

          Test display change

          5. Add a number of activities with the following from/to dates and verify that the text is the same as given here. I have written them in the format [from date] to [to date] = [expected text]. The result may vary in specific details based on your time format - this is the spectacularly horrible format that, I think, is Moodle default. (01:05 PM? Really? I think you mean 1.05 pm, if you must insist in not using 24-hour clock... anyhow, separate issue.)

          a. 14 Oct 13:05 to 17 Oct 12:10 = Available from 14 October 2011, 01:05 PM to 17 October 2011, 12:10 PM.
          b. 14 Oct 0:00 to 17 Oct 12:10 = Available from 14 October 2011 to 17 October 2011, 12:10 PM.
          c.14 Oct 13:05 to 18 Oct 0:00 = Available from 14 October 2011, 01:05 PM to 17 October 2011.’
          d. 14 Oct 0:00 to 18 Oct 0:00 = Available from 14 October 2011 to 17 October 2011.
          e. 14 Oct 0:00 to 15 Oct 0:00 = Available on 14 October 2011.
          f. 14 Oct 13:05 to 15 Oct 0:00 = Available from 14 October 2011, 01:05 PM to 15 October 2011, 12:00 AM.
          g. 14 Oct 0:00 to 14 Oct 12:05 = Available from 14 October 2011, 12:00 AM to 14 October 2011, 12:05 PM.
          h. 14 Oct 13:05 to [disabled] = Available from 14 October 2011, 01:05 PM.
          i. 14 Oct 0:00 to [disabled] = Available from 14 October 2011.
          j. [disabled] to 14 Oct 13:05 = Available until 14 October 2011, 01:05 PM.
          k [disabled] to 15 Oct 0:00 = Available until 14 October 2011.

          (yes I did this during development - I found it quickest to add labels.)
          Eloy Lafuente (stronk7) made changes -
          Currently in integration Yes
          Sam Hemelryk made changes -
          Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
          Integrator samhemelryk
          Sam Hemelryk made changes -
          Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
          moodle.com made changes -
          Testing Instructions You must have enabled availability support at system level for all tests.

          Some background: This change does not affect the logic about whether users are permitted to access/see activities, which was always based on time values in seconds. The change only affects how the settings are edited and displayed. That's why this test does not include 'can the user access...' type steps.

          Test upgrade step:

          1. Before running the system upgrade, ensure that you have some activities with an 'available until' date set, for example to 14 October. (Which means they will be available until 14 October at 23:59:59.)
          2. Run the system upgrade and go back to the course
          - Verify that that the activity still displays as available until 14 October.
          3. Edit the activity.
          - Verify that the 'until' date now shows as 15 October 00:00

          Editing change

          4. Add a new activity (any kind) on the course.
          - Verify that the available from/until dates are both disabled.
          - Verify that the value for these dates is 0:00 on current day. (This allows users to more easily take advantage of the 'shorthand' date-only display.)

          Test display change

          5. Add a number of activities with the following from/to dates and verify that the text is the same as given here. I have written them in the format [from date] to [to date] = [expected text]. The result may vary in specific details based on your time format - this is the spectacularly horrible format that, I think, is Moodle default. (01:05 PM? Really? I think you mean 1.05 pm, if you must insist in not using 24-hour clock... anyhow, separate issue.)

          a. 14 Oct 13:05 to 17 Oct 12:10 = Available from 14 October 2011, 01:05 PM to 17 October 2011, 12:10 PM.
          b. 14 Oct 0:00 to 17 Oct 12:10 = Available from 14 October 2011 to 17 October 2011, 12:10 PM.
          c.14 Oct 13:05 to 18 Oct 0:00 = Available from 14 October 2011, 01:05 PM to 17 October 2011.’
          d. 14 Oct 0:00 to 18 Oct 0:00 = Available from 14 October 2011 to 17 October 2011.
          e. 14 Oct 0:00 to 15 Oct 0:00 = Available on 14 October 2011.
          f. 14 Oct 13:05 to 15 Oct 0:00 = Available from 14 October 2011, 01:05 PM to 15 October 2011, 12:00 AM.
          g. 14 Oct 0:00 to 14 Oct 12:05 = Available from 14 October 2011, 12:00 AM to 14 October 2011, 12:05 PM.
          h. 14 Oct 13:05 to [disabled] = Available from 14 October 2011, 01:05 PM.
          i. 14 Oct 0:00 to [disabled] = Available from 14 October 2011.
          j. [disabled] to 14 Oct 13:05 = Available until 14 October 2011, 01:05 PM.
          k [disabled] to 15 Oct 0:00 = Available until 14 October 2011.

          (yes I did this during development - I found it quickest to add labels.)
          You must have enabled availability support at system level for all tests.

          Some background: This change does not affect the logic about whether users are permitted to access/see activities, which was always based on time values in seconds. The change only affects how the settings are edited and displayed. That's why this test does not include 'can the user access...' type steps.

          Test upgrade step:

          1. Before running the system upgrade, ensure that you have some activities with an 'available until' date set, for example to 14 October. (Which means they will be available until 14 October at 23:59:59.)
          2. Run the system upgrade and go back to the course
          - Verify that that the activity still displays as available until 14 October.
          3. Edit the activity.
          - Verify that the 'until' date now shows as 15 October 00:00

          Editing change

          4. Add a new activity (any kind) on the course.
          - Verify that the available from/until dates are both disabled.
          - Verify that the value for these dates is 0:00 on current day. (This allows users to more easily take advantage of the 'shorthand' date-only display.)

          Test display change

          5. Add a number of activities with the following from/to dates and verify that the text is the same as given here. I have written them in the format [from date] to [to date] = [expected text]. The result may vary in specific details based on your time format - this is the spectacularly horrible format that, I think, is Moodle default. (01:05 PM? Really? I think you mean 1.05 pm, if you must insist in not using 24-hour clock... anyhow, separate issue.)

          a. 14 Oct 13:05 to 17 Oct 12:10 = Available from 14 October 2011, 01:05 PM to 17 October 2011, 12:10 PM.
          b. 14 Oct 0:00 to 17 Oct 12:10 = Available from 14 October 2011 to 17 October 2011, 12:10 PM.
          c.14 Oct 13:05 to 18 Oct 0:00 = Available from 14 October 2011, 01:05 PM to 17 October 2011.'
          d. 14 Oct 0:00 to 18 Oct 0:00 = Available from 14 October 2011 to 17 October 2011.
          e. 14 Oct 0:00 to 15 Oct 0:00 = Available on 14 October 2011.
          f. 14 Oct 13:05 to 15 Oct 0:00 = Available from 14 October 2011, 01:05 PM to 15 October 2011, 12:00 AM.
          g. 14 Oct 0:00 to 14 Oct 12:05 = Available from 14 October 2011, 12:00 AM to 14 October 2011, 12:05 PM.
          h. 14 Oct 13:05 to [disabled] = Available from 14 October 2011, 01:05 PM.
          i. 14 Oct 0:00 to [disabled] = Available from 14 October 2011.
          j. [disabled] to 14 Oct 13:05 = Available until 14 October 2011, 01:05 PM.
          k [disabled] to 15 Oct 0:00 = Available until 14 October 2011.

          (yes I did this during development - I found it quickest to add labels.)
          Tester phalacee
          Jason Fowler made changes -
          Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
          Jason Fowler made changes -
          Status Testing in progress [ 10011 ] Tested [ 10006 ]
          Eloy Lafuente (stronk7) made changes -
          Status Tested [ 10006 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Currently in integration Yes
          Integration date 19/Oct/11
          Martin Dougiamas made changes -
          Link This issue blocks MDL-30160 [ MDL-30160 ]
          Sam Marshall made changes -
          Link This issue is duplicated by MDL-31425 [ MDL-31425 ]

            People

            • Votes:
              38 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: