[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  @mod @mod_assign
   2  Feature: Submissions are unlocked when a new attempt is given
   3    In order to allow students to reattempt a locked submission
   4    As a teacher
   5    I need to use quick grading to grant a new submission
   6  
   7    Background:
   8      Given the following "courses" exist:
   9        | fullname | shortname | category | groupmode |
  10        | Course 1 | C1 | 0 | 1 |
  11      And the following "users" exist:
  12        | username | firstname | lastname | email |
  13        | teacher1 | Teacher | 1 | teacher1@example.com |
  14        | student1 | Student | 1 | student1@example.com |
  15      And the following "course enrolments" exist:
  16        | user | course | role |
  17        | teacher1 | C1 | editingteacher |
  18        | student1 | C1 | student |
  19  
  20    @javascript
  21    Scenario: A locked submission should unlock when a new attempt is automatically given.
  22      And I log in as "teacher1"
  23      And I follow "Course 1"
  24      And I turn editing mode on
  25      And I add a "Assignment" to section "1" and I fill the form with:
  26        | Assignment name | Test assignment name |
  27        | Description | Submit your online text |
  28        | assignsubmission_onlinetext_enabled | 1 |
  29        | Attempts reopened | Automatically until pass |
  30        | Grade to pass | 50 |
  31      And I log out
  32      And I log in as "student1"
  33      And I follow "Course 1"
  34      And I follow "Test assignment name"
  35      And I press "Add submission"
  36      And I set the following fields to these values:
  37        | Online text | I'm the student1 submission |
  38      And I press "Save changes"
  39      And I log out
  40      And I log in as "teacher1"
  41      And I am on site homepage
  42      And I follow "Course 1"
  43      And I follow "Test assignment name"
  44      And I follow "View all submissions"
  45      And I click on "Edit" "link" in the "Student 1" "table_row"
  46      And I follow "Prevent submission changes"
  47      And I should see "Submission changes not allowed"
  48      And I click on "Quick grading" "checkbox"
  49      And I set the field "User grade" to "49.0"
  50      And I press "Save all quick grading changes"
  51      And I should see "The grade changes were saved"
  52      And I press "Continue"
  53      Then I should see "Reopened"
  54      And I should not see "Submission changes not allowed"
  55  
  56    @javascript
  57    Scenario: A locked submission should unlock when a new attempt is manually given.
  58      And I log in as "teacher1"
  59      And I follow "Course 1"
  60      And I turn editing mode on
  61      And I add a "Assignment" to section "1" and I fill the form with:
  62        | Assignment name | Test assignment name |
  63        | Description | Submit your online text |
  64        | assignsubmission_onlinetext_enabled | 1 |
  65        | Attempts reopened | Manually |
  66      And I log out
  67      And I log in as "student1"
  68      And I follow "Course 1"
  69      And I follow "Test assignment name"
  70      And I press "Add submission"
  71      And I set the following fields to these values:
  72        | Online text | I'm the student1 submission |
  73      And I press "Save changes"
  74      And I log out
  75      And I log in as "teacher1"
  76      And I am on site homepage
  77      And I follow "Course 1"
  78      And I follow "Test assignment name"
  79      And I follow "View all submissions"
  80      And I click on "Edit" "link" in the "Student 1" "table_row"
  81      And I follow "Prevent submission changes"
  82      And I should see "Submission changes not allowed"
  83      And I click on "Edit" "link" in the "Student 1" "table_row"
  84      And I follow "Allow another attempt"
  85      Then I should see "Reopened"
  86      And I should not see "Submission changes not allowed"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1