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

Validate the duedate of a plan

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: Competencies
    • Labels:
    • Testing Instructions:
      Hide
      • create a template with a due date set to now + 3 hours
      • you should have an error "the due date is too soon"
      • create a template with a due date set to the past
      • you should have an error "The due date cannot be set in the past"
      • check that creating/updating draft plan with any value of duedate should not get error
      • check that creating plan with status active and duedate in past should get error (The due date cannot be set in the past)
      • check that creating plan with status active and now < duedate < now + 10 minutes should get error (the due date is too soon)
      • check that updating an active plan having duedate in past with new duedate in future should get error (The due date has passed, it cannot be changed)
      • check that passing a draft plan (having past duedate) to active with a duatedate > now + 10 min should not get error
      • check that passing a draft plan (having past duedate) to active with a duatedate > now + 10 min should not get error
      • check that passing a draft plan (having past duedate) to active with a duatedate < now should not get error (The due date cannot be set in the past)
      • check that passing a draft plan (having past duedate) to active with now < duedate < now + 10 minutes should get error (the due date is too soon)
      • check that completing plan set with any value of duedate should not get error
      • check that reopening plan with duedate expired or too soon should get an active plan with duedate set to 0.
      • run the unittest

        mdk phpunit -r -s tool_lp_testsuite
        

      Show
      create a template with a due date set to now + 3 hours you should have an error "the due date is too soon" create a template with a due date set to the past you should have an error "The due date cannot be set in the past" check that creating/updating draft plan with any value of duedate should not get error check that creating plan with status active and duedate in past should get error (The due date cannot be set in the past) check that creating plan with status active and now < duedate < now + 10 minutes should get error (the due date is too soon) check that updating an active plan having duedate in past with new duedate in future should get error (The due date has passed, it cannot be changed) check that passing a draft plan (having past duedate) to active with a duatedate > now + 10 min should not get error check that passing a draft plan (having past duedate) to active with a duatedate > now + 10 min should not get error check that passing a draft plan (having past duedate) to active with a duatedate < now should not get error (The due date cannot be set in the past) check that passing a draft plan (having past duedate) to active with now < duedate < now + 10 minutes should get error (the due date is too soon) check that completing plan set with any value of duedate should not get error check that reopening plan with duedate expired or too soon should get an active plan with duedate set to 0. run the unittest mdk phpunit -r -s tool_lp_testsuite
    • Affected Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-52485_master
    • Story Points:
      0.5
    • Sprint:
      CBE Sprint 4

      Description

      The plan persistent does not validate the due date field.

      This issue should also ensure that updating a plan from a template will not cause problems because of this new validation. E.g. Can dates on templates be set in the past, or can latency in updating the plan be slow enough to fail due date validation?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                taboubii Issam Taboubi
                Reporter:
                fred Frédéric Massart
                Peer reviewer:
                Frédéric Massart
                Participants:
                Component watchers:
                Damyon Wiese, Jean-Philippe Gaudreau, Steve Massicotte, Serge Gauthier, Issam Taboubi, Adrian Greeve, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: