Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_assign
2
Feature: Assign reset
3
  In order to reuse past Assignss
4
  As a teacher
5
  I need to remove all previous data.
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | teacher1 | Tina | Teacher1 | teacher1@example.com |
11
      | student1 | Sam1 | Student1 | student1@example.com |
12
      | student2 | Sam2 | Student2 | student2@example.com |
13
    And the following "courses" exist:
14
      | fullname | shortname | category |
15
      | Course 1 | C1 | 0 |
16
    And the following "course enrolments" exist:
17
      | user | course | role |
18
      | teacher1 | C1 | editingteacher |
19
      | student1 | C1 | student |
20
      | student2 | C1 | student |
21
    And the following "groups" exist:
22
      | name    | course | idnumber |
23
      | Group 1 | C1     | G1       |
24
      | Group 2 | C1     | G2       |
25
    And the following "activity" exists:
26
      | activity                                      | assign                  |
27
      | course                                        | C1                      |
28
      | name                                          | Test assignment name    |
29
      | intro                                         | Submit your online text |
30
      | assignsubmission_onlinetext_enabled           | 1                       |
31
      | assignsubmission_onlinetext_wordlimit_enabled | 1                       |
32
      | assignsubmission_onlinetext_wordlimit         | 10                      |
33
      | assignsubmission_file_enabled                 | 0                       |
34
      | submissiondrafts                              | 0                       |
35
 
36
  Scenario: Use course reset to clear all attempt data
37
    Given the following "mod_assign > submissions" exist:
38
      | assign                | user      | onlinetext                       |
39
      | Test assignment name  | student1  | I'm the student first submission |
40
    And I am on the "Test assignment name" Activity page logged in as student1
41
    And I should see "Submitted for grading"
42
    And I should see "I'm the student first submission"
43
    And I should see "Not graded"
44
    And I log out
45
 
46
    And I am on the "Test assignment name" Activity page logged in as teacher1
47
    And I follow "View all submissions"
48
    And I should see "Submitted for grading"
49
    When I am on the "Course 1" "reset" page
50
    And I set the following fields to these values:
51
        | Delete all submissions | 1  |
52
    And I press "Reset course"
53
    And I press "Continue"
54
    And I am on the "Test assignment name" Activity page
55
    And I follow "View all submissions"
56
    Then I should not see "Submitted for grading"
57
 
58
  @javascript
59
  Scenario: Use course reset to remove user overrides.
60
    And I am on the "Test assignment name" Activity page logged in as teacher1
61
    And I navigate to "Overrides" in current page administration
62
    And I press "Add user override"
63
    And I set the following fields to these values:
64
        | Override user    | Student1  |
65
        | id_duedate_enabled | 1 |
66
        | duedate[day]       | 1 |
67
        | duedate[month]     | January |
68
        | duedate[year]      | 2020 |
69
        | duedate[hour]      | 08 |
70
        | duedate[minute]    | 00 |
71
    And I press "Save"
72
    And I should see "Sam1 Student1"
73
    When I am on the "Course 1" "reset" page
74
    And I set the following fields to these values:
75
        | Delete all user overrides | 1  |
76
    And I press "Reset course"
77
    And I press "Continue"
78
    And I am on "Course 1" course homepage
79
    And I click on "Test assignment name" "link" in the "region-main" "region"
80
    And I navigate to "Overrides" in current page administration
81
    Then I should not see "Sam1 Student1"
82
 
83
  Scenario: Use course reset to remove group overrides.
84
    When I am on the "Test assignment name" Activity page logged in as teacher1
85
    And I navigate to "Overrides" in current page administration
86
    And I select "Group overrides" from the "jump" singleselect
87
    And I press "Add group override"
88
    And I set the following fields to these values:
89
        | Override group   | Group 1  |
90
        | id_duedate_enabled | 1 |
91
        | duedate[day]       | 1 |
92
        | duedate[month]     | January |
93
        | duedate[year]      | 2020 |
94
        | duedate[hour]      | 08 |
95
        | duedate[minute]    | 00 |
96
    And I press "Save"
97
    And I should see "Group 1"
98
    And I am on the "Course 1" "reset" page
99
    And I set the following fields to these values:
100
        | Delete all group overrides | 1  |
101
    And I press "Reset course"
102
    And I press "Continue"
103
    And I am on the "Test assignment name" Activity page
104
    And I navigate to "Overrides" in current page administration
105
    And I select "Group overrides" from the "jump" singleselect
106
    Then I should not see "Group 1"
107
 
108
  Scenario: Use course reset to reset blind marking assignment.
109
    When I am on the "Test assignment name" Activity page logged in as teacher1
110
    And I navigate to "Settings" in current page administration
111
    And I set the following fields to these values:
112
        | blindmarking | 1 |
113
    And I press "Save"
114
    When I am on the "Test assignment name" Activity page
115
    And I follow "View all submissions"
116
    And I select "Reveal student identities" from the "Grading action" singleselect
117
    And I press "Continue"
118
    And I should see "Sam1 Student1"
119
    When I am on the "Course 1" "reset" page
120
    And I set the following fields to these values:
121
        | Delete all submissions | 1 |
122
    And I press "Reset course"
123
    And I press "Continue"
124
    And I am on the "Test assignment name" Activity page
125
    And I follow "View all submissions"
126
    Then I should not see "Sam1 Student1"