Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | 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         |
1441 ariadna 45
      | qbank    | Qbank 1       |                           | C1     | qbank1   |           |
1 efrain 46
    And the following "question categories" exist:
1441 ariadna 47
      | contextlevel    | reference | name           |
48
      | Activity module | qbank1    | Test questions |
1 efrain 49
    And the following "questions" exist:
50
      | questioncategory | qtype       | name  | questiontext    |
51
      | Test questions   | truefalse   | TF1   | First question  |
52
      | Test questions   | truefalse   | TF2   | Second question |
53
    And quiz "Separate quiz" contains the following questions:
54
      | question | page |
55
      | TF1      | 1    |
56
    And quiz "Visible quiz" contains the following questions:
57
      | question | page |
58
      | TF1      | 1    |
59
 
60
  Scenario Outline: Editing teachers should see all groups on the Results page. Non-editing teachers should see just their own
61
    groups in Separate groups mode, all groups in Visible groups mode.
62
    Given I am on the "<quiz>" "quiz activity" page logged in as "<user>"
63
    And I follow "Results"
64
    Then I <all> "All participants"
65
    And I <G1> "Group 1"
66
    And I <G2> "Group 2"
67
    And I <error> "Sorry, but you need to be part of a group to see this page."
68
    And I should not see "Group 3"
69
 
70
    Examples:
71
      | quiz  | user       | all            | G1             | G2             | error          |
72
      | quiz1 | teacher1   | should see     | should see     | should see     | should not see |
73
      | quiz1 | noneditor1 | should not see | should see     | should not see | should not see |
74
      | quiz1 | noneditor2 | should see     | should not see | should not see | should see     |
75
      | quiz2 | teacher1   | should see     | should see     | should see     | should not see |
76
      | quiz2 | noneditor1 | should see     | should see     | should see     | should not see |
77
      | quiz2 | noneditor2 | should see     | should see     | should see     | should not see |