Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide

      1/ install moodle - verify the altered setting do not pop up
      2/ install 2.3, set the duration to some value like 90 in manual enrol admin settings - upgrade to master, verify the setting continues being 90 seconds.
      3/ in 2.4, set the duration to 7200 seconds and save. Verify it has been converted to 2 hours.
      4/ in 2.4, try changing manual, paypal and self duration default setting and
      5/ create new course and add enrol instances - verify the defaults were used

      Show
      1/ install moodle - verify the altered setting do not pop up 2/ install 2.3, set the duration to some value like 90 in manual enrol admin settings - upgrade to master, verify the setting continues being 90 seconds. 3/ in 2.4, set the duration to 7200 seconds and save. Verify it has been converted to 2 hours. 4/ in 2.4, try changing manual, paypal and self duration default setting and 5/ create new course and add enrol instances - verify the defaults were used
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w34_MDL-34853_m24_durationsetting

      Description

      At present we specify duration in seconds which is not good for enrol default settings, there is already duration element in formslib.

      1/ add new duration admin setting that mimics form element
      2/ add "weeks" unit (I may be useful in week based courses)
      3/ use the new duration setting type in enrol_self, enrol_paypal and enrol_manual

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Integrated, with one extra commit fixing code style violations (master only). Thanks!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, with one extra commit fixing code style violations (master only). Thanks!
              Hide
              poltawski Dan Poltawski added a comment -

              Failing, this seems to be breaking phpunit:

              duration_form_element_testcase::test_get_units
              Failed asserting that two arrays are equal.
              — Expected
              +++ Actual
              @@ @@
              Array (
              1 => 'seconds'
              60 => 'minutes'
              3600 => 'hours'
              86400 => 'days'

              • 604800 => 'weeks'
                )

              /Users/Shared/Jenkins/Home/git_repositories/master/lib/form/tests/duration_test.php:80
              /Users/Shared/Jenkins/Home/git_repositories/master/lib/phpunit/classes/basic_testcase.php:64

              Show
              poltawski Dan Poltawski added a comment - Failing, this seems to be breaking phpunit: duration_form_element_testcase::test_get_units Failed asserting that two arrays are equal. — Expected +++ Actual @@ @@ Array ( 1 => 'seconds' 60 => 'minutes' 3600 => 'hours' 86400 => 'days' 604800 => 'weeks' ) /Users/Shared/Jenkins/Home/git_repositories/master/lib/form/tests/duration_test.php:80 /Users/Shared/Jenkins/Home/git_repositories/master/lib/phpunit/classes/basic_testcase.php:64
              Hide
              poltawski Dan Poltawski added a comment -

              Have pushed a fix for that.

              Show
              poltawski Dan Poltawski added a comment - Have pushed a fix for that.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Thanks for the fix!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Thanks for the fix!
              Hide
              poltawski Dan Poltawski added a comment -

              This works, apart from the JS popup, which is different..

              I'm passing this, and suggest we create a new issue for that new issue.

              Show
              poltawski Dan Poltawski added a comment - This works, apart from the JS popup, which is different.. I'm passing this, and suggest we create a new issue for that new issue.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              YEAR!*

              CAF*, TOT!*

              • Your effort amazingly resulted. (unbelievable :-P)
              • Closing as fixed.
              • Tons of thanks.
              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - YEAR!* CAF*, TOT!* Your effort amazingly resulted. (unbelievable :-P) Closing as fixed. Tons of thanks.

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12