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 students high scores in group 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
    And the following "activity" exists:
28
      | activity                      | assign             |
29
      | course                        | C1                 |
30
      | idnumber                      | 0001               |
31
      | name                          | Test assignment    |
32
      | intro                         | Offline text       |
33
      | assignsubmission_file_enabled | 0                  |
34
    And the following "scales" exist:
35
      | name     | scale                                                                |
36
      | My Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
37
    And I am on the "Test assignment" "assign activity editing" page logged in as teacher1
38
    And I set the following fields to these values:
39
      | id_grade_modgrade_type | Scale |
40
      | id_grade_modgrade_scale | My Scale |
41
    And I press "Save and return to course"
42
    And I am on the "Course 1" "grades > Grader report > View" page
43
    And I turn editing mode on
44
    And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
45
    And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
46
    And I give the grade "Good" to the user "Student 3" for the grade item "Test assignment"
47
    And I give the grade "Average" to the user "Student 4" for the grade item "Test assignment"
48
    And I give the grade "Not good enough" to the user "Student 5" for the grade item "Test assignment"
49
    And I press "Save changes"
50
    And I am on "Course 1" course homepage with editing mode on
51
 
52
  Scenario: Configure the block on the course page to show 1 high score
53
    Given I add the "Activity results" block to the default region with:
54
      | config_showbest | 1 |
55
      | config_showworst | 0 |
56
      | config_nameformat | Display full names |
57
      | config_decimalpoints | 0 |
58
    Then I should see "Student 1" in the "Activity results" "block"
59
    And I should see "Excellent!" in the "Activity results" "block"
60
 
61
  Scenario: Try to configure the block on the course page to show multiple high scores using full names
62
    Given I add the "Activity results" block to the default region with:
63
      | config_showbest | 3 |
64
      | config_showworst | 0 |
65
      | config_nameformat | Display full names |
66
    Then I should see "Student 1" in the "Activity results" "block"
67
    And I should see "Excellent!" in the "Activity results" "block"
68
    And I should see "Student 2" in the "Activity results" "block"
69
    And I should see "Very good" in the "Activity results" "block"
70
    And I should see "Student 3" in the "Activity results" "block"
71
    And I should see "Good" in the "Activity results" "block"
72
 
73
  Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers
74
    Given the following config values are set as admin:
75
      | showuseridentity | idnumber,email |
76
    And I add the "Activity results" block to the default region with:
77
      | config_showbest | 3 |
78
      | config_showworst | 0 |
79
      | config_nameformat | Display only ID numbers |
80
    Then I should see "User S1" in the "Activity results" "block"
81
    And I should see "Excellent!" in the "Activity results" "block"
82
    And I should see "User S2" in the "Activity results" "block"
83
    And I should see "Very good" in the "Activity results" "block"
84
    And I should see "User S3" in the "Activity results" "block"
85
    And I should see "Good" in the "Activity results" "block"
86
 
87
  Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names
88
    Given I add the "Activity results" block to the default region with:
89
      | config_showbest | 3 |
90
      | config_showworst | 0 |
91
      | config_nameformat | Anonymous results |
92
    Then I should see "User" in the "Activity results" "block"
93
    And I should not see "Student 1" in the "Activity results" "block"
94
    And I should see "Excellent!" in the "Activity results" "block"
95
    And I should not see "Student 2" in the "Activity results" "block"
96
    And I should see "Very good" in the "Activity results" "block"
97
    And I should not see "Student 3" in the "Activity results" "block"
98
    And I should see "Good" in the "Activity results" "block"