Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_lti @core_completion
2
Feature: View activity completion information in the LTI activity
3
  In order to have visibility of LTI completion requirements
4
  As a student
5
  I need to be able to view my LTI 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 | category | enablecompletion | showcompletionconditions |
14
      | Course 1 | C1        | 0        | 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 "activities" exist:
20
      | activity | name          | course | idnumber | completion | completionview | completionusegrade |
21
      | lti      | Music history | C1     | lti1     | 2          | 1              | 1                  |
22
 
23
  Scenario: View automatic completion items as a teacher
24
    Given I am on the "Music history" "lti activity" page logged in as teacher1
25
    Then "Music history" should have the "Receive a grade" completion condition
26
    And "Music history" should have the "View" completion condition
27
 
28
  @javascript
29
  Scenario: View automatic completion items as a student
30
    Given I am on the "Music history" "lti activity" page logged in as student1
31
    And the "View" completion condition of "Music history" is displayed as "done"
32
    And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
33
    And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1"
34
    And I turn editing mode on
35
    And I give the grade "90.00" to the user "Vinnie Student1" for the grade item "Music history"
36
    And I press "Save changes"
37
    When I am on the "Music history" "lti activity" page logged in as student1
38
    Then the "Receive a grade" completion condition of "Music history" is displayed as "done"
39
    And the "View" completion condition of "Music history" is displayed as "done"
40
 
41
  @javascript
42
  Scenario: Use manual completion
43
    Given I am on the "Music history" "lti activity editing" page logged in as teacher1
44
    And I expand all fieldsets
45
    And I set the field "Students must manually mark the activity as done" to "1"
46
    And I press "Save and display"
47
    # Teacher view.
48
    And the manual completion button for "Music history" should be disabled
49
    # Student view.
50
    When I am on the "Music history" "lti activity" page logged in as student1
51
    Then the manual completion button of "Music history" is displayed as "Mark as done"
52
    And I toggle the manual completion state of "Music history"
53
    And the manual completion button of "Music history" is displayed as "Done"