1 |
efrain |
1 |
@mod @mod_choice
|
|
|
2 |
Feature: Add choice activity
|
|
|
3 |
In order to ask questions as a choice of multiple responses
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to add choice activities to courses
|
|
|
6 |
|
|
|
7 |
Scenario: Add a choice activity and complete the activity as a student
|
|
|
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 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | category |
|
|
|
14 |
| Course 1 | C1 | 0 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
And the following "activities" exist:
|
|
|
20 |
| activity | name | intro | course | idnumber | option | section |
|
|
|
21 |
| choice | Choice name | Choice Description | C1 | choice1 | Option 1, Option 2 | 1 |
|
|
|
22 |
When I log in as "student1"
|
|
|
23 |
And I am on "Course 1" course homepage
|
|
|
24 |
And I choose "Option 1" from "Choice name" choice activity
|
|
|
25 |
Then I should see "Your selection: Option 1"
|
|
|
26 |
And I should see "Your choice has been saved"
|