Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_workshop @core_completion @javascript
2
Feature: Workshop submission and assessment with pass grade activity completion
3
 
4
  Background:
5
    Given the following "users" exist:
6
      | username | firstname | lastname | email                |
7
      | student1 | Sam1      | Student1 | student1@example.com |
8
      | student2 | Sam2      | Student2 | student2@example.com |
9
      | student3 | Sam3      | Student3 | student3@example.com |
10
      | student4 | Sam4      | Student4 | student3@example.com |
11
      | teacher1 | Terry1    | Teacher1 | teacher1@example.com |
12
    And the following "courses" exist:
13
      | fullname  | shortname | enablecompletion |
14
      | Course1   | c1        | 1                |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | student1 | c1     | student        |
18
      | student2 | c1     | student        |
19
      | student3 | c1     | student        |
20
      | student4 | c1     | student        |
21
      | teacher1 | c1     | editingteacher |
22
    And the following "activity" exists:
23
      | activity                  | workshop                  |
24
      | name                      | TestWorkshop              |
25
      | course                    | c1                        |
26
      | idnumber                  | workshop1                 |
27
      | submissiontypetext        | 2                         |
28
      | submissiontypefile        | 1                         |
29
      | completion                | 2                         |
30
      | completiongradeitemnumber | 0                         |
31
      | submissiongradepass       | 40                        |
32
      | gradinggradepass          | 60                        |
33
      | completionpassgrade       | 1                         |
34
    # teacher1 sets up assessment form and changes the phase to submission
35
    When I am on the "TestWorkshop" "workshop activity" page logged in as teacher1
36
    And I edit assessment form in workshop "TestWorkshop" as:
37
      | id_description__idx_0_editor | Aspect1 |
38
      | id_description__idx_1_editor | Aspect2 |
39
      | id_description__idx_2_editor |         |
40
    And I change phase in workshop "TestWorkshop" to "Submission phase"
41
    # student1 submits
42
    And I am on the "TestWorkshop" "workshop activity" page logged in as student1
43
    And I add a submission in workshop "TestWorkshop" as:
44
      | Title              | Submission1  |
45
      | Submission content | Some content |
46
    # student2 submits
47
    And I am on the "TestWorkshop" "workshop activity" page logged in as student2
48
    And I add a submission in workshop "TestWorkshop" as:
49
      | Title              | Submission2  |
50
      | Submission content | Some content |
51
    # student3 submits
52
    And I am on the "TestWorkshop" "workshop activity" page logged in as student3
53
    And I add a submission in workshop "TestWorkshop" as:
54
      | Title              | Submission3  |
55
      | Submission content | Some content |
56
    # teacher1 allocates reviewers and changes the phase to assessment
57
    And I am on the "TestWorkshop" "workshop activity" page logged in as teacher1
58
    And I allocate submissions in workshop "TestWorkshop" as:
59
      | Participant   | Reviewer      |
60
      | Sam1 Student1 | Sam2 Student2 |
61
      | Sam2 Student2 | Sam1 Student1 |
62
      | Sam3 Student3 | Sam1 Student1 |
63
      | Sam2 Student2 | Sam4 Student4 |
64
    And I am on the "TestWorkshop" "workshop activity" page
65
    And I change phase in workshop "TestWorkshop" to "Assessment phase"
66
    # student1 assesses work of student2 and student3
67
    And I am on the "TestWorkshop" "workshop activity" page logged in as student1
68
    And I assess submission "Sam2" in workshop "TestWorkshop" as:
69
      | grade__idx_0            | 5 / 10            |
70
      | peercomment__idx_0      | You can do better |
71
      | grade__idx_1            | 10 / 10           |
72
      | peercomment__idx_1      | Amazing           |
73
      | Feedback for the author | Good work         |
74
    And I am on "Course1" course homepage
75
    And I assess submission "Sam3" in workshop "TestWorkshop" as:
76
      | grade__idx_0            | 9 / 10      |
77
      | peercomment__idx_0      | Well done   |
78
      | grade__idx_1            | 8 / 10      |
79
      | peercomment__idx_1      | Very good   |
80
      | Feedback for the author | No comments |
81
    # student2 assesses work of student1
82
    And I am on the "TestWorkshop" "workshop activity" page logged in as student2
83
    And I assess submission "Sam1" in workshop "TestWorkshop" as:
84
      | grade__idx_0            | 6 / 10     |
85
      | peercomment__idx_0      |            |
86
      | grade__idx_1            | 7 / 10     |
87
      | peercomment__idx_1      |            |
88
      | Feedback for the author | Keep it up |
89
    # teacher1 makes sure he can see all peer grades
90
    And I am on the "TestWorkshop" "workshop activity" page logged in as teacher1
91
    And I click on "//table/tbody/tr[td[contains(concat(' ', normalize-space(@class), ' '), ' participant ') and contains(.,'Sam2')]]/td[contains(concat(' ', normalize-space(@class), ' '), ' receivedgrade ') and contains(.,'Sam1')]/descendant::a[@class='grade']" "xpath_element"
92
    # teacher1 assesses the work on submission1 and assesses the assessment of peer
93
    And I set the following fields to these values:
94
      | Override grade for assessment | 11 |
95
      | Feedback for the reviewer     |    |
96
    And I press "Save and close"
97
    And I change phase in workshop "TestWorkshop" to "Grading evaluation phase"
98
    And I follow "Submission1"
99
    And I press "Assess"
100
    And I set the following fields to these values:
101
      | grade__idx_0            | 1 / 10                      |
102
      | peercomment__idx_0      | Extremely bad               |
103
      | grade__idx_1            | 2 / 10                      |
104
      | peercomment__idx_1      | Very bad                    |
105
      | Feedback for the author | Your peers overestimate you |
106
    And I press "Save and close"
107
    And I press "Re-calculate grades"
108
    And I change phase in workshop "TestWorkshop" to "Closed"
109
 
110
  Scenario: Add and assess submissions in workshop with javascript enabled
111
    And I am on the "Course1" course page logged in as student1
112
    And the "Receive a grade" completion condition of "TestWorkshop" is displayed as "done"
113
    And the "Receive a passing grade" completion condition of "TestWorkshop" is displayed as "failed"
114
    And I am on the "Course1" course page logged in as student2
115
    And the "Receive a grade" completion condition of "TestWorkshop" is displayed as "done"
116
    And the "Receive a passing grade" completion condition of "TestWorkshop" is displayed as "done"
117
    And I am on the "Course1" course page logged in as student3
118
    And the "Receive a grade" completion condition of "TestWorkshop" is displayed as "done"
119
    And the "Receive a passing grade" completion condition of "TestWorkshop" is displayed as "done"
120
    And I am on the "Course1" course page logged in as student4
121
    And the "Receive a grade" completion condition of "TestWorkshop" is displayed as "todo"
122
    And the "Receive a passing grade" completion condition of "TestWorkshop" is displayed as "todo"
123
    And I am on the "Course1" course page logged in as teacher1
124
    And "Sam1 Student1" user has completed "TestWorkshop" activity
125
    And "Sam2 Student2" user has completed "TestWorkshop" activity
126
    And "Sam3 Student3" user has completed "TestWorkshop" activity
127
    And "Sam4 Student4" user has not completed "TestWorkshop" activity