Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_questionnaire
2
Feature: In questionnaire, personality tests can be constructed using feedback on specific question responses and questions can be
3
  assigned to multiple sections.
4
  In order to define a feedback questionnaire
5
  As a teacher
6
  I must add the required question types and complete the feedback options with more than one section per question.
7
 
8
  @javascript
9
  Scenario: Create a questionnaire with a with feeback question types and add more than one feedback section.
10
    Given the following "users" exist:
11
      | username | firstname | lastname | email |
12
      | teacher1 | Teacher | 1 | teacher1@example.com |
13
      | student1 | Student | 1 | student1@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
    And the following "activities" exist:
22
      | activity | name | description | course | idnumber | resume | navigate |
23
      | questionnaire | Test questionnaire | Test questionnaire description | C1 | questionnaire0 | 1 | 1 |
24
    And the "multilang" filter is "on"
25
    And the "multilang" filter applies to "content and headings"
26
    And I am on the "Test questionnaire" "mod_questionnaire > questions" page logged in as "teacher1"
27
    Then I should see "Add questions"
28
    And I add a "Dropdown Box" question and I fill the form with:
29
      | Question Name | Q1 |
30
      | Yes | y |
31
      | Question Text | Select one dropdown |
32
      | Possible answers | 1=One,2=Two,3=<span lang="en" class="multilang">Three</span>,4=Four |
33
    Then I should see "[Dropdown Box] (Q1)"
34
    And I add a "Radio Buttons" question and I fill the form with:
35
      | Question Name | Q2 |
36
      | Yes | y |
37
      | Horizontal | Checked |
38
      | Question Text | Select one radio |
39
      | Possible answers | 1=One,2=Two,3=Three,4=Four |
40
    Then I should see "[Radio Buttons] (Q2)"
41
    And I add a "Rate (scale 1..5)" question and I fill the form with:
42
      | Question Name | Q3 |
43
      | Yes | y |
44
      | Nb of scale items | 4 |
45
      | Type of rate scale | Normal |
46
      | Question Text | Rate these |
47
      | Possible answers | Cheese,Bread,Meat,Fruit |
48
      | Named degrees    | 1=One,2=Two,3=Three,4=Four |
49
    Then I should see "[Rate (scale 1..5)] (Q3)"
50
    And I add a "Yes/No" question and I fill the form with:
51
      | Question Name | Q4 |
52
      | Yes | y |
53
      | Question Text | Yes or no |
54
    Then I should see "[Yes/No] (Q4)"
55
    And I add a "Rate (scale 1..5)" question and I fill the form with:
56
      | Question Name | Q5 |
57
      | Yes | y |
58
      | Nb of scale items | 5 |
59
      | Type of rate scale | Normal |
60
      | Question Text | Rate these |
61
      | Possible answers | Clubs,Diamonds,Hearts,Spades |
62
      | Named degrees    | 0=Zero,2=Two,4=Four,8=Eight,16=Sixteen |
63
    Then I should see "[Rate (scale 1..5)] (Q5)"
64
    And I follow "Feedback"
65
    And I should see "Feedback options"
66
    And I set the field "id_feedbacksections" to "Feedback sections"
67
    And I set the field "id_feedbackscores" to "Yes"
68
    And I set the field "id_feedbacknotes" to "These are the main Feedback notes"
69
    And I press "Save settings and edit Feedback Sections"
70
    Then I should see "[New section] section questions"
71
    And I follow "[New section] section questions"
72
    And I set the field "addquestionselect" to "Q1"
73
    And I press "Add question..."
74
    And I set the field "addquestionselect" to "Q2"
75
    And I press "Add question..."
76
    And I set the field "addquestionselect" to "Q5"
77
    And I press "Add question..."
78
    And I set the field "id_sectionlabel" to "Section 1 label"
79
    And I set the field "id_sectionheading" to "Section 1 heading"
80
    And I follow "[New section] section messages"
81
    And I set the field "id_feedbacktext_0" to "Feedback 1 100%"
82
    And I set the field "id_feedbackboundaries_0" to "50"
83
    And I set the field "id_feedbacktext_1" to "Feedback 1 50%"
84
    And I set the field "id_feedbackboundaries_1" to "20"
85
    And I set the field "id_feedbacktext_2" to "Feedback 1 20%"
86
    And I press "Save changes"
87
    And I set the field "newsectionlabel" to "Section 2 label"
88
    And I press "Add new section"
89
    Then I should see "Section 2 label section questions"
90
    And I follow "Section 2 label section questions"
91
    And I set the field "addquestionselect" to "Q1"
92
    And I press "Add question..."
93
    And I set the field "weight1" to "0.1"
94
    And I set the field "addquestionselect" to "Q2"
95
    And I press "Add question..."
96
    And I set the field "weight1" to "0.1"
97
    And I set the field "addquestionselect" to "Q3"
98
    And I press "Add question..."
99
    And I set the field "addquestionselect" to "Q4"
100
    And I press "Add question..."
101
    And I set the field "id_sectionheading" to "Section 2 heading"
102
    And I follow "Section 2 label section messages"
103
    And I set the field "id_feedbacktext_0" to "Feedback 2 100%"
104
    And I set the field "id_feedbackboundaries_0" to "50"
105
    And I set the field "id_feedbacktext_1" to "Feedback 2 50%"
106
    And I set the field "id_feedbackboundaries_1" to "20"
107
    And I set the field "id_feedbacktext_2" to "Feedback 2 20%"
108
    And I press "Save changes"
109
    And I log out
110
 
111
#  Scenario: Student completes feedback questions.
112
    And I log in as "student1"
113
    And I am on "Course 1" course homepage
114
    And I follow "Test questionnaire"
115
    And I navigate to "Answer the questions..." in current page administration
116
    Then I should see "Select one dropdown"
117
    And I set the field "dropQ1" to "Three"
118
    Then I should not see "<span lang=\"en\" class=\"multilang\">Three</span>" in the "//select[@id='dropQ1']//option[4]" "xpath_element"
119
    And I click on "Three" "radio"
120
    And I click on "Choice Three for row Cheese" "radio"
121
    And I click on "Choice Three for row Bread" "radio"
122
    And I click on "Choice Three for row Meat" "radio"
123
    And I click on "Choice Three for row Fruit" "radio"
124
    And I click on "Yes" "radio"
125
    And I click on "Choice Two for row Clubs" "radio"
126
    And I click on "Choice Four for row Diamonds" "radio"
127
    And I click on "Choice Zero for row Hearts" "radio"
128
    And I click on "Choice Sixteen for row Spades" "radio"
129
    And I press "Submit questionnaire"
130
    Then I should see "Thank you for completing this Questionnaire."
131
    And I press "Continue"
132
    Then I should see "View your response(s)"
133
    And I should see "These are the main Feedback notes"
134
    And I should see "Section 1 label"
135
    And I should see "39%"
136
    And I should see "Feedback 1 50%"
137
    And I should see "Section 2 label"
138
    And I should see "76%"
139
    And I should see "Feedback 2 100%"
140
    And I log out
141
 
142
#  Scenario: Another student completes feedback questions differently.
143
    And I log in as "student1"
144
    And I am on "Course 1" course homepage
145
    And I follow "Test questionnaire"
146
    And I navigate to "Answer the questions..." in current page administration
147
    Then I should see "Select one dropdown"
148
    And I set the field "dropQ1" to "One"
149
    And I click on "One" "radio"
150
    And I click on "Choice Two for row Cheese" "radio"
151
    And I click on "Choice Two for row Bread" "radio"
152
    And I click on "Choice Two for row Meat" "radio"
153
    And I click on "Choice Two for row Fruit" "radio"
154
    And I click on "Yes" "radio"
155
    And I click on "Choice Zero for row Clubs" "radio"
156
    And I click on "Choice Two for row Diamonds" "radio"
157
    And I click on "Choice Four for row Hearts" "radio"
158
    And I click on "Choice Eight for row Spades" "radio"
159
    And I press "Submit questionnaire"
160
    Then I should see "Thank you for completing this Questionnaire."
161
    And I press "Continue"
162
    And I should see "These are the main Feedback notes"
163
    And I should see "Section 1 label"
164
    And I should see "22%"
165
    And I should see "Feedback 1 50%"
166
    And I should see "Section 2 label"
167
    And I should see "53%"
168
    And I should see "Feedback 2 100%"
169
    And I log out