1 |
efrain |
1 |
@mod @mod_scorm
|
|
|
2 |
Feature: Scorm availability
|
|
|
3 |
In order to control when a SCORM activity is available to students
|
|
|
4 |
As a teacher
|
|
|
5 |
I need be able to set availability dates for the SCORM
|
|
|
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 | category |
|
|
|
13 |
| Course 1 | C1 | 0 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| student1 | C1 | student |
|
|
|
17 |
And the following "activities" exist:
|
|
|
18 |
| activity | course | name | packagefilepath | timeopen | timeclose |
|
|
|
19 |
| scorm | C1 | Past SCORM | mod/scorm/tests/packages/singlesco_scorm12.zip | ##yesterday## | ##yesterday## |
|
|
|
20 |
| scorm | C1 | Current SCORM | mod/scorm/tests/packages/singlesco_scorm12.zip | ##yesterday## | ##tomorrow## |
|
|
|
21 |
| scorm | C1 | Future SCORM | mod/scorm/tests/packages/singlesco_scorm12.zip | ##tomorrow## | ##tomorrow## |
|
|
|
22 |
|
|
|
23 |
Scenario: Scorm activity with dates in the past should not be available.
|
|
|
24 |
When I am on the "Past SCORM" "scorm activity" page logged in as "student1"
|
|
|
25 |
Then the activity date in "Past SCORM" should contain "Opened:"
|
|
|
26 |
And the activity date in "Past SCORM" should contain "##yesterday noon##%A, %d %B %Y, %I:%M##"
|
|
|
27 |
And the activity date in "Past SCORM" should contain "Closed:"
|
|
|
28 |
And the activity date in "Past SCORM" should contain "##yesterday noon##%A, %d %B %Y, %I:%M##"
|
|
|
29 |
And "Enter" "button" should not exist
|
|
|
30 |
And I should not see "Preview"
|
|
|
31 |
And I am on the "Current SCORM" "scorm activity" page
|
|
|
32 |
And the activity date in "Current SCORM" should contain "Opened:"
|
|
|
33 |
And the activity date in "Current SCORM" should contain "##yesterday noon##%A, %d %B %Y, %I:%M##"
|
|
|
34 |
And the activity date in "Current SCORM" should contain "Closes:"
|
|
|
35 |
And the activity date in "Current SCORM" should contain "##tomorrow noon##%A, %d %B %Y, %I:%M##"
|
|
|
36 |
And "Enter" "button" should exist
|
|
|
37 |
And I should see "Preview"
|
|
|
38 |
And I am on the "Future SCORM" "scorm activity" page
|
|
|
39 |
And the activity date in "Future SCORM" should contain "Opens:"
|
|
|
40 |
And the activity date in "Future SCORM" should contain "##tomorrow noon##%A, %d %B %Y, %I:%M##"
|
|
|
41 |
And the activity date in "Future SCORM" should contain "Closes:"
|
|
|
42 |
And the activity date in "Future SCORM" should contain "##tomorrow noon##%A, %d %B %Y, %I:%M##"
|
|
|
43 |
And "Enter" "button" should not exist
|
|
|
44 |
And I should not see "Preview"
|