Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@report @report_completion
2
Feature: See the completion for items in a course
3
  In order see completion data
4
  As a teacher
5
  I need to view completion report
6
 
7
  Background:
8
    Given the following "custom profile fields" exist:
9
      | datatype | shortname | name  |
10
      | text     | fruit     | Fruit |
11
    And the following "users" exist:
12
      | username | firstname | lastname  | email                | middlename | alternatename | firstnamephonetic | lastnamephonetic | profile_field_fruit |
13
      | teacher1 | Teacher   | 1         | teacher1@example.com |            | fred          |                   |                  |                     |
14
      | student1 | Grainne   | Beauchamp | student1@example.com | Ann        | Jill          | Gronya            | Beecham          | Kumquat             |
15
    And the following "courses" exist:
16
      | fullname | shortname | category | enablecompletion |
17
      | Course 1 | C1        | 0        | 1                |
18
    And the following "course enrolments" exist:
19
      | user     | course | role           |
20
      | teacher1 | C1     | editingteacher |
21
      | student1 | C1     | student        |
22
    And the following "activities" exist:
23
      | activity | name       | intro      | course | idnumber | completion | completionview |
24
      | page     | PageName1  | PageDesc1  | C1     | PAGE1    | 1          | 1              |
25
 
26
  @javascript
27
  Scenario: The completion report respects user fullname setting
28
    Given the following config values are set as admin:
29
      | fullnamedisplay | firstname |
30
      | alternativefullnameformat | middlename, alternatename, firstname, lastname |
31
    And I am on the "C1" "Course" page logged in as "teacher1"
32
    And I navigate to "Course completion" in current page administration
33
    And I expand all fieldsets
34
    And I set the following fields to these values:
35
      | Page - PageName1 | 1 |
36
    And I press "Save changes"
37
    And I am on "Course 1" course homepage
38
    When I navigate to "Reports" in current page administration
39
    And I click on "Course completion" "link" in the "region-main" "region"
40
    Then I should see "Ann, Jill, Grainne, Beauchamp"
41
 
42
  @javascript
43
  Scenario: The completion report displays custom user profile fields
44
    Given the following config values are set as admin:
45
      | showuseridentity | email,profile_field_fruit |
46
    And I am on the "C1" "Course" page logged in as "teacher1"
47
    And I navigate to "Course completion" in current page administration
48
    And I expand all fieldsets
49
    And I set the following fields to these values:
50
      | Page - PageName1 | 1 |
51
    And I press "Save changes"
52
    And I am on "Course 1" course homepage
53
    When I navigate to "Reports" in current page administration
54
    And I click on "Course completion" "link" in the "region-main" "region"
55
    # We can't refer to table headings by name because they aren't on the first row.
56
    Then the following should exist in the "completionreport" table:
57
      | -1-               | -2-                  | -3-     |
58
      | Grainne Beauchamp | student1@example.com | Kumquat |