Merge branch 'MDL-72655-master' of https://github.com/andelacruz/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2021-11-03 19:03:22 +01:00
commit 3873af5626
12 changed files with 226 additions and 369 deletions

View File

@ -14,6 +14,10 @@ Feature: Basic recycle bin functionality
| fullname | shortname |
| Course 1 | C1 |
| Course 2 | C2 |
And the following "activities" exist:
| activity | course | section | name | intro |
| assign | C1 | 1 | Test assign 1 | Test 1 |
| assign | C1 | 1 | Test assign 2 | Test 2 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@ -43,23 +47,16 @@ Feature: Basic recycle bin functionality
Scenario: Restore a deleted assignment
Given I log in as "teacher1"
And the following "activity" exists:
| activity | assign |
| name | Test assign |
| intro | Test |
| course | C1 |
| idnumber | 0001 |
| section | 1 |
And I am on "Course 1" course homepage with editing mode on
And I delete "Test assign" activity
And I delete "Test assign 1" activity
When I navigate to "Recycle bin" in current page administration
Then I should see "Test assign"
Then I should see "Test assign 1"
And I should see "Contents will be permanently deleted after 7 days"
And I click on "Restore" "link" in the "region-main" "region"
And I should see "'Test assign' has been restored"
And I should see "'Test assign 1' has been restored"
And I wait to be redirected
And I am on "Course 1" course homepage
And I should see "Test assign" in the "Topic 1" "section"
And I should see "Test assign 1" in the "Topic 1" "section"
Scenario: Restore a deleted course
Given I log in as "admin"
@ -91,31 +88,22 @@ Feature: Basic recycle bin functionality
Scenario: Deleting a single item from the recycle bin
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assign |
| Description | Test |
And I delete "Test assign" activity
And I delete "Test assign 1" activity
And I run all adhoc tasks
And I navigate to "Recycle bin" in current page administration
When I click on "Delete" "link"
Then I should see "Are you sure you want to delete the selected item from the recycle bin?"
And I click on "Cancel" "button" in the "Confirmation" "dialogue"
And I should see "Test assign"
And I should see "Test assign 1"
And I click on "Delete" "link"
And I press "Yes"
And I should see "'Test assign' has been deleted"
And I should see "'Test assign 1' has been deleted"
And I should see "There are no items in the recycle bin."
@javascript
Scenario: Deleting all the items from the recycle bin
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assign 1 |
| Description | Test 1 |
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assign 2 |
| Description | Test 2 |
And I delete "Test assign 1" activity
And I delete "Test assign 2" activity
And I run all adhoc tasks

View File

@ -16,6 +16,14 @@ Feature: availability_grade
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
# Add an assignment.
And the following "activity" exists:
| activity | assign |
| course | C1 |
| section | 1 |
| name | A1 |
| intro | x |
| assignsubmission_onlinetext_enabled | 1 |
@javascript
Scenario: Test condition
@ -23,12 +31,6 @@ Feature: availability_grade
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
# Add an assignment.
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | A1 |
| Description | x |
| Online text | 1 |
# Add a Page with a grade condition for 'any grade'.
And I add a "Page" to section "2"
And I set the following fields to these values:

View File

@ -4,20 +4,32 @@ Feature: Award badges
As an admin
I need to add criteria to badges in the system
Background:
Given the following "courses" exist:
| fullname | shortname | format | enablecompletion |
| Course 1 | C1 | topics | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| section | 1 |
| name | Test assignment name |
| intro | Submit your online text |
| completion | 1 |
| assignsubmission_onlinetext_enabled | 1 |
@javascript
Scenario: Award badge on other badges as criteria
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 | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
Given I log in as "teacher1"
And I am on "Course 1" course homepage
# Create course badge 1.
And I navigate to "Badges > Add a new badge" in current page administration
@ -126,11 +138,7 @@ Feature: Award badges
@javascript
Scenario: Award site badge
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher | teacher | 1 | teacher1@example.com |
| student | student | 1 | student1@example.com |
And I log in as "admin"
Given I log in as "admin"
And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge |
@ -144,36 +152,22 @@ Feature: Award badges
And I press "Continue"
And I follow "Recipients (0)"
And I press "Award badge"
And I set the field "potentialrecipients[]" to "teacher 1 (teacher1@example.com)"
And I set the field "potentialrecipients[]" to "Teacher 1 (teacher1@example.com)"
And I press "Award badge"
And I set the field "potentialrecipients[]" to "student 1 (student1@example.com)"
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)"
And I press "Award badge"
And I navigate to "Badges > Manage badges" in site administration
When I follow "Site Badge"
Then I should see "Recipients (2)"
And I log out
And I log in as "student"
And I log in as "student1"
And I follow "Profile" in the user menu
Then I should see "Site Badge"
@javascript
Scenario: Award course badge
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the "multilang" filter is "on"
And the "multilang" filter applies to "content and headings"
And the following "courses" exist:
| fullname | shortname | category | groupmode |
| <span class="multilang" lang="en">Course 1</span><span class="multilang" lang="de">Kurs 1</span> | C1 | 0 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I am on the "C1" "Course" page logged in as "teacher1"
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Badges > Add a new badge" in current page administration
And I set the following fields to these values:
| Name | Course Badge |
@ -203,28 +197,7 @@ Feature: Award badges
@javascript
Scenario: Award badge on activity completion
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And 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:
| Enable completion tracking | Yes |
And I press "Save and display"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Submit your online text |
| id_completion | 1 |
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I change window size to "large"
And I navigate to "Badges > Add a new badge" in current page administration
@ -251,29 +224,8 @@ Feature: Award badges
@javascript
Scenario: Award badge on course completion
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
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:
| Enable completion tracking | Yes |
And I press "Save and display"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| id_completion | 1 |
And I navigate to "Course completion" in current page administration
And I set the field "id_overall_aggregation" to "2"
And I click on "Condition: Activity completion" "link"
@ -312,20 +264,7 @@ Feature: Award badges
@javascript
Scenario: All of the selected roles can award badges
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1"
Given I log in as "teacher1"
And I am on "Course 1" course homepage
# Create course badge 1.
And I navigate to "Badges > Add a new badge" in current page administration
@ -394,20 +333,7 @@ Feature: Award badges
@javascript
Scenario: Revoke badge
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1"
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Badges > Add a new badge" in current page administration
And I set the following fields to these values:

View File

@ -7,19 +7,25 @@ Feature: Restrict activity availability through date conditions
Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
# Adding the page like this because id_available*_enabled needs to be clicked to trigger the action.
And I add a "Assignment" to section "1"
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| section | 1 |
| name | Test assignment 1 |
| intro | This assignment is restricted by date |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
And I am on the "Test assignment 1" "assign activity" page logged in as "teacher1"
And I navigate to "Settings" in current page administration
And I expand all fieldsets
@javascript
@ -27,10 +33,6 @@ Feature: Restrict activity availability through date conditions
Given I click on "Add restriction..." "button"
And I click on "Date" "button" in the "Add restriction..." "dialogue"
And I set the following fields to these values:
| Assignment name | Test assignment 1 |
| Description | This assignment is restricted by date |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| x[day] | 31 |
| x[month] | 12 |
| x[year] | 2037 |
@ -46,10 +48,6 @@ Feature: Restrict activity availability through date conditions
Given I click on "Add restriction..." "button"
And I click on "Date" "button" in the "Add restriction..." "dialogue"
And I set the following fields to these values:
| Assignment name | Test assignment 2 |
| Description | This assignment is restricted by date |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| x[day] | 1 |
| x[month] | 2 |
| x[year] | 2013 |
@ -59,4 +57,4 @@ Feature: Restrict activity availability through date conditions
And I press "Save and return to course"
And I log out
When I am on the "Course 1" course page logged in as student1
Then I should not see "Test assignment 2" in the "page" "region"
Then I should not see "Test assignment 1" in the "page" "region"

View File

@ -7,15 +7,24 @@ Feature: Restrict sections availability through completion or grade conditions
Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| section | 1 |
| name | Grade assignment |
| intro | Grade this assignment to revoke restriction on restricted assignment |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| submissiondrafts | 0 |
@javascript
Scenario: Show section greyed-out to student when completion condition is not satisfied
@ -53,11 +62,6 @@ Feature: Restrict sections availability through completion or grade conditions
Scenario: Show section greyed-out to student when grade condition is not satisfied
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Grade assignment |
| Description | Grade this assignment to revoke restriction on restricted assignment |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
And I add a "Page" to section "2" and I fill the form with:
| Name | Test page name |
| Description | Restricted section page resource, till grades in Grade assignment is at least 20% |

View File

@ -4,20 +4,25 @@ Feature: Toggle activities visibility from the course page
As a teacher
I need to quickly change the visibility of an activity
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 | format | numsections |
| Course 1 | C1 | topics | 2 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | course | section | idnumber | name | intro | id_visible |
| assign | C1 | 1 | 1 | Test assignment name | Test assignment description | 1 |
@javascript
Scenario: Hide/Show toggle with javascript enabled
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 | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
Given the following "activity" exists:
| activity | forum |
| course | C1 |
| idnumber | C1F1 |
@ -66,18 +71,7 @@ Feature: Toggle activities visibility from the course page
@javascript
Scenario: Activities can be made available and unavailable inside a hidden section
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 | format | numsections |
| Course 1 | C1 | topics | 2 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
Given the following "activity" exists:
| activity | forum |
| course | C1 |
| idnumber | C1F1 |
@ -125,26 +119,11 @@ Feature: Toggle activities visibility from the course page
@javascript
Scenario: Activities can be made available but not visible on a course page
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 | format | numsections |
| Course 1 | C1 | topics | 2 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin:
Given the following config values are set as admin:
| allowstealth | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add the "Recent activity" block
And I add a "Assignment" to section "2" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Test assignment description |
| Availability | Show on course page |
When I open "Test assignment name" actions menu
Then "Test assignment name" actions menu should not have "Show" item
And "Test assignment name" actions menu should have "Hide" item

View File

@ -17,12 +17,17 @@ Feature: Rubrics can be created and edited
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| section | 1 |
| name | Test assignment 1 name |
| intro | Test assignment description |
| assignfeedback_comments_enabled | 1 |
| assignfeedback_editpdf_enabled | 1 |
| advancedgradingmethod_submissions | rubric |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment 1 name |
| Description | Test assignment description |
| Grading method | Rubric |
When I go to "Test assignment 1 name" advanced grading definition page
# Defining a rubric.
And I set the following fields to these values:

View File

@ -7,38 +7,28 @@ Feature: We can change what we are viewing on the grader report
Background:
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
| Course 1 | C1 | topics |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 1 | student2@example.com |
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 1 | student2@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name 1 |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name 2 |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
And I log out
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "activities" exist:
| activity | course | section | name | intro | assignsubmission_onlinetext_enabled | submissiondrafts |
| assign | C1 | 1 | Test assignment name 1 | Submit your online text | 1 | 0 |
| assign | C1 | 1 | Test assignment name 2 | submit your online text | 1 | 0 |
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Test assignment name 1 | student1 | This is a submission for assignment 1 |
| Test assignment name 2 | student1 | This is a submission for assignment 2 |
And I am on the "Test assignment name 1" "assign activity" page logged in as student1
When I press "Add submission"
And I set the following fields to these values:
| Online text | This is a submission for assignment 1 |
And I press "Save changes"
Then I should see "Submitted for grading"
And I am on the "Test assignment name 2" "assign activity" page
When I press "Add submission"
And I set the following fields to these values:
| Online text | This is a submission for assignment 2 |
And I press "Save changes"
Then I should see "Submitted for grading"
And I log out
And I log in as "teacher1"
@ -89,9 +79,6 @@ Feature: We can change what we are viewing on the grader report
| capability | permission |
| moodle/grade:viewhidden | Prevent |
And I log out
And the following "course enrolments" exist:
| user | course | role |
| student2 | C1 | student |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook

View File

@ -8,27 +8,25 @@ Feature: A teacher checks the grade history report in a course
Scenario: Check the history report displays results correctly
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| teacher2 | Teacher | 2 | teacher2@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| teacher2 | Teacher | 2 | teacher2@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher2 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher2 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "activities" exist:
| activity | course | section | name | intro |
| assign | C1 | 1 | The greatest assignment ever | Write a behat test for Moodle - it's amazing |
| assign | C1 | 1 | Rewarding assignment | After writing your behat test go grab a beer! |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | The greatest assignment ever |
| Description | Write a behat test for Moodle - it's amazing! |
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Rewarding assignment |
| Description | After writing your behat test go grab a beer! |
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "50.00" to the user "Student 1" for the grade item "The greatest assignment ever"

View File

@ -7,24 +7,33 @@ Feature: We can set the grade to pass value
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | format | numsections |
| Course 1 | C1 | weeks | 5 |
| Course 1 | C1 | weeks | 5 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "scales" exist:
| name | scale |
| name | scale |
| Test Scale 1 | Disappointing, Good, Very good, Excellent |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| section | 1 |
| idnumber | assign1 |
| name | Test Assignment 1 |
| intro | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
@javascript
Scenario: Validate that switching the type of grading used correctly disables grade to pass
When I turn editing mode on
And I add a "Assignment" to section "1"
Given I turn editing mode on
And I am on the "Test Assignment 1" "assign activity" page
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "grade[modgrade_type]" to "Point"
Then the "Grade to pass" "field" should be enabled
@ -35,22 +44,20 @@ Feature: We can set the grade to pass value
@javascript
Scenario: Create an activity with a Grade to pass value greater than the maximum grade
When I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test Assignment 1 |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| grade[modgrade_type] | Point |
| grade[modgrade_point] | 50 |
| Grade to pass | 100 |
And I am on the "Test Assignment 1" "assign activity" page
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "grade[modgrade_type]" to "Point"
And I set the field "grade[modgrade_point]" to "50"
And I set the field "Grade to pass" to "100"
And I press "Save and return to course"
Then I should see "The grade to pass can not be greater than the maximum possible grade 50"
And I press "Cancel"
@javascript
Scenario: Set a valid grade to pass for an assignment activity using points
Given the following "activities" exist:
| activity | name | intro | course | section | idnumber |
| assign | Test Assignment 1 | Submit your online text | C1 | 1 | assign1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Assignment 1"
When I turn editing mode on
And I am on the "Test Assignment 1" "assign activity" page
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| assignsubmission_onlinetext_enabled | 1 |
@ -59,12 +66,11 @@ Feature: We can set the grade to pass value
| Grade to pass | 25 |
And I press "Save and return to course"
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I click on "Edit assign Test Assignment 1" "link"
Then the field "Grade to pass" matches value "25"
And I am on "Course 1" course homepage
And I follow "Test Assignment 1"
And I follow "Settings"
And I am on the "Test Assignment 1" "assign activity" page
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "Grade to pass" to "30"
And I press "Save and return to course"
@ -72,12 +78,10 @@ Feature: We can set the grade to pass value
And I click on "Edit assign Test Assignment 1" "link"
And the field "Grade to pass" matches value "30"
@javascript
Scenario: Set a valid grade to pass for an assignment activity using scales
Given the following "activities" exist:
| activity | name | intro | course | section | idnumber |
| assign | Test Assignment 1 | Submit your online text | C1 | 1 | assign1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Assignment 1"
When I turn editing mode on
And I am on the "Test Assignment 1" "assign activity" page
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| grade[modgrade_type] | Scale |
@ -91,16 +95,14 @@ Feature: We can set the grade to pass value
And I set the field "Grade to pass" to "4"
And I press "Save changes"
And I am on "Course 1" course homepage
And I follow "Test Assignment 1"
And I follow "Settings"
And I am on the "Test Assignment 1" "assign activity" page
And I navigate to "Settings" in current page administration
And the field "Grade to pass" matches value "4"
@javascript
Scenario: Set a invalid grade to pass for an assignment activity using scales
Given the following "activities" exist:
| activity | name | intro | course | section | idnumber |
| assign | Test Assignment 1 | Submit your online text | C1 | 1 | assign1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Assignment 1"
When I turn editing mode on
And I am on the "Test Assignment 1" "assign activity" page
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| grade[modgrade_type] | Scale |

View File

@ -6,31 +6,29 @@ Feature: Using the activity grade form element
Background:
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 | groupmode |
| Course 1 | C1 | 0 | 1 |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "scales" exist:
| name | scale |
| ABCDEF | F,E,D,C,B,A |
| Letter scale | Disappointing, Good, Very good, Excellent |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| section | 1 |
| name | Test assignment name |
| intro | Test assignment description |
Scenario: Being able to change the grade type, scale and maximum grade when there are no grades
Given I log in as "admin"
And I navigate to "Grades > Scales" in site administration
And I press "Add a new scale"
And I set the following fields to these values:
| Name | ABCDEF |
| Scale | F,E,D,C,B,A |
And I press "Save changes"
And I press "Add a new scale"
And I set the following fields to these values:
| Name | Letter scale |
| Scale | Disappointing, Good, Very good, Excellent |
And I press "Save changes"
And I log out
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| forum | Test forum name | Test forum description | C1 | forum1 |
@ -65,20 +63,7 @@ Feature: Using the activity grade form element
@javascript
Scenario: Attempting to change the scale when grades already exist in rating activity
Given I log in as "admin"
And I navigate to "Grades > Scales" in site administration
And I press "Add a new scale"
And I set the following fields to these values:
| Name | ABCDEF |
| Scale | F,E,D,C,B,A |
And I press "Save changes"
And I press "Add a new scale"
And I set the following fields to these values:
| Name | Letter scale |
| Scale | Disappointing, Good, Very good, Excellent |
And I press "Save changes"
And I log out
And I log in as "teacher1"
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
@ -114,26 +99,12 @@ Feature: Using the activity grade form element
@javascript
Scenario: Attempting to change the scale when grades already exist in non-rating activity
Given I log in as "admin"
And I navigate to "Grades > Scales" in site administration
And I press "Add a new scale"
Given I am on the "Test assignment name" "assign activity" page logged in as "teacher1"
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Name | ABCDEF |
| Scale | F,E,D,C,B,A |
And I press "Save changes"
And I press "Add a new scale"
And I set the following fields to these values:
| Name | Letter scale |
| Scale | Disappointing, Good, Very good, Excellent |
And I press "Save changes"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Test assignment description |
| grade[modgrade_type] | Scale |
| grade[modgrade_scale] | ABCDEF |
And I press "Save and display"
And I am on the "Test assignment name" "assign activity" page
And I navigate to "View all submissions" in current page administration
And I click on "Grade" "link" in the "Student 1" "table_row"
@ -181,11 +152,7 @@ Feature: Using the activity grade form element
@javascript
Scenario: Attempting to change the maximum grade when no rescaling option has been chosen
Given the following "activity" exists:
| course | C1 |
| activity | assign |
| name | Test assign name |
And I am on the "Test assign name" "assign activity" page logged in as teacher1
Given I am on the "Test assignment name" "assign activity" page logged in as teacher1
And I navigate to "View all submissions" in current page administration
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade out of 100" to "50"

View File

@ -8,28 +8,29 @@ Feature: Bulk released grades should not be sent to gradebook while submissions
Background:
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
# Add the assignment.
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Test assignment description |
| Online text | 1 |
| File submissions | 0 |
| Use marking workflow | Yes |
| Anonymous submissions | Yes |
And I log out
And the following "activity" exists:
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Test assignment description |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| markingworkflow | 1 |
| blindmarking | 1 |
| assignfeedback_comments_enabled | 1 |
| assignfeedback_editpdf_enabled | 1 |
# Add a submission.
And I am on the "Test assignment name" "assign activity" page logged in as "student1"
Then I should not see "Feedback"