AutorÃa | Ultima modificación | Ver Log |
@mod @mod_assignFeature: Assignments can have default grades and scales definedIn order to improve assignment creationAs a teacherThe grade and scale should be set by defaultBackground:Given the following "courses" exist:| fullname | shortname | category | groupmode || Course 1 | C1 | 0 | 1 |And the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher |@javascriptScenario: When creating an assignment the default grade type and grade scale are set as default in the formGiven the following config values are set as admin:| config | value | plugin || defaultgradetype | 2 | mod_assign || defaultgradescale | 2 | mod_assign |When I am on the "Course 1" course page logged in as teacher1And I wait until the page is readyAnd I switch editing mode onAnd I open the activity chooserAnd I click on "Add a new Assignment" "link" in the "Add an activity or resource" "dialogue"And I set the following fields to these values:| name | Test assignment |Then the following fields match these values:| grade[modgrade_type] | Scale || grade[modgrade_scale] | Default competence scale |And I press "Save and return to course"And I am on the "Test assignment" "assign activity editing" pageAnd the following fields match these values:| grade[modgrade_type] | Scale || grade[modgrade_scale] | Default competence scale |Scenario: Editing an assignment will save the selected grade type and grade scaleGiven the following "activity" exists:| activity | assign || course | C1 || name | Test assignment || description | Assignment description || gradetype | 1 || gradescale | 1 |When I am on the "Test assignment" "assign activity editing" page logged in as teacher1And the following fields match these values:| grade[modgrade_type] | Point || grade[modgrade_scale] | Default competence scale |And I set the following fields to these values:| grade[modgrade_type] | Scale || grade[modgrade_scale] | Separate and Connected ways of knowing |And I press "Save and return to course"And I am on the "Test assignment" "assign activity editing" pageThen the following fields match these values:| grade[modgrade_type] | Scale || grade[modgrade_scale] | Separate and Connected ways of knowing |Scenario: When a scale is set as the default grade scale it should be shown as in useGiven the following config values are set as admin:| config | value | plugin || defaultgradetype | 2 | mod_assign || defaultgradescale | 2 | mod_assign |When I log in as "admin"And I navigate to "Grades > Scales" in site administrationThen "Default competence scale" row "Used" column of "generaltable" table should contain "Yes"And "Separate and Connected ways of knowing" row "Used" column of "generaltable" table should contain "No"And the following config values are set as admin:| config | value | plugin || defaultgradetype | 2 | mod_assign || defaultgradescale | 1 | mod_assign |And I navigate to "Grades > Scales" in site administrationAnd "Default competence scale" row "Used" column of "generaltable" table should contain "No"And "Separate and Connected ways of knowing" row "Used" column of "generaltable" table should contain "Yes"