Merge branch 'MOODLE_32_STABLE' into install_32_STABLE
This commit is contained in:
@@ -16,8 +16,7 @@ Feature: Display extended course names
|
||||
And I should not see "C_shortname Course fullname"
|
||||
|
||||
Scenario: Courses list with extended course names
|
||||
Given I expand "Site administration" node
|
||||
And I click on "Courses" "link" in the "//div[@id='settingsnav']/descendant::li[contains(concat(' ', normalize-space(@class), ' '), ' type_setting ')][contains(., 'Appearance')]" "xpath_element"
|
||||
Given I navigate to "Appearance > Courses" in site administration
|
||||
And I set the field "Display extended course names" to "1"
|
||||
When I press "Save changes"
|
||||
And I am on site homepage
|
||||
|
||||
@@ -25,7 +25,7 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
|
||||
And I log in as "admin"
|
||||
And I add "User Two (two@example.com)" user to "CH1" cohort members
|
||||
And I add "User Three (three@example.com)" user to "CH1" cohort members
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
|
||||
Scenario: Filter user accounts by role and cohort
|
||||
When I set the following fields to these values:
|
||||
|
||||
@@ -8,6 +8,8 @@ Feature: Manage availability conditions
|
||||
Scenario: Display list of availability conditions
|
||||
# Check the report doesn't show when not enabled.
|
||||
Given I log in as "admin"
|
||||
And I press "Customise this page"
|
||||
And I add the "Administration" block if not present
|
||||
And the following config values are set as admin:
|
||||
| enableavailability | 0 |
|
||||
And I expand "Site administration" node
|
||||
|
||||
@@ -59,8 +59,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
Then I should see "Group 1"
|
||||
And I should see "Group 2"
|
||||
And I follow "Groupings"
|
||||
@@ -90,8 +89,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Permissions"
|
||||
And I navigate to "Users > Permissions" in current page administration
|
||||
And I set the field "Advanced role override" to "Student (1)"
|
||||
Then "mod/forum:editanypost" capability has "Allow" permission
|
||||
And I press "Cancel"
|
||||
@@ -134,30 +132,31 @@ Feature: Set up contextual data for tests
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| user4 | C1 | custom1 |
|
||||
| user2 | C1 | student |
|
||||
| user3 | C1 | editingteacher |
|
||||
And the following "role assigns" exist:
|
||||
| user | role | contextlevel | reference |
|
||||
| user1 | manager | System | |
|
||||
| user2 | editingteacher | Category | CAT1 |
|
||||
| user3 | editingteacher | Course | C1 |
|
||||
| user5 | custom2 | System | |
|
||||
When I log in as "user1"
|
||||
And I am on site homepage
|
||||
Then I should see "Front page settings"
|
||||
Then "Edit settings" "link" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "user2"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I should see "Turn editing on"
|
||||
And "Turn editing on" "link" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "user3"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I should see "Turn editing on"
|
||||
And "Turn editing on" "link" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "user4"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I should see "Turn editing on"
|
||||
And "Turn editing on" "link" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "user5"
|
||||
And I should see "You are logged in as"
|
||||
@@ -264,8 +263,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
Then the "groups" select box should contain "Group 1 (1)"
|
||||
And the "groups" select box should contain "Group 2 (1)"
|
||||
And I set the field "groups" to "Group 1 (1)"
|
||||
@@ -302,7 +300,7 @@ Feature: Set up contextual data for tests
|
||||
| System cohort A | 1 |
|
||||
| System cohort B | 2 |
|
||||
And I should not see "Cohort in category"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Cat 1"
|
||||
And I follow "Cohorts"
|
||||
And I should not see "System cohort"
|
||||
@@ -322,10 +320,9 @@ Feature: Set up contextual data for tests
|
||||
| fullname | course | gradecategory |
|
||||
| Grade sub category 2 | C1 | Grade category 1 |
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
Then I should see "Grade category 1"
|
||||
And I should see "Grade sub category 2"
|
||||
|
||||
@@ -349,7 +346,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I navigate to "Setup > Gradebook setup" in the course gradebook
|
||||
Then I should see "Test Grade Item 1"
|
||||
And I follow "Edit Test Grade Item 1"
|
||||
And I expand all fieldsets
|
||||
@@ -378,7 +375,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I navigate to "Scales" in the course gradebook
|
||||
Then I should see "Test Scale 1"
|
||||
And I should see "Disappointing, Good, Very good, Excellent"
|
||||
|
||||
@@ -429,7 +426,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I navigate to "Setup > Gradebook setup" in the course gradebook
|
||||
Then I should see "Test Outcome Grade Item 1"
|
||||
And I follow "Edit Test Outcome Grade Item 1"
|
||||
And the field "Outcome" matches value "Grade outcome 1"
|
||||
|
||||
@@ -32,8 +32,7 @@ Feature: Edit capabilities
|
||||
Scenario: Course capabilities overrides
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Permissions"
|
||||
And I navigate to "Users > Permissions" in current page administration
|
||||
And I override the system permissions of "Student" role with:
|
||||
| mod/forum:deleteanypost | Prohibit |
|
||||
| mod/forum:editanypost | Prevent |
|
||||
@@ -52,7 +51,7 @@ Feature: Edit capabilities
|
||||
| Forum name | I'm the name |
|
||||
| Description | I'm the introduction |
|
||||
And I follow "I'm the name"
|
||||
And I navigate to "Permissions" node in "Forum administration"
|
||||
And I navigate to "Permissions" in current page administration
|
||||
And I override the system permissions of "Student" role with:
|
||||
| mod/forum:deleteanypost | Prohibit |
|
||||
| mod/forum:editanypost | Prevent |
|
||||
|
||||
@@ -33,8 +33,6 @@ Feature: Verify that all form fields values can be get and set
|
||||
| activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible |
|
||||
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
|
||||
And I log in as "admin"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Appearance" node
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Reset" node in "Course administration"
|
||||
@@ -60,9 +58,8 @@ Feature: Verify that all form fields values can be get and set
|
||||
| HTML format | Student page contents |
|
||||
And I press "Save"
|
||||
Then I should see "Student page contents" in the "region-main" "region"
|
||||
And I click on "Edit" "link" in the "Administration" "block"
|
||||
# Select (multi-select) - Checking "I set the field".
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
# Checkbox - Checking "I set the field".
|
||||
And I set the field "Display description on course page" to "1"
|
||||
@@ -75,7 +72,7 @@ Feature: Verify that all form fields values can be get and set
|
||||
And I press "Save and return to course"
|
||||
And I should see "Test this one"
|
||||
And I follow "Test this one"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
# Checkbox - Checking "the field matches value" and "the following fields match these values".
|
||||
And the following fields match these values:
|
||||
| Display description on course page | 1 |
|
||||
@@ -91,7 +88,7 @@ Feature: Verify that all form fields values can be get and set
|
||||
# Select (simple) - Checking "I set the field".
|
||||
And I set the field "Group mode" to "Separate groups"
|
||||
And I press "Save and display"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And the following fields match these values:
|
||||
| Default format | NWiki |
|
||||
| Group mode | Separate groups |
|
||||
@@ -134,8 +131,7 @@ Feature: Verify that all form fields values can be get and set
|
||||
@javascript
|
||||
Scenario: with JS enabled all form fields getters and setters works as expected
|
||||
Then I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
# Select (multi-select & AJAX) - Checking "I set the field" and "select box should contain".
|
||||
And I set the field "groups" to "Group 2"
|
||||
And the "members" select box should contain "Student 2"
|
||||
@@ -158,7 +154,7 @@ Feature: Verify that all form fields values can be get and set
|
||||
And the "available[day]" "field" should be enabled
|
||||
And the field "deadline[enabled]" matches value "1"
|
||||
And I press "Save and display"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And the field "available[enabled]" matches value "1"
|
||||
And the "available[day]" "field" should be enabled
|
||||
And the field "deadline[enabled]" matches value "1"
|
||||
|
||||
@@ -41,5 +41,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_tool_log_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -39,5 +39,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -56,5 +56,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -7,12 +7,9 @@ Feature: Manage competency frameworks
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I expand "Site administration" node
|
||||
When I expand "Competencies" node
|
||||
Then I should see "Competency frameworks"
|
||||
|
||||
Scenario: Create a new framework
|
||||
Given I follow "Competency frameworks"
|
||||
Given I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "List of competency frameworks"
|
||||
And I click on "Add new competency framework" "button"
|
||||
And I should see "General"
|
||||
@@ -34,7 +31,7 @@ Feature: Manage competency frameworks
|
||||
Given the following lp "frameworks" exist:
|
||||
| shortname | idnumber |
|
||||
| Science Year-2 | sc-y-2 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-2"
|
||||
When I click on "Science Year-2" "link"
|
||||
Then I should see "Science Year-2"
|
||||
@@ -43,7 +40,7 @@ Feature: Manage competency frameworks
|
||||
Given the following lp "frameworks" exist:
|
||||
| shortname | idnumber |
|
||||
| Science Year-3 | sc-y-3 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-3"
|
||||
And I click on "Edit" of edit menu in the "Science Year-3" row
|
||||
And the field "Name" matches value "Science Year-3 "
|
||||
@@ -57,7 +54,7 @@ Feature: Manage competency frameworks
|
||||
Given the following lp "frameworks" exist:
|
||||
| shortname | idnumber |
|
||||
| Science Year-4 | sc-y-4 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-4"
|
||||
And I should see "sc-y-4"
|
||||
And I click on "Delete" of edit menu in the "Science Year-4" row
|
||||
@@ -90,7 +87,7 @@ Scenario: Edit a framework with competencies in user competency
|
||||
| user | competency |
|
||||
| admin | Comp1 |
|
||||
| admin | Comp2 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-5"
|
||||
And I click on "Edit" of edit menu in the "Science Year-5" row
|
||||
And the field "Name" matches value "Science Year-5 "
|
||||
@@ -120,7 +117,7 @@ Scenario: Edit a framework with competencies in user competency plan
|
||||
| user | competency | plan |
|
||||
| admin | Comp1 | Plan Science-6 |
|
||||
| admin | Comp2 | Plan Science-6 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-6"
|
||||
And I click on "Edit" of edit menu in the "Science Year-6" row
|
||||
And the field "Name" matches value "Science Year-6 "
|
||||
|
||||
@@ -26,9 +26,7 @@ Feature: Manage plearning plan
|
||||
| shortname | description |
|
||||
| Science template | science template description |
|
||||
And I follow "Home"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Competencies" node
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I click on ".template-userplans" "css_element" in the "Science template" "table_row"
|
||||
And I click on ".form-autocomplete-downarrow" "css_element"
|
||||
And I click on "Admin" item in the autocomplete list
|
||||
@@ -52,9 +50,7 @@ Feature: Manage plearning plan
|
||||
| student-plan1 | COHORTPLAN |
|
||||
| student-plan2 | COHORTPLAN |
|
||||
And I follow "Home"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Competencies" node
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I click on ".template-cohorts" "css_element" in the "Science template cohort" "table_row"
|
||||
And I click on ".form-autocomplete-downarrow" "css_element"
|
||||
And I click on "cohort plan" item in the autocomplete list
|
||||
|
||||
@@ -145,10 +145,7 @@ Feature: Manage plan workflow
|
||||
| Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 |
|
||||
| Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 |
|
||||
And I log in as "manager1"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Users" node
|
||||
And I expand "Accounts" node
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I follow "User 1"
|
||||
And I follow "Learning plans"
|
||||
And I should see "List of learning plans"
|
||||
@@ -167,10 +164,7 @@ Feature: Manage plan workflow
|
||||
| Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 |
|
||||
| Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 |
|
||||
And I log in as "manager1"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Users" node
|
||||
And I expand "Accounts" node
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I follow "User 1"
|
||||
And I follow "Learning plans"
|
||||
And I should see "List of learning plans"
|
||||
@@ -191,10 +185,7 @@ Scenario: Manager reopen a complete learning plan
|
||||
| Test-Plan3 | user1 | Description of plan 3 for user 1 | complete | manager1 |
|
||||
| Test-Plan4 | user1 | Description of plan 4 for user 1 | complete | manager1 |
|
||||
And I log in as "manager1"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Users" node
|
||||
And I expand "Accounts" node
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I follow "User 1"
|
||||
And I follow "Learning plans"
|
||||
And I should see "List of learning plans"
|
||||
|
||||
@@ -7,12 +7,9 @@ Feature: Manage plearning plan templates
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I expand "Site administration" node
|
||||
When I expand "Competencies" node
|
||||
Then I should see "Learning plan templates"
|
||||
|
||||
Scenario: Create a new learning plan template
|
||||
Given I follow "Learning plan templates"
|
||||
Given I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I should see "List of learning plan templates"
|
||||
And I click on "Add new learning plan template" "button"
|
||||
And I should see "Add new learning plan template"
|
||||
@@ -26,7 +23,7 @@ Feature: Manage plearning plan templates
|
||||
Given the following lp "templates" exist:
|
||||
| shortname | description |
|
||||
| Science template Year-2 | science template description |
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I should see "Science template Year-2"
|
||||
When I click on "Science template Year-2" "link"
|
||||
Then I should see "Science template Year-2"
|
||||
@@ -36,7 +33,7 @@ Feature: Manage plearning plan templates
|
||||
Given the following lp "templates" exist:
|
||||
| shortname | description |
|
||||
| Science template Year-3 | science template description |
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I should see "Science template Year-3"
|
||||
And I click on "Edit" of edit menu in the "Science template Year-3" row
|
||||
And the field "Name" matches value "Science template Year-3"
|
||||
@@ -49,7 +46,7 @@ Feature: Manage plearning plan templates
|
||||
Given the following lp "templates" exist:
|
||||
| shortname | description |
|
||||
| Science template Year-4 | science template description |
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I should see "Science template Year-4"
|
||||
And I click on "Delete" of edit menu in the "Science template Year-4" row
|
||||
And "Confirm" "dialogue" should be visible
|
||||
|
||||
@@ -77,5 +77,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2016052305, 'tool', 'monitor');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -65,6 +65,6 @@ Feature: Backup user data
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
When I go to "User report" in the course gradebook
|
||||
When I navigate to "User report" in the course gradebook
|
||||
Then "Quiz 1" row "Grade" column of "user-grade" table should contain "5"
|
||||
And "Quiz 1" row "Percentage" column of "user-grade" table should contain "50"
|
||||
|
||||
@@ -42,6 +42,10 @@ Feature: Basic recycle bin functionality
|
||||
And I should see "Test assign" in the "Topic 1" "section"
|
||||
|
||||
Scenario: Restore a deleted course
|
||||
# TODO MDL-57250 remove extra category.
|
||||
Given the following "categories" exist:
|
||||
| name | idnumber |
|
||||
| There is a bug with navigation and we need an extra category | CAT1 |
|
||||
Given I log in as "admin"
|
||||
And I go to the courses management page
|
||||
And I click on "delete" action for "Course 2" in management course listing
|
||||
@@ -49,9 +53,10 @@ Feature: Basic recycle bin functionality
|
||||
And I should see "Deleting C2"
|
||||
And I should see "C2 has been completely deleted"
|
||||
And I press "Continue"
|
||||
And I go to the courses management page
|
||||
And I should not see "Course 2" in the "#course-listing" "css_element"
|
||||
When I navigate to "Recycle bin" node in "Category: Miscellaneous"
|
||||
And I am on course index
|
||||
And I follow "Miscellaneous"
|
||||
And I should not see "Course 2"
|
||||
When I navigate to "Recycle bin" in current page administration
|
||||
Then I should see "Course 2"
|
||||
And I should see "Contents will be permanently deleted after 14 days"
|
||||
And I click on "Restore" "link" in the "region-main" "region"
|
||||
|
||||
@@ -75,7 +75,7 @@ if (!empty($delall) && confirm_sesskey()) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!empty($ignore)) {
|
||||
if (!empty($ignore) && confirm_sesskey()) {
|
||||
unset($SESSION->users_result[$id]);
|
||||
echo json_encode(true);
|
||||
exit;
|
||||
|
||||
@@ -29,14 +29,13 @@ Feature: Upload users
|
||||
And I should see "Section 1"
|
||||
And I press "Upload users"
|
||||
And I press "Continue"
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I should see "Tom Jones"
|
||||
And I should see "Trent Reznor"
|
||||
And I should see "reznor@example.com"
|
||||
And I am on site homepage
|
||||
And I follow "Maths"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
And I set the field "groups" to "Section 1 (1)"
|
||||
And the "members" select box should contain "Tom Jones"
|
||||
|
||||
|
||||
@@ -42,5 +42,8 @@ function xmldb_tool_usertours_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2016120501, 'tool', 'usertours');
|
||||
}
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ Feature: Add a new user tour
|
||||
And I add steps to the "First tour" tour:
|
||||
| targettype | targetvalue_selector | Title | Content |
|
||||
| Selector | .usermenu | User menu | This is your personal user menu. You'll find your personal preferences and your user profile here. |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
||||
And I press "Next"
|
||||
And I should see "This area shows you what's happening in some of your courses"
|
||||
@@ -38,7 +38,7 @@ Feature: Add a new user tour
|
||||
And I should see "This area shows you what's happening in some of your courses"
|
||||
And I press "End tour"
|
||||
And I should not see "This area shows you what's happening in some of your courses"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
And I am on homepage
|
||||
And I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
||||
And I should not see "This area shows you what's happening in some of your courses"
|
||||
And I follow "Reset user tour on this page"
|
||||
@@ -58,7 +58,7 @@ Feature: Add a new user tour
|
||||
And I add steps to the "First tour" tour:
|
||||
| targettype | Title | Content |
|
||||
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
Then I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
||||
|
||||
@javascript
|
||||
@@ -77,5 +77,5 @@ Feature: Add a new user tour
|
||||
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
|
||||
And I open the User tour settings page
|
||||
When I click on "Enable" "link" in the "My first tour" "table_row"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
And I am on homepage
|
||||
Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
||||
|
||||
@@ -16,7 +16,7 @@ Feature: Apply tour filters to a tour
|
||||
And I add steps to the "First tour" tour:
|
||||
| targettype | Title | Content |
|
||||
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
Then I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful"
|
||||
|
||||
@javascript
|
||||
|
||||
@@ -55,5 +55,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -55,5 +55,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -43,5 +43,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -43,5 +43,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ Feature: availability_grade
|
||||
|
||||
# Give the assignment 40%.
|
||||
And I follow "A1"
|
||||
And I click on "View all submissions" "link" in the "Administration" "block"
|
||||
And I navigate to "View all submissions" in current page administration
|
||||
# Pick the grade link in the row that has [email protected] in it.
|
||||
And I click on "Grade" "link" in the "s@example.com" "table_row"
|
||||
And I set the field "Grade out of 100" to "40"
|
||||
|
||||
@@ -101,7 +101,7 @@ Feature: availability_profile
|
||||
|
||||
# Edit it again and check the setting still works.
|
||||
When I follow "P1"
|
||||
And I navigate to "Edit settings" node in "Page module administration"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
Then the field "User profile field" matches value "Super field"
|
||||
And the field "Value to compare against" matches value "Bananaman"
|
||||
|
||||
@@ -216,7 +216,7 @@ Feature: edit_availability
|
||||
|
||||
# Check the button still works after saving and editing.
|
||||
And I press "Save and display"
|
||||
And I navigate to "Edit settings" node in "Forum administration"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And the "Add group/grouping access restriction" "button" should be disabled
|
||||
And I should see "Grouping" in the "Restrict access" "fieldset"
|
||||
|
||||
@@ -41,7 +41,7 @@ Feature: Restore Moodle 2 course backups
|
||||
Then I should see "Course 1 restored in a new course"
|
||||
And I should see "Community finder" in the "Community finder" "block"
|
||||
And I should see "Test forum name"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I expand all fieldsets
|
||||
And the field "id_format" matches value "Topics format"
|
||||
And the field "Number of sections" matches value "15"
|
||||
@@ -83,7 +83,7 @@ Feature: Restore Moodle 2 course backups
|
||||
When I restore "test_backup.mbz" backup into a new course using this options:
|
||||
Then I should see "Topic 1"
|
||||
And I should see "Test forum name"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I expand all fieldsets
|
||||
And the field "id_format" matches value "Topics format"
|
||||
And I set the following fields to these values:
|
||||
@@ -95,14 +95,14 @@ Feature: Restore Moodle 2 course backups
|
||||
And I press "Save and display"
|
||||
And I should see "1 January - 7 January"
|
||||
And I should see "Test forum name"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I expand all fieldsets
|
||||
And the field "id_format" matches value "Weekly format"
|
||||
And I set the following fields to these values:
|
||||
| id_format | Social format |
|
||||
And I press "Save and display"
|
||||
And I should see "An open forum for chatting about anything you want to"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I expand all fieldsets
|
||||
And the field "id_format" matches value "Social format"
|
||||
And I press "Cancel"
|
||||
@@ -119,7 +119,7 @@ Feature: Restore Moodle 2 course backups
|
||||
| Confirmation | Filename | test_backup.mbz |
|
||||
And I restore "test_backup.mbz" backup into "Course 2" course using this options:
|
||||
| Schema | Overwrite course configuration | Yes |
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I expand all fieldsets
|
||||
Then the field "id_format" matches value "Topics format"
|
||||
And the field "Number of sections" matches value "15"
|
||||
|
||||
@@ -14,12 +14,16 @@ Feature: Add badges to the system
|
||||
And I set the field "Default badge issuer name" to "Test Badge Site"
|
||||
And I set the field "Default badge issuer contact details" to "testuser@example.com"
|
||||
And I press "Save changes"
|
||||
And I follow "Badges"
|
||||
When I follow "Add a new badge"
|
||||
Then the field "issuercontact" matches value "testuser@example.com"
|
||||
And the field "issuername" matches value "Test Badge Site"
|
||||
|
||||
@javascript
|
||||
Scenario: Accessing the badges
|
||||
And I press "Customise this page"
|
||||
# TODO MDL-57120 site "Badges" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
Given I navigate to "Site badges" node in "Site pages"
|
||||
Then I should see "There are no badges available."
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ Feature: Block activity modules
|
||||
| workshop | Test workshop name | Test workshop description | C1 | workshop1 |
|
||||
|
||||
When I log in as "admin"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add the "Activities" block
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
And I press "Save and return to course"
|
||||
And I follow "Course 1"
|
||||
And I should see "Test page name"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment 1"
|
||||
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment 1"
|
||||
|
||||
@@ -33,7 +33,7 @@ Feature: The activity results block displays student scores
|
||||
| id_config_nameformat | Display full names |
|
||||
And I press "Save changes"
|
||||
When I follow "Test assignment"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| id_grade_modgrade_type | None |
|
||||
And I press "Save and return to course"
|
||||
|
||||
@@ -32,7 +32,7 @@ Feature: The activity results block displays student scores
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -26,7 +26,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| student5 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I navigate to "Scales" in the course gradebook
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
@@ -41,7 +41,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| id_grade_modgrade_type | Scale |
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -43,7 +43,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| student6 | G3 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I navigate to "Scales" in the course gradebook
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
@@ -59,7 +59,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -32,7 +32,7 @@ Feature: The activity results block displays student scores
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -26,7 +26,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| student5 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I navigate to "Scales" in the course gradebook
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
@@ -41,7 +41,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| id_grade_modgrade_type | Scale |
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -43,7 +43,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| student6 | G3 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I navigate to "Scales" in the course gradebook
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
@@ -59,7 +59,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -85,5 +85,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -35,5 +35,4 @@ Feature: Enable Block Badges on the dashboard and view awarded badges
|
||||
And I press "Award badge"
|
||||
And I log out
|
||||
When I log in as "teacher1"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
Then I should see "Badge 1" in the "Latest badges" "block"
|
||||
|
||||
@@ -12,6 +12,8 @@ Feature: Feature: Students can use the recent blog entries block to view recent
|
||||
And I am on site homepage
|
||||
And I navigate to "Turn editing on" node in "Front page settings"
|
||||
And I add the "Recent blog entries" block
|
||||
# TODO MDL-57120 site "Blogs" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I log out
|
||||
|
||||
Scenario: Students use the recent blog entries block to view blogs
|
||||
|
||||
@@ -24,8 +24,11 @@ Feature: Adding blog tag block
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add the "Blog tags" block
|
||||
# TODO MDL-57120 site "Blogs" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
|
||||
And I navigate to "Course blogs" node in "My courses > c1 > Participants"
|
||||
And I navigate to course participants
|
||||
And I click on "Course blogs" "link" in the "Navigation" "block"
|
||||
And I follow "Blog about this Course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | Blog post from teacher |
|
||||
@@ -35,7 +38,8 @@ Feature: Adding blog tag block
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Course blogs" node in "My courses > c1 > Participants"
|
||||
And I navigate to course participants
|
||||
And I click on "Course blogs" "link" in the "Navigation" "block"
|
||||
And I follow "Blog about this Course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | Blog post from student |
|
||||
|
||||
@@ -85,5 +85,8 @@ function xmldb_block_calendar_month_upgrade($oldversion, $block) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
And I create a calendar event with form data:
|
||||
| id_eventtype | User |
|
||||
| id_name | User Event |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
And I follow "Course 1"
|
||||
And I follow "Hide course events"
|
||||
And I hover over today in the calendar
|
||||
@@ -102,7 +102,7 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
And I create a calendar event with form data:
|
||||
| id_eventtype | User |
|
||||
| id_name | User Event |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
And I follow "Course 1"
|
||||
And I hover over today in the calendar
|
||||
Then I should see "User Event"
|
||||
@@ -120,7 +120,7 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
And I create a calendar event with form data:
|
||||
| id_eventtype | User |
|
||||
| id_name | User Event |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
And I follow "Course 1"
|
||||
And I follow "Hide user events"
|
||||
And I hover over today in the calendar
|
||||
|
||||
@@ -85,5 +85,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -58,5 +58,8 @@ function xmldb_block_community_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -60,5 +60,8 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ Feature: Enable Block Completion in a course
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I follow "Test page name"
|
||||
And I navigate to "Edit settings" node in "Page module administration"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ Feature: Enable Block Completion in a course using activity completion
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I follow "Test page name"
|
||||
And I navigate to "Edit settings" node in "Page module administration"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
@@ -47,7 +47,7 @@ Feature: Enable Block Completion in a course using activity completion
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I follow "Test page name"
|
||||
And I navigate to "Edit settings" node in "Page module administration"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
|
||||
@@ -153,7 +153,6 @@ Feature: View the course overview block on the dashboard and test it's functiona
|
||||
And I click on "Enable" "link" in the "Course meta link" "table_row"
|
||||
And I am on site homepage
|
||||
And I follow "Course 2"
|
||||
And I navigate to "Enrolment methods" node in "Course administration > Users"
|
||||
And I add "Course meta link" enrolment method with:
|
||||
| Link course | C1 |
|
||||
And I log out
|
||||
|
||||
@@ -60,5 +60,8 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ Scenario: Admin can add random glossary block to the frontpage
|
||||
| glossary | Tips and Tricks | Frontpage glossary description | Acceptance test site | glossary0 |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I click on "Turn editing on" "link" in the "Administration" "block"
|
||||
And I turn editing mode on
|
||||
And I add the "Random glossary entry" block
|
||||
And I configure the "block_glossary_random" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -45,5 +45,8 @@ function xmldb_block_html_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ Feature: Adding and configuring HTML blocks
|
||||
Scenario: Configuring the HTML block with Javascript on
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
When I click on "Turn editing on" "link" in the "Administration" "block"
|
||||
When I turn editing mode on
|
||||
And I add the "HTML" block
|
||||
And I configure the "(new HTML block)" block
|
||||
And I set the field "Content" to "Static text without a header"
|
||||
@@ -25,7 +25,7 @@ Feature: Adding and configuring HTML blocks
|
||||
Scenario: Configuring the HTML block with Javascript off
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
When I click on "Turn editing on" "link" in the "Administration" "block"
|
||||
When I turn editing mode on
|
||||
And I add the "HTML" block
|
||||
And I configure the "(new HTML block)" block
|
||||
And I set the field "Content" to "Static text without a header"
|
||||
|
||||
@@ -7,7 +7,7 @@ Feature: Adding and configuring HTML blocks
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
When I click on "Turn editing on" "link" in the "Administration" "block"
|
||||
When I turn editing mode on
|
||||
And I add the "HTML" block
|
||||
|
||||
Scenario: Other users can not see HTML block that has not been configured
|
||||
|
||||
@@ -67,5 +67,8 @@ function xmldb_block_navigation_upgrade($oldversion, $block) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,13 @@ Feature: Expand the courses nodes within the navigation block
|
||||
| navshowallcourses | 1 |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I press "Save changes"
|
||||
And I turn editing mode off
|
||||
And I follow "Course 2"
|
||||
And I navigate to "Enrolment methods" node in "Course administration > Users"
|
||||
And I click on "Edit" "link" in the "Guest access" "table_row"
|
||||
|
||||
@@ -15,13 +15,22 @@ Feature: Displaying the link to the Participants page
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
|
||||
@javascript
|
||||
Scenario: Course participants link is displayed to enrolled students after expanding the course node
|
||||
When I log in as "student1"
|
||||
And I expand "C1" node
|
||||
Then "Participants" "link" should exist in the "Navigation" "block"
|
||||
And I navigate to "Participants" node in "My courses > C1"
|
||||
And I click on "Participants" "link" in the "Navigation" "block"
|
||||
And I should see "Participants"
|
||||
And "Student One" "link" should exist
|
||||
And "Student Two" "link" should not exist
|
||||
@@ -29,7 +38,7 @@ Feature: Displaying the link to the Participants page
|
||||
Scenario: Site participants link is displayed to admins
|
||||
When I log in as "admin"
|
||||
Then "Participants" "link" should exist in the "Navigation" "block"
|
||||
And I navigate to "Participants" node in "Site pages"
|
||||
And I click on "Participants" "link" in the "Navigation" "block"
|
||||
And I should see "Participants"
|
||||
And "Student One" "link" should exist
|
||||
And "Student Two" "link" should exist
|
||||
|
||||
@@ -29,6 +29,15 @@ Feature: View my courses in navigation block
|
||||
| student1 | c1 | student |
|
||||
| student1 | c31 | student |
|
||||
| student1 | c331 | student |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
|
||||
@javascript
|
||||
Scenario: The plain list of enrolled courses is shown
|
||||
|
||||
@@ -34,14 +34,14 @@ Feature: Latest announcements block displays the course latest news
|
||||
Then I should see "Discussion One" in the "Latest announcements" "block"
|
||||
And I should see "Discussion Two" in the "Latest announcements" "block"
|
||||
And I should see "Discussion Three" in the "Latest announcements" "block"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| News items to show | 2 |
|
||||
And I press "Save and display"
|
||||
And I should not see "Discussion One" in the "Latest announcements" "block"
|
||||
And I should see "Discussion Two" in the "Latest announcements" "block"
|
||||
And I should see "Discussion Three" in the "Latest announcements" "block"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| News items to show | 0 |
|
||||
And I press "Save and display"
|
||||
|
||||
@@ -110,5 +110,8 @@ function xmldb_block_quiz_results_upgrade($oldversion, $block) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -59,5 +59,8 @@ function xmldb_block_recent_activity_upgrade($oldversion, $block) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ Feature: View structural changes in recent activity block
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I follow "ForumNew"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| name | ForumUpdated |
|
||||
And I press "Save and return to course"
|
||||
|
||||
@@ -56,5 +56,8 @@ function xmldb_block_rss_client_upgrade($oldversion) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ Feature: The search forums block allows users to search for forum posts
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I follow "Announcements"
|
||||
And I navigate to "Edit settings" node in "Forum administration"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "id_visible" to "0"
|
||||
And I press "Save and return to course"
|
||||
|
||||
@@ -61,5 +61,8 @@ function xmldb_block_section_links_upgrade($oldversion, $block) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -60,5 +60,8 @@ function xmldb_block_selfcompletion_upgrade($oldversion, $block) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -67,5 +67,8 @@ function xmldb_block_settings_upgrade($oldversion, $block) {
|
||||
// Moodle v3.1.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
// Automatically generated Moodle v3.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
|
||||
|
||||
use Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException;
|
||||
|
||||
require_once(__DIR__ . '/../../../lib/behat/behat_base.php');
|
||||
|
||||
/**
|
||||
@@ -56,6 +58,20 @@ class behat_blocks extends behat_base {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the selected block if it is not already present. Editing mode must be previously enabled.
|
||||
*
|
||||
* @Given /^I add the "(?P<block_name_string>(?:[^"]|\\")*)" block if not present$/
|
||||
* @param string $blockname
|
||||
*/
|
||||
public function i_add_the_block_if_not_present($blockname) {
|
||||
try {
|
||||
$this->get_text_selector_node('block', $blockname);
|
||||
} catch (ElementNotFoundException $e) {
|
||||
$this->execute('behat_blocks::i_add_the_block', [$blockname]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Docks a block. Editing mode should be previously enabled.
|
||||
*
|
||||
|
||||
@@ -50,9 +50,8 @@ Feature: Add and configure blocks throughout the site
|
||||
|
||||
Scenario: Blocks on the dashboard page can have roles assigned to them
|
||||
Given I log in as "manager1"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I press "Customise this page"
|
||||
Then I should see "Assign roles in Navigation block"
|
||||
Then I should see "Assign roles in Private files block"
|
||||
|
||||
Scenario: Blocks on courses can have roles assigned to them
|
||||
Given I log in as "teacher1"
|
||||
@@ -64,7 +63,7 @@ Feature: Add and configure blocks throughout the site
|
||||
@javascript
|
||||
Scenario: Blocks can safely be customised
|
||||
Given I log in as "admin"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
And I am on homepage
|
||||
And I press "Customise this page"
|
||||
And I add the "HTML" block
|
||||
And I configure the "(new HTML block)" block
|
||||
|
||||
@@ -30,8 +30,7 @@ Feature: Allowed blocks controls
|
||||
| block/activity_modules:addinstance | Prohibit |
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Permissions"
|
||||
And I navigate to "Users > Permissions" in current page administration
|
||||
And I override the system permissions of "Teacher" role with:
|
||||
| block/completionstatus:addinstance | Prohibit |
|
||||
And I log out
|
||||
|
||||
@@ -14,7 +14,7 @@ Feature: The context of a block can always be returned to it's original state.
|
||||
And I follow "Turn editing on"
|
||||
And I add the "Tags" block
|
||||
Then I should see "Tags" in the "Tags" "block"
|
||||
And I click on "Participants" "link" in the "//li[p/a[contains(normalize-space(string(.)), 'Courses')]]" "xpath_element"
|
||||
And I navigate to course participants
|
||||
And I configure the "Tags" block
|
||||
And I set the following fields to these values:
|
||||
| Display on page types | Any page |
|
||||
@@ -31,7 +31,7 @@ Feature: The context of a block can always be returned to it's original state.
|
||||
And I should see "Tags" in the "Tags" "block"
|
||||
And I follow "Course 1"
|
||||
And "Tags" "block" should not exist
|
||||
And I navigate to "Participants" node in "Courses > C1"
|
||||
And I navigate to course participants
|
||||
And "Tags" "block" should not exist
|
||||
And I follow "Course 1"
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
@@ -45,5 +45,5 @@ Feature: The context of a block can always be returned to it's original state.
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I should see "Tags" in the "Tags" "block"
|
||||
And I navigate to "Participants" node in "Courses > C1"
|
||||
And I navigate to course participants
|
||||
And I should see "Tags" in the "Tags" "block"
|
||||
|
||||
@@ -27,7 +27,7 @@ Feature: Blogs can be set to be only visible by the author.
|
||||
Scenario: A student can not see another student's blog entries.
|
||||
Given I log in as "testuser"
|
||||
And I follow "Course 1"
|
||||
And I follow "Participants"
|
||||
And I navigate to course participants
|
||||
And I follow "Test2 User2"
|
||||
And I should see "Miscellaneous"
|
||||
Then I should not see "Blog entries"
|
||||
|
||||
@@ -9,9 +9,18 @@ Feature: Comment on a blog entry
|
||||
| username | firstname | lastname | email |
|
||||
| testuser | Test | User | moodle@example.com |
|
||||
| testuser2 | Test2 | User2 | moodle2@example.com |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
# TODO MDL-57120 "Site blogs" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
And I log in as "testuser"
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
And I navigate to "Site blogs" node in "Site pages"
|
||||
And I follow "Add a new entry"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | Blog post from user 1 |
|
||||
@@ -23,8 +32,7 @@ Feature: Comment on a blog entry
|
||||
Scenario: Commenting on my own blog entry
|
||||
Given I am on site homepage
|
||||
And I log in as "testuser"
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
And I navigate to "Site blogs" node in "Site pages"
|
||||
And I follow "Blog post from user 1"
|
||||
And I should see "User 1 blog post content"
|
||||
And I follow "Comments (0)"
|
||||
@@ -39,8 +47,7 @@ Feature: Comment on a blog entry
|
||||
Scenario: Deleting my own comment
|
||||
Given I am on site homepage
|
||||
And I log in as "testuser"
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
And I navigate to "Site blogs" node in "Site pages"
|
||||
And I follow "Blog post from user 1"
|
||||
And I should see "User 1 blog post content"
|
||||
And I follow "Comments (0)"
|
||||
@@ -60,8 +67,7 @@ Feature: Comment on a blog entry
|
||||
Given I am on site homepage
|
||||
And I log in as "testuser2"
|
||||
And I am on site homepage
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
And I navigate to "Site blogs" node in "Site pages"
|
||||
And I follow "Blog post from user 1"
|
||||
When I follow "Comments (0)"
|
||||
And I set the field "content" to "$My own >nasty< \"string\"!"
|
||||
|
||||
@@ -8,9 +8,18 @@ Feature: Delete a blog entry
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| testuser | Test | User | moodle@example.com |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
# TODO MDL-57120 "Site blogs" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
And I log in as "testuser"
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
And I navigate to "Site blogs" node in "Site pages"
|
||||
And I follow "Add a new entry"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | Blog post one |
|
||||
@@ -22,8 +31,7 @@ Feature: Delete a blog entry
|
||||
| Blog entry body | User 1 blog post content |
|
||||
And I press "Save changes"
|
||||
And I am on site homepage
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
And I navigate to "Site blogs" node in "Site pages"
|
||||
|
||||
Scenario: Delete blog post results in post deleted
|
||||
Given I follow "Blog post one"
|
||||
|
||||
@@ -58,8 +58,10 @@ Feature: Access visible and hidden cohorts
|
||||
And the "Cohort" select box should contain "System empty cohort"
|
||||
And I set the field "Cohort" to "System cohort"
|
||||
And I press "Add method"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Enrolled users" node in "Course administration > Users"
|
||||
And I should see "student@example.com"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Groups" node in "Course administration > Users"
|
||||
And I press "Auto-create groups"
|
||||
And the "Select members from cohort" select box should contain "Cohort in category 1"
|
||||
|
||||
@@ -38,7 +38,8 @@ Feature: Add cohorts of users
|
||||
And the "Current users" select box should not contain "Forth User (forth@example.com)"
|
||||
|
||||
Scenario: Add users to a cohort using a bulk user action
|
||||
When I follow "Bulk user actions"
|
||||
When I follow "Accounts"
|
||||
And I follow "Bulk user actions"
|
||||
And I set the field "Available" to "Third User"
|
||||
And I press "Add to selection"
|
||||
And I set the field "Available" to "Forth User"
|
||||
@@ -47,6 +48,7 @@ Feature: Add cohorts of users
|
||||
And I press "Go"
|
||||
And I set the field "Cohort" to "Test cohort name [333]"
|
||||
And I press "Add to cohort"
|
||||
And I follow "Accounts"
|
||||
And I follow "Cohorts"
|
||||
Then I should see "2" in the "#cohorts" "css_element"
|
||||
And I click on "Assign" "link" in the "Test cohort name" "table_row"
|
||||
|
||||
@@ -28,7 +28,7 @@ Feature: Upload users to a cohort
|
||||
And I press "Upload users"
|
||||
And I press "Upload users"
|
||||
And I press "Continue"
|
||||
And I follow "Cohorts"
|
||||
And I navigate to "Users > Accounts > Cohorts" in site administration
|
||||
And I click on "Assign" "link" in the "Cohort 1" "table_row"
|
||||
Then the "Current users" select box should contain "Tom Jones (tomjones@example.com)"
|
||||
And the "Current users" select box should contain "Bob Jones (bobjones@example.com)"
|
||||
@@ -38,15 +38,13 @@ Feature: Upload users to a cohort
|
||||
And the "Current users" select box should contain "Alice Smith (alicesmith@example.com)"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Enrolled users"
|
||||
And I navigate to "Users > Enrolled users" in current page administration
|
||||
And I should see "Tom Jones"
|
||||
And I should see "Bob Jones"
|
||||
And I should not see "Mary Smith"
|
||||
And I am on site homepage
|
||||
And I follow "Course 2"
|
||||
And I expand "Users" node
|
||||
And I follow "Enrolled users"
|
||||
And I navigate to "Users > Enrolled users" in current page administration
|
||||
And I should see "Mary Smith"
|
||||
And I should see "Alice Smith"
|
||||
And I should not see "Tom Jones"
|
||||
|
||||
@@ -90,9 +90,9 @@ Feature: A privileged user can create cohorts using a CSV file
|
||||
| user | role | contextlevel | reference |
|
||||
| user1 | manager | Category | CAT1 |
|
||||
When I log in as "user1"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Cat 1"
|
||||
And I navigate to "Cohorts" node in "Category: Cat 1"
|
||||
And I navigate to "Cohorts" in current page administration
|
||||
And I follow "Upload cohorts"
|
||||
And I upload "cohort/tests/fixtures/uploadcohorts1.csv" file to "File" filemanager
|
||||
And I click on "Preview" "button"
|
||||
|
||||
@@ -53,7 +53,7 @@ Feature: View cohort list
|
||||
|
||||
Scenario: Manager in category can see cohorts in the category
|
||||
When I log in as "user2"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Cat 1"
|
||||
And I follow "Cohorts"
|
||||
And I should not see "All cohorts"
|
||||
|
||||
+1
-1
@@ -158,7 +158,7 @@ abstract class exporter {
|
||||
} else if ($definition['type'] === PARAM_TEXT) {
|
||||
if (!empty($definition['multiple'])) {
|
||||
foreach ($data->$property as $key => $value) {
|
||||
$data->$property[$key] = external_format_string($value, $context->id);
|
||||
$data->{$property}[$key] = external_format_string($value, $context->id);
|
||||
}
|
||||
} else {
|
||||
$data->$property = external_format_string($data->$property, $context->id);
|
||||
|
||||
@@ -111,6 +111,9 @@ class core_competency_exporter_testcase extends advanced_testcase {
|
||||
$output = $PAGE->get_renderer('tool_lp');
|
||||
|
||||
$result = $exporter->export($output);
|
||||
|
||||
$this->assertSame('Another string', $result->otherstring);
|
||||
$this->assertSame(array('String a', 'String b'), $result->otherstrings);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,8 +133,8 @@ class core_competency_testable_exporter extends \core_competency\external\export
|
||||
|
||||
protected function get_other_values(renderer_base $output) {
|
||||
return array(
|
||||
'otherstring' => 'An other string',
|
||||
'otherstrings' => array('String a', 'String b')
|
||||
'otherstring' => 'Another <strong>string</strong>',
|
||||
'otherstrings' => array('String a', 'String <strong>b</strong>')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Feature: Allow students to manually mark an activity as complete
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
And I press "Save and display"
|
||||
@@ -38,6 +38,5 @@ Feature: Allow students to manually mark an activity as complete
|
||||
And I log in as "teacher1"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Reports" node
|
||||
And I follow "Activity completion"
|
||||
And I navigate to "Reports > Activity completion" in current page administration
|
||||
And "Student First" user has completed "Test forum name" activity
|
||||
|
||||
@@ -56,7 +56,7 @@ Feature: Restrict activity availability through grade conditions
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I follow "Grade assignment"
|
||||
And I click on "View all submissions" "link" in the "Administration" "block"
|
||||
And I navigate to "View all submissions" in current page administration
|
||||
And I click on "Grade" "link" in the "Student First" "table_row"
|
||||
And I set the following fields to these values:
|
||||
| Grade | 21 |
|
||||
|
||||
@@ -23,7 +23,7 @@ Feature: Restrict sections availability through completion or grade conditions
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
And I press "Save and display"
|
||||
@@ -93,7 +93,7 @@ Feature: Restrict sections availability through completion or grade conditions
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I follow "Grade assignment"
|
||||
And I click on "View all submissions" "link" in the "Administration" "block"
|
||||
And I navigate to "View all submissions" in current page administration
|
||||
And I click on "Grade" "link" in the "Student First" "table_row"
|
||||
And I set the following fields to these values:
|
||||
| Grade | 21 |
|
||||
|
||||
@@ -97,7 +97,7 @@ Background:
|
||||
And I follow "Course 1"
|
||||
|
||||
Scenario: When number of discussions is decreased fewer discussions appear
|
||||
Given I click on "Edit settings" "link" in the "Administration" "block"
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| numdiscussions | 5 |
|
||||
When I press "Save and display"
|
||||
@@ -106,7 +106,7 @@ Scenario: When number of discussions is decreased fewer discussions appear
|
||||
And I should not see "This is forum post six"
|
||||
|
||||
Scenario: When number of discussions is decreased to less than 1 only 1 discussion should appear
|
||||
Given I click on "Edit settings" "link" in the "Administration" "block"
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| numdiscussions | -1 |
|
||||
When I press "Save and display"
|
||||
@@ -115,7 +115,7 @@ Scenario: When number of discussions is decreased to less than 1 only 1 discussi
|
||||
And I should not see "This is forum post ten"
|
||||
|
||||
Scenario: When number of discussions is increased more discussions appear
|
||||
Given I click on "Edit settings" "link" in the "Administration" "block"
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| numdiscussions | 9 |
|
||||
When I press "Save and display"
|
||||
|
||||
+1
-1
@@ -3791,7 +3791,7 @@ function course_get_user_administration_options($course, $context) {
|
||||
$options->reports = has_capability('moodle/site:viewreports', $context);
|
||||
$options->backup = has_capability('moodle/backup:backupcourse', $context);
|
||||
$options->restore = has_capability('moodle/restore:restorecourse', $context);
|
||||
$options->files = $course->legacyfiles == 2 and has_capability('moodle/course:managefiles', $context);
|
||||
$options->files = ($course->legacyfiles == 2 && has_capability('moodle/course:managefiles', $context));
|
||||
|
||||
if (!$isfrontpage) {
|
||||
$options->tags = has_capability('moodle/course:tag', $context);
|
||||
|
||||
@@ -145,6 +145,9 @@ function add_moduleinfo($moduleinfo, $course, $mform = null) {
|
||||
// Update embedded links and save files.
|
||||
$modcontext = context_module::instance($moduleinfo->coursemodule);
|
||||
if (!empty($introeditor)) {
|
||||
// This will respect a module that has set a value for intro in it's modname_add_instance() function.
|
||||
$introeditor['text'] = $moduleinfo->intro;
|
||||
|
||||
$moduleinfo->intro = file_save_draft_area_files($introeditor['itemid'], $modcontext->id,
|
||||
'mod_'.$moduleinfo->modulename, 'intro', 0,
|
||||
array('subdirs'=>true), $introeditor['text']);
|
||||
|
||||
@@ -35,24 +35,24 @@ Feature: Edit completion settings of an activity
|
||||
@javascript
|
||||
Scenario: Pressing the unlock button allows the user to edit completion settings
|
||||
Given I follow "TestPage"
|
||||
When I click on "Edit settings" "link" in the "Administration" "block"
|
||||
When I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I press "Unlock completion options"
|
||||
Then I should see "Completion options unlocked"
|
||||
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
|
||||
And I press "Save and display"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
Then the field "Completion tracking" matches value "Students can manually mark the activity as completed"
|
||||
|
||||
@javascript
|
||||
Scenario: Even when completion is locked, the user can still set the date
|
||||
Given I follow "TestPage"
|
||||
When I click on "Edit settings" "link" in the "Administration" "block"
|
||||
When I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
When I click on "id_completionexpected_enabled" "checkbox"
|
||||
And I set the field "id_completionexpected_year" to "2013"
|
||||
And I press "Save and display"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
Then the field "id_completionexpected_year" matches value "2013"
|
||||
|
||||
@@ -21,7 +21,7 @@ Feature: Toggle activities groups mode from the course page
|
||||
And I add a "Forum" to section "1" and I fill the form with:
|
||||
| Forum name | Test forum name |
|
||||
| Description | Test forum description |
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Group mode | No groups |
|
||||
| Force group mode | No |
|
||||
|
||||
@@ -30,8 +30,9 @@ Feature: Add activities to courses
|
||||
| Allow comments on entries | Yes |
|
||||
And I turn editing mode off
|
||||
Then I should not see "Adding a new"
|
||||
And I follow "Test name"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I turn editing mode on
|
||||
And I open "Test name" actions menu
|
||||
And I click on "Edit settings" "link" in the "Test name" activity
|
||||
And I expand all fieldsets
|
||||
And the field "Name" matches value "Test name"
|
||||
And the field "Entries required for completion" matches value "9"
|
||||
|
||||
@@ -51,7 +51,7 @@ class behat_course extends behat_base {
|
||||
try {
|
||||
$this->execute("behat_forms::press_button", get_string('turneditingon'));
|
||||
} catch (Exception $e) {
|
||||
$this->execute("behat_general::i_click_on_in_the", [get_string('turneditingon'), 'link', 'Administration', 'block']);
|
||||
$this->execute("behat_navigation::i_navigate_to_in_current_page_administration", [get_string('turneditingon')]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ class behat_course extends behat_base {
|
||||
try {
|
||||
$this->execute("behat_forms::press_button", get_string('turneditingoff'));
|
||||
} catch (Exception $e) {
|
||||
$this->execute("behat_general::i_click_on_in_the", [get_string('turneditingoff'), 'link', 'Administration', 'block']);
|
||||
$this->execute("behat_navigation::i_navigate_to_in_current_page_administration", [get_string('turneditingoff')]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1728,4 +1728,16 @@ class behat_course extends behat_base {
|
||||
$node = $this->get_management_category_listing_node_by_name($name);
|
||||
$node->find('css', 'a.categoryname')->click();
|
||||
}
|
||||
|
||||
/**
|
||||
* Go to the course participants
|
||||
*
|
||||
* @Given /^I navigate to course participants$/
|
||||
*/
|
||||
public function i_navigate_to_course_participants() {
|
||||
$coursestr = behat_context_helper::escape(get_string('courses'));
|
||||
$mycoursestr = behat_context_helper::escape(get_string('mycourses'));
|
||||
$xpath = "//div[contains(@class,'block')]//li[p/*[string(.)=$coursestr or string(.)=$mycoursestr]]";
|
||||
$this->execute('behat_general::i_click_on_in_the', [get_string('participants'), 'link', $xpath, 'xpath_element']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,9 +340,7 @@ Feature: Test category management actions
|
||||
| name | category | idnumber |
|
||||
| Cat 1 | 0 | CAT1 |
|
||||
And I log in as "admin"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Courses" node
|
||||
And I follow "Add a category"
|
||||
And I navigate to "Courses > Add a category" in site administration
|
||||
And I set the following fields to these values:
|
||||
| Category name | Test duplicate |
|
||||
| Category ID number | CAT1 |
|
||||
|
||||
@@ -16,16 +16,15 @@ Feature: Role assignments can be made at the category level
|
||||
| manager | manager | Category | CAT1 |
|
||||
And I log in as "admin"
|
||||
|
||||
|
||||
@javascript
|
||||
Scenario: A user with a category role can assign roles
|
||||
Given I define the allowed role assignments for the "Manager" role as:
|
||||
| Teacher | Assignable |
|
||||
And I log out
|
||||
And I log in as "manager"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
When I follow "Cat 1"
|
||||
Then I should see "Assign roles"
|
||||
Then "Assign roles" "link" should exist in current page administration
|
||||
|
||||
@javascript
|
||||
Scenario: A user with a category role cannot assign roles if there are no roles to assign
|
||||
@@ -37,6 +36,6 @@ Feature: Role assignments can be made at the category level
|
||||
| Student | Not assignable |
|
||||
And I log out
|
||||
And I log in as "manager"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
When I follow "Cat 1"
|
||||
Then I should not see "Assign roles"
|
||||
Then "Assign roles" "link" should not exist in current page administration
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user