Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@ewallah @availability @availability_coursecompleted
2
Feature: availability coursecompleted fast completion
3
  I need to test how fast this a restricted module becomes available when using availability course completion
4
 
5
  Background:
6
    Given the following "courses" exist:
7
      | fullname | shortname | format | enablecompletion |
8
      | Course 1 | C1        | topics | 1                |
9
    And the following "activities" exist:
10
      | activity  | name   | course | idnumber | completion |
11
      | page      | Page 1 | C1     | page1    | 1          |
12
      | page      | Page 2 | C1     | page2    | 0          |
13
    And the following "users" exist:
14
      | username |
15
      | student1 |
16
    And the following "course enrolments" exist:
17
      | user     | course | role           |
18
      | student1 | C1     | student        |
19
 
20
  @javascript
21
  Scenario: Bulk upload of users and restrict completion
22
    Given I am on the "C1" "Course" page logged in as "admin"
23
    And I navigate to "Course completion" in current page administration
24
    And I expand all fieldsets
25
    And I set the field "Page 1" to "1"
26
    And I click on "Save changes" "button"
27
    And I am on the "page2" "page activity editing" page
28
    And I expand all fieldsets
29
    And I click on "Add restriction..." "button"
30
    And I click on "Activity completion" "button" in the "Add restriction..." "dialogue"
31
    And I set the field "Activity or resource" to "Page 1"
32
    And I click on "Save and return to course" "button"
33
    And I log out
34
    # Log in as student.
35
    When I am on the "C1" "Course" page logged in as "student1"
36
    And I should see "Page 1" in the "region-main" "region"
37
    And I should see "Page 2" in the "region-main" "region"
38
    And I should see "Not available unless:" in the "region-main" "region"
39
    And I press "Mark as done"
40
    And I wait until "Done" "button" exists
41
    And I follow "Page 2"
42
    Then I should see "Test page content" in the "region-main" "region"
43