Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_h5pactivity @core_5hp
2
Feature: Control H5P activity availability for students
3
  In order to restrict student access to H5P activity
4
  As a teacher
5
  I need to control the availability of the H5P activity
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | Teacher   | 1        | teacher1@example.com |
11
      | student1 | Student   | 1        | student1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname |
14
      | Course 1 | C1        |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | teacher1 | C1     | editingteacher |
18
      | student1 | C1     | student        |
19
    And the following "activities" exist:
20
      | activity    | course | name     |
21
      | h5pactivity | C1     | H5P Test |
22
 
23
  @javascript
24
  Scenario Outline: Restrict H5P activity access by date
25
    Given I am on the "H5P Test" "h5pactivity activity editing" page logged in as teacher1
26
    And I expand all fieldsets
27
    And I click on "Add restriction..." "button"
28
    And I click on "Date" "button" in the "Add restriction..." "dialogue"
29
    And I set the following fields to these values:
30
      | Direction | from   |
31
      | x[day]    | 1      |
32
      | x[month]  | 1      |
33
      | x[year]   | <year> |
34
    And I press "Save and return to course"
35
    When I am on the "Course 1" course page logged in as student1
36
    Then I <fromvisibility> see "Available from"
37
 
38
    Examples:
39
      | year                | fromvisibility |
40
      | ## -1 year ## %Y ## | should not     |
41
      | ## +1 year ## %Y ## | should         |