Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@enrol @ewallah @enrol_coursecompleted
2
Feature: Groups kept during enrolment on course completion
3
 
4
  Background:
5
    Given the following "courses" exist:
6
      | fullname | shortname | startdate     | enddate                    | enablecompletion |
7
      | Course 1 | C1        | ##yesterday## | ##tomorrow##               | 1                |
8
      | Course 2 | C2        | ##tomorrow##  | ##last day of next month## | 1                |
9
    And the following "users" exist:
10
      | username |
11
      | user1    |
12
      | teacher1 |
13
    And the following "course enrolments" exist:
14
      | user     | course | role           |
15
      | user1    | C1     | student        |
16
      | teacher1 | C1     | editingteacher |
17
      | teacher1 | C2     | editingteacher |
18
    And the following "groups" exist:
19
      | name    | description       | course | idnumber |
20
      | Group 1 | Group description | C1     | GROUP1   |
21
      | Group 1 | Group description | C2     | GROUP2   |
22
    And the following "group members" exist:
23
      | user  | group |
24
      | user1 | GROUP1|
25
 
26
  @javascript
27
  Scenario: User stays in same group after completing one or several courses
28
    Given I log in as "admin"
29
    And I navigate to "Plugins > Enrolments > Manage enrol plugins" in site administration
30
    And I click on "Enable" "link" in the "Course completed enrolment" "table_row"
31
    And I am on "Course 1" course homepage
32
    And I navigate to "Course completion" in current page administration
33
    And I expand all fieldsets
34
    And I set the field "Teacher" to "1"
35
    And I press "Save changes"
36
    And I log out
37
 
38
    When I am on the "C2" "Course" page logged in as "teacher1"
39
    And I add "Course completed enrolment" enrolment method in "Course 2" with:
40
       | Course | Course 1 |
41
    And I am on "Course 1" course homepage
42
    And I navigate to "Reports" in current page administration
43
    And I click on "Course completion" "link" in the "region-main" "region"
44
    And I follow "Click to mark user complete"
45
    And I wait "1" seconds
46
    And I run the scheduled task "core\task\completion_regular_task"
47
    And I run all adhoc tasks
48
 
49
    And I am on "Course 2" course homepage
50
    And I navigate to course participants
51
    Then I should see "2 participants found"
52
    And I should see "Group 1" in the "participants" "table"
53
    And I set the field "type" in the "Filter 1" "fieldset" to "Groups"
54
    And I set the field "Type or select..." in the "Filter 1" "fieldset" to "Group 1"
55
    And I click on "Apply filters" "button"
56
    And I should see "1 participants found"