Part of MDL-55611 epic.
@javascript
Scenario: Override a permission
- Given I follow "Course fullname"
+ Given I am on course page "Course fullname"
And I navigate to "Users > Permissions" in current page administration
And I select "Manager (0)" from the "roleid" singleselect
And I click on "Prohibit" "radio" in the "View added and updated modules in recent activity block" "table_row"
# OK, toggling works. Set the grade one to Hide and we'll go see if it actually worked.
And I click on "Hide" "icon" in the "Restriction by grade" "table_row"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Page" to section "1"
And I expand all fieldsets
| Grouping 2 | C1 | GG2 |
When I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Users > Groups" in current page administration
Then I should see "Group 1"
And I should see "Group 2"
| mod/forum:replynews | Prevent | editingteacher | Course | C1 |
When I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
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
| user | course | role |
| student1 | C1 | student |
When I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Then I should see "Topic 1"
Scenario: Add role assigns
And I log out
And I log in as "user2"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 am on course page "Course 1"
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 am on course page "Course 1"
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"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "You can not enrol yourself in this course."
Scenario: Add modules
| assign | Test assignment name with scale | Test assignment description | C1 | assign1 | Test Scale 1 |
When I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
Then I should see "Test assignment name"
# Assignment 2.2 module type is disabled by default
# And I should see "Test assignment22 name"
| GG1 | G1 |
When I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
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)"
| Grade sub category 2 | C1 | Grade category 1 |
When I log in as "admin"
And I am on course index
- And I follow "Course 1"
+ And I am on course page "Course 1"
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"
| Test Grade Item 3 | C1 | Grade sub category 2 |
When I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
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"
| Test Scale 1 | Disappointing, Good, Very good, Excellent |
When I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
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"
| enableoutcomes | 1 |
When I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Outcomes"
Then I should see "Grade outcome 1" in the "#addoutcomes" "css_element"
And I should see "Grade outcome 2" in the "#removeoutcomes" "css_element"
| enableoutcomes | 1 |
When I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
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"
| online_users | Course | C1 | course-view-* | site-pre |
When I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
Then I should see "Online users"
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment name"
And I should see "##yesterday##l, j F Y##"
And I log out
Scenario: Course capabilities overrides
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Users > Permissions" in current page administration
And I override the system permissions of "Student" role with:
| mod/forum:deleteanypost | Prohibit |
Scenario: Module capabilities overrides
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | I'm the name |
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
And I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Reset" node in "Course administration"
# Select (multi-select) - Checking "the select box should contain".
And I expand all fieldsets
And the "Unenrol users" select box should not contain "Baker"
And the "Unenrol users" select box should not contain "President, Baker"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I follow "Test this one"
And I press "Create page"
| Default format | HTML |
| Force format | 1 |
And I press "Cancel"
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Radio - Checking "I set the field" and "the field matches value".
And I add a "Choice" to section "1" and I fill the form with:
| Choice name | Test choice name |
And the field "two" matches value ""
# Check if field xpath set/match works.
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Edit settings" node in "Course administration"
And I set the field with xpath "//input[@id='id_idnumber']" to "Course id number"
And the field with xpath "//input[@name='idnumber']" matches value "Course id number"
@javascript
Scenario: with JS enabled all form fields getters and setters works as expected
- Then I follow "Course 1"
+ Then I am on course page "Course 1"
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"
And the "members" select box should not contain "Student 3"
# Checkbox (AJAX) - Checking "I set the field" and "I set the following fields to these values".
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I add a "Lesson" to section "1"
And I set the following fields to these values:
| Name | Test lesson |
| Course 1 | C1 | 0 |
And I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Quiz" to section "1"
When I expand all fieldsets
And I press "Save changes"
# Create a resource activity and add it to a course
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add a "File" to section "1"
And I set the following fields to these values:
And I navigate to "Event monitoring rules" node in "Site administration > Reports"
And I click on "Enable" "link"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
And I press "Add a new rule"
And I set the following fields to these values:
Scenario: Add a rule on course level
Given I log in as "teacher1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I press "Add a new rule"
And I set the following fields to these values:
Scenario: Delete a rule on course level
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I click on "Delete rule" "link"
Then I should see "Are you sure you want to delete the rule \"New rule course level\"?"
Scenario: Edit a rule on course level
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I click on "Edit rule" "link"
And I set the following fields to these values:
Scenario: Duplicate a rule on course level
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I click on "Duplicate rule" "link" in the "New rule course level" "table_row"
Then I should see "Rule successfully duplicated"
Scenario: Duplicate a rule on site level
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I click on "Duplicate rule" "link" in the "New rule site level" "table_row"
Then I should see "Rule successfully duplicated"
And I navigate to "Event monitoring rules" node in "Site administration > Reports"
And I click on "Enable" "link"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
And I press "Add a new rule"
And I set the following fields to these values:
And I should see "Subscription successfully created"
And "#toolmonitorsubs_r0" "css_element" should exist
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I trigger cron
And I am on site homepage
When I click on ".popover-region-notifications" "css_element"
@javascript
Scenario: Delete and restore a quiz with user data
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Quiz" to section "1" and I fill the form with:
| Name | Quiz 1 |
| Feedback for the response 'False'. | So you think it is false |
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Quiz 1"
And I press "Attempt quiz now"
And I click on "True" "radio" in the "First question" "question"
And I should see "5.00 out of 10.00"
And I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I delete "Quiz 1" activity
And I run all adhoc tasks
And I click on "Restore" "link" in the "region-main" "region"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
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"
Scenario: Restore a deleted assignment
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assign |
And I should see "'Test assign' has been restored"
And I wait to be redirected
And I am on homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Test assign" in the "Topic 1" "section"
Scenario: Restore a deleted course
@javascript
Scenario: Deleting a single item from the recycle bin
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assign |
@javascript
Scenario: Deleting all the items from the recycle bin
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assign 1 |
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 am on course page "Maths"
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"
And I log out
And I log in as "editor1"
And I am on site homepage
- When I follow "Course 1"
+ When I am on course page "Course 1"
Then I should not see "Welcome to your course tour."
And I log out
And I log in as "student1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Welcome to your course tour."
And I click on "End tour" "button"
And I log out
And I log in as "teacher1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Welcome to your course tour."
# Basic setup.
Given I log in as "teacher1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
# Add a Page with a completion tickbox.
When I log out
And I log in as "student1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Page 2 should not appear yet.
Then I should not see "Page 2" in the "region-main" "region"
Scenario: Multiple completion conditions on glossary
# Set up course.
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Edit settings" node in "Course administration"
And I expand all fieldsets
And I set the field "Enable completion tracking" to "Yes"
# Basic setup.
Given I log in as "teacher1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
# Add a Page with a date condition that does match (from the past).
When I log out
And I log in as "student1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Page 1 should appear, but page 2 does not.
Then I should see "Page 1" in the "region-main" "region"
# Basic setup.
Given I log in as "teacher1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
# Add an assignment.
And I click on "Edit settings" "link" in the "P3" activity
And I expand all fieldsets
And the field "Maximum grade percentage (exclusive)" matches value ""
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Add a Page with a grade condition for 10%.
And I add a "Page" to section "4"
When I log out
And I log in as "student1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Do the assignment.
And I follow "A1"
When I log out
And I log in as "teacher1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Give the assignment 40%.
And I follow "A1"
And I log out
And I log in as "student1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Check pages are visible.
Then I should see "P2" in the "region-main" "region"
# Basic setup.
Given I log in as "teacher1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
# Start to add a Page. If there aren't any groups, there's no Group option.
# This step used to be 'And I follow "C1"', but Chrome thinks the breadcrumb
# is not clickable, so we'll go via the home page instead.
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I add a "Page" to section "1"
And I expand all fieldsets
And I click on "Add restriction..." "button"
When I log out
And I log in as "student1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
# No pages should appear yet.
Then I should not see "P1" in the "region-main" "region"
And I log out
And I log in as "student1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
# P1 (any groups) and P2 should show but not P3.
Then I should see "P1" in the "region-main" "region"
# Basic setup.
Given I log in as "teacher1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
# Start to add a Page. If there aren't any groupings, there's no Grouping option.
# This step used to be 'And I follow "C1"', but Chrome thinks the breadcrumb
# is not clickable, so we'll go via the home page instead.
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And the following "groupings" exist:
| name | course | idnumber |
| GX1 | C1 | GXI1 |
# Log back in as student.
When I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
# No pages should appear yet.
Then I should not see "P1" in the "region-main" "region"
| GXI1 | GI1 |
And I log in as "student1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
# P1 should show but not B2.
Then I should see "P1" in the "region-main" "region"
# Basic setup.
Given I log in as "teacher1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
# Add
When I log out
And I log in as "student1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
# I see P1 but not P2.
Then I should see "P1" in the "region-main" "region"
# Set Page activity which has requirement on this field.
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Page" to section "1"
And I set the following fields to these values:
And I log out
And I log in as "student1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
Then I should see "P1" in the "region-main" "region"
# Set up.
Given I log in as "teacher1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
# Add a Page with 1 restriction.
Given I log out
And I log in as "student1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Page 1 display still there but should be dimmed and not a link.
Then I should see "Page 1" in the "#section-1 .dimmed_text" "css_element"
# Set up.
Given I log in as "teacher1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
# Add a restriction to section 1 (visible to students).
# This is necessary because otherwise it fails in Chrome, see MDL-44959
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Add Pages to each section.
And I add a "Page" to section "1" and I fill the form with:
Given I log out
And I log in as "student1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
# The contents of both sections should be hidden.
Then I should not see "Page 1" in the "region-main" "region"
| enableavailability | 0 |
When I log in as "teacher1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Page" to section "1"
Then "Restrict access" "fieldset" should not exist
| enableavailability | 1 |
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I add a "Page" to section "1"
Then "Restrict access" "fieldset" should exist
Scenario: Edit availability using settings in activity form
# Set up.
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Add a Page and check it has None in so far.
And I turn editing mode on
# Set up.
Given I log in as "teacher1"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
# Edit a section
| enableavailability | 0 |
And I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Forum" to section "1"
When I expand all fieldsets
| GX1 | C1 | GXI1 |
And I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Forum" to section "1"
And I set the following fields to these values:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Database" to section "1" and I fill the form with:
| Name | Test database name |
| teacher1 | C1 | editingteacher |
| teacher1 | C2 | editingteacher |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Database" to section "1" and I fill the form with:
| Name | Test database name |
| Grouping 1 | C1 | GROUPING1 |
| Grouping 2 | C1 | GROUPING2 |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Scenario: Include groups and groupings when importing a course to another course
Given I import "Course 1" course into "Course 2" course using this options:
| data | C3 | data1 | Test database name | Database description | 2 |
And I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
Scenario: Restore a backup into the same course removing it's contents before that
When I backup "Course 1" course using this options:
| Confirmation | Filename | test_backup.mbz |
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum post backup name |
| Description | Test forum post backup description |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
And I set the following fields to these values:
And I press "Award badge"
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)"
When I press "Award badge"
- And I follow "Course Badge"
+ And I am on course page "Course Badge"
Then I should see "Recipients (2)"
And I log out
And I log in as "student1"
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Edit settings" node in "Course administration"
And I set the following fields to these values:
| Enable completion tracking | Yes |
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 follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
And I set the following fields to these values:
And I click on "Course 1" "link" in the "region-main" "region"
Then I should not see "badges"
And I am on homepage
- And I follow "Course 1"
- And I click on "Not completed: Test assignment name. Select to mark as complete." "icon"
+ And I am on course page "Course 1"
+ And I press "Mark as complete: Test assignment name"
And I follow "Profile" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
Then I should see "Course Badge"
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Edit settings" node in "Course administration"
And I set the following fields to these values:
| Enable completion tracking | Yes |
And I click on "Condition: Activity completion" "link"
And I set the field "Assignment - Test assignment name" to "1"
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
And I set the following fields to these values:
And I click on "Course 1" "link" in the "region-main" "region"
Then I should not see "badges"
And I am on homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "Not completed: Test assignment name. Select to mark as complete." "icon"
And I log out
# Completion cron won't mark the whole course completed unless the
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Create course badge 1.
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
And I set the following fields to these values:
And I press "Award badge"
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)"
When I press "Award badge"
- And I follow "Course Badge"
+ And I am on course page "Course Badge"
Then I should see "Recipients (2)"
And I follow "Recipients (2)"
And I press "Award badge"
And I press "Revoke badge"
And I set the field "existingrecipients[]" to "Student 1 (student1@example.com)"
When I press "Revoke badge"
- And I follow "Course Badge"
+ And I am on course page "Course Badge"
Then I should see "Recipients (0)"
When I log in as "admin"
And I am on course index
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Activities" block
And I click on "Assignments" "link" in the "Activities" "block"
Then I should see "Test assignment name"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "Chats" "link" in the "Activities" "block"
And I should see "Test chat name"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "Choices" "link" in the "Activities" "block"
And I should see "Test choice name"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "Databases" "link" in the "Activities" "block"
And I should see "Test database name"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "Feedback" "link" in the "Activities" "block"
And I should see "Test feedback name"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "Forums" "link" in the "Activities" "block"
And I should see "Test forum name"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "External tools" "link" in the "Activities" "block"
And I should see "Test lti name"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "Quizzes" "link" in the "Activities" "block"
And I should see "Test quiz name"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "Glossaries" "link" in the "Activities" "block"
And I should see "Test glossary name"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "SCORM packages" "link" in the "Activities" "block"
And I should see "Test scorm name"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "Lessons" "link" in the "Activities" "block"
And I should see "Test lesson name"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "Wikis" "link" in the "Activities" "block"
And I should see "Test wiki name"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "Workshop" "link" in the "Activities" "block"
And I should see "Test workshop name"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I click on "Resources" "link" in the "Activities" "block"
And I should see "Test book name"
And I should see "Test page name"
| student4 | C1 | student |
| student5 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment 1 |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment 2 |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment 3 |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I add a "Page" to section "1"
And I set the following fields to these values:
| Name | Test page name |
| Description | Test page description |
| Page content | This is a page |
And I press "Save and return to course"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Test page name"
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment 1"
And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment 1"
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Scenario: Configure the block on a non-graded activity to show 3 high scores
Given I follow "Test page name"
And I configure the "Activity results" block
Then the field "id_config_activitygradeitemid" matches value "Test assignment 1"
And I press "Cancel"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 2"
And I add the "Activity results" block
And I configure the "Activity results" block
And the field "id_config_activitygradeitemid" matches value "Test assignment 2"
And I press "Cancel"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 3"
And I add the "Activity results" block
And I configure the "Activity results" block
And the field "id_config_activitygradeitemid" matches value "Test assignment 3"
And I press "Cancel"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test page name"
And I add the "Activity results" block
And I configure the "Activity results" block
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
Scenario: Add the block to a the course
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
Scenario: Try to configure the block to use an activity without grades
| config_gradeformat | 2 | block_activity_results |
| config_nameformat | 2 | block_activity_results |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I add the "Activity results" block
When I configure the "Activity results" block
And the following fields match these values:
| config_showworst | 0 | block_activity_results |
| config_showworst_locked | 1 | block_activity_results |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I add the "Activity results" block
When I configure the "Activity results" block
And the following fields match these values:
| student4 | C1 | student |
| student5 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 "60.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment"
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Scenario: Configure the block on the course page to show 0 high scores
Given I add the "Activity results" block
| student4 | C1 | student |
| student5 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 |
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| assignsubmission_file_enabled | 0 |
| id_grade_modgrade_type | Scale |
| id_grade_modgrade_scale | My Scale |
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 "Average" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "Not good enough" to the user "Student 5" for the grade item "Test assignment"
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Scenario: Configure the block on the course page to show 1 high score
Given I add the "Activity results" block
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 |
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| id_grade_modgrade_type | Scale |
| id_grade_modgrade_scale | My Scale |
| Group mode | Separate groups |
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 "Good" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "Average" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Scenario: Try to configure the block on the course page to show 1 high score
Given I add the "Activity results" block
And I should see "Excellent!" in the "Activity results" "block"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 1" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student3"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 3" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
And I should see "Student 4" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "User S1" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
And I should see "User S2" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "User" in the "Activity results" "block"
And I should see "Excellent!" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Scenario: Configure the block on the course page to show 1 high score
Given I add the "Activity results" block
And I should see "95.00/100.00" in the "Activity results" "block"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 1" in the "Activity results" "block"
And I should see "100.00/100.00" in the "Activity results" "block"
And I should see "95.00" in the "Activity results" "block"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 1" in the "Activity results" "block"
And I should see "100.00" in the "Activity results" "block"
And I should see "75%" in the "Activity results" "block"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 1" in the "Activity results" "block"
And I should see "100%" in the "Activity results" "block"
And I should see "Student 2" in the "Activity results" "block"
And I should see "75.00/100.00" in the "Activity results" "block"
And I log out
And I log in as "student3"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 3" in the "Activity results" "block"
And I should see "90.00/100.00" in the "Activity results" "block"
And I should see "Student 4" in the "Activity results" "block"
And I should see "75.00" in the "Activity results" "block"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 1" in the "Activity results" "block"
And I should see "100.00" in the "Activity results" "block"
And I should see "Student 2" in the "Activity results" "block"
And I should see "75.00%" in the "Activity results" "block"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "User S1" in the "Activity results" "block"
And I should see "100.00%" in the "Activity results" "block"
And I should see "User S2" in the "Activity results" "block"
And I should see "75.00%" in the "Activity results" "block"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "User" in the "Activity results" "block"
And I should see "100.00%" in the "Activity results" "block"
And I should see "90.00%" in the "Activity results" "block"
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Scenario: Configure the block on the course page to show 1 high score
Given I add the "Activity results" block
And I press "Save changes"
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Group 1" in the "Activity results" "block"
And I should see "95.00/100.00" in the "Activity results" "block"
And I press "Save changes"
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Group 1" in the "Activity results" "block"
And I should see "95.00" in the "Activity results" "block"
And I press "Save changes"
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Group 1" in the "Activity results" "block"
And I should see "95%" in the "Activity results" "block"
And I should see "Group 2" in the "Activity results" "block"
And I press "Save changes"
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Group 1" in the "Activity results" "block"
And I should see "95.00/100.00" in the "Activity results" "block"
And I should see "Group 2" in the "Activity results" "block"
And I press "Save changes"
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Group 1" in the "Activity results" "block"
And I should see "95.00" in the "Activity results" "block"
And I should see "Group 2" in the "Activity results" "block"
And I press "Save changes"
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Group" in the "Activity results" "block"
And I should see "95.00%" in the "Activity results" "block"
And I should see "85.00%" in the "Activity results" "block"
And I press "Save changes"
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Group" in the "Activity results" "block"
And I should see "95.00%" in the "Activity results" "block"
And I should see "85.00%" in the "Activity results" "block"
| student4 | C1 | student |
| student5 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 "60.00" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment"
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Scenario: Configure the block on the course page to show 1 low score
Given I add the "Activity results" block
| student4 | C1 | student |
| student5 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 |
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| assignsubmission_file_enabled | 0 |
| id_grade_modgrade_type | Scale |
| id_grade_modgrade_scale | My Scale |
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 "Average" to the user "Student 4" for the grade item "Test assignment"
And I give the grade "Not good enough" to the user "Student 5" for the grade item "Test assignment"
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Scenario: Configure the block on the course page to show 1 low score
Given I add the "Activity results" block
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 |
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| id_grade_modgrade_type | Scale |
| id_grade_modgrade_scale | My Scale |
| Group mode | Separate groups |
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 "Good" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "Average" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Scenario: Try to configure the block on the course page to show 1 low score
Given I add the "Activity results" block
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student5"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 6" in the "Activity results" "block"
And I should see "Average" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student3"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 3" in the "Activity results" "block"
And I should see "Very good" in the "Activity results" "block"
And I should see "Student 4" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student5"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "User S5" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I should see "User S6" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I log out
And I log in as "student5"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "User" in the "Activity results" "block"
And I should see "Good" in the "Activity results" "block"
And I should see "Average" in the "Activity results" "block"
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Scenario: Configure the block on the course page to show 1 low score
Given I add the "Activity results" block
And I should see "75.00/100.00" in the "Activity results" "block"
And I log out
And I log in as "student5"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 6" in the "Activity results" "block"
And I should see "70.00/100.00" in the "Activity results" "block"
And I should see "75.00" in the "Activity results" "block"
And I log out
And I log in as "student5"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 6" in the "Activity results" "block"
And I should see "70.00" in the "Activity results" "block"
And I should see "75%" in the "Activity results" "block"
And I log out
And I log in as "student5"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 6" in the "Activity results" "block"
And I should see "70%" in the "Activity results" "block"
And I should see "Student 5" in the "Activity results" "block"
And I should see "75.00/100.00" in the "Activity results" "block"
And I log out
And I log in as "student3"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 3" in the "Activity results" "block"
And I should see "90.00/100.00" in the "Activity results" "block"
And I should see "Student 4" in the "Activity results" "block"
And I should see "75.00" in the "Activity results" "block"
And I log out
And I log in as "student5"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Student 5" in the "Activity results" "block"
And I should see "80.00" in the "Activity results" "block"
And I should see "Student 6" in the "Activity results" "block"
And I should see "75.00%" in the "Activity results" "block"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "User S1" in the "Activity results" "block"
And I should see "100.00%" in the "Activity results" "block"
And I should see "User S2" in the "Activity results" "block"
And I should see "75.00%" in the "Activity results" "block"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "User" in the "Activity results" "block"
And I should see "100.00%" in the "Activity results" "block"
And I should see "90.00%" in the "Activity results" "block"
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
- And I follow "Course 1"
+ And I am on course page "Course 1"
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 "80.00" to the user "Student 5" for the grade item "Test assignment"
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment"
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Scenario: Configure the block on the course page to show 1 low score
Given I add the "Activity results" block
And I press "Save changes"
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Group 3" in the "Activity results" "block"
And I should see "75.00/100.00" in the "Activity results" "block"
And I press "Save changes"
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Group 3" in the "Activity results" "block"
And I should see "75.00" in the "Activity results" "block"
And I should see "75%" in the "Activity results" "block"
And I log out
And I log in as "student5"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Then I should see "Group 2" in the "Activity results" "block"
And I should see "85%" in the "Activity results" "block"
And I should see "Group 3" in the "Activity results" "block"
And I press "Save changes"
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Group 2" in the "Activity results" "block"
And I should see "85.00/100.00" in the "Activity results" "block"
And I should see "Group 3" in the "Activity results" "block"
And I press "Save changes"
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Group 2" in the "Activity results" "block"
And I should see "85.00" in the "Activity results" "block"
And I should see "Group 3" in the "Activity results" "block"
And I press "Save changes"
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Group" in the "Activity results" "block"
And I should see "85.00%" in the "Activity results" "block"
And I should see "75.00%" in the "Activity results" "block"
And I press "Save changes"
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Group" in the "Activity results" "block"
And I should see "85.00%" in the "Activity results" "block"
And I should see "75.00%" in the "Activity results" "block"
| enablebadges | 0 |
And I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Latest badges" block
Then I should see "Badges are not enabled on this site." in the "Latest badges" "block"
Scenario: Add the block to a the course when badges are enabled
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Latest badges" block
Then I should see "You have no badges to display" in the "Latest badges" "block"
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Issue badge 1 of 2
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I set the following fields to these values:
Scenario: Add the recent badges block to a course.
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Latest badges" block
Then I should see "Badge 1" in the "Latest badges" "block"
Scenario: Add the recent badges block to a course and limit it to only display 1 badge.
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Latest badges" block
And I configure the "Latest badges" block
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Issue badge 1 of 2
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I set the following fields to these values:
And I add the "Latest badges" block
And I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Issue badge 1 of 2
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I set the following fields to these values:
| enableblogs | 0 |
And I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Blog menu" block
Then I should see "Blogging is disabled!" in the "Blog menu" "block"
| useblogassociations | 0 |
And I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Blog menu" block
Then I should see "Blog entries" in the "Blog menu" "block"
| useblogassociations | 1 |
And I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Blog menu" block
Then I should see "Blog entries" in the "Blog menu" "block"
| enablerssfeeds | 0 |
And I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Blog menu" block
Then I should not see "Blog RSS feed" in the "Blog menu" "block"
| enablerssfeeds | 1 |
And I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Blog menu" block
Then I should see "Blog RSS feed" in the "Blog menu" "block"
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment 1 |
Scenario: Students use the blog menu block to post blogs
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add a new entry"
When I set the following fields to these values:
Then I should see "S1 First Blog"
And I should see "This is my awesome blog!"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Blog entries"
And I should see "S1 First Blog"
Scenario: Students use the blog menu block to view their blogs about the activity
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add an entry about this Assignment"
And I set the following fields to these values:
And I should see "Associated Assignment: Test assignment 1"
And I log out
And I log in as "student2"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add a new entry"
And I set the following fields to these values:
And I should see "My unrelated blog!"
And I should not see "Associated Assignment: Test assignment 1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add an entry about this Assignment"
And I set the following fields to these values:
And I should see "My course blog is better!"
And I should see "Associated Assignment: Test assignment 1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
When I follow "View my entries about this Assignment"
Then I should see "S2 First Blog"
Scenario: Students use the blog menu block to view all blogs about the assignment
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add an entry about this Assignment"
And I set the following fields to these values:
And I should see "Associated Assignment: Test assignment 1"
And I log out
And I log in as "student2"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add a new entry"
And I set the following fields to these values:
And I should see "My unrelated blog!"
And I should not see "Associated Assignment: Test assignment 1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add an entry about this Assignment"
And I set the following fields to these values:
And I should see "My course blog is better!"
And I should see "Associated Assignment: Test assignment 1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
When I follow "View all entries about this Assignment"
Then I should see "S1 First Blog"
Scenario: Students use the blog menu block to view all their blog entries
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add an entry about this Assignment"
And I set the following fields to these values:
And I should see "Associated Assignment: Test assignment 1"
And I log out
And I log in as "student2"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add a new entry"
And I set the following fields to these values:
And I should see "My unrelated blog!"
And I should not see "Associated Assignment: Test assignment 1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add an entry about this Assignment"
And I set the following fields to these values:
And I should see "My course blog is better!"
And I should see "Associated Assignment: Test assignment 1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
When I follow "Blog entries"
Then I should see "S2 First Blog"
Scenario: Teacher searches for student blogs
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add an entry about this Assignment"
And I set the following fields to these values:
And I should see "Associated Assignment: Test assignment 1"
And I log out
And I log in as "student2"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add a new entry"
And I set the following fields to these values:
And I should see "My unrelated blog!"
And I should not see "Associated Assignment: Test assignment 1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add an entry about this Assignment"
And I set the following fields to these values:
And I should see "Associated Assignment: Test assignment 1"
And I log out
When I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I set the field "blogsearchquery" to "First"
And I press "Search"
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Blog menu" block
And I log out
Scenario: Students use the blog menu block to post blogs
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add a new entry"
When I set the following fields to these values:
| Entry title | S1 First Blog |
Then I should see "S1 First Blog"
And I should see "This is my awesome blog!"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Blog entries"
And I should see "S1 First Blog"
And I should see "This is my awesome blog!"
Scenario: Students use the blog menu block to view their blogs about the course
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add an entry about this course"
And I set the following fields to these values:
| Entry title | S1 First Blog |
And I should see "Associated Course: C1"
And I log out
And I log in as "student2"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add a new entry"
And I set the following fields to these values:
| Entry title | S2 Second Blog |
And I should see "My unrelated blog!"
And I should not see "Associated Course: C1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add an entry about this course"
And I set the following fields to these values:
| Entry title | S2 First Blog |
And I should see "My course blog is better!"
And I should see "Associated Course: C1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
When I follow "View my entries about this course"
Then I should see "S2 First Blog"
And I should not see "S2 Second Blog"
Scenario: Students use the blog menu block to view all blogs about the course
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add an entry about this course"
And I set the following fields to these values:
| Entry title | S1 First Blog |
And I should see "Associated Course: C1"
And I log out
And I log in as "student2"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add a new entry"
And I set the following fields to these values:
| Entry title | S2 Second Blog |
And I should see "My unrelated blog!"
And I should not see "Associated Course: C1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add an entry about this course"
And I set the following fields to these values:
| Entry title | S2 First Blog |
And I should see "My course blog is better!"
And I should see "Associated Course: C1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
When I follow "View all entries for this course"
Then I should see "S1 First Blog"
And I should see "S2 First Blog"
Scenario: Students use the blog menu block to view all their blog entries
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add an entry about this course"
And I set the following fields to these values:
| Entry title | S1 First Blog |
And I should see "Associated Course: C1"
And I log out
And I log in as "student2"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add a new entry"
And I set the following fields to these values:
| Entry title | S2 Second Blog |
And I should see "My unrelated blog!"
And I should not see "Associated Course: C1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add an entry about this course"
And I set the following fields to these values:
| Entry title | S2 First Blog |
And I should see "My course blog is better!"
And I should see "Associated Course: C1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
When I follow "Blog entries"
Then I should see "S2 First Blog"
And I should see "S2 Second Blog"
Scenario: Teacher searches for student blogs
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add an entry about this course"
And I set the following fields to these values:
| Entry title | S1 First Blog |
And I should see "Associated Course: C1"
And I log out
And I log in as "student2"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add a new entry"
And I set the following fields to these values:
| Entry title | S2 Second Blog |
And I should see "My unrelated blog!"
And I should not see "Associated Course: C1"
And I follow "Dashboard"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add an entry about this course"
And I set the following fields to these values:
| Entry title | S2 First Blog |
And I should see "Associated Course: C1"
And I log out
When I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I set the field "blogsearchquery" to "First"
And I press "Search"
Then I should see "S1 First Blog"
| enableblogs | 0 |
And I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Recent blog entries" block
Then I should see "Blogging is disabled!" in the "Recent blog entries" "block"
Scenario: Add the recent blogs block to a course when there are not any blog posts
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Recent blog entries" block
Then I should see "No recent entries" in the "Recent blog entries" "block"
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment 1 |
Scenario: Students use the recent blog entries block to view blogs
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add an entry about this Assignment"
When I set the following fields to these values:
Scenario: Students only see a few entries in the recent blog entries block
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test assignment 1"
And I follow "Add an entry about this Assignment"
# Blog 1 of 5
And I should see "This is my awesome blog!"
Then I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I follow "Test assignment 1"
And I configure the "Recent blog entries" block
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Blog menu" block
And I add the "Recent blog entries" block
Scenario: Students use the recent blog entries block to view blogs
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add an entry about this course"
When I set the following fields to these values:
| Entry title | S1 First Blog |
Scenario: Students only see a few entries in the recent blog entries block
Given I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Add an entry about this course"
# Blog 1 of 5
And I set the following fields to these values:
And I should see "This is my awesome blog!"
Then I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I configure the "Recent blog entries" block
And I set the following fields to these values:
| teacher1 | c1 | editingteacher |
| student1 | c1 | student |
When I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "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 press "Save changes"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to course participants
And I click on "Course blogs" "link" in the "Navigation" "block"
And I follow "Blog about this Course"
Scenario: Add the block to a the course
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Calendar" block
Then I should see "Events key" in the "Calendar" "block"
| id_name | Site Event |
And I log out
When I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Calendar" block
And I hover over today in the calendar
| id_name | Site Event |
And I log out
When I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Calendar" block
And I create a calendar event with form data:
| id_eventtype | Course |
| id_name | Course Event |
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Hide global events"
And I hover over today in the calendar
Then I should not see "Site Event"
@javascript
Scenario: View a course event in the calendar block
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Calendar" block
And I create a calendar event with form data:
| id_eventtype | Course |
| id_name | Course Event |
- When I follow "Course 1"
+ When I am on course page "Course 1"
And I hover over today in the calendar
Then I should see "Course Event"
@javascript
Scenario: Filter course events in the calendar block
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Calendar" block
And I create a calendar event with form data:
| id_eventtype | Course |
| id_name | Course Event |
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I create a calendar event with form data:
| id_eventtype | User |
| id_name | User Event |
When I am on homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Hide course events"
And I hover over today in the calendar
Then I should not see "Course Event"
@javascript
Scenario: View a user event in the calendar block
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Calendar" block
And I create a calendar event with form data:
| id_eventtype | User |
| id_name | User Event |
When I am on homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I hover over today in the calendar
Then I should see "User Event"
@javascript
Scenario: Filter user events in the calendar block
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Calendar" block
And I create a calendar event with form data:
| id_eventtype | Course |
| id_name | Course Event |
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I create a calendar event with form data:
| id_eventtype | User |
| id_name | User Event |
When I am on homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Hide user events"
And I hover over today in the calendar
Then I should not see "User Event"
| student1 | G1 |
| student2 | G2 |
When I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Edit settings" node in "Course administration"
And I set the following fields to these values:
| id_groupmode | Separate groups |
| id_name | Group Event |
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I hover over today in the calendar
And I should see "Group Event"
And I log out
And I log in as "student2"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I hover over today in the calendar
And I should not see "Group Event"
| student1 | G1 |
| student2 | G2 |
When I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Edit settings" node in "Course administration"
And I set the following fields to these values:
| id_groupmode | Separate groups |
And I create a calendar event with form data:
| id_eventtype | Course |
| id_name | Course Event 1 |
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I create a calendar event with form data:
| id_eventtype | Group |
| id_groupid | Group 1 |
| id_name | Group Event 1 |
And I log out
Then I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Hide group events"
And I hover over today in the calendar
And I should not see "Group Event 1"
| id_name | Site Event |
And I log out
Then I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Calendar" block
And I hover over today in the calendar
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Comments" block
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
@javascript
Scenario: Add a comment with Javascript enabled
And I add "Super test comment 31" comment to comments block
Then I should see "Super test comment 01"
And I should see "Super test comment 31"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should not see "Super test comment 01"
And I should not see "Super test comment 02"
And I should not see "Super test comment 16"
| activity | course | idnumber | name | intro |
| page | C1 | page1 | Test page name | Test page description |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I follow "Test page name"
And I add the "Comments" block
And I add "I'm a comment from the teacher" comment to comments block
And I log out
When I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test page name"
And I follow "Show comments"
Then I should see "I'm a comment from the teacher"
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Comments" block
And I follow "Show comments"
And I add "I'm a comment from the teacher" comment to comments block
And I log out
When I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Show comments"
Then I should see "I'm a comment from the teacher"
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Comments" block
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I add "Comment from student1" comment to comments block
And I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I add "Comment from teacher1" comment to comments block
When I delete "Comment from student1" comment from comments block
Then I should not see "Comment from student1"
Scenario: Add the block to a the course where completion is disabled
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I navigate to "Edit settings" node in "Course administration"
And I set the following fields to these values:
Scenario: Add the block to a the course where completion is not set
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Course completion status" block
Then I should see "No completion criteria set for this course" in the "Course completion status" "block"
| activity | course | idnumber | name | intro |
| page | C1 | page1 | Test page name | Test page description |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I follow "Test page name"
And I navigate to "Edit settings" in current page administration
Scenario: Add the block to a the course and add course completion items
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I follow "Test page name"
And I navigate to "Edit settings" in current page administration
And I press "Save changes"
And I log out
When I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Then I should see "Status: Not yet started" in the "Course completion status" "block"
And I should see "0 of 1" in the "Activity completion" "table_row"
Scenario: Add the block to a the course and add course completion items
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I follow "Test page name"
And I navigate to "Edit settings" in current page administration
And I press "Save changes"
And I log out
When I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I follow "Test page name"
And I follow "C1"
Then I should see "Status: Pending" in the "Course completion status" "block"
And I should see "0 of 1" in the "Activity completion" "table_row"
And I trigger cron
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "1 of 1" in the "Activity completion" "table_row"
And I follow "More details"
And I should see "Yes" in the "Activity completion" "table_row"
Scenario: Add the block to a the course and mark a student complete.
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Course completion status" block
And I navigate to "Course completion" node in "Course administration"
And I press "Save changes"
And I log out
When I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Status: Not yet started" in the "Course completion status" "block"
And I should see "No" in the "Teacher" "table_row"
And I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Course completion" node in "Course administration > Reports"
And I follow "Click to mark user complete"
# Running completion task just after clicking sometimes fail, as record
And I am on site homepage
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Then I should see "Status: Complete" in the "Course completion status" "block"
And I should see "Yes" in the "Teacher" "table_row"
And I follow "More details"
Scenario: Add the block to a the course and require multiple roles to mark a student complete.
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Course completion status" block
And I navigate to "Course completion" node in "Course administration"
And I press "Save changes"
And I log out
When I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Status: Not yet started" in the "Course completion status" "block"
And I should see "No" in the "Teacher" "table_row"
And I should see "No" in the "Non-editing teacher" "table_row"
And I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Course completion" node in "Course administration > Reports"
And I follow "Click to mark user complete"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Status: In progress" in the "Course completion status" "block"
And I should see "Yes" in the "Teacher" "table_row"
And I should see "No" in the "Non-editing teacher" "table_row"
And I should see "No" in the "Marked complete by Non-editing teacher" "table_row"
And I log out
And I log in as "teacher2"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I navigate to "Course completion" node in "Course administration > Reports"
And I follow "Click to mark user complete"
# Running completion task just after clicking sometimes fail, as record
And I am on site homepage
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Then I should see "Status: Complete" in the "Course completion status" "block"
And I should see "Yes" in the "Teacher" "table_row"
And I should see "Yes" in the "Non-editing teacher" "table_row"
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Course completion status" block
And I add the "Self completion" block
And I press "Save changes"
And I log out
When I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Status: Not yet started" in the "Course completion status" "block"
And I should see "No" in the "Self completion" "table_row"
And I follow "Complete course"
And I wait "1" seconds
And I run the scheduled task "core\task\completion_regular_task"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
Then I should see "Status: Complete" in the "Course completion status" "block"
And I should see "Yes" in the "Self completion" "table_row"
And I follow "More details"
And I should see "Course 2" in the "My courses" "block"
And I should see "Course 3" in the "My courses" "block"
And I should not see "Course 4" in the "My courses" "block"
- And I follow "Course 3"
+ And I am on course page "Course 3"
And I should see "Course 3"
Scenario: Add the course list block on category page and view as an admin
Scenario: Add the course list block on course page and navigate to the course listing
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Courses" block
Then I should see "Course 1" in the "My courses" "block"
Scenario: Add the course list block on course page and navigate to another course
Given I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Courses" block
Then I should see "Course 1" in the "My courses" "block"
And I should see "Course 2" in the "My courses" "block"
And I should see "Course 3" in the "My courses" "block"
And I should not see "Course 4" in the "My courses" "block"
- And I follow "Course 3"
+ And I am on course page "Course 3"
And I should see "Course 3"
Scenario: Add the course list block on course page and view as an admin
Given I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Courses" block
Then I should see "Miscellaneous" in the "Course categories" "block"
Given the following config values are set as admin:
| block_course_list_hideallcourseslink | 1 |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Courses" block
Then I should not see "All courses" in the "My courses" "block"
| admin | C1 | editingteacher |
And I log in as "admin"
And I am on site homepage
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
When I add the "Courses" block
Then I should not see "Miscellaneous" in the "My courses" "block"
And I should see "Course 2" in the "My courses" "block"
And I should see "Course 3" in the "My courses" "block"
And I should not see "Course 4" in the "My courses" "block"
- And I follow "Course 3"
+ And I am on course page "Course 3"
And I should see "Course 3"
Scenario: Add the course list block on the dashboard and view as an admin
And I should see "Course 2" in the "My courses" "block"
And I should see "Course 3" in the "My courses" "block"
And I should not see "Course 4" in the "My courses" "block"
- And I follow "Course 3"
+ And I am on course page "Course 3"
And I should see "Course 3"
Scenario: Add the course list block on the frontpage page and view as an admin
| student1 | C101 | student |
| teacher1 | C101 | editingteacher |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Course/site summary" block
And I log out
Scenario: Student can view course summary
When I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Then "Course summary" "block" should exist
And I should see "Course summary" in the "Course summary" "block"
And I should see "Proved the course summary block works!" in the "Course summary" "block"
Scenario: Teacher can not see edit icon when edit mode is off
When I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Then I should see "Proved the course summary block works!" in the "Course summary" "block"
And I should see "Course summary" in the "Course summary" "block"
And "Edit" "link" should not exist in the "Course summary" "block"
Scenario: Student can not see the block if it is not configured
When I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Random glossary entry" block
Then I should see "Please configure this block using the edit icon" in the "block_glossary_random" "block"
And I log out
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And "block_glossary_random" "block" should not exist
And I log out
| activity | name | intro | course | idnumber | defaultapproval |
| glossary | GlossaryAuto | Test glossary description | C1 | glossary1 | 1 |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Random glossary entry" block
And I configure the "block_glossary_random" block
And I press "Save changes"
And I log out
When I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Then I should see "There are no entries yet in the chosen glossary" in the "AutoGlossaryblock" "block"
And I click on "Add a new entry" "link" in the "AutoGlossaryblock" "block"
And I set the following fields to these values:
| Concept | Concept1 |
| Definition | Definition1 |
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Concept1" in the "AutoGlossaryblock" "block"
And I should see "Definition1" in the "AutoGlossaryblock" "block"
And I should not see "There are no entries yet in the chosen glossary" in the "AutoGlossaryblock" "block"
| Concept | Concept2 |
| Definition | Definition2 |
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
# Only the last entry appears in the block
And I should not see "Concept1" in the "AutoGlossaryblock" "block"
And I should not see "Definition1" in the "AutoGlossaryblock" "block"
| activity | name | intro | course | idnumber | defaultapproval |
| glossary | GlossaryManual | Test glossary description | C1 | glossary2 | 0 |
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Random glossary entry" block
And I configure the "block_glossary_random" block
And I press "Save changes"
And I log out
When I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
Then I should see "There are no entries yet in the chosen glossary" in the "ManualGlossaryblock" "block"
And I click on "Add a new entry" "link" in the "ManualGlossaryblock" "block"
And I set the following fields to these values:
| Concept | Concept1 |
| Definition | Definition1 |
And I press "Save changes"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "There are no entries yet in the chosen glossary" in the "ManualGlossaryblock" "block"
And I log out
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "There are no entries yet in the chosen glossary" in the "ManualGlossaryblock" "block"
And I follow "GlossaryManual"
And I follow "Waiting approval"
Scenario: View random (last) entry in the global glossary
When I log in as "admin"
And I am on site homepage
- And I follow "Course 2"
+ And I am on course page "Course 2"
And I follow "Tips and Tricks"
And I press "Add a new entry"
And I set the following fields to these values:
And I log out
# As a teacher add a block to the course page linking to the global glossary.
And I log in as "teacher1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I turn editing mode on
And I add the "Random glossary entry" block
And I configure the "block_glossary_random" block
And I log out
# Student who can't see the module is still able to view entries in this block (because the glossary was marked as global)
And I log in as "student1"
- And I follow "Course 1"
+ And I am on course page "Course 1"
And I should see "Never come late" in the "Tip of the day" "block"
And I should not see "Add a new entry" in the "Tip of the day" "block"
And I should see "View all entries" in the "Tip of the day" "block"
Scenario: Removing the global glossary that is used in random glossary block
And I log in as "teacher1"
-