Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
@mod @mod_assign
2
Feature: Assignments can have default grades and scales defined
3
  In order to improve assignment creation
4
  As a teacher
5
  The grade and scale should be set by default
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category | groupmode |
10
      | Course 1 | C1        | 0        | 1         |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email                |
13
      | teacher1 | Teacher   | 1        | teacher1@example.com |
14
    And the following "course enrolments" exist:
15
      | user      | course  | role           |
16
      | teacher1  | C1      | editingteacher |
17
 
18
  @javascript
19
  Scenario: When creating an assignment the default grade type and grade scale are set as default in the form
20
    Given the following config values are set as admin:
21
      | config            | value | plugin     |
22
      | defaultgradetype  | 2     | mod_assign |
23
      | defaultgradescale | 2     | mod_assign |
24
    When I am on the "Course 1" course page logged in as teacher1
25
    And I wait until the page is ready
26
    And I switch editing mode on
27
    And I open the activity chooser
28
    And I click on "Add a new Assignment" "link" in the "Add an activity or resource" "dialogue"
29
    And I set the following fields to these values:
30
      | name | Test assignment |
31
    Then the following fields match these values:
32
      | grade[modgrade_type]  | Scale                    |
33
      | grade[modgrade_scale] | Default competence scale |
34
    And I press "Save and return to course"
35
    And I am on the "Test assignment" "assign activity editing" page
36
    And the following fields match these values:
37
      | grade[modgrade_type]  | Scale                    |
38
      | grade[modgrade_scale] | Default competence scale |
39
 
40
  Scenario: Editing an assignment will save the selected grade type and grade scale
41
    Given the following "activity" exists:
42
      | activity    | assign                 |
43
      | course      | C1                     |
44
      | name        | Test assignment        |
45
      | description | Assignment description |
46
      | gradetype   | 1                      |
47
      | gradescale  | 1                      |
48
    When I am on the "Test assignment" "assign activity editing" page logged in as teacher1
49
    And the following fields match these values:
50
      | grade[modgrade_type]  | Point                    |
51
      | grade[modgrade_scale] | Default competence scale |
52
    And I set the following fields to these values:
53
      | grade[modgrade_type]  | Scale                                  |
54
      | grade[modgrade_scale] | Separate and Connected ways of knowing |
55
    And I press "Save and return to course"
56
    And I am on the "Test assignment" "assign activity editing" page
57
    Then the following fields match these values:
58
      | grade[modgrade_type]  | Scale                                  |
59
      | grade[modgrade_scale] | Separate and Connected ways of knowing |
60
 
61
  Scenario: When a scale is set as the default grade scale it should be shown as in use
62
    Given the following config values are set as admin:
63
      | config            | value | plugin     |
64
      | defaultgradetype  | 2     | mod_assign |
65
      | defaultgradescale | 2     | mod_assign |
66
    When I log in as "admin"
67
    And I navigate to "Grades > Scales" in site administration
68
    Then "Default competence scale" row "Used" column of "generaltable" table should contain "Yes"
69
    And "Separate and Connected ways of knowing" row "Used" column of "generaltable" table should contain "No"
70
    And the following config values are set as admin:
71
      | config            | value | plugin     |
72
      | defaultgradetype  | 2     | mod_assign |
73
      | defaultgradescale | 1     | mod_assign |
74
    And I navigate to "Grades > Scales" in site administration
75
    And "Default competence scale" row "Used" column of "generaltable" table should contain "No"
76
    And "Separate and Connected ways of knowing" row "Used" column of "generaltable" table should contain "Yes"