mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-77581 behat: Apply new lesson generators to existing tests
This commit is contained in:
parent
cec4403678
commit
273251d765
@ -24,18 +24,13 @@ Feature: Using the lesson activities which support point scale
|
||||
|
||||
@javascript
|
||||
Scenario: Lesson rescale grade should not be possible when users are graded
|
||||
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 "Numerical"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Numerical question |
|
||||
| Page contents | What is 1 + 2? |
|
||||
| id_answer_editor_0 | 3 |
|
||||
| id_jumpto_0 | End of lesson |
|
||||
| id_enableotheranswers | 1 |
|
||||
| id_jumpto_6 | Next page |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | numeric | Numerical question | What is 1 + 2? |
|
||||
And the following "mod_lesson > answers" exist:
|
||||
| page | answer | jumpto | score |
|
||||
| Numerical question | 3 | End of lesson | 1 |
|
||||
| Numerical question | @#wronganswer#@ | Next page | 0 |
|
||||
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"
|
||||
|
@ -10,45 +10,24 @@ Feature: Set end of lesson reached as a completion condition for a lesson
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Course 1 | C1 | 0 | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
Given the following "activity" exists:
|
||||
| activity | lesson |
|
||||
| course | C1 |
|
||||
| idnumber | 0001 |
|
||||
| name | Test lesson |
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I navigate to "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 am on the "Test lesson" "lesson activity editing" page
|
||||
And I set the following fields to these values:
|
||||
| Add requirements | 1 |
|
||||
| completionview | 0 |
|
||||
| completionendreached | 1 |
|
||||
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 |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
And the following "activity" exist:
|
||||
| activity | name | course | idnumber | completion | completionview | completionendreached |
|
||||
| lesson | Test lesson | C1 | 0001 | 2 | 0 | 1 |
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson | content | First page name | First page contents |
|
||||
| Test lesson | content | Second page name | Second page contents |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto |
|
||||
| First page name | Next page | Next page |
|
||||
| Second page name | Previous page | Previous page |
|
||||
| Second page name | Next page | Next page |
|
||||
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"
|
||||
|
@ -6,50 +6,29 @@ Feature: Set time spent as a completion condition for a lesson
|
||||
|
||||
Scenario: Set time spent as a condition
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion |
|
||||
| Course 1 | C1 | 0 | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
And the following "activity" exists:
|
||||
| activity | lesson |
|
||||
| course | C1 |
|
||||
| idnumber | 0001 |
|
||||
| name | Test lesson |
|
||||
And I am on the "Course 1" course page logged in as teacher1
|
||||
And I navigate to "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 am on the "Test lesson" "lesson activity editing" page
|
||||
And I set the following fields to these values:
|
||||
| Add requirements | 1 |
|
||||
| completionview | 0 |
|
||||
| completiontimespentenabled | 1 |
|
||||
| completiontimespent[timeunit] | 1 |
|
||||
| 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 |
|
||||
| Page contents | First page contents |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
And the following "activity" exist:
|
||||
| activity | name | course | idnumber | completion | completionview | completiontimespentenabled | completiontimespent |
|
||||
| lesson | Test lesson | C1 | 0001 | 2 | 0 | 1 | 5 |
|
||||
And the following "mod_lesson > pages" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson | content | First page name | First page contents |
|
||||
| Test lesson | content | Second page name | Second page contents |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto |
|
||||
| First page name | Next page | Next page |
|
||||
| Second page name | Previous page | Previous page |
|
||||
| Second page name | Next page | Next page |
|
||||
|
||||
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"
|
||||
|
@ -19,11 +19,15 @@ Feature: A teacher can set available from and deadline dates to access a lesson
|
||||
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
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson | content | First page name | First page contents |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto |
|
||||
| First page name | Next page | Next page |
|
||||
|
||||
Scenario: Forbidding lesson accesses until a specified date
|
||||
Given I am on the "Test lesson" "lesson activity editing" page
|
||||
Given I am on the "Test lesson" "lesson activity editing" page logged in as teacher1
|
||||
And I set the field "id_available_enabled" to "1"
|
||||
And I set the following fields to these values:
|
||||
| available[day] | 1 |
|
||||
@ -32,18 +36,12 @@ Feature: A teacher can set available from and deadline dates to access a lesson
|
||||
| available[hour] | 08 |
|
||||
| available[minute] | 00 |
|
||||
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"
|
||||
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 I am on the "Test lesson" "lesson activity editing" page
|
||||
Given I am on the "Test lesson" "lesson activity editing" page logged in as teacher1
|
||||
And I set the field "id_deadline_enabled" to "1"
|
||||
And I set the following fields to these values:
|
||||
| deadline[day] | 1 |
|
||||
@ -52,12 +50,6 @@ Feature: A teacher can set available from and deadline dates to access a lesson
|
||||
| deadline[hour] | 08 |
|
||||
| deadline[minute] | 00 |
|
||||
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"
|
||||
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"
|
||||
|
@ -14,26 +14,22 @@ Feature: Display the lesson description in the lesson and optionally in the cour
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
Given the following "activity" exists:
|
||||
| activity | lesson |
|
||||
| course | C1 |
|
||||
| idnumber | 0001 |
|
||||
| name | Test lesson name |
|
||||
| intro | Test lesson description |
|
||||
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"
|
||||
And the following "activity" exist:
|
||||
| activity | name | intro | course | idnumber |
|
||||
| lesson | Test lesson name | Test lesson description | C1 | 0001 |
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | Test lesson part 1 | Test lesson part 1 |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto |
|
||||
| Test lesson part 1 | Next page | Next page |
|
||||
|
||||
Scenario: Description is displayed in the Lesson
|
||||
When I am on the "Test lesson name" "lesson activity" page
|
||||
When I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
||||
Then I should see "Test lesson description"
|
||||
|
||||
Scenario: Show lesson description in the course homepage
|
||||
Given I am on the "Test lesson name" "lesson activity editing" page
|
||||
Given I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
|
||||
And the following fields match these values:
|
||||
| Display description on course page | |
|
||||
And I set the following fields to these values:
|
||||
@ -43,7 +39,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 the "Test lesson name" "lesson activity editing" page
|
||||
Given I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
|
||||
And the following fields match these values:
|
||||
| Display description on course page | |
|
||||
And I press "Save and return to course"
|
||||
|
@ -28,22 +28,14 @@ Feature: View activity completion in the lesson activity
|
||||
| completionendreached | 1 |
|
||||
| completiontimespentenabled | 1 |
|
||||
| completiontimespent | 3 |
|
||||
And I am on the "Music history" "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 | Music history part 1 |
|
||||
| Description | The history of music part 1 |
|
||||
| Jump | Next page |
|
||||
And I click on "Save page" "button"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "Essay"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Music essay |
|
||||
| Page contents | Write a really interesting music essay |
|
||||
| Jump | End of lesson |
|
||||
| Score | 1 |
|
||||
And I press "Save page"
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Music history | content | Music history part 1 | |
|
||||
| Music history | essay | Music essay | Write a really interesting music essay |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto | score |
|
||||
| Music history part 1 | The history of music part 1 | Next page | 0 |
|
||||
| Music essay | | Next page | 1 |
|
||||
|
||||
Scenario: View automatic completion items as a teacher
|
||||
When I am on the "Music history" "lesson activity" page logged in as teacher1
|
||||
|
@ -18,29 +18,18 @@ Feature: Teachers can review student progress on all lessons in a course by view
|
||||
And the following "activities" exist:
|
||||
| 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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | First page name |
|
||||
| Page contents | First page contents |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | truefalse | True/false question 1 | Paper is made from trees. |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| True/false question 1 | True | Correct | Next page | 1 |
|
||||
| True/false question 1 | False | Wrong | This page | 0 |
|
||||
And I log in as "teacher1"
|
||||
When I am on "Course 1" course homepage
|
||||
And I navigate to course participants
|
||||
And I follow "Student 1"
|
||||
@ -48,36 +37,17 @@ Feature: Teachers can review student progress on all lessons in a course by view
|
||||
Then I should see "No attempts have been made on this lesson"
|
||||
|
||||
Scenario: View student progress for an incomplete lesson containing both content and question pages
|
||||
Given 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 |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
And I log out
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
| Test lesson name | truefalse | True/false question 1 | Paper is made from trees. |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| Second page name | Next page | | Next page | 0 |
|
||||
| True/false question 1 | True | Correct | Next page | 1 |
|
||||
| True/false question 1 | False | Wrong | This page | 0 |
|
||||
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"
|
||||
@ -90,48 +60,21 @@ Feature: Teachers can review student progress on all lessons in a course by view
|
||||
And I should see "0" in the ".cell.c2" "css_element"
|
||||
|
||||
Scenario: View student progress for a lesson containing both content and question pages
|
||||
Given 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 |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | The sky is Pink. |
|
||||
| id_answer_editor_0 | False |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | True |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
| Test lesson name | truefalse | True/false question 1 | Paper is made from trees. |
|
||||
| Test lesson name | truefalse | True/false question 2 | The sky is Pink. |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| Second page name | Previous page | | Previous page | 0 |
|
||||
| Second page name | Next page | | Next page | 0 |
|
||||
| True/false question 1 | True | Correct | Next page | 1 |
|
||||
| True/false question 1 | False | Wrong | This page | 0 |
|
||||
| True/false question 2 | False | Correct | Next page | 1 |
|
||||
| True/false question 2 | True | Wrong | This page | 0 |
|
||||
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"
|
||||
@ -158,22 +101,15 @@ Feature: Teachers can review student progress on all lessons in a course by view
|
||||
And I should see "1" in the ".cell.c3" "css_element"
|
||||
|
||||
Scenario: View student attempts in a lesson containing only content pages
|
||||
Given 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 |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | End of lesson |
|
||||
| id_jumpto_1 | End of lesson |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto |
|
||||
| First page name | Next page | Next page |
|
||||
| Second page name | Previous page | Previous page |
|
||||
| Second page name | End of lesson | End of lesson |
|
||||
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"
|
||||
|
@ -9,21 +9,14 @@ Feature: Pass grade activity completion in the lesson activity
|
||||
| student3 | Vinnie | Student3 | student3@example.com |
|
||||
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
| fullname | shortname | category | enablecompletion | showcompletionconditions |
|
||||
| Course 1 | C1 | 0 | 1 | 1 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
| student3 | C1 | student |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I am on the "Course 1" course page logged in as teacher1
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
| Show activity completion conditions | Yes |
|
||||
And I press "Save and display"
|
||||
And the following "activity" exists:
|
||||
| activity | lesson |
|
||||
| course | C1 |
|
||||
@ -33,18 +26,13 @@ Feature: Pass grade activity completion in the lesson activity
|
||||
| completion | 2 |
|
||||
| completionusegrade | 1 |
|
||||
| completionpassgrade | 1 |
|
||||
And I am on the "Music history" "lesson activity" page
|
||||
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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Numerical question |
|
||||
| Page contents | What is 1 + 2? |
|
||||
| id_answer_editor_0 | 3 |
|
||||
| id_jumpto_0 | End of lesson |
|
||||
| id_enableotheranswers | 1 |
|
||||
| id_jumpto_6 | Next page |
|
||||
And I press "Save page"
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Music history | numeric | Numerical question | What is 1 + 2? |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto | score |
|
||||
| Numerical question | 3 | End of lesson | 1 |
|
||||
| Numerical question | @#wronganswer#@ | Next page | 0 |
|
||||
|
||||
Scenario: View automatic completion items as a teacher
|
||||
When I am on the "Music history" "lesson activity" page logged in as teacher1
|
||||
|
@ -25,20 +25,13 @@ Feature: Lesson reset
|
||||
And the following "activities" exist:
|
||||
| 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"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Cat is an amphibian |
|
||||
| id_answer_editor_0 | False |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | True |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | truefalse | True/false question 1 | Cat is an amphibian |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| True/false question 1 | False | Correct | Next page | 1 |
|
||||
| True/false question 1 | True | Wrong | This page | 0 |
|
||||
|
||||
Scenario: Use course reset to clear all attempt data
|
||||
When I am on the "Test lesson name" "lesson activity" page logged in as student1
|
||||
@ -62,7 +55,7 @@ Feature: Lesson reset
|
||||
|
||||
@javascript
|
||||
Scenario: Use course reset to remove user overrides.
|
||||
When I am on the "Test lesson name" "lesson activity" page
|
||||
When I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
||||
And I navigate to "Overrides" in current page administration
|
||||
And I follow "Add user override"
|
||||
And I set the following fields to these values:
|
||||
@ -80,7 +73,8 @@ Feature: Lesson reset
|
||||
Then I should not see "Sam1 Student1"
|
||||
|
||||
Scenario: Use course reset to remove group overrides.
|
||||
When I navigate to "Overrides" in current page administration
|
||||
When I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
||||
And I navigate to "Overrides" in current page administration
|
||||
And I select "Group overrides" from the "jump" singleselect
|
||||
And I follow "Add group override"
|
||||
And I set the following fields to these values:
|
||||
|
@ -20,31 +20,18 @@ branch table contents
|
||||
And the following "activities" exist:
|
||||
| activity | name | course | idnumber |
|
||||
| lesson | Test lesson name | C1 | lesson1 |
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | numeric | Hardest question ever | 1 + 1? |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| First page name | Previous page | | Previous page | 0 |
|
||||
| Hardest question ever | 2 | Correct answer | End of lesson | 1 |
|
||||
| Hardest question ever | 1 | Incorrect answer | First page name | 0 |
|
||||
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 |
|
||||
| Page contents | First page contents |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | Previous page |
|
||||
| id_jumpto_1 | Previous page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "Numerical"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Hardest question ever |
|
||||
| Page contents | 1 + 1? |
|
||||
| id_answer_editor_0 | 2 |
|
||||
| id_response_editor_0 | Correct answer |
|
||||
| id_jumpto_0 | End of lesson |
|
||||
| id_score_0 | 1 |
|
||||
| id_answer_editor_1 | 1 |
|
||||
| id_response_editor_1 | Incorrect answer |
|
||||
| id_jumpto_1 | First page name |
|
||||
| id_score_1 | 0 |
|
||||
And I press "Save page"
|
||||
And I press "Edit lesson"
|
||||
And I select edit type "Expanded"
|
||||
|
||||
Scenario: Edit lesson content page
|
||||
|
@ -19,39 +19,21 @@ Feature: In a lesson activity, teacher can edit lesson's pages
|
||||
And the following "activities" exist:
|
||||
| activity | name | course | idnumber |
|
||||
| lesson | Test lesson name | C1 | lesson1 |
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
| Test lesson name | numeric | Hardest question ever | 1 + 1? |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| Second page name | Previous page | | Previous page | 0 |
|
||||
| Second page name | Next page | | Next page | 0 |
|
||||
| Hardest question ever | 2 | Correct answer | End of lesson | 1 |
|
||||
| Hardest question ever | 1 | Incorrect answer | Second page name | 0 |
|
||||
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 |
|
||||
| Page contents | First page contents |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
And I press "Edit lesson"
|
||||
And I select edit type "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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Hardest question ever |
|
||||
| Page contents | 1 + 1? |
|
||||
| id_answer_editor_0 | 2 |
|
||||
| id_response_editor_0 | Correct answer |
|
||||
| id_jumpto_0 | End of lesson |
|
||||
| id_score_0 | 1 |
|
||||
| id_answer_editor_1 | 1 |
|
||||
| id_response_editor_1 | Incorrect answer |
|
||||
| id_jumpto_1 | Second page name |
|
||||
| id_score_1 | 0 |
|
||||
And I press "Save page"
|
||||
|
||||
Scenario: Edit lesson content page
|
||||
Given I click on "//th[normalize-space(.)='Second page name']/descendant::a[3]" "xpath_element"
|
||||
|
@ -18,14 +18,12 @@ Feature: In a lesson activity, teacher can add an essay question
|
||||
And the following "activities" exist:
|
||||
| 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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Essay question |
|
||||
| Page contents | <p>Please write a story about a <b>frog</b>.</p> |
|
||||
And I press "Save page"
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | essay | Essay question | <p>Please write a story about a <b>frog</b>.</p> |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | jumpto | score |
|
||||
| Essay question | Next page | 1 |
|
||||
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."
|
||||
|
@ -32,20 +32,13 @@ Feature: Lesson group override
|
||||
And the following "activities" exist:
|
||||
| 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"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Cat is an amphibian |
|
||||
| id_answer_editor_0 | False |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | True |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | truefalse | True/false question 1 | Cat is an amphibian |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| True/false question 1 | False | Correct | Next page | 1 |
|
||||
| True/false question 1 | True | Wrong | This page | 0 |
|
||||
|
||||
Scenario: Add, modify then delete a group override
|
||||
Given I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
||||
|
@ -20,31 +20,20 @@ Feature: In a lesson activity, if custom scoring is not enabled, student should
|
||||
And the following "activities" exist:
|
||||
| activity | name | course | idnumber |
|
||||
| lesson | Test lesson name | C1 | lesson1 |
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | numeric | Hardest question ever | 1 + 1? |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| Hardest question ever | 2 | Correct answer | Next page | 1 |
|
||||
| Hardest question ever | 1 | Incorrect answer | This page | 0 |
|
||||
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 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 |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "Numerical"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Hardest question ever |
|
||||
| Page contents | 1 + 1? |
|
||||
| id_answer_editor_0 | 2 |
|
||||
| id_response_editor_0 | Correct answer |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | 1 |
|
||||
| id_response_editor_1 | Incorrect answer |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I duplicate "Test lesson name" activity
|
||||
And I wait until section "1" is available
|
||||
|
@ -19,42 +19,20 @@ Feature: In a lesson activity, students can navigate through a series of pages i
|
||||
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 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 |
|
||||
| Page contents | First page contents |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
And I select edit type "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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Hardest question ever |
|
||||
| Page contents | 1 + 1? |
|
||||
| id_answer_editor_0 | 2 |
|
||||
| id_response_editor_0 | Correct answer |
|
||||
| id_jumpto_0 | End of lesson |
|
||||
| id_score_0 | 1 |
|
||||
| id_answer_editor_1 | 1 |
|
||||
| id_response_editor_1 | Incorrect answer |
|
||||
| id_jumpto_1 | Second page name |
|
||||
| id_score_1 | 0 |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
| Test lesson name | numeric | Hardest question ever | 1 + 1? |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| Second page name | Previous page | | Previous page | 0 |
|
||||
| Second page name | Next page | | Next page | 0 |
|
||||
| Hardest question ever | 2 | Correct answer | End of lesson | 1 |
|
||||
| Hardest question ever | 1 | Incorrect answer | Second page name | 0 |
|
||||
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"
|
||||
@ -84,21 +62,18 @@ 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 I am on the "Test lesson name" "lesson activity editing" page
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | truefalse | Test question | Test content |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto | score |
|
||||
| Test question | right | Next page | 1 |
|
||||
| Test question | wrong | This page | 0 |
|
||||
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:
|
||||
| id_review | Yes |
|
||||
| id_maxattempts | 3 |
|
||||
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 |
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Test question |
|
||||
| Page contents | Test content |
|
||||
| id_answer_editor_0 | right |
|
||||
| id_answer_editor_1 | wrong |
|
||||
And I press "Save page"
|
||||
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:
|
||||
@ -121,32 +96,21 @@ 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 I am on the "Test lesson name" "lesson activity editing" page
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | truefalse | Test question | Test content 1 |
|
||||
| Test lesson name | truefalse | Test question 2 | Test content 2 |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto | score |
|
||||
| Test question | right | Next page | 1 |
|
||||
| Test question | wrong | This page | 0 |
|
||||
| Test question 2 | right | Test question | 1 |
|
||||
| Test question 2 | wrong | Test question | 0 |
|
||||
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:
|
||||
| id_review | Yes |
|
||||
| id_maxattempts | 3 |
|
||||
| id_review | Yes |
|
||||
| id_maxattempts | 3 |
|
||||
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 |
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Test question |
|
||||
| Page contents | Test content 1 |
|
||||
| id_answer_editor_0 | right |
|
||||
| id_answer_editor_1 | wrong |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Test question 2 |
|
||||
| Page contents | Test content 2 |
|
||||
| id_answer_editor_0 | right |
|
||||
| id_jumpto_0 | Test question |
|
||||
| id_answer_editor_1 | wrong |
|
||||
| id_jumpto_1 | Test question |
|
||||
And I press "Save page"
|
||||
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:
|
||||
@ -173,21 +137,18 @@ 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 I am on the "Test lesson name" "lesson activity editing" page
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | truefalse | Test question | Test content |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto | score |
|
||||
| Test question | right | Next page | 1 |
|
||||
| Test question | wrong | This page | 0 |
|
||||
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:
|
||||
| id_review | Yes |
|
||||
| id_maxattempts | 0 |
|
||||
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 |
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Test question |
|
||||
| Page contents | Test content |
|
||||
| id_answer_editor_0 | right |
|
||||
| id_answer_editor_1 | wrong |
|
||||
And I press "Save page"
|
||||
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:
|
||||
|
@ -27,7 +27,20 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons
|
||||
| idnumber | 0001 |
|
||||
| name | Test lesson name |
|
||||
| retake | 1 |
|
||||
When I am on the "Test lesson name" "lesson activity editing" page
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | truefalse | True/false question 1 | Cat is an amphibian |
|
||||
| Test lesson name | truefalse | True/false question 2 | Paper is made from trees. |
|
||||
| Test lesson name | truefalse | True/false question 3 | 1+1=2 |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| True/false question 1 | False | Correct | Next page | 1 |
|
||||
| True/false question 1 | True | Wrong | This page | 0 |
|
||||
| True/false question 2 | True | Correct | Next page | 1 |
|
||||
| True/false question 2 | False | Wrong | This page | 0 |
|
||||
| True/false question 3 | True | Correct | Next page | 1 |
|
||||
| True/false question 3 | False | Wrong | This page | 0 |
|
||||
And 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 |
|
||||
@ -37,47 +50,7 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons
|
||||
| deadline[hour] | 08 |
|
||||
| deadline[minute] | 00 |
|
||||
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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Cat is an amphibian |
|
||||
| id_answer_editor_0 | False |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | True |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 2 |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select edit type "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 "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 3 |
|
||||
| Page contents | 1+1=2 |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
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 |
|
||||
|
@ -19,22 +19,37 @@ Feature: In a lesson activity, I need to edit pages in the lesson taking into ac
|
||||
And the following "activities" exist:
|
||||
| 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 the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | numeric | Hardest question ever | 1 + 1? |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| Hardest question ever | 2.87 | Correct answer | End of lesson | 1 |
|
||||
| Hardest question ever | 2.1:2.8 | Incorrect answer | This page | 0 |
|
||||
|
||||
Scenario: Create a numerical question with the locale specific variables
|
||||
Given the following "activities" exist:
|
||||
| activity | name | course | idnumber | modattempts |
|
||||
| lesson | Empty lesson name | C1 | lesson2 | 1 |
|
||||
And I am on the "Empty lesson name" "lesson activity" page logged in as teacher1
|
||||
When I follow "Add a question page"
|
||||
And I set the field "Select a question type" to "Numerical"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Hardest question ever |
|
||||
| Page contents | 1 + 1? |
|
||||
| id_answer_editor_0 | 2#87 |
|
||||
| Page title | Second question |
|
||||
| Page contents | 2 + 2? |
|
||||
| id_answer_editor_0 | 4#87 |
|
||||
| id_response_editor_0 | Correct answer |
|
||||
| id_jumpto_0 | End of lesson |
|
||||
| id_score_0 | 1 |
|
||||
| id_answer_editor_1 | 2#1:2#8 |
|
||||
| id_answer_editor_1 | 4#1:4#8 |
|
||||
| id_response_editor_1 | Incorrect answer |
|
||||
| id_jumpto_1 | This page |
|
||||
| id_score_1 | 0 |
|
||||
And I press "Save page"
|
||||
And I follow "Second question"
|
||||
Then I should see "4#87"
|
||||
And I should see "4#1:4#8"
|
||||
|
||||
Scenario: Edit a numerical question with the locale specific variables
|
||||
Given I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
||||
|
@ -24,62 +24,35 @@ Feature: Teachers can review student progress on all lessons in a course by view
|
||||
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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | First page name |
|
||||
| Page contents | First page contents |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
When I am on "Course 1" course homepage
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | truefalse | True/false question 1 | Paper is made from trees. |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| True/false question 1 | True | Correct | Next page | 1 |
|
||||
| True/false question 1 | False | Wrong | This page | 0 |
|
||||
When I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to course participants
|
||||
And I follow "Student 1"
|
||||
And I follow "Outline report"
|
||||
Then I should see "No attempts have been made on this lesson"
|
||||
|
||||
Scenario: View student progress for an incomplete lesson containing both content and question pages
|
||||
Given 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 |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
| Test lesson name | truefalse | True/false question 1 | Paper is made from trees. |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| Second page name | Previous page | | Previous page | 0 |
|
||||
| Second page name | Next page | | Next page | 0 |
|
||||
| True/false question 1 | True | Correct | Next page | 1 |
|
||||
| True/false question 1 | False | Wrong | This page | 0 |
|
||||
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"
|
||||
@ -90,35 +63,18 @@ Feature: Teachers can review student progress on all lessons in a course by view
|
||||
And I should see "Lesson has been started, but not yet completed"
|
||||
|
||||
Scenario: View student progress for a lesson containing both content and question pages
|
||||
Given 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 |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
| Test lesson name | truefalse | True/false question 1 | Paper is made from trees. |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| Second page name | Previous page | | Previous page | 0 |
|
||||
| Second page name | Next page | | Next page | 0 |
|
||||
| True/false question 1 | True | Correct | Next page | 1 |
|
||||
| True/false question 1 | False | Wrong | This page | 0 |
|
||||
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"
|
||||
@ -137,22 +93,15 @@ Feature: Teachers can review student progress on all lessons in a course by view
|
||||
And I should see "Grade: 100.00 / 100.00"
|
||||
|
||||
Scenario: View student attempts in a lesson containing only content pages
|
||||
Given 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 |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | End of lesson |
|
||||
| id_jumpto_1 | End of lesson |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto | score |
|
||||
| First page name | Next page | Next page | 0 |
|
||||
| Second page name | Previous page | Previous page | 0 |
|
||||
| Second page name | End of lesson | End of lesson | 0 |
|
||||
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"
|
||||
|
@ -21,17 +21,14 @@ Feature: Practice mode in a lesson activity
|
||||
| course | C1 |
|
||||
| idnumber | 0001 |
|
||||
| name | 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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True or False |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| 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
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | truefalse | True or False | Paper is made from trees. |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto | score |
|
||||
| True or False | True | Next page | 1 |
|
||||
| True or False | False | This page | 0 |
|
||||
And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
|
||||
|
||||
Scenario: Non-practice lesson records grades in the gradebook
|
||||
Given I set the following fields to these values:
|
||||
|
@ -19,42 +19,22 @@ Feature: In a lesson activity, students can see their progress viewing a progres
|
||||
And the following "activities" exist:
|
||||
| activity | name | course | idnumber |
|
||||
| lesson | Test lesson name | C1 | lesson1 |
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
| Test lesson name | numeric | Hardest question ever | 1 + 1? |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| Second page name | Previous page | | Previous page | 0 |
|
||||
| Second page name | Next page | | Next page | 0 |
|
||||
| Hardest question ever | 2 | Correct answer | End of lesson | 1 |
|
||||
| Hardest question ever | 1 | Incorrect answer | First page name | 0 |
|
||||
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 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 |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
And I select edit type "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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Hardest question ever |
|
||||
| Page contents | 1 + 1? |
|
||||
| id_answer_editor_0 | 2 |
|
||||
| id_response_editor_0 | Correct answer |
|
||||
| id_jumpto_0 | End of lesson |
|
||||
| id_score_0 | 1 |
|
||||
| id_answer_editor_1 | 1 |
|
||||
| id_response_editor_1 | Incorrect answer |
|
||||
| id_jumpto_1 | Second page name |
|
||||
| id_score_1 | 0 |
|
||||
And I press "Save page"
|
||||
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"
|
||||
|
@ -22,71 +22,27 @@ Feature: In a lesson activity, students can not re-attempt a question more than
|
||||
| name | Test lesson name |
|
||||
| retake | 1 |
|
||||
| minquestions | 3 |
|
||||
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 |
|
||||
| Page contents | First page contents |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Third page name |
|
||||
| Page contents | Third page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 3 |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 2 |
|
||||
| Page contents | Kermit is a frog |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | The earth is round. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | truefalse | True/false question 1 | The earth is round. |
|
||||
| Test lesson name | truefalse | True/false question 2 | Kermit is a frog |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
| Test lesson name | truefalse | True/false question 3 | Paper is made from trees. |
|
||||
| Test lesson name | content | Third page name | Third page contents |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| Second page name | Previous page | | Previous page | 0 |
|
||||
| Second page name | Next page | | Next page | 0 |
|
||||
| True/false question 1 | True | Correct | Next page | 1 |
|
||||
| True/false question 1 | False | Wrong | This page | 0 |
|
||||
| True/false question 2 | True | Correct | Next page | 1 |
|
||||
| True/false question 2 | False | Wrong | This page | 0 |
|
||||
| True/false question 3 | True | Correct | Next page | 1 |
|
||||
| True/false question 3 | False | Wrong | This page | 0 |
|
||||
| Third page name | Previous page | | Previous page | 0 |
|
||||
| Third page name | Next page | | Next page | 0 |
|
||||
|
||||
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
|
||||
|
@ -19,60 +19,26 @@ Feature: In a lesson activity, teachers can review student attempts
|
||||
And the following "activities" exist:
|
||||
| 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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | First page name |
|
||||
| Page contents | First page contents |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 2 |
|
||||
| Page contents | Kermit is a frog |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Third page name |
|
||||
| Page contents | Third page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
| Test lesson name | content | Third page name | Third page contents |
|
||||
| Test lesson name | truefalse | True/false question 1 | Paper is made from trees. |
|
||||
| Test lesson name | truefalse | True/false question 2 | Kermit is a frog |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| Second page name | Previous page | | Previous page | 0 |
|
||||
| Second page name | Next page | | Next page | 0 |
|
||||
| Third page name | Previous page | | Previous page | 0 |
|
||||
| Third page name | Next page | | Next page | 0 |
|
||||
| True/false question 1 | True | Correct | Next page | 1 |
|
||||
| True/false question 1 | False | Wrong | This page | 0 |
|
||||
| True/false question 2 | True | Correct | Next page | 1 |
|
||||
| True/false question 2 | False | Wrong | This page | 0 |
|
||||
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"
|
||||
@ -100,40 +66,21 @@ Feature: In a lesson activity, teachers can review student attempts
|
||||
And I should see "Low score"
|
||||
|
||||
Scenario: View student attempts in a lesson containing only content pages
|
||||
Given 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 |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Fourth page name |
|
||||
| Page contents | Fourth page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | End of lesson |
|
||||
| id_jumpto_1 | End of lesson |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Third page name |
|
||||
| Page contents | Third page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
| Test lesson name | content | Third page name | Third page contents |
|
||||
| Test lesson name | content | Fourth page name | Fourth page contents |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto |
|
||||
| First page name | Next page | Next page |
|
||||
| Second page name | Previous page | Previous page |
|
||||
| Second page name | Next page | Next page |
|
||||
| Third page name | Previous page | Previous page |
|
||||
| Third page name | Next page | Next page |
|
||||
| Fourth page name | Previous page | Previous page |
|
||||
| Fourth page name | End of lesson | End of lesson |
|
||||
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"
|
||||
|
@ -24,15 +24,12 @@ Feature: In a lesson activity, teachers can view detailed statistics report
|
||||
And I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
||||
|
||||
Scenario: View detailed statistics in a lesson when empty string is given as answer
|
||||
Given I follow "Add a question page"
|
||||
And I set the field "Select a question type" to "Numerical"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Numerical question |
|
||||
| Page contents | What is 1 + 0.5? |
|
||||
| id_answer_editor_0 | 1.5 |
|
||||
| id_jumpto_0 | End of lesson |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | numeric | Numerical question | What is 1 + 0.5? |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto | score |
|
||||
| Numerical question | 1.5 | End of lesson | 1 |
|
||||
When I am on the "Test lesson name" "lesson activity" page logged in as student1
|
||||
And I press "Submit"
|
||||
And I log out
|
||||
|
@ -16,9 +16,19 @@ Feature: In a lesson activity, students can review the answers they gave to ques
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
Given the following "activities" exist:
|
||||
And the following "activity" exist:
|
||||
| activity | name | course | idnumber |
|
||||
| lesson | Test lesson name | C1 | lesson1 |
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | numeric | Hardest question ever | 1 + 1? |
|
||||
| Test lesson name | truefalse | Next question | Paper is made from trees. |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| Hardest question ever | 2 | Correct answer | Next page | 1 |
|
||||
| Hardest question ever | 1 | Incorrect answer | This page | 0 |
|
||||
| Next question | True | Correct | Next page | 1 |
|
||||
| Next question | False | Wrong | This page | 0 |
|
||||
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 |
|
||||
@ -29,32 +39,6 @@ Feature: In a lesson activity, students can review the answers they gave to ques
|
||||
| Custom scoring | No |
|
||||
| Re-takes allowed | Yes |
|
||||
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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Hardest question ever |
|
||||
| Page contents | 1 + 1? |
|
||||
| id_answer_editor_0 | 2 |
|
||||
| id_response_editor_0 | Correct answer |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | 1 |
|
||||
| id_response_editor_1 | Incorrect answer |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Next question |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
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:
|
||||
|
@ -20,60 +20,26 @@ Feature: In a lesson activity a student should
|
||||
| course | C1 |
|
||||
| idnumber | 0001 |
|
||||
| retake | 1 |
|
||||
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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | First page name |
|
||||
| Page contents | First page contents |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 2 |
|
||||
| Page contents | Kermit is a frog |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Third page name |
|
||||
| Page contents | Third page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
| Test lesson name | content | Third page name | Third page contents |
|
||||
| Test lesson name | truefalse | True/false question 1 | Paper is made from trees. |
|
||||
| Test lesson name | truefalse | True/false question 2 | Kermit is a frog |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| Second page name | Previous page | | Previous page | 0 |
|
||||
| Second page name | Next page | | Next page | 0 |
|
||||
| Third page name | Previous page | | Previous page | 0 |
|
||||
| Third page name | Next page | | Next page | 0 |
|
||||
| True/false question 1 | True | Correct | Next page | 1 |
|
||||
| True/false question 1 | False | Wrong | This page | 0 |
|
||||
| True/false question 2 | True | Correct | Next page | 1 |
|
||||
| True/false question 2 | False | Wrong | This page | 0 |
|
||||
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"
|
||||
@ -116,40 +82,21 @@ Feature: In a lesson activity a student should
|
||||
And I should see "Congratulations - end of lesson reached"
|
||||
|
||||
Scenario: resume a lesson with only content pages
|
||||
Given 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 |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Fourth page name |
|
||||
| Page contents | Fourth page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | End of lesson |
|
||||
| id_jumpto_1 | End of lesson |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Third page name |
|
||||
| Page contents | Third page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
| Test lesson name | content | Third page name | Third page contents |
|
||||
| Test lesson name | content | Fourth page name | Fourth page contents |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto |
|
||||
| First page name | Next page | Next page |
|
||||
| Second page name | Previous page | Previous page |
|
||||
| Second page name | Next page | Next page |
|
||||
| Third page name | Previous page | Previous page |
|
||||
| Third page name | Next page | Next page |
|
||||
| Fourth page name | Previous page | Previous page |
|
||||
| Fourth page name | End of lesson | End of lesson |
|
||||
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"
|
||||
@ -173,92 +120,36 @@ Feature: In a lesson activity a student should
|
||||
And I should see "First page contents"
|
||||
|
||||
Scenario: resume a lesson with both question then content pages
|
||||
Given 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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Cat is an amphibian |
|
||||
| id_answer_editor_0 | False |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | True |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 5 |
|
||||
| Page contents | Kermit is a frog |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Content page 2 |
|
||||
| Page contents | Second content page |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 4 |
|
||||
| Page contents | 2+2=4 |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 3 |
|
||||
| Page contents | 1+1=2 |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 2 |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Content page 1 |
|
||||
| Page contents | First content page |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | truefalse | True/false question 1 | Cat is an amphibian |
|
||||
| Test lesson name | content | First page name | First page contents |
|
||||
| Test lesson name | truefalse | True/false question 2 | Paper is made from trees. |
|
||||
| Test lesson name | truefalse | True/false question 3 | 1+1=2 |
|
||||
| Test lesson name | truefalse | True/false question 4 | 2+2=4 |
|
||||
| Test lesson name | content | Second page name | Second page contents |
|
||||
| Test lesson name | truefalse | True/false question 5 | Kermit is a frog |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| True/false question 1 | False | Correct | Next page | 1 |
|
||||
| True/false question 1 | True | Wrong | This page | 0 |
|
||||
| First page name | Next page | | Next page | 0 |
|
||||
| True/false question 2 | True | Correct | Next page | 1 |
|
||||
| True/false question 2 | False | Wrong | This page | 0 |
|
||||
| True/false question 3 | True | Correct | Next page | 1 |
|
||||
| True/false question 3 | False | Wrong | This page | 0 |
|
||||
| True/false question 4 | True | Correct | Next page | 1 |
|
||||
| True/false question 4 | False | Wrong | This page | 0 |
|
||||
| Second page name | Next page | | Next page | 0 |
|
||||
| True/false question 5 | True | Correct | Next page | 1 |
|
||||
| True/false question 5 | False | Wrong | This page | 0 |
|
||||
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 "First content page"
|
||||
And I should see "First page contents"
|
||||
And I press "Next page"
|
||||
And I should see "Paper is made from trees."
|
||||
And I set the following fields to these values:
|
||||
@ -285,13 +176,13 @@ Feature: In a lesson activity a student should
|
||||
And I wait "1" seconds
|
||||
And I press "Submit"
|
||||
And I press "Continue"
|
||||
And I should see "Second content page"
|
||||
And I should see "Second page contents"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test lesson name"
|
||||
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 follow "Yes"
|
||||
And I should see "Second content page"
|
||||
And I should see "Second page contents"
|
||||
And I press "Next page"
|
||||
And I should see "Kermit is a frog"
|
||||
And I set the following fields to these values:
|
||||
@ -301,71 +192,25 @@ Feature: In a lesson activity a student should
|
||||
And I should see "Congratulations - end of lesson reached"
|
||||
|
||||
Scenario: resume a lesson with only question pages
|
||||
Given 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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Cat is an amphibian |
|
||||
| id_answer_editor_0 | False |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | True |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 5 |
|
||||
| Page contents | Kermit is a frog |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 4 |
|
||||
| Page contents | 2+2=4 |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 3 |
|
||||
| Page contents | 1+1=2 |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And I select "Add a question page" from the "qtype" singleselect
|
||||
And I set the field "Select a question type" to "True/false"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 2 |
|
||||
| Page contents | Paper is made from trees. |
|
||||
| id_answer_editor_0 | True |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | False |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | truefalse | True/false question 1 | Cat is an amphibian |
|
||||
| Test lesson name | truefalse | True/false question 2 | Paper is made from trees. |
|
||||
| Test lesson name | truefalse | True/false question 3 | 1+1=2 |
|
||||
| Test lesson name | truefalse | True/false question 4 | 2+2=4 |
|
||||
| Test lesson name | truefalse | True/false question 5 | Kermit is a frog |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| True/false question 1 | False | Correct | Next page | 1 |
|
||||
| True/false question 1 | True | Wrong | This page | 0 |
|
||||
| True/false question 2 | True | Correct | Next page | 1 |
|
||||
| True/false question 2 | False | Wrong | This page | 0 |
|
||||
| True/false question 3 | True | Correct | Next page | 1 |
|
||||
| True/false question 3 | False | Wrong | This page | 0 |
|
||||
| True/false question 4 | True | Correct | Next page | 1 |
|
||||
| True/false question 4 | False | Wrong | This page | 0 |
|
||||
| True/false question 5 | True | Correct | Next page | 1 |
|
||||
| True/false question 5 | False | Wrong | This page | 0 |
|
||||
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:
|
||||
|
@ -21,20 +21,13 @@ Feature: Lesson user override
|
||||
And the following "activities" exist:
|
||||
| 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"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | True/false question 1 |
|
||||
| Page contents | Cat is an amphibian |
|
||||
| id_answer_editor_0 | False |
|
||||
| id_response_editor_0 | Correct |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | True |
|
||||
| id_response_editor_1 | Wrong |
|
||||
| id_jumpto_1 | This page |
|
||||
And I press "Save page"
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | truefalse | True/false question 1 | Cat is an amphibian |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | response | jumpto | score |
|
||||
| True/false question 1 | False | Correct | Next page | 1 |
|
||||
| True/false question 1 | True | Wrong | This page | 0 |
|
||||
|
||||
@javascript
|
||||
Scenario: Add, modify then delete a user override
|
||||
|
@ -19,23 +19,15 @@ Feature: link to gradebook on the end of lesson page
|
||||
And the following "activities" exist:
|
||||
| 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 |
|
||||
| Page contents | First page contents |
|
||||
| id_answer_editor_0 | Next page |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Second page name |
|
||||
| Page contents | Second page contents |
|
||||
| id_answer_editor_0 | Previous page |
|
||||
| id_jumpto_0 | Previous page |
|
||||
| id_answer_editor_1 | Next page |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson | content | First page name | First page contents |
|
||||
| Test lesson | content | Second page name | Second page contents |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto |
|
||||
| First page name | Next page | Next page |
|
||||
| Second page name | Previous page | Previous page |
|
||||
| Second page name | Next page | Next page |
|
||||
|
||||
Scenario: Link to gradebook for non practice lesson
|
||||
When I am on the "Test lesson" "lesson activity" page logged in as student1
|
||||
@ -48,7 +40,7 @@ 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 am on the "Test lesson" "lesson activity editing" page
|
||||
Given I am on the "Test lesson" "lesson activity editing" page logged in as teacher1
|
||||
And I set the following fields to these values:
|
||||
| Type | None |
|
||||
And I press "Save and display"
|
||||
@ -59,7 +51,7 @@ Feature: link to gradebook on the end of lesson page
|
||||
And I should not see "View grades"
|
||||
|
||||
Scenario: No link to gradebook for practice lesson
|
||||
Given I am on the "Test lesson" "lesson activity editing" page
|
||||
Given I am on the "Test lesson" "lesson activity editing" page logged in as teacher1
|
||||
And I set the following fields to these values:
|
||||
| Practice lesson | Yes |
|
||||
And I press "Save and display"
|
||||
@ -70,7 +62,8 @@ Feature: link to gradebook on the end of lesson page
|
||||
And I should not see "View grades"
|
||||
|
||||
Scenario: No link if Show gradebook to student disabled
|
||||
Given I am on "Course 1" course homepage
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Show gradebook to students | No |
|
||||
|
@ -23,13 +23,12 @@ Feature: A teacher can password protect a lesson
|
||||
| name | Test lesson |
|
||||
| usepassword | 1 |
|
||||
| password | moodle_rules |
|
||||
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"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson | content | First page name | First page contents |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto |
|
||||
| First page name | The first one | Next page |
|
||||
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"
|
||||
|
@ -42,17 +42,16 @@ Feature: In a lesson activity, a non editing teacher can grade essay questions
|
||||
And the following "activities" exist:
|
||||
| activity | name | course | idnumber |
|
||||
| lesson | Test lesson name | C1 | lesson1 |
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | essay | Essay question | <p>Please write a story about a <b>frog</b>.</p> |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | jumpto | score |
|
||||
| Essay question | Next page | 1 |
|
||||
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 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"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Essay question |
|
||||
| Page contents | <p>Please write a story about a frog.</p> |
|
||||
And I press "Save page"
|
||||
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"
|
||||
|
@ -20,6 +20,12 @@ Feature: A teacher can set a time limit for a lesson
|
||||
And the following "activities" exist:
|
||||
| activity | course | name |
|
||||
| lesson | C1 | Test lesson |
|
||||
And the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson | content | Lesson page name | Single lesson page contents |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto |
|
||||
| Lesson page name | Single button | This page |
|
||||
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:
|
||||
@ -27,12 +33,6 @@ Feature: A teacher can set a time limit for a lesson
|
||||
| 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"
|
||||
When I am on the "Test lesson" "lesson activity" page logged in as student1
|
||||
Then I should see "You have 10 secs to finish the lesson."
|
||||
And I wait "3" seconds
|
||||
|
@ -26,24 +26,15 @@ Feature: An incorrect response to an answer with multiple attempts show appropri
|
||||
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"
|
||||
And I set the field "Select a question type" to "Numerical"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Numerical question |
|
||||
| Page contents | What is 1 + 2? |
|
||||
| id_answer_editor_0 | 3 |
|
||||
| id_jumpto_0 | Next page |
|
||||
| id_answer_editor_1 | 2 |
|
||||
| id_jumpto_1 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Just move on page |
|
||||
| Page contents | You are here to move on |
|
||||
| id_answer_editor_0 | End this lesson |
|
||||
| id_jumpto_0 | End of lesson |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | numeric | Numerical question | What is 1 + 2? |
|
||||
| Test lesson name | content | Just move on page | You are here to move on |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto | score |
|
||||
| Numerical question | 3 | Next page | 1 |
|
||||
| Numerical question | 2 | Next page | 0 |
|
||||
| Just move on page | End this lesson | End of lesson | 0 |
|
||||
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"
|
||||
@ -53,22 +44,14 @@ Feature: An incorrect response to an answer with multiple attempts show appropri
|
||||
Then I should see "You are here to move on"
|
||||
|
||||
Scenario: A student answering incorrectly to a question will only see an option to try again if there is no matching wrong response.
|
||||
Given I follow "Add a question page"
|
||||
And I set the field "Select a question type" to "Numerical"
|
||||
And I press "Add a question page"
|
||||
And I set the following fields to these values:
|
||||
| Page title | Numerical question |
|
||||
| Page contents | What is 1 + 2? |
|
||||
| id_answer_editor_0 | 3 |
|
||||
| id_jumpto_0 | Next page |
|
||||
And I press "Save page"
|
||||
And I select "Add a content page" from the "qtype" singleselect
|
||||
And I set the following fields to these values:
|
||||
| Page title | Just move on page |
|
||||
| Page contents | You are here to move on |
|
||||
| id_answer_editor_0 | End this lesson |
|
||||
| id_jumpto_0 | End of lesson |
|
||||
And I press "Save page"
|
||||
Given the following "mod_lesson > page" exist:
|
||||
| lesson | qtype | title | content |
|
||||
| Test lesson name | numeric | Numerical question | What is 1 + 2? |
|
||||
| Test lesson name | content | Just move on page | You are here to move on |
|
||||
And the following "mod_lesson > answer" exist:
|
||||
| page | answer | jumpto | score |
|
||||
| Numerical question | 3 | Next page | 1 |
|
||||
| Just move on page | End this lesson | End of lesson | 0 |
|
||||
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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user