Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_feedback @core_completion
2
Feature: View activity completion in the feedback activity
3
  In order to have visibility of feedback completion requirements
4
  As a student
5
  I need to be able to view my feedback 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         | feedback      |
21
      | course           | C1            |
22
      | idnumber         | mh1           |
23
      | name             | Music history |
24
      | section          | 1             |
25
      | completion       | 2             |
26
      | completionview   | 1             |
27
      | completionsubmit | 1             |
28
    And I am on the "Music history" "feedback activity" page logged in as teacher1
29
    And I click on "Edit questions" "link" in the "[role=main]" "css_element"
30
    And I add a "Multiple choice" question to the feedback with:
31
        | Question               | What is your favourite instrument |
32
        | Label                  | instrument1                       |
33
        | Multiple choice type   | Multiple choice - single answer   |
34
        | Multiple choice values | drums\guitar\hurdygurdy           |
35
    And I log out
36
 
37
  Scenario: View automatic completion items as a teacher
38
    When I am on the "Music history" "feedback activity" page logged in as teacher1
39
    Then "Music history" should have the "View" completion condition
40
    And "Music history" should have the "Submit feedback" completion condition
41
 
42
  Scenario: View automatic completion items as a student
43
    Given I am on the "Music history" "feedback activity" page logged in as student1
44
    And the "View" completion condition of "Music history" is displayed as "todo"
45
    And the "Submit feedback" completion condition of "Music history" is displayed as "todo"
46
    When I follow "Answer the questions"
47
    And I set the field "drums" to "1"
48
    And I press "Submit your answers"
49
    And I press "Continue"
50
    And I am on the "Music history" "feedback activity" page
51
    Then the "View" completion condition of "Music history" is displayed as "done"
52
    And the "Submit feedback" completion condition of "Music history" is displayed as "done"
53
 
54
  @javascript
55
  Scenario: Use manual completion
56
    Given I am on the "Music history" "feedback activity editing" page logged in as teacher1
57
    And I expand all fieldsets
58
    And I set the field "Students must manually mark the activity as done" to "1"
59
    And I press "Save and display"
60
    # Teacher view.
61
    And the manual completion button for "Music history" should be disabled
62
    And I log out
63
    # Student view.
64
    When I am on the "Music history" "feedback activity" page logged in as student1
65
    Then the manual completion button of "Music history" is displayed as "Mark as done"
66
    And I toggle the manual completion state of "Music history"
67
    And the manual completion button of "Music history" is displayed as "Done"