AutorÃa | Ultima modificación | Ver Log |
@mod @mod_workshopFeature: Setting grades to pass via workshop editing formIn order to define grades to passAs a teacherI can set them in the workshop settings form, without the need to go to the gradebookBackground:Given the following "users" exist:| username | firstname | lastname | email || teacher1 | Terry1 | Teacher1 | teacher1@example.com |And the following "courses" exist:| fullname | shortname || Course1 | c1 |And the following "course enrolments" exist:| user | course | role || teacher1 | c1 | editingteacher |Scenario: Adding a new workshop with grade to pass field setGiven the following "activities" exist:| activity | name | course | idnumber || workshop | Awesome workshop | c1 | workshop1 |When I am on the "Awesome workshop" "workshop activity editing" page logged in as teacher1And I set the field "Submission grade to pass" to "45"And I set the field "Assessment grade to pass" to "10.5"And I press "Save and return to course"And I am on the "Awesome workshop" "workshop activity editing" pageThen the field "Submission grade to pass" matches value "45.00"And the field "Assessment grade to pass" matches value "10.50"@javascriptScenario: Grade to pass kept even with submission types without online text (MDL-64862)Given the following "activities" exist:| activity | course | name | submissiongradepass | gradinggradepass | submissiontypetextavailable || workshop | c1 | Another workshop | 42 | 10.1 | 0 |When I am on the "Course1" course page logged in as teacher1Then I should not see "New Workshop"And I am on the "Another workshop" "workshop activity editing" pageAnd the field "Submission grade to pass" matches value "42.00"And the field "Assessment grade to pass" matches value "10.10"Scenario: Adding a new workshop with grade to pass fields left emptyGiven the following "activities" exist:| activity | name | course | idnumber || workshop | Another awesome workshop | c1 | workshop1 |When I am on the "Another awesome workshop" "workshop activity editing" page logged in as teacher1Then the field "Submission grade to pass" matches value "0.00"And the field "Assessment grade to pass" matches value "0.00"Scenario: Adding a new workshop with non-numeric value of a grade to passGiven the following "activities" exist:| activity | name | course | idnumber | section || workshop | Another awesome workshop | c1 | workshop1 | 1 |When I am on the "Another awesome workshop" "workshop activity editing" page logged in as teacher1And I set the field "Assessment grade to pass" to "You shall not pass!"And I press "Save and return to course"Then I should see "Edit settings"And I should see "You must enter a number here"Scenario: Adding a new workshop with invalid value of a grade to passGiven the following "activities" exist:| activity | name | course | idnumber | section || workshop | Almost awesome workshop | c1 | workshop1 | 1 |When I am on the "Almost awesome workshop" "workshop activity editing" page logged in as teacher1And I set the field "Assessment grade to pass" to "10000000"And I press "Save and return to course"Then I should see "Edit settings"And I should see "The grade to pass can not be greater than the maximum possible grade"Scenario: Emptying grades to pass fields sets them to zeroGiven the following "activities" exist:| activity | name | course | idnumber | section || workshop | Super awesome workshop | c1 | workshop1 | 1 |When I am on the "Super awesome workshop" "workshop activity editing" page logged in as teacher1And I set the field "Submission grade to pass" to "59.99"And I set the field "Assessment grade to pass" to "0.000"And I press "Save and return to course"And I should not see "Edit settings"And I am on the "Super awesome workshop" "workshop activity editing" pageAnd the field "Submission grade to pass" matches value "59.99"And the field "Assessment grade to pass" matches value "0.00"When I set the field "Submission grade to pass" to ""And I set the field "Assessment grade to pass" to ""And I press "Save and display"Then I should not see "New Workshop"And I am on the "Super awesome workshop" "workshop activity editing" pageAnd the field "Submission grade to pass" matches value "0.00"And the field "Assessment grade to pass" matches value "0.00"