403Webshell
Server IP : 104.21.80.248  /  Your IP : 172.71.28.156
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Inetpub/www/myschool/triamudom/tuprblearn/mod/workshop/tests/behat/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/myschool/triamudom/tuprblearn/mod/workshop/tests/behat/delete_submission.feature
@mod @mod_workshop
Feature: Workshop submission removal
  In order to get rid of accidentally submitted or otherwise inappropriate contents
  As a student and as a teacher
  I need to be able to delete my submission, or any submission respectively

  Background:
    Given the following "users" exist:
      | username | firstname | lastname | email                 |
      | student1 | Sam1      | Student1 | [email protected]  |
      | student2 | Sam2      | Student2 | [email protected]  |
      | student3 | Sam3      | Student3 | [email protected]  |
      | teacher1 | Terry1    | Teacher1 | [email protected]  |
    And the following "courses" exist:
      | fullname  | shortname |
      | Course1   | c1        |
    And the following "course enrolments" exist:
      | user     | course | role           |
      | student1 | c1     | student        |
      | student2 | c1     | student        |
      | student3 | c1     | student        |
      | teacher1 | c1     | editingteacher |
    And the following "activities" exist:
      | activity | name         | intro                     | course | idnumber  | submissiontypefile |
      | workshop | TestWorkshop | Test workshop description | c1     | workshop1 | 1                  |
    # Teacher sets up assessment form and changes the phase to submission.
    And I log in as "teacher1"
    And I am on "Course1" course homepage
    And I edit assessment form in workshop "TestWorkshop" as:"
      | id_description__idx_0_editor | Aspect1 |
      | id_description__idx_1_editor | Aspect2 |
      | id_description__idx_2_editor |         |
    And I change phase in workshop "TestWorkshop" to "Submission phase"
    And I log out
    # Student1 submits.
    And I log in as "student1"
    And I am on "Course1" course homepage
    And I follow "TestWorkshop"
    And I add a submission in workshop "TestWorkshop" as:"
      | Title              | Submission1  |
      | Submission content | Some content |
    And I log out
    # Student2 submits.
    And I log in as "student2"
    And I am on "Course1" course homepage
    And I add a submission in workshop "TestWorkshop" as:"
      | Title              | Submission2  |
      | Submission content | Some content |
    And I log out
    # Teacher allocates student3 to be reviewer of student2's submission.
    And I log in as "teacher1"
    And I am on "Course1" course homepage
    And I follow "TestWorkshop"
    And I allocate submissions in workshop "TestWorkshop" as:"
      | Participant   | Reviewer      |
      | Sam2 Student2 | Sam3 Student3 |
    And I log out

  Scenario: Students can delete their submissions as long as the submissions are editable and not allocated for assessments
    Given I log in as "student1"
    And I am on "Course1" course homepage
    And I follow "TestWorkshop"
    When I follow "Submission1"
    Then I should see "Submission1"
    And "Delete submission" "button" should exist
    And I click on "Delete submission" "button"
    And I should see "Are you sure you want to delete the following submission?"
    And I should see "Submission1"
    And I click on "Continue" "button"
    And I should see "You have not submitted your work yet"

  Scenario: Students cannot delete their submissions if the submissions are not editable
    Given I log in as "teacher1"
    And I am on "Course1" course homepage
    And I follow "TestWorkshop"
    And I change phase in workshop "TestWorkshop" to "Closed"
    And I log out
    And I log in as "student1"
    And I am on "Course1" course homepage
    And I follow "TestWorkshop"
    When I follow "Submission1"
    Then I should see "Submission1"
    And "Delete submission" "button" should not exist

  Scenario: Students cannot delete their submissions if the submissions are allocated for assessments
    Given I log in as "student2"
    And I am on "Course1" course homepage
    And I follow "TestWorkshop"
    When I follow "Submission2"
    Then I should see "Submission2"
    And "Delete submission" "button" should not exist

  Scenario: Teachers can delete submissions even if the submissions are allocated for assessments.
    Given I log in as "teacher1"
    And I am on "Course1" course homepage
    And I follow "TestWorkshop"
    And "Submission1" "link" should exist
    And "Submission2" "link" should exist
    When I follow "Submission2"
    Then "Delete submission" "button" should exist
    And I click on "Delete submission" "button"
    And I should see "Are you sure you want to delete the following submission?"
    And I should see "Note this will also delete 1 assessments associated with this submission, which may affect the reviewers' grades."
    And I click on "Continue" "button"
    And "Submission1" "link" should exist
    And "Submission2" "link" should not exist

Youez - 2016 - github.com/yon3zu
LinuXploit