1 |
efrain |
1 |
@mod @mod_workshop @_file_upload
|
|
|
2 |
Feature: Provide example submission
|
|
|
3 |
In order to let students practise the assessment process in the workshop
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to define example submission and its referential assessment
|
|
|
6 |
|
|
|
7 |
@javascript
|
|
|
8 |
Scenario: Add example submission with attachments to a workshop
|
|
|
9 |
# Prepare the users, course, enrolments and the workshop instance.
|
|
|
10 |
Given the following "users" exist:
|
|
|
11 |
| username | firstname | lastname | email |
|
|
|
12 |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
|
|
|
13 |
And the following "courses" exist:
|
|
|
14 |
| fullname | shortname |
|
|
|
15 |
| Course1 | c1 |
|
|
|
16 |
And the following "course enrolments" exist:
|
|
|
17 |
| user | course | role |
|
|
|
18 |
| teacher1 | c1 | editingteacher |
|
|
|
19 |
And the following "activities" exist:
|
|
|
20 |
| activity | name | course | idnumber | useexamples |
|
|
|
21 |
| workshop | TestWorkshop | c1 | workshop1 | 1 |
|
|
|
22 |
# As a teacher, define the assessment form to be used in the workshop.
|
|
|
23 |
When I am on the "Course1" course page logged in as teacher1
|
|
|
24 |
And I edit assessment form in workshop "TestWorkshop" as:
|
|
|
25 |
| id_description__idx_0_editor | Aspect1 |
|
|
|
26 |
| id_description__idx_1_editor | Aspect2 |
|
|
|
27 |
| id_description__idx_2_editor | |
|
|
|
28 |
# Add an example submission with an attachment.
|
|
|
29 |
And I press "Add example submission"
|
|
|
30 |
And I set the following fields to these values:
|
|
|
31 |
| Title | First example submission |
|
|
|
32 |
| Submission content | Just an example but hey, it works! |
|
|
|
33 |
| Attachment | lib/tests/fixtures/empty.txt |
|
|
|
34 |
And I press "Save changes"
|
|
|
35 |
# Make sure that the submission was saved.
|
|
|
36 |
Then I should see "First example submission"
|
|
|
37 |
And I should see "Just an example but hey, it works!"
|
|
|
38 |
And "empty.txt" "link" should exist
|