Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_workshop
2
Feature: Workshop submission removal
3
  In order to get rid of accidentally submitted or otherwise inappropriate contents
4
  As a student and as a teacher
5
  I need to be able to delete my submission, or any submission respectively
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                 |
10
      | student1 | Sam1      | Student1 | student1@example.com  |
11
      | student2 | Sam2      | Student2 | student2@example.com  |
12
      | student3 | Sam3      | Student3 | student3@example.com  |
13
      | teacher1 | Terry1    | Teacher1 | teacher1@example.com  |
14
    And the following "courses" exist:
15
      | fullname  | shortname |
16
      | Course1   | c1        |
17
    And the following "course enrolments" exist:
18
      | user     | course | role           |
19
      | student1 | c1     | student        |
20
      | student2 | c1     | student        |
21
      | student3 | c1     | student        |
22
      | teacher1 | c1     | editingteacher |
23
    And the following "activities" exist:
24
      | activity | name         | course | idnumber  | submissiontypefile |
25
      | workshop | TestWorkshop | c1     | workshop1 | 1                  |
26
    # Teacher sets up assessment form and changes the phase to submission.
27
    And I am on the "Course1" course page logged in as teacher1
28
    And I edit assessment form in workshop "TestWorkshop" as:
29
      | id_description__idx_0_editor | Aspect1 |
30
      | id_description__idx_1_editor | Aspect2 |
31
      | id_description__idx_2_editor |         |
32
    And I change phase in workshop "TestWorkshop" to "Submission phase"
33
    # Student1 submits.
34
    And I am on the "TestWorkshop" "workshop activity" page logged in as student1
35
    And I add a submission in workshop "TestWorkshop" as:
36
      | Title              | Submission1  |
37
      | Submission content | Some content |
38
    # Student2 submits.
39
    And I am on the "Course1" course page logged in as student2
40
    And I add a submission in workshop "TestWorkshop" as:
41
      | Title              | Submission2  |
42
      | Submission content | Some content |
43
    # Teacher allocates student3 to be reviewer of student2's submission.
44
    And I am on the "TestWorkshop" "workshop activity" page logged in as teacher1
45
    And I allocate submissions in workshop "TestWorkshop" as:
46
      | Participant   | Reviewer      |
47
      | Sam2 Student2 | Sam3 Student3 |
48
 
49
  Scenario: Students can delete their submissions as long as the submissions are editable and not allocated for assessments
50
    Given I am on the "TestWorkshop" "workshop activity" page logged in as student1
51
    When I follow "Submission1"
52
    Then I should see "Submission1"
53
    And "Delete submission" "button" should exist
54
    And I click on "Delete submission" "button"
55
    And I should see "Are you sure you want to delete the following submission?"
56
    And I should see "Submission1"
57
    And I click on "Continue" "button"
58
    And I should see "You have not submitted your work yet"
59
 
60
  Scenario: Students cannot delete their submissions if the submissions are not editable
61
    Given I am on the "TestWorkshop" "workshop activity" page logged in as teacher1
62
    And I change phase in workshop "TestWorkshop" to "Closed"
63
    And I am on the "TestWorkshop" "workshop activity" page logged in as student1
64
    When I follow "Submission1"
65
    Then I should see "Submission1"
66
    And "Delete submission" "button" should not exist
67
 
68
  Scenario: Students cannot delete their submissions if the submissions are allocated for assessments
69
    Given I am on the "TestWorkshop" "workshop activity" page logged in as student2
70
    When I follow "Submission2"
71
    Then I should see "Submission2"
72
    And "Delete submission" "button" should not exist
73
 
74
  Scenario: Teachers can delete submissions even if the submissions are allocated for assessments.
75
    Given I am on the "TestWorkshop" "workshop activity" page logged in as teacher1
76
    And "Submission1" "link" should exist
77
    And "Submission2" "link" should exist
78
    When I follow "Submission2"
79
    Then "Delete submission" "button" should exist
80
    And I click on "Delete submission" "button"
81
    And I should see "Are you sure you want to delete the following submission?"
82
    And I should see "Note this will also delete 1 assessments associated with this submission, which may affect the reviewers' grades."
83
    And I click on "Continue" "button"
84
    And "Submission1" "link" should exist
85
    And "Submission2" "link" should not exist