Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_activity_results @javascript
2
Feature: The activity results block displays student low scores as scales
3
  In order to be display student scores as scales
4
  As a user
5
  I need to see the activity results block
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email | idnumber |
10
      | teacher1 | Teacher | 1 | teacher1@example.com | T1 |
11
      | student1 | Student | 1 | student1@example.com | S1 |
12
      | student2 | Student | 2 | student2@example.com | S2 |
13
      | student3 | Student | 3 | student3@example.com | S3 |
14
      | student4 | Student | 4 | student4@example.com | S4 |
15
      | student5 | Student | 5 | student5@example.com | S5 |
16
    And the following "courses" exist:
17
      | fullname | shortname | category |
18
      | Course 1 | C1 | 0 |
19
    And the following "course enrolments" exist:
20
      | user | course | role |
21
      | teacher1 | C1 | editingteacher |
22
      | student1 | C1 | student |
23
      | student2 | C1 | student |
24
      | student3 | C1 | student |
25
      | student4 | C1 | student |
26
      | student5 | C1 | student |
27
    Given the following "activity" exists:
28
      | activity                      | assign                          |
29
      | name                          | Test assignment                 |
30
      | intro                         | Offline text                    |
31
      | course                        | C1                              |
32
      | idnumber                      | 0001                            |
33
      | section                       | 1                               |
34
      | assignsubmission_file_enabled | 0                               |
35
    And the following "scales" exist:
36
      | name     | scale                                                                |
37
      | My Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
38
    And I am on the "Test assignment" "assign activity editing" page logged in as teacher1
39
    And I set the following fields to these values:
40
      | id_grade_modgrade_type | Scale |
41
      | id_grade_modgrade_scale | My Scale |
42
    And I press "Save and return to course"
43
    And I turn editing mode on
44
    And I am on the "Course 1" "grades > Grader report > View" page
45
    And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
46
    And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
47
    And I give the grade "Good" to the user "Student 3" for the grade item "Test assignment"
48
    And I give the grade "Average" to the user "Student 4" for the grade item "Test assignment"
49
    And I give the grade "Not good enough" to the user "Student 5" for the grade item "Test assignment"
50
    And I press "Save changes"
51
    And I am on "Course 1" course homepage
52
 
53
  Scenario: Configure the block on the course page to show 1 low score
54
    Given I add the "Activity results" block to the default region with:
55
      | config_showbest | 0 |
56
      | config_showworst | 1 |
57
      | config_gradeformat | Percentages |
58
      | config_nameformat | Display full names |
59
      | config_decimalpoints | 0 |
60
    Then I should see "Student 5" in the "Activity results" "block"
61
    And I should see "Not good enough" in the "Activity results" "block"
62
 
63
  Scenario: Try to configure the block on the course page to show multiple low scores using full names
64
    Given I add the "Activity results" block to the default region with:
65
      | config_showbest | 0 |
66
      | config_showworst | 3 |
67
      | config_nameformat | Display full names |
68
    Then I should see "Student 5" in the "Activity results" "block"
69
    And I should see "Not good enough" in the "Activity results" "block"
70
    And I should see "Student 4" in the "Activity results" "block"
71
    And I should see "Average" in the "Activity results" "block"
72
    And I should see "Student 3" in the "Activity results" "block"
73
    And I should see "Good" in the "Activity results" "block"
74
 
75
  Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers
76
    Given the following config values are set as admin:
77
      | showuseridentity | idnumber,email |
78
    And I add the "Activity results" block to the default region with:
79
      | config_showbest | 0 |
80
      | config_showworst | 3 |
81
      | config_nameformat | Display only ID numbers |
82
    Then I should see "User S5" in the "Activity results" "block"
83
    And I should see "Not good enough" in the "Activity results" "block"
84
    And I should see "User S4" in the "Activity results" "block"
85
    And I should see "Average" in the "Activity results" "block"
86
    And I should see "User S3" in the "Activity results" "block"
87
    And I should see "Good" in the "Activity results" "block"
88
 
89
  Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names
90
    Given I add the "Activity results" block to the default region with:
91
      | config_showbest | 0 |
92
      | config_showworst | 3 |
93
      | config_nameformat | Anonymous results |
94
    Then I should see "User" in the "Activity results" "block"
95
    And I should not see "Student 5" in the "Activity results" "block"
96
    And I should see "Not good enough" in the "Activity results" "block"
97
    And I should not see "Student 4" in the "Activity results" "block"
98
    And I should see "Average" in the "Activity results" "block"
99
    And I should not see "Student 3" in the "Activity results" "block"
100
    And I should see "Good" in the "Activity results" "block"