[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/mod/assign/tests/behat/ -> online_submissions.feature (source)

   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 | [email protected] |
  15        | student1 | Student | 1 | [email protected] |
  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"


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1