1 |
efrain |
1 |
@enrol @enrol_lti
|
|
|
2 |
Feature: Publish activities and resources over LTI Advantage
|
|
|
3 |
In order to make content available to external platforms
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to publish and manage activities and resources using LTI Advantage
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | format |
|
|
|
13 |
| Course 1 | C1 | topics |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
And the following "activities" exist:
|
|
|
18 |
| activity | name | intro | course | idnumber | section |
|
|
|
19 |
| assign | Test assignment name | Submit your online text | C1 | assign1 | 1 |
|
|
|
20 |
And I enable "lti" "enrol" plugin
|
|
|
21 |
|
|
|
22 |
Scenario: A teacher can publish an activity
|
|
|
23 |
Given I log in as "teacher1"
|
|
|
24 |
And I am on the "Course 1" "enrolment methods" page
|
|
|
25 |
When I select "Publish as LTI tool" from the "Add method" singleselect
|
|
|
26 |
And the following fields match these values:
|
|
|
27 |
| LTI version | LTI Advantage |
|
|
|
28 |
And I set the following fields to these values:
|
|
|
29 |
| Custom instance name | Published assignment |
|
|
|
30 |
| Tool to be published | Test assignment name |
|
|
|
31 |
And I press "Add method"
|
|
|
32 |
And I am on "Course 1" course homepage
|
|
|
33 |
And I navigate to "Published as LTI tools" in current page administration
|
|
|
34 |
Then I should see "Launch URL" in the "Published assignment" "table_row"
|
|
|
35 |
And I should see "Custom properties" in the "Published assignment" "table_row"
|
|
|
36 |
And "Edit" "link" should exist in the "Published assignment" "table_row"
|
|
|
37 |
And "Delete" "link" should exist in the "Published assignment" "table_row"
|
|
|
38 |
And "Disable" "link" should exist in the "Published assignment" "table_row"
|
|
|
39 |
|
|
|
40 |
Scenario: A teacher can edit a published resource/activity
|
|
|
41 |
Given the following "enrol_lti > published resources" exist:
|
|
|
42 |
| name | uuid | activity | course |
|
|
|
43 |
| Published assignment | my-uuid-123 | assign1 | C1 |
|
|
|
44 |
And I am on the "Course 1" "Course" page logged in as "teacher1"
|
|
|
45 |
And I navigate to "Published as LTI tools" in current page administration
|
|
|
46 |
And the "value" attribute of "Custom properties" "field" should contain "id=my-uuid-123"
|
|
|
47 |
When I click on "Edit" "link" in the "Published assignment" "table_row"
|
|
|
48 |
And I set the following fields to these values:
|
|
|
49 |
| Custom instance name | New instance name |
|
|
|
50 |
And I press "Cancel"
|
|
|
51 |
And I should see "Published assignment" in the "Published assignment" "table_row"
|
|
|
52 |
And the "value" attribute of "Custom properties" "field" should contain "id=my-uuid-123"
|
|
|
53 |
And I click on "Edit" "link" in the "Published assignment" "table_row"
|
|
|
54 |
And I set the following fields to these values:
|
|
|
55 |
| Custom instance name | New instance name |
|
|
|
56 |
And I press "Save changes"
|
|
|
57 |
Then I should see "New instance name"
|
|
|
58 |
And the "value" attribute of "Custom properties" "field" should contain "id=my-uuid-123"
|
|
|
59 |
|
|
|
60 |
Scenario: A teacher can disable and enable a published resource/activity
|
|
|
61 |
Given the following "enrol_lti > published resources" exist:
|
|
|
62 |
| name | activity | course |
|
|
|
63 |
| Published assignment | assign1 | C1 |
|
|
|
64 |
And I am on the "Course 1" "Course" page logged in as "teacher1"
|
|
|
65 |
And I navigate to "Published as LTI tools" in current page administration
|
|
|
66 |
When I click on "Disable" "link" in the "Published assignment" "table_row"
|
|
|
67 |
Then ".dimmed_text" "css_element" should exist in the "Published assignment" "table_row"
|
|
|
68 |
And I click on "Enable" "link" in the "Published assignment" "table_row"
|
|
|
69 |
And ".dimmed_text" "css_element" should not exist in the "Published assignment" "table_row"
|
|
|
70 |
|
|
|
71 |
Scenario: A teacher can delete a published tool
|
|
|
72 |
Given the following "enrol_lti > published resources" exist:
|
|
|
73 |
| name | activity | course |
|
|
|
74 |
| Published assignment | assign1 | C1 |
|
|
|
75 |
And I am on the "Course 1" "Course" page logged in as "teacher1"
|
|
|
76 |
And I navigate to "Published as LTI tools" in current page administration
|
|
|
77 |
When I click on "Delete" "link" in the "Published assignment" "table_row"
|
|
|
78 |
And I press "Cancel"
|
|
|
79 |
And I should see "Published assignment" in the "Published assignment" "table_row"
|
|
|
80 |
And I click on "Delete" "link" in the "Published assignment" "table_row"
|
|
|
81 |
And I press "Continue"
|
|
|
82 |
And I should see "No resources or activities are published yet"
|
|
|
83 |
And I should not see "Published assignment"
|
|
|
84 |
|
|
|
85 |
Scenario: A teacher can switch the version of a published resource from LTI 1.1 to LTI Advantage
|
|
|
86 |
Given the following "enrol_lti > published resources" exist:
|
|
|
87 |
| name | activity | course | ltiversion |
|
|
|
88 |
| Published assignment | assign1 | C1 | LTI-1p0/LTI-2p0 |
|
|
|
89 |
And I am on the "Course 1" "Course" page logged in as "teacher1"
|
|
|
90 |
And I navigate to "Published as LTI tools" in current page administration
|
|
|
91 |
And I should see "No resources or activities are published yet"
|
|
|
92 |
And I click on "Legacy LTI (1.1/2.0)" "link"
|
|
|
93 |
And I should see "Published assignment"
|
|
|
94 |
When I click on "Edit" "link" in the "Published assignment" "table_row"
|
|
|
95 |
And the following fields match these values:
|
|
|
96 |
| LTI version | Legacy LTI (1.1/2.0) |
|
|
|
97 |
And I set the following fields to these values:
|
|
|
98 |
| LTI version | LTI Advantage |
|
|
|
99 |
| Custom instance name | New instance name |
|
|
|
100 |
And I press "Save changes"
|
|
|
101 |
And I click on "LTI Advantage" "link"
|
|
|
102 |
Then I should see "New instance name"
|
|
|
103 |
And "LTI Advantage" "link" should not exist
|
|
|
104 |
And "Legacy LTI (1.1/2.0)" "link" should exist
|
|
|
105 |
And the "value" attribute of "Custom properties" "field" should contain "id="
|