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

View File

@ -16,6 +16,14 @@ Feature: availability_grade
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | 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 @javascript
Scenario: Test condition Scenario: Test condition
@ -23,12 +31,6 @@ Feature: availability_grade
Given 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 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'. # Add a Page with a grade condition for 'any grade'.
And I add a "Page" to section "2" And I add a "Page" to section "2"
And I set the following fields to these values: And I set the following fields to these values:

View File

@ -4,20 +4,32 @@ Feature: Award badges
As an admin As an admin
I need to add criteria to badges in the system I need to add criteria to badges in the system
@javascript Background:
Scenario: Award badge on other badges as criteria Given the following "courses" exist:
Given the following "users" exist: | fullname | shortname | format | enablecompletion |
| Course 1 | C1 | topics | 1 |
And the following "users" exist:
| username | firstname | lastname | email | | username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com | | teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com | | student1 | Student | 1 | student1@example.com |
And the following "courses" exist: | student2 | Student | 2 | student2@example.com |
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And I log in as "teacher1" | 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 I log in as "teacher1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
# Create course badge 1. # Create course badge 1.
And I navigate to "Badges > Add a new badge" in current page administration And I navigate to "Badges > Add a new badge" in current page administration
@ -126,11 +138,7 @@ Feature: Award badges
@javascript @javascript
Scenario: Award site badge Scenario: Award site badge
Given the following "users" exist: Given I log in as "admin"
| username | firstname | lastname | email |
| teacher | teacher | 1 | teacher1@example.com |
| student | student | 1 | student1@example.com |
And I log in as "admin"
And I navigate to "Badges > Add a new badge" in site administration And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values: And I set the following fields to these values:
| Name | Site Badge | | Name | Site Badge |
@ -144,36 +152,22 @@ Feature: Award badges
And I press "Continue" And I press "Continue"
And I follow "Recipients (0)" And I follow "Recipients (0)"
And I press "Award badge" 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 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 press "Award badge"
And I navigate to "Badges > Manage badges" in site administration And I navigate to "Badges > Manage badges" in site administration
When I follow "Site Badge" When I follow "Site Badge"
Then I should see "Recipients (2)" Then I should see "Recipients (2)"
And I log out And I log out
And I log in as "student" And I log in as "student1"
And I follow "Profile" in the user menu And I follow "Profile" in the user menu
Then I should see "Site Badge" Then I should see "Site Badge"
@javascript @javascript
Scenario: Award course badge Scenario: Award course badge
Given the following "users" exist: Given I log in as "teacher1"
| username | firstname | lastname | email | And I am on "Course 1" course homepage
| 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"
And I navigate to "Badges > Add a new badge" in current page administration And I navigate to "Badges > Add a new badge" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| Name | Course Badge | | Name | Course Badge |
@ -203,28 +197,7 @@ Feature: Award badges
@javascript @javascript
Scenario: Award badge on activity completion Scenario: Award badge on activity completion
Given the following "courses" exist: Given I log in as "teacher1"
| 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 |
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I change window size to "large" And I change window size to "large"
And I navigate to "Badges > Add a new badge" in current page administration And I navigate to "Badges > Add a new badge" in current page administration
@ -251,29 +224,8 @@ Feature: Award badges
@javascript @javascript
Scenario: Award badge on course completion Scenario: Award badge on course completion
Given the following "courses" exist: Given I log in as "teacher1"
| 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 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 navigate to "Course completion" in current page administration
And I set the field "id_overall_aggregation" to "2" And I set the field "id_overall_aggregation" to "2"
And I click on "Condition: Activity completion" "link" And I click on "Condition: Activity completion" "link"
@ -312,20 +264,7 @@ Feature: Award badges
@javascript @javascript
Scenario: All of the selected roles can award badges Scenario: All of the selected roles can award badges
Given the following "users" exist: Given I log in as "teacher1"
| 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"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
# Create course badge 1. # Create course badge 1.
And I navigate to "Badges > Add a new badge" in current page administration And I navigate to "Badges > Add a new badge" in current page administration
@ -394,20 +333,7 @@ Feature: Award badges
@javascript @javascript
Scenario: Revoke badge Scenario: Revoke badge
Given the following "users" exist: Given I log in as "teacher1"
| 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"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I navigate to "Badges > Add a new badge" in current page administration And I navigate to "Badges > Add a new badge" in current page administration
And I set the following fields to these values: And I set the following fields to these values:

View File

@ -16,10 +16,16 @@ Feature: Restrict activity availability through date conditions
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And I log in as "teacher1" And the following "activity" exists:
And I am on "Course 1" course homepage with editing mode on | activity | assign |
# Adding the page like this because id_available*_enabled needs to be clicked to trigger the action. | course | C1 |
And I add a "Assignment" to section "1" | 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 And I expand all fieldsets
@javascript @javascript
@ -27,10 +33,6 @@ Feature: Restrict activity availability through date conditions
Given I click on "Add restriction..." "button" Given I click on "Add restriction..." "button"
And I click on "Date" "button" in the "Add restriction..." "dialogue" And I click on "Date" "button" in the "Add restriction..." "dialogue"
And I set the following fields to these values: 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[day] | 31 |
| x[month] | 12 | | x[month] | 12 |
| x[year] | 2037 | | x[year] | 2037 |
@ -46,10 +48,6 @@ Feature: Restrict activity availability through date conditions
Given I click on "Add restriction..." "button" Given I click on "Add restriction..." "button"
And I click on "Date" "button" in the "Add restriction..." "dialogue" And I click on "Date" "button" in the "Add restriction..." "dialogue"
And I set the following fields to these values: 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[day] | 1 |
| x[month] | 2 | | x[month] | 2 |
| x[year] | 2013 | | x[year] | 2013 |
@ -59,4 +57,4 @@ Feature: Restrict activity availability through date conditions
And I press "Save and return to course" And I press "Save and return to course"
And I log out And I log out
When I am on the "Course 1" course page logged in as student1 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

@ -16,6 +16,15 @@ Feature: Restrict sections availability through completion or grade conditions
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | 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 @javascript
Scenario: Show section greyed-out to student when completion condition is not satisfied 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 Scenario: Show section greyed-out to student when grade condition is not satisfied
Given 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 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: And I add a "Page" to section "2" and I fill the form with:
| Name | Test page name | | Name | Test page name |
| Description | Restricted section page resource, till grades in Grade assignment is at least 20% | | 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 As a teacher
I need to quickly change the visibility of an activity I need to quickly change the visibility of an activity
@javascript Background:
Scenario: Hide/Show toggle with javascript enabled
Given the following "users" exist: Given the following "users" exist:
| username | firstname | lastname | email | | username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com | | teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com | | student1 | Student | 1 | student1@example.com |
And the following "courses" exist: And the following "courses" exist:
| fullname | shortname | format | | fullname | shortname | format | numsections |
| Course 1 | C1 | topics | | Course 1 | C1 | topics | 2 |
And the following "course enrolments" exist: And the following "course enrolments" exist:
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And the following "activity" exists: 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 "activity" exists:
| activity | forum | | activity | forum |
| course | C1 | | course | C1 |
| idnumber | C1F1 | | idnumber | C1F1 |
@ -66,18 +71,7 @@ Feature: Toggle activities visibility from the course page
@javascript @javascript
Scenario: Activities can be made available and unavailable inside a hidden section Scenario: Activities can be made available and unavailable inside a hidden section
Given the following "users" exist: Given the following "activity" exists:
| 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:
| activity | forum | | activity | forum |
| course | C1 | | course | C1 |
| idnumber | C1F1 | | idnumber | C1F1 |
@ -125,26 +119,11 @@ Feature: Toggle activities visibility from the course page
@javascript @javascript
Scenario: Activities can be made available but not visible on a course page Scenario: Activities can be made available but not visible on a course page
Given the following "users" exist: Given the following config values are set as admin:
| 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:
| allowstealth | 1 | | allowstealth | 1 |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on And I am on "Course 1" course homepage with editing mode on
And I add the "Recent activity" block 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 When I open "Test assignment name" actions menu
Then "Test assignment name" actions menu should not have "Show" item Then "Test assignment name" actions menu should not have "Show" item
And "Test assignment name" actions menu should have "Hide" 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 | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | 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 log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on 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 When I go to "Test assignment 1 name" advanced grading definition page
# Defining a rubric. # Defining a rubric.
And I set the following fields to these values: And I set the following fields to these values:

View File

@ -17,28 +17,18 @@ Feature: We can change what we are viewing on the grader report
| user | course | role | | user | course | role |
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
And I log in as "teacher1" | student2 | C1 | student |
And I am on "Course 1" course homepage with editing mode on And the following "activities" exist:
And I add a "Assignment" to section "1" and I fill the form with: | activity | course | section | name | intro | assignsubmission_onlinetext_enabled | submissiondrafts |
| Assignment name | Test assignment name 1 | | assign | C1 | 1 | Test assignment name 1 | Submit your online text | 1 | 0 |
| Description | Submit your online text | | assign | C1 | 1 | Test assignment name 2 | submit your online text | 1 | 0 |
| assignsubmission_onlinetext_enabled | 1 | And the following "mod_assign > submissions" exist:
And I add a "Assignment" to section "1" and I fill the form with: | assign | user | onlinetext |
| Assignment name | Test assignment name 2 | | Test assignment name 1 | student1 | This is a submission for assignment 1 |
| Description | Submit your online text | | Test assignment name 2 | student1 | This is a submission for assignment 2 |
| assignsubmission_onlinetext_enabled | 1 |
And I log out
And I am on the "Test assignment name 1" "assign activity" page logged in as student1 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" Then I should see "Submitted for grading"
And I am on the "Test assignment name 2" "assign activity" page 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" Then I should see "Submitted for grading"
And I log out And I log out
And I log in as "teacher1" And I log in as "teacher1"
@ -89,9 +79,6 @@ Feature: We can change what we are viewing on the grader report
| capability | permission | | capability | permission |
| moodle/grade:viewhidden | Prevent | | moodle/grade:viewhidden | Prevent |
And I log out And I log out
And the following "course enrolments" exist:
| user | course | role |
| student2 | C1 | student |
And I log in as "teacher1" And I log in as "teacher1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook And I navigate to "View > Grader report" in the course gradebook

View File

@ -21,14 +21,12 @@ Feature: A teacher checks the grade history report in a course
| teacher2 | C1 | editingteacher | | teacher2 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
| student2 | 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 log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on 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 navigate to "View > Grader report" in the course gradebook
And I turn editing mode on 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" And I give the grade "50.00" to the user "Student 1" for the grade item "The greatest assignment ever"

View File

@ -18,13 +18,22 @@ Feature: We can set the grade to pass value
And the following "scales" exist: And the following "scales" exist:
| name | scale | | name | scale |
| Test Scale 1 | Disappointing, Good, Very good, Excellent | | 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 log in as "teacher1"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
@javascript @javascript
Scenario: Validate that switching the type of grading used correctly disables grade to pass Scenario: Validate that switching the type of grading used correctly disables grade to pass
When I turn editing mode on Given I turn editing mode on
And I add a "Assignment" to section "1" 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 expand all fieldsets
And I set the field "grade[modgrade_type]" to "Point" And I set the field "grade[modgrade_type]" to "Point"
Then the "Grade to pass" "field" should be enabled Then the "Grade to pass" "field" should be enabled
@ -35,22 +44,20 @@ Feature: We can set the grade to pass value
@javascript @javascript
Scenario: Create an activity with a Grade to pass value greater than the maximum grade Scenario: Create an activity with a Grade to pass value greater than the maximum grade
When I turn editing mode on When I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with: And I am on the "Test Assignment 1" "assign activity" page
| Assignment name | Test Assignment 1 | And I navigate to "Settings" in current page administration
| Description | Submit your online text | And I expand all fieldsets
| assignsubmission_onlinetext_enabled | 1 | And I set the field "grade[modgrade_type]" to "Point"
| grade[modgrade_type] | Point | And I set the field "grade[modgrade_point]" to "50"
| grade[modgrade_point] | 50 | And I set the field "Grade to pass" to "100"
| Grade to pass | 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" Then I should see "The grade to pass can not be greater than the maximum possible grade 50"
And I press "Cancel" And I press "Cancel"
@javascript
Scenario: Set a valid grade to pass for an assignment activity using points Scenario: Set a valid grade to pass for an assignment activity using points
Given the following "activities" exist: When I turn editing mode on
| activity | name | intro | course | section | idnumber | And I am on the "Test Assignment 1" "assign activity" page
| 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"
And I navigate to "Settings" in current page administration And I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| assignsubmission_onlinetext_enabled | 1 | | assignsubmission_onlinetext_enabled | 1 |
@ -59,12 +66,11 @@ Feature: We can set the grade to pass value
| Grade to pass | 25 | | Grade to pass | 25 |
And I press "Save and return to course" And I press "Save and return to course"
And I navigate to "View > Grader report" in the course gradebook 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" And I click on "Edit assign Test Assignment 1" "link"
Then the field "Grade to pass" matches value "25" Then the field "Grade to pass" matches value "25"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Test Assignment 1" And I am on the "Test Assignment 1" "assign activity" page
And I follow "Settings" And I navigate to "Settings" in current page administration
And I expand all fieldsets And I expand all fieldsets
And I set the field "Grade to pass" to "30" And I set the field "Grade to pass" to "30"
And I press "Save and return to course" 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 I click on "Edit assign Test Assignment 1" "link"
And the field "Grade to pass" matches value "30" And the field "Grade to pass" matches value "30"
@javascript
Scenario: Set a valid grade to pass for an assignment activity using scales Scenario: Set a valid grade to pass for an assignment activity using scales
Given the following "activities" exist: When I turn editing mode on
| activity | name | intro | course | section | idnumber | And I am on the "Test Assignment 1" "assign activity" page
| 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"
And I navigate to "Settings" in current page administration And I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| grade[modgrade_type] | Scale | | 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 set the field "Grade to pass" to "4"
And I press "Save changes" And I press "Save changes"
And I am on "Course 1" course homepage And I am on "Course 1" course homepage
And I follow "Test Assignment 1" And I am on the "Test Assignment 1" "assign activity" page
And I follow "Settings" And I navigate to "Settings" in current page administration
And the field "Grade to pass" matches value "4" And the field "Grade to pass" matches value "4"
@javascript
Scenario: Set a invalid grade to pass for an assignment activity using scales Scenario: Set a invalid grade to pass for an assignment activity using scales
Given the following "activities" exist: When I turn editing mode on
| activity | name | intro | course | section | idnumber | And I am on the "Test Assignment 1" "assign activity" page
| 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"
And I navigate to "Settings" in current page administration And I navigate to "Settings" in current page administration
And I set the following fields to these values: And I set the following fields to these values:
| grade[modgrade_type] | Scale | | grade[modgrade_type] | Scale |

View File

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

View File

@ -20,16 +20,17 @@ Feature: Bulk released grades should not be sent to gradebook while submissions
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
# Add the assignment. # Add the assignment.
And I log in as "teacher1" And the following "activity" exists:
And I am on "Course 1" course homepage with editing mode on | activity | assign |
And I add a "Assignment" to section "1" and I fill the form with: | course | C1 |
| Assignment name | Test assignment name | | name | Test assignment name |
| Description | Test assignment description | | intro | Test assignment description |
| Online text | 1 | | assignsubmission_onlinetext_enabled | 1 |
| File submissions | 0 | | assignsubmission_file_enabled | 0 |
| Use marking workflow | Yes | | markingworkflow | 1 |
| Anonymous submissions | Yes | | blindmarking | 1 |
And I log out | assignfeedback_comments_enabled | 1 |
| assignfeedback_editpdf_enabled | 1 |
# Add a submission. # Add a submission.
And I am on the "Test assignment name" "assign activity" page logged in as "student1" And I am on the "Test assignment name" "assign activity" page logged in as "student1"
Then I should not see "Feedback" Then I should not see "Feedback"