1 |
efrain |
1 |
@mod @mod_assign
|
|
|
2 |
Feature: In an assignment, teachers can edit a students submission inline
|
|
|
3 |
In order to easily mark students assignments
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to have a students submission text copied to the grading online form.
|
|
|
6 |
|
|
|
7 |
@javascript @_file_upload
|
|
|
8 |
Scenario: Submit a text online and edit the submission
|
|
|
9 |
Given the following "courses" exist:
|
|
|
10 |
| fullname | shortname | category | groupmode |
|
|
|
11 |
| Course 1 | C1 | 0 | 1 |
|
|
|
12 |
And the following "users" exist:
|
|
|
13 |
| username | firstname | lastname | email |
|
|
|
14 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
15 |
| student1 | Student | 1 | student1@example.com |
|
|
|
16 |
And the following "course enrolments" exist:
|
|
|
17 |
| user | course | role |
|
|
|
18 |
| teacher1 | C1 | editingteacher |
|
|
|
19 |
| student1 | C1 | student |
|
|
|
20 |
And the following "activity" exists:
|
|
|
21 |
| activity | assign |
|
|
|
22 |
| course | C1 |
|
|
|
23 |
| name | Test assignment name |
|
|
|
24 |
| assignsubmission_onlinetext_enabled | 1 |
|
|
|
25 |
| assignsubmission_file_enabled | 0 |
|
|
|
26 |
| assignfeedback_comments_enabled | 1 |
|
|
|
27 |
| assignfeedback_file_enabled | 1 |
|
|
|
28 |
| assignfeedback_comments_commentinline | 1 |
|
|
|
29 |
| submissiondrafts | 0 |
|
|
|
30 |
And the following "mod_assign > submissions" exist:
|
|
|
31 |
| assign | user | onlinetext |
|
|
|
32 |
| Test assignment name | student1 | I'm the student first submission |
|
|
|
33 |
|
|
|
34 |
When I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
35 |
And I follow "View all submissions"
|
|
|
36 |
And I click on "Grade" "link" in the "Student 1" "table_row"
|
|
|
37 |
And I set the following fields to these values:
|
|
|
38 |
| Grade out of 100 | 50 |
|
|
|
39 |
| Feedback comments | I'm the teacher feedback |
|
|
|
40 |
And I upload "lib/tests/fixtures/empty.txt" file to "Feedback files" filemanager
|
|
|
41 |
And I press "Save changes"
|
|
|
42 |
And I follow "View all submissions"
|
|
|
43 |
Then I should see "50.00" in the "Student 1" "table_row"
|
|
|
44 |
And I should see "Submitted for grading" in the "Student 1" "table_row"
|
|
|
45 |
And I should see "Graded" in the "Student 1" "table_row"
|
|
|
46 |
And I should see "I'm the student first submission" in the "Student 1" "table_row"
|
|
|
47 |
And I should see "I'm the teacher feedback" in the "Student 1" "table_row"
|
|
|
48 |
And I should see "empty.txt" in the "Student 1" "table_row"
|
|
|
49 |
And I log out
|
|
|
50 |
|
|
|
51 |
When I am on the "Test assignment name" Activity page logged in as student1
|
|
|
52 |
And I should see "Submitted for grading" in the "Submission status" "table_row"
|
|
|
53 |
And I should see "Graded" in the "Grading status" "table_row"
|
|
|
54 |
And I should see "I'm the student first submission" in the "Online text" "table_row"
|
|
|
55 |
And I should see "I'm the teacher feedback" in the "Feedback comments" "table_row"
|
|
|
56 |
And I should see "empty.txt" in the "Feedback files" "table_row"
|