1 |
efrain |
1 |
@mod @mod_feedback
|
|
|
2 |
Feature: Preview feedback questions
|
|
|
3 |
In order to view the feedback questions
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to preview them
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname |
|
|
|
10 |
| student | Student | User |
|
|
|
11 |
| editingteacher | Editing | Teacher |
|
|
|
12 |
| teacher | NonEditing | Teacher |
|
|
|
13 |
And the following "courses" exist:
|
|
|
14 |
| fullname | shortname |
|
|
|
15 |
| Course 1 | C1 |
|
|
|
16 |
And the following "course enrolments" exist:
|
|
|
17 |
| user | course | role |
|
|
|
18 |
| student | C1 | student |
|
|
|
19 |
| editingteacher | C1 | editingteacher |
|
|
|
20 |
| teacher | C1 | teacher |
|
|
|
21 |
And the following "activities" exist:
|
|
|
22 |
| activity | name | course | idnumber |
|
|
|
23 |
| feedback | Music history | C1 | feedback0 |
|
|
|
24 |
And I am on the "Music history" "feedback activity" page logged in as editingteacher
|
|
|
25 |
And I click on "Edit questions" "link" in the "[role=main]" "css_element"
|
|
|
26 |
And I add a "Multiple choice" question to the feedback with:
|
|
|
27 |
| Question | What is your favourite instrument |
|
|
|
28 |
| Label | instrument1 |
|
|
|
29 |
| Multiple choice type | Multiple choice - single answer |
|
|
|
30 |
| Multiple choice values | drums\guitar\hurdygurdy |
|
|
|
31 |
And I log out
|
|
|
32 |
|
|
|
33 |
Scenario: Students cannot see the Preview questions button
|
|
|
34 |
When I am on the "Music history" "feedback activity" page logged in as student
|
|
|
35 |
Then I should not see "Preview questions"
|
|
|
36 |
|
|
|
37 |
Scenario: Non-editing teachers can see the Preview questions button
|
|
|
38 |
When I am on the "Music history" "feedback activity" page logged in as teacher
|
|
|
39 |
Then I should see "Preview questions"
|
|
|
40 |
And I follow "Preview questions"
|
|
|
41 |
And I should see "What is your favourite instrument"
|
|
|
42 |
|
|
|
43 |
Scenario: Editing teachers can see the Preview questions button
|
|
|
44 |
When I am on the "Music history" "feedback activity" page logged in as editingteacher
|
|
|
45 |
Then I should see "Preview questions"
|
|
|
46 |
And I follow "Preview questions"
|
|
|
47 |
And I should see "What is your favourite instrument"
|