Merge branch 'MDL-75230-311' of https://github.com/andelacruz/moodle into MOODLE_311_STABLE

This commit is contained in:
Ilya Tregubov
2023-02-15 16:13:32 +08:00
40 changed files with 256 additions and 657 deletions
@@ -138,10 +138,11 @@ Feature: Verify that all form fields values can be get and set
And I navigate to "Edit settings" in current page administration
And the field "Course ID number" matches value "Course id number"
Scenario: with JS disabled all form fields getters and setters works as expected
@javascript
Scenario: with JS enabled all form fields getters and setters works as expected
Given the following "activities" exist:
| activity | course | name |
| lesson | C1 | Test lesson |
Then I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
# Select (multi-select & AJAX) - Checking "I set the field" and "select box should contain".
@@ -154,11 +155,8 @@ Feature: Verify that all form fields values can be get and set
And the "members" select box should contain "Student 2 (s2@example.com)"
And the "members" select box should not contain "Student 3 (s3@example.com)"
# Checkbox (AJAX) - Checking "I set the field" and "I set the following fields to these values".
And I am on "Course 1" course homepage
And I add a "Lesson" to section "1"
And I am on the "Test lesson" "lesson activity editing" page
And I set the following fields to these values:
| Name | Test lesson |
| Description | Test lesson description |
| available[enabled] | 1 |
And I set the field "deadline[enabled]" to "1"
# Checkbox (AJAX) - Checking "the field matches value" before saving.
+19 -23
View File
@@ -114,10 +114,11 @@ Feature: We can set the grade to pass value
Scenario: Set a valid grade to pass for workshop activity
Given the following "activities" exist:
| activity | name | course | idnumber |
| workshop | Test Workshop 1 | C1 | workshop1 |
| activity | name | intro | course | section | idnumber |
| workshop | Test Workshop 1 | Test workshop | C1 | 1 | workshop1 |
And I am on "Course 1" course homepage with editing mode on
And I am on the "Test Workshop 1" "workshop activity editing" page
And I follow "Test Workshop 1"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| grade | 80 |
| Submission grade to pass | 40 |
@@ -136,16 +137,19 @@ Feature: We can set the grade to pass value
And the field "Grade to pass" matches value "10"
And I set the field "Grade to pass" to "15"
And I press "Save changes"
And I am on the "Test Workshop 1" "workshop activity editing" page
And I am on "Course 1" course homepage
And I follow "Test Workshop 1"
And I follow "Edit settings"
And the field "Submission grade to pass" matches value "45"
And the field "Assessment grade to pass" matches value "15"
Scenario: Set an invalid grade to pass for workshop activity
Given the following "activities" exist:
| activity | name | course | idnumber |
| workshop | Test Workshop 1 | C1 | workshop1 |
| activity | name | intro | course | section | idnumber |
| workshop | Test Workshop 1 | Test workshop | C1 | 1 | workshop1 |
And I am on "Course 1" course homepage with editing mode on
And I am on the "Test Workshop 1" "workshop activity editing" page
And I follow "Test Workshop 1"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| grade | 80 |
| Submission grade to pass | 90 |
@@ -179,11 +183,9 @@ Feature: We can set the grade to pass value
Scenario: Set a valid grade to pass for lesson activity
Given the following "activities" exist:
| activity | name | intro | course | section | idnumber |
| lesson | Test Lesson 1 | Test | C1 | 1 | lesson1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Lesson 1"
And I navigate to "Edit settings" in current page administration
| activity | name | course | idnumber |
| lesson | Test Lesson 1 | C1 | lesson1 |
And I am on the "Test Lesson 1" "lesson activity editing" page
And I set the following fields to these values:
| Grade to pass | 90 |
And I press "Save and return to course"
@@ -194,21 +196,17 @@ Feature: We can set the grade to pass value
Then the field "Grade to pass" matches value "90"
And I set the field "Grade to pass" to "80"
And I press "Save changes"
And I am on "Course 1" course homepage
And I follow "Test Lesson 1"
And I follow "Edit settings"
And I am on the "Test Lesson 1" "lesson activity editing" page
And the field "Grade to pass" matches value "80"
Scenario: Set a valid grade to pass for lesson activity with custom decimal separator
Given the following "activities" exist:
| activity | name | intro | course | section | idnumber |
| lesson | Test Lesson 1 | Test | C1 | 1 | lesson1 |
| activity | name | course | idnumber |
| lesson | Test Lesson 1 | C1 | lesson1 |
And the following "language customisations" exist:
| component | stringid | value |
| core_langconfig | decsep | # |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Lesson 1"
And I navigate to "Edit settings" in current page administration
And I am on the "Test Lesson 1" "lesson activity editing" page
And I set the following fields to these values:
| Grade to pass | 90#50 |
And I press "Save and return to course"
@@ -219,9 +217,7 @@ Feature: We can set the grade to pass value
Then the field "Grade to pass" matches value "90#50"
And I set the field "Grade to pass" to "80"
And I press "Save changes"
And I am on "Course 1" course homepage
And I follow "Test Lesson 1"
And I follow "Edit settings"
And I am on the "Test Lesson 1" "lesson activity editing" page
And the field "Grade to pass" matches value "80#00"
Scenario: Set a valid grade to pass for database activity
@@ -20,7 +20,6 @@ Feature: Using the lesson activities which support point scale
| course | C1 |
| activity | lesson |
| name | Test lesson name |
| intro | Test forum description |
| idnumber | lesson1 |
@javascript
@@ -37,11 +36,9 @@ Feature: Using the lesson activities which support point scale
| id_enableotheranswers | 1 |
| id_jumpto_6 | Next page |
And I press "Save page"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I set the field "Your answer" to "5"
And I press "Submit"
And I log out
And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
And I expand all fieldsets
Then the "Maximum grade" "field" should be disabled
@@ -34,10 +34,10 @@ Feature: Embed videos without the media filter
@javascript
Scenario: Add a video as content to a lesson. Make sure media filters work
When I add a "Lesson" to section "1"
And I set the following fields to these values:
| Name | Lesson with video |
| Description | Example of a video in a lesson |
Given the following "activities" exist:
| activity | course | section | name |
| lesson | Acceptance test site | 1 | Lesson with video |
When I am on the "Lesson with video" "lesson activity editing" page
And I expand all fieldsets
And I upload "media/player/videojs/tests/fixtures/test.mov" file to "Linked media" filemanager
And I press "Save and display"
@@ -21,18 +21,12 @@ Feature: Numeric and short answer questions have a section to catch all other st
| course | C1 |
| idnumber | 0001 |
| name | Test lesson name |
| intro | Test lesson description |
| section | 1 |
| maxattempts | 3 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I navigate to "Edit settings" in current page administration
And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
And I expand all fieldsets
And I set the following fields to these values:
| Provide option to try a question again | Yes |
And I press "Save and return to course"
And I follow "Test lesson name"
And I press "Save and display"
Scenario: I can create a numerical question with an option to catch all student responses.
Given I follow "Add a question page"
@@ -53,10 +47,7 @@ Feature: Numeric and short answer questions have a section to catch all other st
| id_answer_editor_0 | End this lesson |
| id_jumpto_0 | End of lesson |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I set the field "Your answer" to "5"
And I press "Submit"
And I should see "That's the wrong answer"
@@ -87,10 +78,7 @@ Feature: Numeric and short answer questions have a section to catch all other st
| id_answer_editor_0 | End this lesson |
| id_jumpto_0 | End of lesson |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I set the field "Your answer" to "dog"
And I press "Submit"
And I should see "That's the wrong answer"
@@ -21,22 +21,18 @@ Feature: Set end of lesson reached as a completion condition for a lesson
| course | C1 |
| idnumber | 0001 |
| name | Test lesson |
| intro | Test lesson description |
| section | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Enable completion tracking | Yes |
And I press "Save and display"
And I follow "Test lesson"
And I navigate to "Edit settings" in current page administration
And I am on the "Test lesson" "lesson activity editing" page
And I set the following fields to these values:
| Completion tracking | Show activity as complete when conditions are met |
| completionview | 0 |
| completionendreached | 1 |
And I press "Save and return to course"
And I follow "Test lesson"
And I press "Save and display"
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -53,16 +49,13 @@ Feature: Set end of lesson reached as a completion condition for a lesson
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
When I am on the "Course 1" course page logged in as student1
Then the "Go through the activity to the end" completion condition of "Test lesson" is displayed as "todo"
And I follow "Test lesson"
And I press "Next page"
And I am on "Course 1" course homepage
And the "Go through the activity to the end" completion condition of "Test lesson" is displayed as "todo"
And I am on "Course 1" course homepage
And I follow "Test lesson"
And I am on the "Test lesson" "lesson activity" page
And I should see "You have seen more than one page of this lesson already."
And I should see "Do you want to start at the last page you saw?"
And I click on "No" "link" in the "#page-content" "css_element"
@@ -70,7 +63,5 @@ Feature: Set end of lesson reached as a completion condition for a lesson
And I press "Next page"
And I am on "Course 1" course homepage
And the "Go through the activity to the end" completion condition of "Test lesson" is displayed as "done"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I am on the "Course 1" course page logged in as teacher1
And "Student 1" user has completed "Test lesson" activity
@@ -21,24 +21,19 @@ Feature: Set time spent as a completion condition for a lesson
| course | C1 |
| idnumber | 0001 |
| name | Test lesson |
| intro | Test lesson description |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I am on the "Course 1" course page logged in as teacher1
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Enable completion tracking | Yes |
And I press "Save and display"
And I follow "Test lesson"
And I navigate to "Edit settings" in current page administration
And I am on the "Test lesson" "lesson activity editing" page
And I set the following fields to these values:
| Completion tracking | Show activity as complete when conditions are met |
| completionview | 0 |
| completiontimespentenabled | 1 |
| completiontimespent[timeunit] | 1 |
| completiontimespent[number] | 10 |
And I press "Save and return to course"
And I am on "Course 1" course homepage
And I follow "Test lesson"
| completiontimespent[number] | 5 |
And I press "Save and display"
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -55,28 +50,23 @@ Feature: Set time spent as a completion condition for a lesson
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
Then the "Spend at least 10 secs on this activity" completion condition of "Test lesson" is displayed as "todo"
When I am on the "Course 1" course page logged in as student1
Then the "Spend at least 5 secs on this activity" completion condition of "Test lesson" is displayed as "todo"
And I follow "Test lesson"
And I press "Next page"
# Add 1 sec delay so lesson knows a valid attempt has been made in past.
And I wait "1" seconds
And I press "Next page"
And I should see "You completed this lesson in"
And I should see ", which is less than the required time of 10 secs. You might need to attempt the lesson again."
And I should see ", which is less than the required time of 5 secs. You might need to attempt the lesson again."
And I am on "Course 1" course homepage
And the "Spend at least 10 secs on this activity" completion condition of "Test lesson" is displayed as "todo"
And I am on "Course 1" course homepage
And I follow "Test lesson"
And the "Spend at least 5 secs on this activity" completion condition of "Test lesson" is displayed as "todo"
And I am on the "Test lesson" "lesson activity" page
And I press "Next page"
And I wait "11" seconds
And I wait "5" seconds
And I press "Next page"
And I should not see "You might need to attempt the lesson again."
And I am on "Course 1" course homepage
And the "Spend at least 10 secs on this activity" completion condition of "Test lesson" is displayed as "done"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And the "Spend at least 5 secs on this activity" completion condition of "Test lesson" is displayed as "done"
And I am on the "Course 1" course page logged in as teacher1
And "Student 1" user has completed "Test lesson" activity
@@ -16,16 +16,14 @@ Feature: A teacher can set available from and deadline dates to access a lesson
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | course | idnumber |
| lesson | Test lesson | C1 | lesson1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
Scenario: Forbidding lesson accesses until a specified date
Given the following "activities" exist:
| activity | name | intro | course | section | idnumber |
| lesson | Test lesson | Test lesson description | C1 | 1 | lesson1 |
And I am on "Course 1" course homepage
And I follow "Test lesson"
And I navigate to "Edit settings" in current page administration
Given I am on the "Test lesson" "lesson activity editing" page
And I set the field "id_available_enabled" to "1"
And I set the following fields to these values:
| available[day] | 1 |
@@ -33,28 +31,19 @@ Feature: A teacher can set available from and deadline dates to access a lesson
| available[year] | 2030 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save and return to course"
And I follow "Test lesson"
And I press "Save and display"
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
| Page contents | First page contents |
| Description | The first one |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Test lesson"
When I am on the "Test lesson" "lesson activity" page logged in as student1
Then the activity date in "Test lesson" should contain "Opens: Tuesday, 1 January 2030, 8:00"
And I should not see "First page contents"
Scenario: Forbidding lesson accesses after a specified date
Given the following "activities" exist:
| activity | name | intro | course | section | idnumber |
| lesson | Test lesson | Test lesson description | C1 | 1 | lesson1 |
And I am on "Course 1" course homepage
And I follow "Test lesson"
And I navigate to "Edit settings" in current page administration
Given I am on the "Test lesson" "lesson activity editing" page
And I set the field "id_deadline_enabled" to "1"
And I set the following fields to these values:
| deadline[day] | 1 |
@@ -62,17 +51,13 @@ Feature: A teacher can set available from and deadline dates to access a lesson
| deadline[year] | 2000 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save and return to course"
And I follow "Test lesson"
And I press "Save and display"
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
| Page contents | First page contents |
| Description | The first one |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Test lesson"
When I am on the "Test lesson" "lesson activity" page logged in as student1
Then the activity date in "Test lesson" should contain "Closed: Saturday, 1 January 2000, 8:00"
And I should not see "First page contents"
@@ -20,18 +20,20 @@ Feature: Display the lesson description in the lesson and optionally in the cour
| idnumber | 0001 |
| name | Test lesson name |
| intro | Test lesson description |
| section | 1 |
And I log in as "teacher1"
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | Test lesson part 1 |
| Description | Lesson part 1 description |
| Jump | Next page |
And I click on "Save page" "button"
Scenario: Description is displayed in the Lesson
Given I am on "Course 1" course homepage
When I follow "Test lesson"
When I am on the "Test lesson name" "lesson activity" page
Then I should see "Test lesson description"
Scenario: Show lesson description in the course homepage
Given I am on "Course 1" course homepage
And I follow "Test lesson"
And I navigate to "Edit settings" in current page administration
Given I am on the "Test lesson name" "lesson activity editing" page
And the following fields match these values:
| Display description on course page | |
And I set the following fields to these values:
@@ -41,9 +43,7 @@ Feature: Display the lesson description in the lesson and optionally in the cour
Then I should see "Test lesson description"
Scenario: Hide lesson description in the course homepage
Given I am on "Course 1" course homepage
And I follow "Test lesson"
And I navigate to "Edit settings" in current page administration
Given I am on the "Test lesson name" "lesson activity editing" page
And the following fields match these values:
| Display description on course page | |
And I press "Save and return to course"
@@ -44,7 +44,6 @@ Feature: View activity completion in the lesson activity
| Jump | End of lesson |
| Score | 1 |
And I press "Save page"
And I log out
Scenario: View automatic completion items as a teacher
When I am on the "Music history" "lesson activity" page logged in as teacher1
@@ -82,7 +81,6 @@ Feature: View activity completion in the lesson activity
And I press "Save and display"
# Teacher view.
And the manual completion button for "Music history" should be disabled
And I log out
# Student view.
When I am on the "Music history" "lesson activity" page logged in as student1
Then the manual completion button of "Music history" is displayed as "Mark as done"
@@ -16,11 +16,9 @@ Feature: Teachers can review student progress on all lessons in a course by view
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber | retake |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
| activity | name | course | idnumber | retake |
| lesson | Test lesson name | C1 | lesson1 | 1 |
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
Scenario: View student progress for lesson that was never attempted
Given I follow "Add a content page"
@@ -80,14 +78,10 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_jumpto_1 | Next page |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I log out
Then I log in as "teacher1"
And I am on "Course 1" course homepage
Then I am on the "Course 1" course page logged in as teacher1
And I navigate to course participants
And I follow "Student 1"
And I follow "Complete report"
@@ -138,10 +132,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Second page contents"
@@ -157,9 +148,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I press "Submit"
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I log out
Then I log in as "teacher1"
And I am on "Course 1" course homepage
Then I am on the "Course 1" course page logged in as teacher1
And I navigate to course participants
And I follow "Student 1"
And I follow "Complete report"
@@ -185,17 +174,12 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Second page contents"
And I press "End of lesson"
And I log out
Then I log in as "teacher1"
And I am on "Course 1" course homepage
Then I am on the "Course 1" course page logged in as teacher1
And I navigate to course participants
And I follow "Student 1"
And I follow "Complete report"
@@ -23,8 +23,8 @@ Feature: Lesson reset
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
| activity | name | course | idnumber |
| lesson | Test lesson name | C1 | lesson1 |
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
@@ -41,15 +41,13 @@ Feature: Lesson reset
And I press "Save page"
Scenario: Use course reset to clear all attempt data
When I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student1
When I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
And I set the following fields to these values:
| False | 1 |
And I press "Submit"
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I navigate to "Reports > Overview" in current page administration
And I should see "Sam1 Student1"
@@ -18,11 +18,9 @@ branch table contents
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
| activity | name | course | idnumber |
| lesson | Test lesson name | C1 | lesson1 |
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -55,11 +53,8 @@ branch table contents
| id_answer_editor_1 | |
And I press "Save page"
And I should not see "Previous page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I should see "First page contents"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
Then I should see "First page contents"
And I should not see "Previous page"
And I press "Next page"
And I should see "1 + 1?"
@@ -78,11 +73,8 @@ branch table contents
| id_answer_editor_1 | |
And I press "Save page"
And I should not see "Incorrect answer"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I should see "First page contents"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
Then I should see "First page contents"
And I press "Next page"
And I should see "1 + 1?"
And I set the following fields to these values:
@@ -17,11 +17,9 @@ Feature: In a lesson activity, teacher can edit a cluster page
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber | section |
| lesson | Lesson with cluster | Test lesson description | C1 | lesson1 | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I follow "Lesson with cluster"
| activity | name | course | idnumber |
| lesson | Lesson with cluster | C1 | lesson1 |
And I am on the "Lesson with cluster" "lesson activity" page logged in as teacher1
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -87,10 +85,7 @@ Feature: In a lesson activity, teacher can edit a cluster page
| id_jumpto_0 | Second page name |
And I press "Save page"
And I should see "Modified end"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Lesson with cluster"
And I am on the "Lesson with cluster" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Question from cluster"
@@ -17,11 +17,9 @@ Feature: In a lesson activity, teacher can edit lesson's pages
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber | section |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
| activity | name | course | idnumber |
| lesson | Test lesson name | C1 | lesson1 |
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -67,10 +65,7 @@ Feature: In a lesson activity, teacher can edit lesson's pages
And I press "Save page"
Then I should see "Modified second page"
And I should not see "Second page name"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Modified contents"
@@ -106,10 +101,7 @@ Feature: In a lesson activity, teacher can edit lesson's pages
And I press "Save page"
Then I should see "New hardest question"
And I should not see "Hardest question ever"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Second page contents"
@@ -16,11 +16,9 @@ Feature: In a lesson activity, teacher can add an essay question
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber | section | feedback |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 | 1 | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test lesson name"
| activity | name | course | idnumber | feedback |
| lesson | Test lesson name | C1 | lesson1 | 1 |
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a question page"
And I set the field "Select a question type" to "Essay"
And I press "Add a question page"
@@ -28,10 +26,7 @@ Feature: In a lesson activity, teacher can add an essay question
| Page title | Essay question |
| Page contents | <p>Please write a story about a <b>frog</b>.</p> |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
Then I should see "Please write a story about a frog."
And I set the field "Your answer" to "<p>Once upon a time there was a little <b>green</b> frog."
And I press "Submit"
@@ -43,10 +38,7 @@ Feature: In a lesson activity, teacher can add an essay question
And I should see "You earned 0 out of 0 for the automatically graded questions."
And I should see "Your 1 essay question(s) will be graded and added into your final score at a later date."
And I should see "Your current grade without the essay question(s) is 0 out of 1."
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Grade essays"
And I should see "Student 1"
And I should see "Essay question"
@@ -16,11 +16,9 @@ Feature: In a lesson activity, students can exit and re-enter the activity when
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| lesson | Lesson with cluster | Cluster lesson description | C1 | lesson1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I follow "Lesson with cluster"
| activity | name | course | idnumber |
| lesson | Lesson with cluster | C1 | lesson1 |
And I am on the "Lesson with cluster" "lesson activity" page logged in as teacher1
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -185,12 +183,9 @@ Feature: In a lesson activity, students can exit and re-enter the activity when
| id_score_1 | 0 |
And I press "Save page"
And I click on "Add an end of cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][16]" "xpath_element"
And I log out
Scenario: Accessing as student to a cluster only lesson
Given I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Lesson with cluster"
Given I am on the "Lesson with cluster" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Correct answer"
@@ -30,8 +30,8 @@ Feature: Lesson group override
| student2 | G2 |
| student3 | G1 |
And the following "activities" exist:
| activity | name | intro | groupmode | course | idnumber |
| lesson | Test lesson name | Test lesson description | 1 | C1 | lesson1 |
| activity | name | groupmode | course | idnumber |
| lesson | Test lesson name | 1 | C1 | lesson1 |
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
@@ -46,7 +46,6 @@ Feature: Lesson group override
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I log out
Scenario: Add, modify then delete a group override
Given I am on the "Test lesson name" "lesson activity" page logged in as teacher1
@@ -105,7 +104,6 @@ Feature: Lesson group override
| Re-takes allowed | 1 |
And I press "Save"
And I should see "Re-takes allowed"
And I log out
Given I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@@ -116,7 +114,6 @@ Feature: Lesson group override
And I am on the "Test lesson name" "lesson activity" page
Then I should not see "You are not allowed to retake this lesson."
And I should see "Cat is an amphibian"
And I log out
Given I am on the "Test lesson name" "lesson activity" page logged in as student2
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@@ -140,7 +137,6 @@ Feature: Lesson group override
| Password protected lesson | 12345 |
And I press "Save"
And I should see "Password protected lesson"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student1
Then I should see "Test lesson name is a password protected lesson"
And I should not see "Cat is an amphibian"
@@ -156,7 +152,6 @@ Feature: Lesson group override
And I press "Submit"
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student2
And I should see "Test lesson name is a password protected lesson"
And I should not see "Cat is an amphibian"
@@ -189,11 +184,9 @@ Feature: Lesson group override
| deadline[minute] | 00 |
And I press "Save"
And I should see "Lesson closes"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student2
Then the activity date in "Test lesson name" should contain "Closed: Saturday, 1 January 2000, 8:00"
And I should not see "Cat is an amphibian"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
@@ -219,11 +212,9 @@ Feature: Lesson group override
| available[minute] | 00 |
And I press "Save"
And I should see "Lesson opens"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student2
Then the activity date in "Test lesson name" should contain "Opens: Tuesday, 1 January 2030, 8:00"
And I should not see "Cat is an amphibian"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
@@ -239,7 +230,6 @@ Feature: Lesson group override
| Maximum number of attempts per question | 2 |
And I press "Save"
And I should see "Maximum number of attempts per question"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@@ -252,7 +242,6 @@ Feature: Lesson group override
And I press "Submit"
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student2
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@@ -298,13 +287,10 @@ Feature: Lesson group override
| available[minute] | 00 |
And I press "Save"
And I should see "Wednesday, 1 January 2031, 8:00"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And the activity date in "Test lesson name" should contain "Opens: Wednesday, 1 January 2031, 8:00"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student2
And the activity date in "Test lesson name" should contain "Opens: Sunday, 1 January 2040, 8:00"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student3
And the activity date in "Test lesson name" should contain "Opens: Tuesday, 1 January 2030, 8:00"
@@ -367,7 +353,6 @@ Feature: Lesson group override
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save"
And I log out
And I am on the "Lesson 2" "lesson activity" page logged in as teacher1
And I navigate to "Group overrides" in current page administration
Then I should see "Group 1" in the ".generaltable" "css_element"
@@ -18,15 +18,13 @@ Feature: In a lesson activity, if custom scoring is not enabled, student should
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | section | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | 1 | lesson1 |
And I log in as "teacher1"
And I am on the "Test lesson name" "lesson activity editing" page
| activity | name | course | idnumber |
| lesson | Test lesson name | C1 | lesson1 |
And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
And I set the following fields to these values:
| Maximum grade | 75 |
| Custom scoring | No |
And I press "Save and return to course"
And I follow "Test lesson name"
And I press "Save and display"
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -59,8 +57,7 @@ Feature: In a lesson activity, if custom scoring is not enabled, student should
And I log in as "student1"
Scenario: Informations at end of lesson if custom scoring not enabled
Given I am on "Course 1" course homepage
And I follow "Test lesson name"
Given I am on the "Test lesson name" "lesson activity" page
And I should see "First page contents"
When I press "Next page"
And I should see "1 + 1?"
@@ -79,8 +76,7 @@ Feature: In a lesson activity, if custom scoring is not enabled, student should
Given the following "language customisations" exist:
| component | stringid | value |
| core_langconfig | decsep | # |
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page
And I should see "First page contents"
When I press "Next page"
And I should see "1 + 1?"
@@ -96,8 +92,7 @@ Feature: In a lesson activity, if custom scoring is not enabled, student should
And I should see "Your current grade is 0#0 out of 75"
Scenario: Current grade is displayed at end of lesson when grade type is set to scale
Given I am on "Course 1" course homepage
And I follow "Test lesson name 2"
Given I am on the "Test lesson name 2" "lesson activity" page
When I press "Next page"
And I should see "1 + 1?"
And I set the following fields to these values:
@@ -16,14 +16,13 @@ Feature: In a lesson activity, students can navigate through a series of pages i
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | course | idnumber |
| lesson | Test lesson name | C1 | lesson1 |
And I log in as "teacher1"
Scenario: Student navigation with pages and questions
Given the following "activities" exist:
| activity | name | intro | course | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
And I am on "Course 1" course homepage
And I follow "Test lesson name"
Given I am on the "Test lesson name" "lesson activity" page
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -56,10 +55,7 @@ Feature: In a lesson activity, students can navigate through a series of pages i
| id_jumpto_1 | Second page name |
| id_score_1 | 0 |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
Then I should see "First page contents"
And I press "Next page"
And I should see "Second page contents"
@@ -88,17 +84,11 @@ Feature: In a lesson activity, students can navigate through a series of pages i
And I should see "Your score is 0 (out of 1)."
Scenario: Student reattempts a question until out of attempts
Given the following "activities" exist:
| activity | name | intro | course | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
Given I am on the "Test lesson name" "lesson activity editing" page
And I set the following fields to these values:
| id_review | Yes |
| id_maxattempts | 3 |
And I press "Save and return to course"
And I follow "Test lesson name"
And I press "Save and display"
And I follow "Add a question page"
And I set the following fields to these values:
| id_qtype | True/false |
@@ -109,10 +99,7 @@ Feature: In a lesson activity, students can navigate through a series of pages i
| id_answer_editor_0 | right |
| id_answer_editor_1 | wrong |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
Then I should see "Test content"
And I set the following fields to these values:
| wrong | 1 |
@@ -134,16 +121,11 @@ Feature: In a lesson activity, students can navigate through a series of pages i
And I should see "Congratulations - end of lesson reached"
Scenario: Student reattempts a question until out of attempts with specific jumps
Given the following "activities" exist:
| activity | name | intro | course | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
And I am on the "Test lesson name" "lesson activity" page
And I navigate to "Edit settings" in current page administration
Given I am on the "Test lesson name" "lesson activity editing" page
And I set the following fields to these values:
| id_review | Yes |
| id_maxattempts | 3 |
And I press "Save and return to course"
And I follow "Test lesson name"
And I press "Save and display"
And I follow "Add a question page"
And I set the following fields to these values:
| id_qtype | True/false |
@@ -165,7 +147,6 @@ Feature: In a lesson activity, students can navigate through a series of pages i
| id_answer_editor_1 | wrong |
| id_jumpto_1 | Test question |
And I press "Save page"
And I log out
When I am on the "Test lesson name" "lesson activity" page logged in as student1
Then I should see "Test content 1"
And I set the following fields to these values:
@@ -192,17 +173,11 @@ Feature: In a lesson activity, students can navigate through a series of pages i
And I should see "Test content 1"
Scenario: Student should not see remaining attempts notification if maximum number of attempts is set to unlimited
Given the following "activities" exist:
| activity | name | intro | course | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
Given I am on the "Test lesson name" "lesson activity editing" page
And I set the following fields to these values:
| id_review | Yes |
| id_maxattempts | 0 |
And I press "Save and return to course"
And I follow "Test lesson name"
And I press "Save and display"
And I follow "Add a question page"
And I set the following fields to these values:
| id_qtype | True/false |
@@ -213,10 +188,7 @@ Feature: In a lesson activity, students can navigate through a series of pages i
| id_answer_editor_0 | right |
| id_answer_editor_1 | wrong |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
Then I should see "Test content"
And I set the following fields to these values:
| wrong | 1 |
@@ -19,21 +19,14 @@ Feature: Lesson with no calendar capabilites
| course | C1 |
| idnumber | 0001 |
| name | Test lesson name |
| intro | Test lesson description |
| section | 1 |
And I log in as "admin"
And I am on "Course 1" course homepage
And I am on the "Course 1" course page logged in as admin
And I navigate to "Users > Permissions" in current page administration
And I override the system permissions of "Teacher" role with:
| capability | permission |
| moodle/calendar:manageentries | Prohibit |
And I log out
Scenario: Editing a lesson
Given I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
Given I am on the "Test lesson name" "lesson activity editing" page logged in as admin
And I set the following fields to these values:
| id_available_enabled | 1 |
| id_available_day | 1 |
@@ -44,11 +37,7 @@ Feature: Lesson with no calendar capabilites
| id_deadline_month | 2 |
| id_deadline_year | 2017 |
And I press "Save and return to course"
And I log out
When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
When I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
And I set the following fields to these values:
| id_available_year | 2018 |
| id_deadline_year | 2018 |
@@ -26,12 +26,8 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons
| course | C1 |
| idnumber | 0001 |
| name | Test lesson name |
| intro | Test lesson description |
| retake | 1 |
| section | 1 |
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I navigate to "Edit settings" in current page administration
When I am on the "Test lesson name" "lesson activity editing" page
And I expand all fieldsets
And I set the following fields to these values:
| id_deadline_enabled | 1 |
@@ -40,8 +36,7 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons
| deadline[year] | 2030 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save and return to course"
And I follow "Test lesson name"
And I press "Save and display"
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
@@ -82,10 +77,7 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
And I set the following fields to these values:
| False | 1 |
@@ -122,10 +114,7 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I should see "Your score is 3 (out of 3)."
And I log out
And I log in as "student2"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student2
And I should see "Cat is an amphibian"
And I set the following fields to these values:
| True | 1 |
@@ -143,4 +132,3 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I should see "Your score is 2 (out of 3)."
And I log out
@@ -17,11 +17,9 @@ Feature: In a lesson activity, I need to edit pages in the lesson taking into ac
| component | stringid | value |
| core_langconfig | decsep | # |
And the following "activities" exist:
| activity | name | intro | course | idnumber | section | modattempts |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 | 1 | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
| activity | name | course | idnumber | modattempts |
| lesson | Test lesson name | C1 | lesson1 | 1 |
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a question page"
And I set the field "Select a question type" to "Numerical"
And I press "Add a question page"
@@ -37,32 +35,23 @@ Feature: In a lesson activity, I need to edit pages in the lesson taking into ac
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I press "Save page"
And I log out
Scenario: Edit a numerical question with the locale specific variables
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test lesson name"
Given I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I click on "Edit" "link" in the "region-main" "region"
And I follow "Hardest question ever"
Then I should see "2#87"
And I should see "2#1:2#8"
And I log out
Scenario: View the detailed page of lesson
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test lesson name"
Given I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I click on "Edit" "link" in the "region-main" "region"
And I click on "Expanded" "link" in the "region-main" "region"
Then I should see "2#87"
And I should see "2#1:2#8"
And I log out
Scenario: Attempt the lesson successfully as a student
Given I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
Given I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "1 + 1?"
And I set the following fields to these values:
| Your answer | 2#87 |
@@ -72,12 +61,9 @@ Feature: In a lesson activity, I need to edit pages in the lesson taking into ac
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I should see "Your score is 1 (out of 1)."
And I log out
Scenario: Attempt the lesson unsuccessfully as a student
Given I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
Given I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "1 + 1?"
And I set the following fields to these values:
| Your answer | 2#7 |
@@ -87,12 +73,9 @@ Feature: In a lesson activity, I need to edit pages in the lesson taking into ac
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I should see "Your score is 0 (out of 1)."
And I log out
Scenario: Attempt the lesson successfully as a student and review
Given I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
Given I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "1 + 1?"
And I set the following fields to these values:
| Your answer | 2#87 |
@@ -106,23 +89,18 @@ Feature: In a lesson activity, I need to edit pages in the lesson taking into ac
Then I should see "1 + 1?"
And the following fields match these values:
| Your answer | 2#87 |
And I log out
Scenario: Edit lesson question page with updated locale setting and wrong answer
Given I log in as "teacher1"
And the following "language customisations" exist:
| component | stringid | value |
| core_langconfig | decsep | , |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page
Then I click on "Edit" "link" in the "region-main" "region"
And I follow "Hardest question ever"
Then I should see "2,87"
And I should see "2,1:2,8"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "1 + 1?"
And I set the following fields to these values:
| Your answer | 2,7 |
@@ -20,11 +20,8 @@ Feature: Teachers can review student progress on all lessons in a course by view
| course | C1 |
| idnumber | 0001 |
| name | Test lesson name |
| intro | Test lesson description |
| retake | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
Scenario: View student progress for lesson that was never attempted
Given I follow "Add a content page"
@@ -83,15 +80,10 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I log out
Then I log in as "teacher1"
And I am on "Course 1" course homepage
Then I am on the "Course 1" course page logged in as teacher1
And I navigate to course participants
And I follow "Student 1"
And I follow "Outline report"
@@ -127,10 +119,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Second page contents"
@@ -141,9 +130,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I press "Submit"
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I log out
Then I log in as "teacher1"
And I am on "Course 1" course homepage
Then I am on the "Course 1" course page logged in as teacher1
And I navigate to course participants
And I follow "Student 1"
And I follow "Outline report"
@@ -166,17 +153,12 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Second page contents"
And I press "End of lesson"
And I log out
Then I log in as "teacher1"
And I am on "Course 1" course homepage
Then I am on the "Course 1" course page logged in as teacher1
And I navigate to course participants
And I follow "Student 1"
And I follow "Outline report"
+8 -26
View File
@@ -21,11 +21,7 @@ Feature: Practice mode in a lesson activity
| course | C1 |
| idnumber | 0001 |
| name | Test lesson name |
| intro | Lesson description |
| section | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
@@ -35,19 +31,15 @@ Feature: Practice mode in a lesson activity
| id_answer_editor_0 | True |
| id_answer_editor_1 | False |
And I press "Save page"
And I am on the "Test lesson name" "lesson activity editing" page
Scenario: Non-practice lesson records grades in the gradebook
Given I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
Given I set the following fields to these values:
| Name | Non-practice lesson |
| Description | This lesson will affect your course grade |
| Practice lesson | No |
And I press "Save and display"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Non-practice lesson"
When I am on the "Non-practice lesson" "lesson activity" page logged in as student1
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
@@ -57,17 +49,12 @@ Feature: Practice mode in a lesson activity
And I should see "Non-practice lesson"
Scenario: Practice lesson doesn't record grades in the gradebook
Given I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
Given I set the following fields to these values:
| Name | Practice lesson |
| Description | This lesson will NOT affect your course grade |
| Practice lesson | Yes |
And I press "Save and display"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Practice lesson"
When I am on the "Practice lesson" "lesson activity" page logged in as student1
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
@@ -77,18 +64,13 @@ Feature: Practice mode in a lesson activity
And I should not see "Practice lesson"
Scenario: Practice lesson with scale doesn't record grades in the gradebook
Given I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
Given I set the following fields to these values:
| Name | Practice lesson with scale |
| Description | This lesson will NOT affect your course grade |
| Practice lesson | Yes |
| Type | Scale |
And I press "Save and display"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Practice lesson with scale"
When I am on the "Practice lesson with scale" "lesson activity" page logged in as student1
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
@@ -17,16 +17,12 @@ Feature: In a lesson activity, students can see their progress viewing a progres
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | section | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | 1 | lesson1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
| activity | name | course | idnumber |
| lesson | Test lesson name | C1 | lesson1 |
And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
And I set the following fields to these values:
| Progress bar | Yes |
And I press "Save and return to course"
And I follow "Test lesson name"
And I press "Save and display"
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -43,7 +39,7 @@ Feature: In a lesson activity, students can see their progress viewing a progres
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page"
And I click on "Expanded" "link" in the "region-main" "region"
And I follow "Expanded"
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][3]" "xpath_element"
And I set the field "Select a question type" to "Numerical"
And I press "Add a question page"
@@ -59,10 +55,7 @@ Feature: In a lesson activity, students can see their progress viewing a progres
| id_jumpto_1 | Second page name |
| id_score_1 | 0 |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
Then I should see "First page contents"
And I should see "You have completed 0% of the lesson"
And I press "Next page"
@@ -20,10 +20,8 @@ Feature: In a lesson activity, students can not re-attempt a question more than
| course | C1 |
| idnumber | 0001 |
| name | Test lesson name |
| intro | Test lesson description |
| retake | 1 |
| minquestions | 3 |
| section | 1 |
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a content page"
And I set the following fields to these values:
@@ -89,7 +87,6 @@ Feature: In a lesson activity, students can not re-attempt a question more than
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I log out
Scenario: Check that we can leave a quiz and when we re-enter we can not re-attempt the question again
Given I am on the "Test lesson name" "lesson activity" page logged in as student1
+7 -21
View File
@@ -17,11 +17,9 @@ Feature: In a lesson activity, teachers can review student attempts
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | section | idnumber | retake |
| lesson | Test lesson name | Test | C1 | 1 | lesson1 | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
| activity | name | course | idnumber | retake |
| lesson | Test lesson name | C1 | lesson1 | 1 |
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
Scenario: View student attempts in a lesson containing both content and question pages
Given I follow "Add a content page"
@@ -75,10 +73,7 @@ Feature: In a lesson activity, teachers can review student attempts
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Second page contents"
@@ -96,10 +91,7 @@ Feature: In a lesson activity, teachers can review student attempts
And I press "Submit"
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I log out
Then I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
Then I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Reports"
And I should see "Student 1"
And I should see "100%"
@@ -142,10 +134,7 @@ Feature: In a lesson activity, teachers can review student attempts
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Second page contents"
@@ -154,10 +143,7 @@ Feature: In a lesson activity, teachers can review student attempts
And I press "Next page"
And I should see "Fourth page contents"
And I press "End of lesson"
And I log out
Then I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
Then I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Reports"
And I should see "Student 1"
And I should not see "High score"
+5 -12
View File
@@ -17,12 +17,9 @@ Feature: In a lesson activity, students can review the answers they gave to ques
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
Given the following "activities" exist:
| activity | name | intro | course | section | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | 1 | lesson1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
| activity | name | course | idnumber |
| lesson | Test lesson name | C1 | lesson1 |
And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
And I set the following fields to these values:
| Display ongoing score | Yes |
| Slideshow | Yes |
@@ -31,8 +28,7 @@ Feature: In a lesson activity, students can review the answers they gave to ques
| Maximum number of attempts per question | 3 |
| Custom scoring | No |
| Re-takes allowed | Yes |
And I press "Save and return to course"
And I follow "Test lesson name"
And I press "Save and display"
And I follow "Add a question page"
And I set the field "Select a question type" to "Numerical"
And I press "Add a question page"
@@ -59,10 +55,7 @@ Feature: In a lesson activity, students can review the answers they gave to ques
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "You have answered 0 correctly out of 0 attempts."
And I set the following fields to these values:
| Your answer | 1 |
@@ -17,13 +17,11 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | deadline | retake | course | idnumber |
| lesson | Test lesson name | Test lesson description | 1893481200 | 1 | C1 | lesson1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
| activity | name | deadline | retake | course | idnumber |
| lesson | Test lesson name | 1893481200 | 1 | C1 | lesson1 |
Scenario: A completed lesson with only questions that allows multiple attempts
Given I follow "Test lesson name"
Given I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
@@ -50,10 +48,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
And I set the following fields to these values:
| False | 1 |
@@ -67,8 +62,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
And I should see "Congratulations - end of lesson reached"
Scenario: A completed lesson with only questions that does not allow multiple attempts
Given I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
Given I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
And I set the following fields to these values:
| Re-takes allowed | 0 |
And I press "Save and display"
@@ -98,10 +92,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
And I set the following fields to these values:
| False | 1 |
@@ -113,10 +104,9 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
And I press "Submit"
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I log out
Scenario: A completed lesson with only content pages that allows multiple attempts
Given I follow "Test lesson name"
Given I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -133,19 +123,14 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Second page contents"
And I press "End of lesson"
And I log out
Scenario: A completed lesson with only content pages that does not allow multiple attempts
Given I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
Given I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
And I set the following fields to these values:
| Re-takes allowed | 0 |
And I press "Save and display"
@@ -165,18 +150,14 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Second page contents"
And I press "End of lesson"
And I log out
Scenario: An incomplete lesson with only questions.
Given I follow "Test lesson name"
Given I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
@@ -203,19 +184,15 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
And I set the following fields to these values:
| False | 1 |
And I press "Submit"
And I press "Continue"
And I log out
Scenario: An incomplete lesson with only content pages.
Given I follow "Test lesson name"
Given I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -232,17 +209,13 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Second page contents"
And I log out
Scenario: A lesson with only questions that has not been started.
Given I follow "Test lesson name"
Given I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
@@ -269,10 +242,9 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I log out
Scenario: A lesson with only content pages that has not been started.
Given I follow "Test lesson name"
Given I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -289,7 +261,6 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page"
And I log out
Scenario: Viewing the status for multiple lessons in multiple courses
Given the following "courses" exist:
@@ -300,11 +271,10 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| teacher1 | C2 | editingteacher |
| student1 | C2 | student |
And the following "activities" exist:
| activity | name | intro | deadline | retake | course | idnumber |
| lesson | Test lesson name 2 | Test lesson description | 1893481200 | 1 | C1 | lesson1 |
| lesson | Test lesson name 3 | Test lesson description | 1893481200 | 1 | C2 | lesson1 |
And I turn editing mode off
And I follow "Test lesson name"
| activity | name | deadline | retake | course | idnumber |
| lesson | Test lesson name 2 | 1893481200 | 1 | C1 | lesson1 |
| lesson | Test lesson name 3 | 1893481200 | 1 | C2 | lesson1 |
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
@@ -314,8 +284,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| id_answer_editor_0 | True |
| id_answer_editor_1 | False |
And I press "Save page"
And I am on "Course 1" course homepage
And I follow "Test lesson name 2"
And I am on the "Test lesson name 2" "lesson activity" page
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
@@ -325,8 +294,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| id_answer_editor_0 | True |
| id_answer_editor_1 | False |
And I press "Save page"
And I am on "Course 2" course homepage
And I follow "Test lesson name 3"
And I am on the "Test lesson name 3" "lesson activity" page
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
@@ -345,18 +313,13 @@ Feature: In Dashboard, a student can see their current status on all lessons wit
| id_answer_editor_0 | True |
| id_answer_editor_1 | False |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "D035 M00d13 r0x0rz j00 b0x0rs?"
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
And I am on "Course 2" course homepage
And I follow "Test lesson name 3"
And I am on the "Test lesson name 3" "lesson activity" page
And I should see "D035 M00d13 r0x0rz j00 b0x0rs?"
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
And I log out
@@ -17,14 +17,10 @@ Feature: In a lesson activity a student should
And the following "activity" exists:
| activity | lesson |
| name | Test lesson name |
| intro | Test lesson description |
| course | C1 |
| idnumber | 0001 |
| section | 1 |
| retake | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
Scenario: resume a lesson with both content then question pages
Given I follow "Add a content page"
@@ -78,10 +74,7 @@ Feature: In a lesson activity a student should
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
# Add 1 sec delay so lesson knows a valid attempt has been made in past.
@@ -154,10 +147,7 @@ Feature: In a lesson activity a student should
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I press "Next page"
And I should see "Second page contents"
@@ -175,12 +165,8 @@ Feature: In a lesson activity a student should
# Add 1 sec delay so lesson knows a valid attempt has been made in past.
And I wait "1" seconds
And I press "End of lesson"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "First page contents"
And I log out
Scenario: resume a lesson with both question then content pages
Given I follow "Add a question page"
@@ -262,10 +248,7 @@ Feature: In a lesson activity a student should
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
And I set the following fields to these values:
| False | 1 |
@@ -377,10 +360,7 @@ Feature: In a lesson activity a student should
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
And I set the following fields to these values:
| False | 1 |
@@ -19,8 +19,8 @@ Feature: Lesson user override
| student1 | C1 | student |
| student2 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
| activity | name | course | idnumber |
| lesson | Test lesson name | C1 | lesson1 |
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
And I follow "Add a question page"
And I set the field "Select a question type" to "True/false"
@@ -35,7 +35,6 @@ Feature: Lesson user override
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I log out
@javascript
Scenario: Add, modify then delete a user override
@@ -97,7 +96,6 @@ Feature: Lesson user override
| Re-takes allowed | 1 |
And I press "Save"
And I should see "Re-takes allowed"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@@ -108,7 +106,6 @@ Feature: Lesson user override
When I am on the "Test lesson name" "lesson activity" page
Then I should not see "You are not allowed to retake this lesson."
And I should see "Cat is an amphibian"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student2
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@@ -133,7 +130,6 @@ Feature: Lesson user override
| Password protected lesson | 12345 |
And I press "Save"
And I should see "Password protected lesson"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student1
Then I should see "Test lesson name is a password protected lesson"
And I should not see "Cat is an amphibian"
@@ -149,7 +145,6 @@ Feature: Lesson user override
And I press "Submit"
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student2
And I should see "Test lesson name is a password protected lesson"
And I should not see "Cat is an amphibian"
@@ -183,12 +178,10 @@ Feature: Lesson user override
| deadline[minute] | 00 |
And I press "Save"
And I should see "Lesson closes"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student2
And I wait until the page is ready
Then the activity date in "Test lesson name" should contain "Closed: Saturday, 1 January 2000, 8:00"
And I should not see "Cat is an amphibian"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
@@ -215,12 +208,10 @@ Feature: Lesson user override
| available[minute] | 00 |
And I press "Save"
And I should see "Lesson opens"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student2
And I wait until the page is ready
Then the activity date in "Test lesson name" should contain "Opens: Tuesday, 1 January 2030, 8:00"
And I should not see "Cat is an amphibian"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
@@ -237,7 +228,6 @@ Feature: Lesson user override
| Maximum number of attempts per question | 2 |
And I press "Save"
And I should see "Maximum number of attempts per question"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@@ -250,7 +240,6 @@ Feature: Lesson user override
And I press "Submit"
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I log out
And I am on the "Test lesson name" "lesson activity" page logged in as student2
And I should see "Cat is an amphibian"
And I set the following fields to these values:
@@ -331,7 +320,6 @@ Feature: Lesson user override
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save"
And I log out
When I am on the "Lesson 2" "lesson activity" page logged in as teacher1
And I navigate to "User overrides" in current page administration
Then I should see "Student1" in the ".generaltable" "css_element"
@@ -17,13 +17,12 @@ Feature: In a lesson activity, students can see questions in random order
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber | section |
| lesson | Lesson with clusters | Test lesson description | C1 | lesson1 | 1 |
| activity | name | course | idnumber |
| lesson | Lesson with clusters | C1 | lesson1 |
And I log in as "teacher1"
Scenario: Lesson with two clusters
Given I am on "Course 1" course homepage with editing mode on
And I follow "Lesson with clusters"
Given I am on the "Lesson with clusters" "lesson activity" page
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -119,10 +118,7 @@ Feature: In a lesson activity, students can see questions in random order
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Lesson with clusters"
When I am on the "Lesson with clusters" "lesson activity" page logged in as student1
Then I should see "First page contents"
And I press "Next page"
And I should see "Second page contents"
@@ -16,14 +16,13 @@ Feature: In a lesson activity, students can see questions in random order and a
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | course | idnumber |
| lesson | Lesson with subcluster | C1 | lesson1 |
And I log in as "teacher1"
Scenario: Lesson with subcluster
Given the following "activities" exist:
| activity | name | intro | course | idnumber | section |
| lesson | Lesson with subcluster | Test lesson description | C1 | lesson1 | 1 |
And I am on "Course 1" course homepage
And I follow "Lesson with subcluster"
Given I am on the "Lesson with subcluster" "lesson activity" page
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -139,10 +138,7 @@ Feature: In a lesson activity, students can see questions in random order and a
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Lesson with subcluster"
When I am on the "Lesson with subcluster" "lesson activity" page logged in as student1
Then I should see "First page contents"
And I press "Next page"
And I should see "Question from cluster"
@@ -16,12 +16,10 @@ Feature: link to gradebook on the end of lesson page
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| lesson | Test lesson | Test lesson description | C1 | lesson1 |
And I am on "Course 1" course homepage
And I follow "Test lesson"
| activity | name | course | idnumber |
| lesson | Test lesson | C1 | lesson1 |
And I am on the "Test lesson" "lesson activity" page logged in as teacher1
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
@@ -40,10 +38,7 @@ Feature: link to gradebook on the end of lesson page
And I press "Save page"
Scenario: Link to gradebook for non practice lesson
Given I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson"
When I am on the "Test lesson" "lesson activity" page logged in as student1
And I press "Next page"
And I press "Next page"
Then I should see "Congratulations - end of lesson reached"
@@ -53,30 +48,22 @@ Feature: link to gradebook on the end of lesson page
And I should see "Test lesson"
Scenario: No link to gradebook for non graded lesson
Given I follow "Test lesson"
And I navigate to "Edit settings" in current page administration
Given I am on the "Test lesson" "lesson activity editing" page
And I set the following fields to these values:
| Type | None |
And I press "Save and display"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson"
When I am on the "Test lesson" "lesson activity" page logged in as student1
And I press "Next page"
And I press "Next page"
Then I should see "Congratulations - end of lesson reached"
And I should not see "View grades"
Scenario: No link to gradebook for practice lesson
Given I follow "Test lesson"
And I navigate to "Edit settings" in current page administration
Given I am on the "Test lesson" "lesson activity editing" page
And I set the following fields to these values:
| Practice lesson | Yes |
And I press "Save and display"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson"
When I am on the "Test lesson" "lesson activity" page logged in as student1
And I press "Next page"
And I press "Next page"
Then I should see "Congratulations - end of lesson reached"
@@ -88,25 +75,18 @@ Feature: link to gradebook on the end of lesson page
And I set the following fields to these values:
| Show gradebook to students | No |
And I press "Save and display"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson"
When I am on the "Test lesson" "lesson activity" page logged in as student1
And I press "Next page"
And I press "Next page"
Then I should see "Congratulations - end of lesson reached"
And I should not see "View grades"
Scenario: No link to gradebook if no gradereport/user:view capability
Given I log out
And I log in as "admin"
Given I log in as "admin"
And I set the following system permissions of "Student" role:
| capability | permission |
| gradereport/user:view | Prevent |
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson"
When I am on the "Test lesson" "lesson activity" page logged in as student1
And I press "Next page"
And I press "Next page"
Then I should see "Congratulations - end of lesson reached"
@@ -21,23 +21,16 @@ Feature: A teacher can password protect a lesson
| course | C1 |
| idnumber | 0001 |
| name | Test lesson |
| intro | Test lesson description |
| section | 1 |
| usepassword | 1 |
| password | moodle_rules |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson"
And I am on the "Test lesson" "lesson activity" page logged in as teacher1
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
| Page contents | First page contents |
| Description | The first one |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
When I follow "Test lesson"
When I am on the "Test lesson" "lesson activity" page logged in as student1
Then I should see "Test lesson is a password protected lesson"
And I should not see "First page contents"
And I set the field "userpassword" to "moodle"
@@ -76,7 +76,6 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ
And I set the field "Describe this image for someone who cannot see it" to "It's the logo"
And I click on "Save image" "button"
And I press "Save page"
And I log out
When I am on the "Test lesson name" "lesson activity" page logged in as student1
Then I should see "What animal is an amphibian?"
And "//*[contains(@class, 'answeroption')]//img[contains(@src, 'pluginfile.php')]" "xpath_element" should exist
@@ -34,17 +34,12 @@ Feature: In a lesson activity, a non editing teacher can grade essay questions
| student2 | G2 |
| student3 | G3 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | section |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
| activity | name | course | idnumber |
| lesson | Test lesson name | C1 | lesson1 |
And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
And I set the following fields to these values:
| Group mode | Separate groups |
And I press "Save and return to course"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test lesson name"
And I press "Save and display"
And I follow "Add a question page"
And I set the field "Select a question type" to "Essay"
And I press "Add a question page"
@@ -52,22 +47,13 @@ Feature: In a lesson activity, a non editing teacher can grade essay questions
| Page title | Essay question |
| Page contents | <p>Please write a story about a frog.</p> |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
And I set the field "Your answer" to "<p>Once upon a time there was a little green frog."
And I press "Submit"
And I log out
And I log in as "student2"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student2
And I set the field "Your answer" to "<p>Once upon a time there were two little green frogs."
And I press "Submit"
And I log out
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
When I am on the "Test lesson name" "lesson activity" page logged in as teacher1
Then I should see "Grade essays"
And I follow "Grade essays"
And I should see "Student 1"
@@ -89,10 +75,7 @@ Feature: In a lesson activity, a non editing teacher can grade essay questions
And I should not see "Student 1"
And I select "Group C" from the "Separate groups" singleselect
And I should see "No one in Group C has answered an essay question yet."
And I log out
And I log in as "teacher2"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as teacher2
Then I should see "Grade essays"
And I follow "Grade essays"
And I should not see "Student 1"
+12 -12
View File
@@ -17,30 +17,30 @@ Feature: A teacher can set a time limit for a lesson
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Test lesson |
| Description | Test lesson description |
| timelimit[enabled] | 1 |
| timelimit[timeunit] | 60 |
| timelimit[number] | 1 |
And I am on the "Test lesson" "lesson activity" page
And the following "activities" exist:
| activity | course | name |
| lesson | C1 | Test lesson |
And I am on the "Test lesson" "lesson activity editing" page logged in as teacher1
And I expand all fieldsets
And I set the following fields to these values:
| timelimit[enabled] | 1 |
| timelimit[timeunit] | 1 |
| timelimit[number] | 10 |
And I press "Save and display"
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | Lesson page name |
| Page contents | Single lesson page contents |
| Description | Single button |
And I press "Save page"
And I log out
When I am on the "Test lesson" "lesson activity" page logged in as student1
Then I should see "You have 1 min to finish the lesson."
Then I should see "You have 10 secs to finish the lesson."
And I wait "3" seconds
And I should see "Time remaining"
And I press "Single button"
And I should see "0:00:"
And I should see "Warning: You have 1 minute or less to finish the lesson."
And I wait "60" seconds
And I wait "10" seconds
And I press "Single button"
And I should see "You ran out of time for this lesson."
And I should see "Your last answer may not have counted if it was answered after the time was up."
@@ -17,17 +17,13 @@ Feature: An incorrect response to an answer with multiple attempts show appropri
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | section | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | 1 | lesson1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
| activity | name | course | idnumber |
| lesson | Test lesson name | C1 | lesson1 |
And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
And I set the following fields to these values:
| Provide option to try a question again | Yes |
| Maximum number of attempts per question | 2 |
And I press "Save and return to course"
And I follow "Test lesson name"
And I press "Save and display"
Scenario: A student answering incorrectly to a question will see an option to move to the next question if set up.
Given I follow "Add a question page"
@@ -48,10 +44,7 @@ Feature: An incorrect response to an answer with multiple attempts show appropri
| id_answer_editor_0 | End this lesson |
| id_jumpto_0 | End of lesson |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
When I set the field "Your answer" to "2"
And I press "Submit"
And I should see "That's the wrong answer"
@@ -76,10 +69,7 @@ Feature: An incorrect response to an answer with multiple attempts show appropri
| id_answer_editor_0 | End this lesson |
| id_jumpto_0 | End of lesson |
And I press "Save page"
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test lesson name"
And I am on the "Test lesson name" "lesson activity" page logged in as student1
When I set the field "Your answer" to "2"
And I press "Submit"
And I should see "That's the wrong answer"