Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_quiz
2
Feature: Viewing results by group
3
  In order to view quiz results on a large course
4
  As a teacher
5
  I need to filter results by group
6
 
7
  Background:
8
    And the following "courses" exist:
9
      | fullname      | shortname |
10
      | Test Course 1 | C1        |
11
    And the following "groups" exist:
12
      | name    | course | idnumber | participation |
13
      | Group 1 | C1     | G1       | 1             |
14
      | Group 2 | C1     | G2       | 1             |
15
      | Group 3 | C1     | G3       | 0             |
16
    And the following "users" exist:
17
      | username   | firstname     | lastname | email                  |
18
      | teacher1   | TeacherG1     | 1        | teacher1@example.com   |
19
      | noneditor1 | NoneditorG1   | 1        | noneditor1@example.com |
20
      | noneditor2 | NoneditorNone | 2        | noneditor2@example.com |
21
      | user1      | User1G1       | 1        | user1@example.com      |
22
      | user2      | User2G2       | 2        | user2@example.com      |
23
      | user3      | User3None     | 3        | user3@example.com      |
24
      | user4      | User4NPgroup  | 4        | user4@example.com      |
25
    And the following "course enrolments" exist:
26
      | user       | course | role           |
27
      | teacher1   | C1     | editingteacher |
28
      | noneditor1 | C1     | teacher        |
29
      | noneditor2 | C1     | teacher        |
30
      | user1      | C1     | student        |
31
      | user2      | C1     | student        |
32
      | user3      | C1     | student        |
33
      | user4      | C1     | student        |
34
    And the following "group members" exist:
35
      | user       | group |
36
      | teacher1   | G1    |
37
      | noneditor1 | G1    |
38
      | user1      | G1    |
39
      | user2      | G2    |
40
      | user4      | G3    |
41
    And the following "activities" exist:
42
      | activity | name          | intro                     | course | idnumber | groupmode |
43
      | quiz     | Separate quiz | quiz with separate groups | C1     | quiz1    | 1         |
44
      | quiz     | Visible quiz  | quiz with visible groups  | C1     | quiz2    | 2         |
45
    And the following "question categories" exist:
46
      | contextlevel | reference | name           |
47
      | Course       | C1        | Test questions |
48
    And the following "questions" exist:
49
      | questioncategory | qtype       | name  | questiontext    |
50
      | Test questions   | truefalse   | TF1   | First question  |
51
      | Test questions   | truefalse   | TF2   | Second question |
52
    And quiz "Separate quiz" contains the following questions:
53
      | question | page |
54
      | TF1      | 1    |
55
    And quiz "Visible quiz" contains the following questions:
56
      | question | page |
57
      | TF1      | 1    |
58
 
59
  Scenario Outline: Editing teachers should see all groups on the Results page. Non-editing teachers should see just their own
60
    groups in Separate groups mode, all groups in Visible groups mode.
61
    Given I am on the "<quiz>" "quiz activity" page logged in as "<user>"
62
    And I follow "Results"
63
    Then I <all> "All participants"
64
    And I <G1> "Group 1"
65
    And I <G2> "Group 2"
66
    And I <error> "Sorry, but you need to be part of a group to see this page."
67
    And I should not see "Group 3"
68
 
69
    Examples:
70
      | quiz  | user       | all            | G1             | G2             | error          |
71
      | quiz1 | teacher1   | should see     | should see     | should see     | should not see |
72
      | quiz1 | noneditor1 | should not see | should see     | should not see | should not see |
73
      | quiz1 | noneditor2 | should see     | should not see | should not see | should see     |
74
      | quiz2 | teacher1   | should see     | should see     | should see     | should not see |
75
      | quiz2 | noneditor1 | should see     | should see     | should see     | should not see |
76
      | quiz2 | noneditor2 | should see     | should see     | should see     | should not see |