Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_choice
2
Feature: Teacher can modify choices of the students
3
  In order to have all students choices
4
  As a teacher
5
  I need to be able to make choice for studnets
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | teacher1 | Teacher | 1 | teacher1@example.com |
11
      | student1 | Student | 1 | student1@example.com |
12
      | student2 | Student | 2 | student2@example.com |
13
      | student3 | Student | 3 | student3@example.com |
14
    And the following "courses" exist:
15
      | fullname | shortname | category |
16
      | Course 1 | C1 | 0 |
17
    And the following "course enrolments" exist:
18
      | user | course | role |
19
      | teacher1 | C1 | editingteacher |
20
      | student1 | C1 | student |
21
      | student2 | C1 | student |
22
      | student3 | C1 | student |
23
    And the following "activities" exist:
24
      | activity | name        | intro                   | course | idnumber | option |
25
      | choice   | Choice name | Test choice description | C1     | choice1  | Option 1, Option 2, Option 3 |
26
 
27
  @javascript
28
  Scenario: Delete students choice response as a teacher
29
    Given I am on the "Choice name" "choice activity editing" page logged in as teacher1
30
    And I expand all fieldsets
31
    And I set the field "Show column for unanswered" to "Yes"
32
    And I press "Save and return to course"
33
    And I log out
34
    And I log in as "student1"
35
    And I am on "Course 1" course homepage
36
    And I choose "Option 1" from "Choice name" choice activity
37
    Then I should see "Your selection: Option 1"
38
    And I should see "Your choice has been saved"
39
    And I log out
40
    And I log in as "teacher1"
41
    And I change window size to "large"
42
    And I am on the "Choice name" "choice activity" page
43
    And I navigate to "Responses" in current page administration
44
    And I click on "Student 1 Option 1" "checkbox"
45
    And I select "Delete" from the "With selected" singleselect
46
    And "Student 1 Option 1" "checkbox" should not exist
47
    And "Student 1 Not answered yet" "checkbox" should exist
48
 
49
  @javascript
50
  Scenario: Teacher set answers of students who did not respond or change existing answers
51
    Given I am on the "Choice name" "choice activity editing" page logged in as teacher1
52
    And I expand all fieldsets
53
    And I set the field "Show column for unanswered" to "Yes"
54
    And I press "Save and return to course"
55
    And I log out
56
    And I am on the "Course 1" course page logged in as student1
57
    And I choose "Option 1" from "Choice name" choice activity
58
    Then I should see "Your selection: Option 1"
59
    And I should see "Your choice has been saved"
60
    And I log out
61
    And I change window size to "large"
62
    And I am on the "Choice name" "choice activity" page logged in as teacher1
63
    And I navigate to "Responses" in current page administration
64
    And I click on "Student 1 Option 1" "checkbox"
65
    And I click on "Student 2 Not answered yet" "checkbox"
66
    And I click on "Student 3 Not answered yet" "checkbox"
67
    And I select "Choose: Option 2" from the "With selected" singleselect
68
    And "Student 1 Option 1" "checkbox" should not exist
69
    And "Student 2 Not answered yet" "checkbox" should not exist
70
    And "Student 3 Not answered yet" "checkbox" should not exist
71
    And "Student 1 Option 2" "checkbox" should exist
72
    And "Student 2 Option 2" "checkbox" should exist
73
    And "Student 3 Option 2" "checkbox" should exist
74
 
75
  @javascript
76
  Scenario: Teacher can delete answers in the multiple answer choice
77
    Given I am on the "Choice name" "choice activity editing" page logged in as teacher1
78
    And I set the field "Allow more than one choice to be selected" to "Yes"
79
    And I press "Save and return to course"
80
    And I log out
81
    And I am on the "Course 1" course page logged in as student1
82
    And I choose options "Option 1","Option 2" from "Choice name" choice activity
83
    And I should see "Your selection: Option 1; Option 2"
84
    And I should see "Your choice has been saved"
85
    And I log out
86
    And I change window size to "large"
87
    And I am on the "Choice name" "choice activity" page logged in as teacher1
88
    And I navigate to "Responses" in current page administration
89
    And I click on "Student 1 Option 2" "checkbox"
90
    And I select "Delete" from the "With selected" singleselect
91
    And I click on "Student 1 Option 1" "checkbox"
92
    And I select "Choose: Option 3" from the "With selected" singleselect
93
    And I log out
94
    And I am on the "Choice name" "choice activity" page logged in as student1
95
    And I should see "Your selection: Option 1; Option 3"
96
 
97
  @javascript
98
  Scenario: Teacher can manage answers on view page if the names are displayed
99
    Given I am on the "Course 1" course page logged in as student1
100
    And I choose "Option 1" from "Choice name" choice activity
101
    Then I should see "Your selection: Option 1"
102
    And I should see "Your choice has been saved"
103
    And I log out
104
    And I change window size to "large"
105
    And I am on the "Choice name" "choice activity editing" page logged in as teacher1
106
    And I set the following fields to these values:
107
      | Publish results | Always show results to students |
108
      | Privacy of results | Publish full results, showing names and their choices |
109
      | Show column for unanswered | Yes |
110
    And I press "Save and display"
111
    And I click on "Student 1 Option 1" "checkbox"
112
    And I click on "Student 2 Not answered yet" "checkbox"
113
    And I select "Choose: Option 3" from the "With selected" singleselect
114
    And "Student 1 Option 1" "checkbox" should not exist
115
    And "Student 1 Option 3" "checkbox" should exist
116
    And "Student 2 Not answered yet" "checkbox" should not exist
117
    And "Student 2 Option 3" "checkbox" should exist
118
    And I click on "Student 1 Option 3" "checkbox"
119
    And I select "Delete" from the "With selected" singleselect
120
    And "Student 1 Option 3" "checkbox" should not exist
121
    And "Student 1 Not answered yet" "checkbox" should exist