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
2
Feature: View activity completion information in the Workshop activity
3
  In order to have visibility of lesson completion requirements
4
  As a student
5
  I need to be able to view my lesson completion progress
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | student1 | Vinnie    | Student1 | student1@example.com |
11
      | student2 | Rex       | Student2 | student2@example.com |
12
      | teacher1 | Darrell   | Teacher1 | teacher1@example.com |
13
    And the following "courses" exist:
14
      | fullname | shortname | enablecompletion | showcompletionconditions |
15
      | Course 1 | C1        | 1                | 1                        |
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 | submissiontypefile | completion | completionview |
23
        | workshop | Music history | C1     | 1                  | 2          | 1              |
24
    And I am on the "Music history" "workshop activity editing" page logged in as teacher1
25
    And I set the following fields to these values:
26
      | Receive a grade       | Submission                                        |
27
      | Any grade             | 1                                                 |
28
    And I press "Save and return to course"
29
    And I edit assessment form in workshop "Music history" as:
30
      | id_description__idx_0_editor | Aspect1 |
31
    And I change phase in workshop "Music history" to "Submission phase"
32
 
33
  Scenario: View automatic completion items as a teacher
34
    Given I am on the "Music history" "workshop activity" page
35
    Then "Music history" should have the "Receive a grade" completion condition
36
    And "Music history" should have the "View" completion condition
37
 
38
  Scenario: View automatic completion items as a student
39
    Given I am on the "Music history" "workshop activity" page logged in as student1
40
    And the "View" completion condition of "Music history" is displayed as "done"
41
    And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
42
    # Add a submission.
43
    And I press "Add submission"
44
    And I set the field "Title" to "Pinch harmonics"
45
    And I set the field "Submission content" to "Satisfying to play"
46
    And I press "Save changes"
47
    And I am on the "Course 1" course page logged in as teacher1
48
    And I change phase in workshop "Music history" to "Assessment phase"
49
    And I allocate submissions in workshop "Music history" as:
50
      | Participant     | Reviewer      |
51
      | Vinnie Student1 | Rex Student2  |
52
    # Assess the submission.
53
    And I am on the "Music history" "workshop activity" page logged in as student2
54
    And I assess submission "Pinch harmonics" in workshop "Music history" as:
55
      | grade__idx_0            | 9 / 10      |
56
      | peercomment__idx_0      | Well done   |
57
    # Evaluate and close the workshop so a grade is recorded for the student.
58
    And I am on the "Course 1" course page logged in as teacher1
59
    And I change phase in workshop "Music history" to "Grading evaluation phase"
60
    And I am on the "Music history" "workshop activity" page
61
    And I click on "Re-calculate grades" "button"
62
    And I change phase in workshop "Music history" to "Closed"
63
    # Confirm completion condition is updated.
64
    When I am on the "Music history" "workshop activity" page logged in as student1
65
    Then the "View" completion condition of "Music history" is displayed as "done"
66
    And the "Receive a grade" completion condition of "Music history" is displayed as "done"
67
 
68
  @javascript
69
  Scenario: Use manual completion
70
    Given I am on the "Music history" "workshop activity" page
71
    And I am on the "Music history" "workshop activity editing" page
72
    And I expand all fieldsets
73
    And I set the field "Students must manually mark the activity as done" to "1"
74
    And I press "Save and display"
75
    # Teacher view
76
    And the manual completion button for "Music history" should be disabled
77
    # Student view.
78
    When I am on the "Music history" "workshop activity" page logged in as student1
79
    Then the manual completion button of "Music history" is displayed as "Mark as done"
80
    And I toggle the manual completion state of "Music history"
81
    And the manual completion button of "Music history" is displayed as "Done"