Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
11 efrain 1
@mod @mod_data
2
Feature: Control database activity entry based on read-only dates
3
  In order to restrict or allow student entries based on specific dates
4
  As a teacher
5
  I need to be able to set read-only dates for the database activity
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | student1 | Student   | 1        | student1@example.com |
11
    And the following "courses" exist:
12
      | fullname | shortname |
13
      | Course 1 | C1        |
14
    And the following "course enrolments" exist:
15
      | user     | course | role           |
16
      | student1 | C1     | student        |
17
 
18
  Scenario Outline: Student can add entries only when the current date falls outside the read-only date range
19
    Given the following "activities" exist:
20
      | activity | course | name            | idnumber | timeviewfrom | timeviewto |
21
      | data     | C1     | Data Activity 1 | DB1      | <viewfrom>   | <viewto>   |
22
    And the following "mod_data > fields" exist:
23
      | database | type | name       |
24
      | DB1      | text | DB Field 1 |
25
    When I am on the "Data Activity 1" "data activity" page logged in as student1
26
    # The "Add entry" button is visible only when the current date falls outside the read-only date range.
27
    Then "Add entry" "button" <btnvisibility> exist
28
 
29
    Examples:
30
      | viewfrom             | viewto             | btnvisibility |
31
      | ##yesterday##        | ##tomorrow##       | should not    |
32
      | ##tomorrow##         | ##tomorrow +1day## | should        |
33
      | ##1 week ago##       | ##yesterday##      | should        |