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 'Late submissions are allowed' task
3
  In order to encourage students submit their submissions on time when late submissions are allowed
4
  We want only students who have not submitted their work to see the 'Late submissions are allowed' task
5
  and they can only see this after the submission deadline.
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
      | teacher1 | Terry1    | Teacher1 | teacher1@example.com  |
13
    And the following "courses" exist:
14
      | fullname  | shortname |
15
      | Course1   | c1        |
16
    And the following "course enrolments" exist:
17
      | user     | course | role           |
18
      | student1 | c1     | student        |
19
      | student2 | c1     | student        |
20
      | teacher1 | c1     | editingteacher |
21
    And the following "activities" exist:
22
      | activity | name          | course | idnumber  | latesubmissions | submisstionstart | submissionend |
23
      | workshop | TestWorkshop1 | c1     | workshop1 | 1               | 1514904308       | 1893369600    |
24
    # Teacher sets up assessment form and changes the phase to submission.
25
    And I am on the "TestWorkshop1" "workshop activity" page logged in as teacher1
26
    And I edit assessment form in workshop "TestWorkshop1" as:
27
      | id_description__idx_0_editor | Aspect1 |
28
      | id_description__idx_1_editor | Aspect2 |
29
      | id_description__idx_2_editor | Aspect3 |
30
    And I change phase in workshop "TestWorkshop1" to "Submission phase"
31
 
32
  @javascript
33
  Scenario: Student1 add his submission to TestWorkshop1 before submission deadline, but student2 does not submitt
34
    # Student1 submits.
35
    When I am on the "TestWorkshop1" "workshop activity" page logged in as student1
36
    Then I should see "Submissions deadline:"
37
    And I should not see "Late submissions are allowed"
38
    And I add a submission in workshop "TestWorkshop1" as:
39
      | Title              | Submission from s1  |
40
      | Submission content | Some content from student1 |
41
 
42
    # Teacher modifies submission deadline.
43
    When I am on the "TestWorkshop1" "workshop activity" page logged in as teacher1
44
    Then I should see "Late submissions are allowed"
45
    And I navigate to "Settings" in current page administration
46
    And I click on "Expand all" "link" in the "region-main" "region"
47
    And I set the field "id_submissionend_day" to "1"
48
    And I set the field "id_submissionend_month" to "January"
49
    And I set the field "id_submissionend_year" to "2018"
50
    And I click on "Save and display" "button"
51
    And I follow "Switch to the assessment phase"
52
 
53
    # Student1 has already submitted and cannot see 'Late submissions are allowed'.
54
    When I am on the "TestWorkshop1" "workshop activity" page logged in as student1
55
    Then I should see "Submissions deadline:"
56
    And I should not see "Late submissions are allowed"
57
 
58
    # Student2 has not submitted yet who can see 'Late submissions are allowed' text after the submission deadline.
59
    When I am on the "TestWorkshop1" "workshop activity" page logged in as student2
60
    Then I should see "Submissions deadline:"
61
    And I should see "Monday, 1 January 2018"
62
    And I should see "Late submissions are allowed"
63
 
64
    # Teacher can see 'Late submissions are allowed' text after submission deadline.
65
    When I am on the "TestWorkshop1" "workshop activity" page logged in as teacher1
66
    Then I should see "Submissions deadline:"
67
    And I should see "Monday, 1 January 2018"
68
    And I should see "Late submissions are allowed"