[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_assign 2 Feature: In an assignment, students can add and edit text online 3 In order to complete my submissions online 4 As a student 5 I need to submit my assignment editing an online form 6 7 @javascript 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 I log in as "teacher1" 21 And I follow "Course 1" 22 And I turn editing mode on 23 And I add a "Assignment" to section "1" and I fill the form with: 24 | Assignment name | Test assignment name | 25 | Description | Submit your online text | 26 | assignsubmission_onlinetext_enabled | 1 | 27 | assignsubmission_onlinetext_wordlimit_enabled | 1 | 28 | assignsubmission_onlinetext_wordlimit | 10 | 29 | assignsubmission_file_enabled | 0 | 30 And I log out 31 And I log in as "student1" 32 And I follow "Course 1" 33 And I follow "Test assignment name" 34 When I press "Add submission" 35 And I set the following fields to these values: 36 | Online text | This is more than 10 words. 1 2 3 4 5 6 7 8 9 10. | 37 And I press "Save changes" 38 Then I should see "Please review your submission and try again." 39 And I set the following fields to these values: 40 | Online text | I'm the student first submission | 41 And I press "Save changes" 42 Then I should see "Submitted for grading" 43 And I should see "I'm the student first submission" 44 And I should see "Not graded" 45 And I press "Edit submission" 46 And I set the following fields to these values: 47 | Online text | I'm the student second submission | 48 And I press "Save changes" 49 Then I should see "Submitted for grading" 50 And I should see "I'm the student second submission" 51 And I should not see "I'm the student first submission" 52 53 @javascript 54 Scenario: Auto-draft save online text submission 55 Given the following "courses" exist: 56 | fullname | shortname | category | groupmode | 57 | Course 1 | C1 | 0 | 1 | 58 And the following "users" exist: 59 | username | firstname | lastname | email | 60 | teacher1 | Teacher | 1 | teacher1@example.com | 61 | student1 | Student | 1 | student1@example.com | 62 And the following "course enrolments" exist: 63 | user | course | role | 64 | teacher1 | C1 | editingteacher | 65 | student1 | C1 | student | 66 And the following config values are set as admin: 67 | autosavefrequency | 1 | editor_atto | 68 And I log in as "teacher1" 69 And I follow "Course 1" 70 And I turn editing mode on 71 And I add a "Assignment" to section "1" and I fill the form with: 72 | Assignment name | Test assignment name | 73 | Description | Submit your online text | 74 | assignsubmission_onlinetext_enabled | 1 | 75 | assignsubmission_file_enabled | 0 | 76 And I log out 77 And I log in as "student1" 78 And I follow "Course 1" 79 And I follow "Test assignment name" 80 When I press "Add submission" 81 And I set the following fields to these values: 82 | Online text | text submission | 83 # Wait for the draft auto save. 84 And I wait "2" seconds 85 And I follow "Course 1" 86 And I follow "Test assignment name" 87 When I press "Add submission" 88 # Confirm draft was restored. 89 Then I should see "text submission" in the "#id_onlinetext_editoreditable" "css_element"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |