Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_glossary @core_completion
2
Feature: View activity completion in the glossary activity
3
  In order to have visibility of glossary completion requirements
4
  As a student
5
  I need to be able to view my glossary completion progress
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | student1 | Vinnie    | Student1 | student1@example.com |
11
      | teacher1 | Darrell   | Teacher1 | teacher1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname | enablecompletion | showcompletionconditions |
14
      | Course 1 | C1        | 1                | 1                        |
15
    And the following "course enrolments" exist:
16
      | user | course | role           |
17
      | student1 | C1 | student        |
18
      | teacher1 | C1 | editingteacher |
19
    And the following "activity" exists:
20
      | activity | glossary      |
21
      | course   | C1            |
22
      | name     | Music history |
23
      | section  | 1             |
24
    And I am on the "Music history" "glossary activity editing" page logged in as teacher1
25
    And I expand all fieldsets
26
    And I set the following fields to these values:
27
      | Aggregate type           | Average of ratings                                |
28
      | scale[modgrade_type]     | Point                                             |
29
      | scale[modgrade_point]    | 100                                               |
30
      | Add requirements         | 1                  |
31
      | View the activity        | 1                                                 |
32
      | Receive a grade          | 1                                                 |
33
      | Any grade                | 1                                                 |
34
      | completionentriesenabled | 1                                                 |
35
      | completionentries        | 1                                                 |
36
    And I press "Save and display"
37
    And I log out
38
 
39
  Scenario: View automatic completion items as a teacher
40
    Given I am on the "Music history" "glossary activity" page logged in as teacher1
41
    Then "Music history" should have the "View" completion condition
42
    And "Music history" should have the "Make entries: 1" completion condition
43
    And "Music history" should have the "Receive a grade" completion condition
44
 
45
  Scenario: View automatic completion items as a student
46
    Given I am on the "Music history" "glossary activity" page logged in as student1
47
    And the "View" completion condition of "Music history" is displayed as "done"
48
    And the "Make entries: 1" completion condition of "Music history" is displayed as "todo"
49
    And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
50
    And I am on the "Music history" "glossary activity" page
51
    And I press "Add entry"
52
    And I set the following fields to these values:
53
      | Concept    | Blast beats                                               |
54
      | Definition | Repeated fast tempo hits combining bass, snare and cymbal |
55
    And I press "Save changes"
56
    And the "View" completion condition of "Music history" is displayed as "done"
57
    And the "Make entries: 1" completion condition of "Music history" is displayed as "done"
58
    And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
59
    And I log out
60
    And I am on the "Music history" "glossary activity" page logged in as teacher1
61
    And I set the field "rating" to "3"
62
    And I press "Rate"
63
    And I log out
64
    When I am on the "Music history" "glossary activity" page logged in as student1
65
    Then the "View" completion condition of "Music history" is displayed as "done"
66
    And the "Make entries: 1" completion condition of "Music history" is displayed as "done"
67
    And the "Receive a grade" completion condition of "Music history" is displayed as "done"
68
 
69
  @javascript
70
  Scenario: Use manual completion
71
    Given I am on the "Music history" "glossary activity editing" page logged in as teacher1
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
    And I log out
78
    # Student view.
79
    When I am on the "Music history" "glossary activity" page logged in as student1
80
    Then the manual completion button of "Music history" is displayed as "Mark as done"
81
    And I toggle the manual completion state of "Music history"
82
    And the manual completion button of "Music history" is displayed as "Done"