MDL-49513 behat: Set admin config using php api

Added a new set to set config using set_config() api
to make steps faster and more efficient
This commit is contained in:
Rajesh Taneja
2015-04-01 14:28:27 +08:00
parent 0a4b99f35b
commit f57728674e
44 changed files with 181 additions and 239 deletions
+24
View File
@@ -114,6 +114,30 @@ class behat_admin extends behat_base {
}
}
/**
* Sets the specified site settings. A table with | config | value | (optional)plugin | is expected.
*
* @Given /^the following config values are set as admin:$/
* @param TableNode $table
*/
public function the_following_config_values_are_set_as_admin(TableNode $table) {
if (!$data = $table->getRowsHash()) {
return;
}
foreach ($data as $config => $value) {
// Default plugin value is null.
$plugin = null;
if (is_array($value)) {
$plugin = $value[1];
$value = $value[0];
}
set_config($config, $value, $plugin);
}
}
/**
* Waits with the provided params if we are running a JS session.
*
@@ -13,15 +13,13 @@ Feature: Set admin settings value
And I should not see "C_shortname Course fullname"
Scenario: set admin value with full name
Given I set the following administration settings values:
| Display extended course names | 1 |
When I press "Save changes"
Given the following config values are set as admin:
| courselistshortnames | 1 |
And I am on homepage
Then I should see "C_shortname Course fullname"
Scenario: set admin value with short name
Given I set the following administration settings values:
Given the following config values are set as admin:
| courselistshortnames | 1 |
When I press "Save changes"
And I am on homepage
Then I should see "C_shortname Course fullname"
@@ -13,8 +13,8 @@ Feature: Manage availability conditions
Then I should not see "Availability restrictions"
# Enable it and check I can now see and click on it.
And I set the following administration settings values:
| Enable conditional access | 1 |
And the following config values are set as admin:
| enableavailability | 1 |
And I am on homepage
And I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions"
@@ -28,9 +28,9 @@ Feature: Manage availability conditions
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I am on homepage
When I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions"
@@ -385,9 +385,9 @@ Feature: Set up contextual data for tests
And the following "grade outcomes" exist:
| fullname | shortname | course | scale |
| Grade outcome 2 | OT2 | C1 | Test Scale 1 |
And the following config settings values are set as admin:
| enableoutcomes | 1 |
When I log in as "admin"
And I set the following administration settings values:
| Enable outcomes | 1 |
And I follow "Home"
And I follow "Course 1"
And I follow "Outcomes"
@@ -414,9 +414,9 @@ Feature: Set up contextual data for tests
And the following "grade items" exist:
| itemname | course | outcome | gradecategory |
| Test Outcome Grade Item 1 | C1 | OT1 | Grade category 1 |
And the following config settings values are set as admin:
| enableoutcomes | 1 |
When I log in as "admin"
And I set the following administration settings values:
| Enable outcomes | 1 |
And I follow "Home"
And I follow "Course 1"
And I follow "Grades"
@@ -16,11 +16,9 @@ Feature: availability_completion
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
| Enable completion tracking | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
| enablecompletion | 1 |
@javascript
Scenario: Test condition
@@ -16,10 +16,8 @@ Feature: availability_date
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -16,10 +16,8 @@ Feature: availability_grade
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -16,10 +16,8 @@ Feature: availability_group
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -22,10 +22,8 @@ Feature: availability_grouping
And the following "group members" exist:
| user | group |
| student1 | GI1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -16,10 +16,8 @@ Feature: availability_profile
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Test condition
@@ -34,10 +34,8 @@ Feature: display_availability
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
@javascript
Scenario: Activity availability display
@@ -39,15 +39,10 @@ Feature: edit_availability
When I edit the section "1"
Then "Restrict access" "fieldset" should not exist
When I log out
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And the following config values are set as admin:
| enableavailability | 1 |
When I log out
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Page" to section "1"
Then "Restrict access" "fieldset" should exist
@@ -58,10 +53,8 @@ Feature: edit_availability
@javascript
Scenario: Edit availability using settings in activity form
# Set up.
Given I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
@@ -153,10 +146,8 @@ Feature: edit_availability
@javascript
Scenario: Edit availability using settings in section form
# Set up.
Given I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -172,3 +163,4 @@ Feature: edit_availability
And I should not see "None" in the "Restrict access" "fieldset"
And "Restriction type" "select" should be visible
And I should see "Date" in the "Restrict access" "fieldset"
+6 -12
View File
@@ -124,10 +124,9 @@ Feature: Award badges
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I follow "Home"
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
And I set the following fields to these values:
@@ -137,8 +136,6 @@ Feature: Award badges
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Submit your online text |
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
@@ -177,10 +174,9 @@ Feature: Award badges
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I follow "Home"
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
And I set the following fields to these values:
@@ -196,8 +192,6 @@ Feature: Award badges
And I click on "Condition: Activity completion" "link"
And I set the field "Assign - Test assignment name" to "1"
And I press "Save changes"
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
@@ -34,6 +34,8 @@ Feature: Expand the courses nodes within the navigation block
| student1 | c1 | student |
| student1 | c2 | student |
| student1 | c4 | student |
And the following config values are set as admin:
| navshowallcourses | 1 |
And I log in as "admin"
And I follow "Course 2"
And I turn editing mode on
@@ -187,4 +189,4 @@ Feature: Expand the courses nodes within the navigation block
And navigation node "c1" should not be expandable
And navigation node "c2" should be expandable
And navigation node "c3" should not be expandable
And navigation node "c4" should not be expandable
And navigation node "c4" should not be expandable
@@ -29,10 +29,8 @@ Feature: Test expand my courses navigation setting
@javascript
Scenario: The My Courses branch is collapsed when expand my courses is off
Given I log in as "admin"
And I set the following administration settings values:
| Show My courses expanded on My home | 0 |
And I log out
Given the following config values are set as admin:
| navexpandmycourses | 0 |
When I log in as "student1"
And I click on "My home" "link" in the "Navigation" "block"
Then I should not see "c1" in the "Navigation" "block"
@@ -41,10 +39,8 @@ Feature: Test expand my courses navigation setting
@javascript
Scenario: My Courses can be expanded on the My Moodle page when expand my courses is off
Given I log in as "admin"
And I set the following administration settings values:
| Show My courses expanded on My home | 0 |
And I log out
Given the following config values are set as admin:
| navexpandmycourses | 0 |
When I log in as "student1"
And I click on "My home" "link" in the "Navigation" "block"
And I should not see "c1" in the "Navigation" "block"
@@ -29,13 +29,11 @@ Feature: View my courses in navigation block
| student1 | c1 | student |
| student1 | c31 | student |
| student1 | c331 | student |
And I log in as "admin"
@javascript
Scenario: The plain list of enrolled courses is shown
Given I set the following administration settings values:
| Show my course categories | 0 |
And I log out
Given the following config values are set as admin:
| navshowmycoursecategories | 0 |
And I log in as "student1"
When I click on "My home" "link" in the "Navigation" "block"
Then I should not see "cat1" in the "Navigation" "block"
@@ -49,9 +47,8 @@ Feature: View my courses in navigation block
@javascript
Scenario: The nested list of enrolled courses is shown
Given I set the following administration settings values:
| Show my course categories | 1 |
And I log out
Given the following config values are set as admin:
| navshowmycoursecategories | 1 |
And I log in as "student1"
When I click on "My home" "link" in the "Navigation" "block"
Then I should see "cat1" in the "Navigation" "block"
@@ -69,10 +66,9 @@ Feature: View my courses in navigation block
@javascript
Scenario: I can expand categories and courses as guest
Given I set the following administration settings values:
| Show my course categories | 1 |
| Show all courses | 1 |
And I log out
Given the following config values are set as admin:
| navshowmycoursecategories | 1 |
| navshowallcourses | 1 |
And I expand "Courses" node
And I should see "cat1" in the "Navigation" "block"
And I should see "cat2" in the "Navigation" "block"
@@ -46,10 +46,8 @@ Feature: View structural changes in recent activity block
| GG3 | G2 |
Scenario: Check that Added module information is displayed respecting view capability
Given I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -17,11 +17,9 @@ Feature: Allow students to manually mark an activity as complete
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enablecompletion | 1 |
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -16,10 +16,8 @@ Feature: Restrict activity availability through date conditions
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -17,10 +17,8 @@ Feature: Restrict activity availability through grade conditions
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -16,11 +16,9 @@ Feature: Restrict sections availability through completion or grade conditions
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enablecompletion | 1 |
| enableavailability | 1 |
@javascript
Scenario: Show section greyed-out to student when completion condition is not satisfied
@@ -16,9 +16,9 @@ Feature: Allow teachers to manually mark users as complete when configured
| user | course | role |
| student1 | CC1 | student |
| teacher1 | CC1 | editingteacher |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I am on homepage
And I follow "Completion course"
And completion tracking is "Enabled" in current course
@@ -8,9 +8,9 @@ Feature: Edit completion settings of an activity
Given the following "courses" exist:
| fullname | shortname | enablecompletion |
| Course 1 | C1 | 1 |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I am on homepage
And I follow "Course 1"
And I turn editing mode on
+8 -10
View File
@@ -9,11 +9,10 @@ Feature: Course files
Given the following "courses" exist:
| fullname | shortname | category | legacyfiles |
| Course 1 | C1 | 0 | 2 |
And I log in as "admin"
And I set the following administration settings values:
| Legacy course files in new courses | 1 |
| Allow adding to legacy course files | 1 |
When I follow "Home"
And the following config values are set as admin:
| legacyfilesinnewcourses | 1 |
| legacyfilesaddallowed | 1 |
When I log in as "admin"
And I follow "Course 1"
Then I should see "Legacy course files"
And I follow "Legacy course files"
@@ -26,11 +25,10 @@ Feature: Course files
Given the following "courses" exist:
| fullname | shortname | category | legacyfiles |
| Course 1 | C1 | 0 | 2 |
And I log in as "admin"
And I set the following administration settings values:
| Legacy course files in new courses | 1 |
| Allow adding to legacy course files | 0 |
When I follow "Home"
And the following config values are set as admin:
| legacyfilesinnewcourses | 1 |
| legacyfilesaddallowed | 0 |
When I log in as "admin"
And I follow "Course 1"
Then I should see "Legacy course files"
And I follow "Legacy course files"
+5 -19
View File
@@ -248,10 +248,8 @@ Feature: We can use calculated grade totals
@javascript
Scenario: Natural aggregation on outcome items with natural weights
And I log out
And I log in as "admin"
And I set the following administration settings values:
| Enable outcomes | 1 |
And the following config settings values are set as admin:
| enableoutcomes | 1 |
And the following "scales" exist:
| name | scale |
| Test Scale | Disappointing, Good, Very good, Excellent |
@@ -261,10 +259,7 @@ Feature: We can use calculated grade totals
And the following "grade items" exist:
| itemname | course | outcome | gradetype | scale |
| Test outcome item one | C1 | OT1 | Scale | Test Scale |
And I log out
When I log in as "teacher1"
And I follow "Course 1"
And I follow "Grades"
Then I follow "Grades"
And I expand "Setup" node
And I follow "Categories and items"
And I set the following settings for grade item "Course 1":
@@ -272,8 +267,6 @@ Feature: We can use calculated grade totals
| Include outcomes in aggregation | 1 |
| Exclude empty grades | 0 |
And I follow "Grader report"
And I turn editing mode on
And I press "Save changes"
And I give the grade "Excellent" to the user "Student 1" for the grade item "Test outcome item one"
And I press "Save changes"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
@@ -321,10 +314,8 @@ Feature: We can use calculated grade totals
@javascript
Scenario: Natural aggregation on outcome items with modified weights
And I log out
And I log in as "admin"
And I set the following administration settings values:
| Enable outcomes | 1 |
And the following config settings values are set as admin:
| enableoutcomes | 1 |
And the following "scales" exist:
| name | scale |
| Test Scale | Disappointing, Good, Very good, Excellent |
@@ -334,9 +325,6 @@ Feature: We can use calculated grade totals
And the following "grade items" exist:
| itemname | course | outcome | gradetype | scale |
| Test outcome item one | C1 | OT1 | Scale | Test Scale |
And I log out
When I log in as "teacher1"
And I follow "Course 1"
And I follow "Grades"
And I expand "Setup" node
And I follow "Categories and items"
@@ -348,8 +336,6 @@ Feature: We can use calculated grade totals
| Weight adjusted | 1 |
| aggregationcoef2 | 100 |
And I follow "Grader report"
And I turn editing mode on
And I press "Save changes"
And I give the grade "Excellent" to the user "Student 1" for the grade item "Test outcome item one"
And I press "Save changes"
And I navigate to "Course grade settings" node in "Grade administration > Setup"
@@ -32,13 +32,13 @@ Feature: Control the aggregation of the scales
And the following "grade items" exist:
| itemname | course | scale |
| Scale me | C1 | Letterscale |
And the following config values are set as admin:
| grade_includescalesinaggregation | 0 |
And I log out
@javascript
Scenario Outline: Scales can be exluded from aggregation
Given I set the following administration settings values:
| grade_includescalesinaggregation | 0 |
And I log out
And I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
And I follow "Grades"
And I turn editing mode on
@@ -84,10 +84,7 @@ Feature: Control the aggregation of the scales
@javascript
Scenario: Weights of scales cannot be edited when they are not aggregated
Given I set the following administration settings values:
| grade_includescalesinaggregation | 0 |
And I log out
And I log in as "teacher1"
Given I log in as "teacher1"
And I follow "Course 1"
And I follow "Grades"
And I turn editing mode on
@@ -101,12 +98,8 @@ Feature: Control the aggregation of the scales
And I follow "Show more..."
And I should not see "Weight adjusted"
And I should not see "Weight"
And I log out
And I log in as "admin"
And I set the following administration settings values:
And the following config values are set as admin:
| grade_includescalesinaggregation | 1 |
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Grades"
And I navigate to "Categories and items" node in "Grade administration > Setup"
@@ -71,19 +71,19 @@ Feature: View gradebook when single item scales are used
And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Contribution to course total |
| Test assignment one | Ace! | Ace!Ace! | 100.00 % |
| Sub category 1 total | 1.00 | 01 | - |
| Sub category 1 total| 1.00 | 01 | - |
| Course total | 1.00 | 01 | - |
And I set the field "Select all or one user" to "Student 2"
And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Contribution to course total |
| Test assignment one | - | Ace!Ace! | - |
| Sub category 1 total | - | 01 | - |
| Sub category 1 total| - | 01 | - |
| Course total | - | 01 | - |
And I set the field "jump" to "Categories and items"
And the following should exist in the "grade_edit_tree_table" table:
| Name | Max grade |
| Test assignment one | 1.00 |
| Sub category 1 total | 1.00 |
| Sub category 1 total| 1.00 |
| Course total | 1.00 |
@javascript
@@ -111,10 +111,10 @@ Feature: View gradebook when single item scales are used
And I set the field "Select all or one user" to "Student 1"
And I click on "Select all or one user" "select"
And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Contribution to course total |
| Test assignment one | Ace! | Ace!Ace! | <contrib1> |
| Sub category (<aggregation>) total<aggregation>. | <cattotal1> | 0100 | - |
| Course total<aggregation>. | <coursetotal1> | 0100 | - |
| Grade item | Grade | Range | Contribution to course total |
| Test assignment one | Ace! | Ace!Ace! | <contrib1> |
| Sub category (<aggregation>) total<aggregation>. | <cattotal1> | 0100 | - |
| Course total<aggregation>. | <coursetotal1> | 0100 | - |
And I set the field "jump" to "Categories and items"
And the following should exist in the "grade_edit_tree_table" table:
| Name | Max grade |
@@ -16,8 +16,8 @@ Feature: Add or remove items from the TinyMCE editor toolbar
@javascript
Scenario: Remove icons
When I set the following administration settings values:
| Editor toolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen |
When the following config values are set as admin:
| customtoolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen | editor_tinymce |
And I am on homepage
And I follow "Course 1"
And I turn editing mode on
@@ -28,16 +28,16 @@ Feature: Add or remove items from the TinyMCE editor toolbar
@javascript
Scenario: Add icons
When I set the following administration settings values:
| Editor toolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen,anchor |
When the following config values are set as admin:
| customtoolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen,anchor | editor_tinymce |
And I am on homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Database" to section "1"
Then "#id_introeditor_tbl .mce_bold" "css_element" should not exist
And "#id_introeditor_tbl .mce_anchor" "css_element" should exist
And I set the following administration settings values:
| Editor toolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen |
And the following config values are set as admin:
| customtoolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen | editor_tinymce |
And I am on homepage
And I follow "Course 1"
And I add a "Database" to section "1"
@@ -18,11 +18,10 @@ Feature: Outcome grading
| teacher1 | C1 | editingteacher |
| student0 | C1 | student |
| student1 | C1 | student |
And the following config values are set as admin:
| enableoutcomes | 1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable outcomes | 1 |
And I expand "Grades" node
And I follow "Scales"
And I navigate to "Scales" node in "Site administration > Grades"
And I press "Add a new scale"
And I set the following fields to these values:
| Name | Test Scale |
+3 -5
View File
@@ -58,11 +58,9 @@ Feature: In an assignment, teachers grade multiple students on one page
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
When I log in as "admin"
And I set the following administration settings values:
| Enable outcomes | 1 |
And I log out
And I log in as "teacher1"
And the following config values are set as admin:
| enableoutcomes | 1 |
When I log in as "teacher1"
And I follow "Course 1"
And I follow "Outcomes"
And I follow "Edit outcomes"
@@ -33,9 +33,9 @@ Feature: Show users who have not responded to the feedback survey
And the following "grouping groups" exist:
| grouping | group |
| GXI1 | GI1 |
And the following config settings values are set as admin:
| enableavailability | 1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "Show" "link" in the "Feedback" "table_row"
And I log out
@@ -17,11 +17,9 @@ Feature: Set a certain number of discussions as a completion condition for a for
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enablecompletion | 1 |
| enableavailability | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -34,10 +34,8 @@ Feature: As a teacher I need to see an accurate list of subscribed users
And the following "grouping groups" exist:
| grouping | group |
| GG1 | G1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable conditional access | 1 |
And I log out
And the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher"
And I follow "Course 1"
And I turn editing mode on
+12 -12
View File
@@ -82,8 +82,8 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
@javascript
Scenario: Tracking forum posts forced with user tracking on
Given I set the following administration settings values:
| Allow forced read tracking | 1 |
Given the following config values are set as admin:
| forum_allowforcedreadtracking | 1 |
And I follow "Home"
And I follow "Course 1"
Given I add a "Forum" to section "1" and I fill the form with:
@@ -106,8 +106,8 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
@javascript
Scenario: Tracking forum posts forced with user tracking off
Given I set the following administration settings values:
| Allow forced read tracking | 1 |
Given the following config values are set as admin:
| forum_allowforcedreadtracking | 1 |
And I follow "Home"
And I follow "Course 1"
Given I add a "Forum" to section "1" and I fill the form with:
@@ -130,8 +130,8 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
@javascript
Scenario: Tracking forum posts forced (with force disabled) with user tracking on
Given I set the following administration settings values:
| Allow forced read tracking | 1 |
Given the following config values are set as admin:
| forum_allowforcedreadtracking | 1 |
And I follow "Home"
And I follow "Course 1"
Given I add a "Forum" to section "1" and I fill the form with:
@@ -142,8 +142,8 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject |
| Message | Test post message |
And I set the following administration settings values:
| Allow forced read tracking | 0 |
And the following config values are set as admin:
| forum_allowforcedreadtracking | 0 |
And I log out
When I log in as "student1"
And I follow "Course 1"
@@ -162,8 +162,8 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
@javascript
Scenario: Tracking forum posts forced (with force disabled) with user tracking off
Given I set the following administration settings values:
| Allow forced read tracking | 1 |
Given the following config values are set as admin:
| forum_allowforcedreadtracking | 1 |
And I follow "Home"
And I follow "Course 1"
Given I add a "Forum" to section "1" and I fill the form with:
@@ -174,8 +174,8 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject |
| Message | Test post message |
And I set the following administration settings values:
| Allow forced read tracking | 0 |
And the following config values are set as admin:
| forum_allowforcedreadtracking | 0 |
And I log out
When I log in as "student2"
And I follow "Course 1"
@@ -17,10 +17,8 @@ Feature: A teacher can set whether glossary entries are always editable or not
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
And I set the following administration settings values:
| Maximum time to edit posts | 1 minutes |
And I log out
And the following config values are set as admin:
| maxeditingtime | 60 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
@@ -16,11 +16,10 @@ Feature: Set a quiz to be marked complete when the student uses all attempts all
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I expand "Grades" node
And I follow "Grade item settings"
And I navigate to "Grade item settings" node in "Site administration > Grades"
And I set the field "Advanced grade item options" to "hiddenuntil"
And I press "Save changes"
And I log out
@@ -16,11 +16,10 @@ Feature: Set a quiz to be marked complete when the student passes
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
| enablecompletion | 1 |
And I log in as "admin"
And I set the following administration settings values:
| Enable completion tracking | 1 |
And I expand "Grades" node
And I follow "Grade item settings"
And I navigate to "Grade item settings" node in "Site administration > Grades"
And I set the field "Advanced grade item options" to "hiddenuntil"
And I press "Save changes"
And I log out
+4 -4
View File
@@ -21,8 +21,8 @@ Feature: In a report, admin can filter log data
Scenario: Filter log report for standard and legacy log reader
Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
And I click on "Enable" "link" in the "Legacy log" "table_row"
And I set the following administration settings values:
| Log legacy data | 1 |
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I follow "Home"
And I follow "Course 1"
And I navigate to "Participants" node in "Current course > C1"
@@ -62,8 +62,8 @@ Feature: In a report, admin can filter log data
Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
And I click on "Enable" "link" in the "Legacy log" "table_row"
And I click on "Disable" "link" in the "Standard log" "table_row"
And I set the following administration settings values:
| Log legacy data | 1 |
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I follow "Home"
And I follow "Course 1"
And I follow "Home"
@@ -11,8 +11,8 @@ Feature: In a report, admin can see loglive data
And I log in as "admin"
And I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
And I click on "Enable" "link" in the "Legacy log" "table_row"
And I set the following administration settings values:
| Log legacy data | 1 |
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I am on homepage
And I follow "Course 1"
And I turn editing mode on
+4 -4
View File
@@ -33,8 +33,8 @@ Feature: View an outline report
Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
And I click on "Enable" "link" in the "Legacy log" "table_row"
And I click on "Disable" "link" in the "Standard log" "table_row"
And I set the following administration settings values:
| Log legacy data | 1 |
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I log out
And I log in as "student1"
And I follow "Course 1"
@@ -79,8 +79,8 @@ Feature: View an outline report
Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
And I click on "Enable" "link" in the "Legacy log" "table_row"
And "Disable" "link" should exist in the "Standard log" "table_row"
And I set the following administration settings values:
| Log legacy data | 1 |
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I log out
And I log in as "student1"
And I follow "Course 1"
+4 -4
View File
@@ -32,8 +32,8 @@ Feature: View the user page for the outline report
Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
And I click on "Enable" "link" in the "Legacy log" "table_row"
And I click on "Disable" "link" in the "Standard log" "table_row"
And I set the following administration settings values:
| Log legacy data | 1 |
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I log out
And I log in as "student1"
And I follow "Course 1"
@@ -84,8 +84,8 @@ Feature: View the user page for the outline report
Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
And I click on "Enable" "link" in the "Legacy log" "table_row"
And "Disable" "link" should exist in the "Standard log" "table_row"
And I set the following administration settings values:
| Log legacy data | 1 |
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I log out
And I log in as "student1"
And I follow "Course 1"
@@ -34,8 +34,8 @@ Feature: In a participation report, admin can filter student actions
And I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
And I click on "Disable" "link" in the "Standard log" "table_row"
And I click on "Enable" "link" in the "Legacy log" "table_row"
And I set the following administration settings values:
| Log legacy data | 1 |
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I log out
And I log in as "student1"
And I follow "Course 1"
@@ -55,8 +55,8 @@ Feature: In a participation report, admin can filter student actions
And I navigate to "Manage log stores" node in "Site administration > Plugins > Logging"
And I click on "Disable" "link" in the "Standard log" "table_row"
And I click on "Enable" "link" in the "Legacy log" "table_row"
And I set the following administration settings values:
| Log legacy data | 1 |
And the following config values are set as admin:
| loglegacy | 1 | logstore_legacy |
And I log out
And I log in as "student1"
And I follow "Course 1"
+3 -3
View File
@@ -12,9 +12,9 @@ Feature: Tables can be sorted by additional names
| student3 | Travis | Sutcliff | Peter | Mr T | student3@mail.com | s3 |
And I log in as "admin"
And I navigate to "User policies" node in "Site administration > Users > Permissions"
And I set the following administration settings values:
| Full name format | firstname middlename lastname |
| Alternative full name format | firstname middlename alternatename lastname |
And the following config values are set as admin:
| fullnamedisplay | firstname middlename lastname |
| alternativefullnameformat | firstname middlename alternatename lastname |
@javascript
Scenario: All user names are show and sortable in the administration user list.
+2 -4
View File
@@ -40,10 +40,8 @@ Feature: Access to full profiles of users
@javascript
Scenario: Viewing full profiles with forceloginforprofiles off
Given I log in as "admin"
And I set the following administration settings values:
| Force users to log in for profiles | 0 |
And I log out
Given the following config values are set as admin:
| forceloginforprofiles | 0 |
When I log in as "student1"
And I follow "Course 1"
And I navigate to "Participants" node in "Current course > C1"