This commit is contained in:
Eloy Lafuente (stronk7) 2017-01-11 02:42:29 +01:00
commit 777361983c
99 changed files with 562 additions and 543 deletions

View file

@ -36,4 +36,3 @@ Feature: In a lesson activity, teacher can import embedded images in questions a
And "//audio[contains(@title, 'Listen to this greeting:')]/source[contains(@src, 'bonjour.mp3')]" "xpath_element" should exist
And "//*[contains(@class, 'answeroption')]//img[contains(@src, 'pluginfile.php')]" "xpath_element" should exist
And "//*[contains(@class, 'answeroption')]//img[contains(@src, 'flag-france.jpg')]" "xpath_element" should exist

View file

@ -64,7 +64,7 @@ Feature: In a lesson activity, teacher can edit a cluster page
And I press "Save page"
And I click on "Add an end of cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][5]" "xpath_element"
And I click on "Add a content page" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][6]" "xpath_element"
And I set the following fields to these values:
And I set the following fields to these values:
| Page title | Second page name |
| Page contents | Content page after cluster |
| id_answer_editor_0 | Next page |

View file

@ -1,5 +1,5 @@
@mod @mod_lesson
Feature: Lesson user override
Feature: Lesson group override
In order to grant a student special access to a lesson
As a teacher
I need to create an override for that user.

View file

@ -1,96 +1,96 @@
@mod @mod_lesson
Feature: Practice mode in a lesson activity
In order to improve my students understanding of a subject
As a teacher
I need to be able to set ungraded practice lesson activites
In order to improve my students understanding of a subject
As a teacher
I need to be able to set ungraded practice lesson activites
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
# Setup a basic lesson, we'll adjust it in the scenarios later.
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
| Description | Lesson description |
And I follow "Test lesson name"
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"
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
# Setup a basic lesson, we'll adjust it in the scenarios later.
And I add a "Lesson" to section "1" and I fill the form with:
| Name | Test lesson name |
| Description | Lesson description |
And I follow "Test lesson name"
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"
Scenario: Non-practice lesson records grades in the gradebook
Given I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Name | Non-practice lesson |
| Description | This lesson will affect your course grade |
| Practice lesson | No |
And I press "Save and display"
And I log out
When I log in as "student1"
And I follow "Course 1"
And I follow "Non-practice lesson"
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
Then I should see "View grades"
And I follow "Grades" in the user menu
And I follow "Course 1"
And I should see "Non-practice lesson"
Scenario: Non-practice lesson records grades in the gradebook
Given I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Name | Non-practice lesson |
| Description | This lesson will affect your course grade |
| Practice lesson | No |
And I press "Save and display"
And I log out
When I log in as "student1"
And I follow "Course 1"
And I follow "Non-practice lesson"
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
Then I should see "View grades"
And I follow "Grades" in the user menu
And I follow "Course 1"
And I should see "Non-practice lesson"
Scenario: Practice lesson doesn't record grades in the gradebook
Given I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Name | Practice lesson |
| Description | This lesson will NOT affect your course grade |
| Practice lesson | Yes |
And I press "Save and display"
And I log out
When I log in as "student1"
And I follow "Course 1"
And I follow "Practice lesson"
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
Then I should not see "View grades"
And I follow "Grades" in the user menu
And I click on "Course 1" "link" in the "Course 1" "table_row"
And I should not see "Practice lesson"
Scenario: Practice lesson doesn't record grades in the gradebook
Given I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Name | Practice lesson |
| Description | This lesson will NOT affect your course grade |
| Practice lesson | Yes |
And I press "Save and display"
And I log out
When I log in as "student1"
And I follow "Course 1"
And I follow "Practice lesson"
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
Then I should not see "View grades"
And I follow "Grades" in the user menu
And I click on "Course 1" "link" in the "Course 1" "table_row"
And I should not see "Practice lesson"
Scenario: Practice lesson with scale doesn't record grades in the gradebook
Given I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Name | Practice lesson with scale |
| Description | This lesson will NOT affect your course grade |
| Practice lesson | Yes |
| Type | Scale |
And I press "Save and display"
And I log out
When I log in as "student1"
And I follow "Course 1"
And I follow "Practice lesson with scale"
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
Then I should not see "View grades"
And I follow "Grades" in the user menu
And I click on "Course 1" "link" in the "Course 1" "table_row"
And I should not see "Practice lesson with scale"
Scenario: Practice lesson with scale doesn't record grades in the gradebook
Given I follow "Test lesson name"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Name | Practice lesson with scale |
| Description | This lesson will NOT affect your course grade |
| Practice lesson | Yes |
| Type | Scale |
And I press "Save and display"
And I log out
When I log in as "student1"
And I follow "Course 1"
And I follow "Practice lesson with scale"
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
Then I should not see "View grades"
And I follow "Grades" in the user menu
And I click on "Course 1" "link" in the "Course 1" "table_row"
And I should not see "Practice lesson with scale"

View file

@ -75,7 +75,7 @@ Feature: In a lesson activity, students can see questions in random order
And I press "Save page"
And I click on "Add an end of cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][6]" "xpath_element"
And I click on "Add a content page" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][7]" "xpath_element"
And I set the following fields to these values:
And I set the following fields to these values:
| Page title | Third page name |
| Page contents | Content page after cluster 1 |
| id_answer_editor_0 | Next page |
@ -114,7 +114,7 @@ Feature: In a lesson activity, students can see questions in random order
And I press "Save page"
And I click on "Add an end of cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][11]" "xpath_element"
And I click on "Add a content page" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][12]" "xpath_element"
And I set the following fields to these values:
And I set the following fields to these values:
| Page title | Fourth page name |
| Page contents | Content page after cluster 2 |
| id_answer_editor_0 | Next page |

View file

@ -65,7 +65,7 @@ Feature: In a lesson activity, students can see questions in random order and a
| id_score_1 | 0 |
And I press "Save page"
And I click on "Add a content page" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][5]" "xpath_element"
And I set the following fields to these values:
And I set the following fields to these values:
| Page title | Second page name |
| Page contents | This page mark the the beginning of the subcluster it should not be seen by students |
| id_answer_editor_0 | Next page |
@ -134,7 +134,7 @@ Feature: In a lesson activity, students can see questions in random order and a
And I press "Save page"
And I click on "Add an end of cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][11]" "xpath_element"
And I click on "Add a content page" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][12]" "xpath_element"
And I set the following fields to these values:
And I set the following fields to these values:
| Page title | Third page name |
| Page contents | Content page after cluster |
| id_answer_editor_0 | Next page |