1 |
efrain |
1 |
{{!
|
|
|
2 |
This file is part of Moodle - http://moodle.org/
|
|
|
3 |
|
|
|
4 |
Moodle is free software: you can redistribute it and/or modify
|
|
|
5 |
it under the terms of the GNU General Public License as published by
|
|
|
6 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
7 |
(at your option) any later version.
|
|
|
8 |
|
|
|
9 |
Moodle is distributed in the hope that it will be useful,
|
|
|
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
12 |
GNU General Public License for more details.
|
|
|
13 |
|
|
|
14 |
You should have received a copy of the GNU General Public License
|
|
|
15 |
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16 |
}}
|
|
|
17 |
{{!
|
|
|
18 |
@template enrol_lti/local/ltiadvantage/deployments
|
|
|
19 |
|
|
|
20 |
Template which displays a table view of all deployments attached to a registration, with options to delete and add.
|
|
|
21 |
|
|
|
22 |
Classes required for JS:
|
|
|
23 |
* none
|
|
|
24 |
|
|
|
25 |
Data attributes required for JS:
|
|
|
26 |
* none
|
|
|
27 |
|
|
|
28 |
Context variables required for this template:
|
|
|
29 |
* deployments_info
|
|
|
30 |
* has_deployments
|
|
|
31 |
* add_deployment_url
|
|
|
32 |
|
|
|
33 |
Optional context variables for this template:
|
|
|
34 |
* tool_deployments
|
|
|
35 |
|
|
|
36 |
Example context (json):
|
|
|
37 |
{
|
|
|
38 |
"deployments_info": "A deployment ID will be generated when...",
|
|
|
39 |
"has_deployments": true,
|
|
|
40 |
"tool_deployments": [
|
|
|
41 |
{
|
|
|
42 |
"name": "Site level deployment of tool x in platform y",
|
|
|
43 |
"deploymentid": "deploy-id-12345",
|
|
|
44 |
"deleteurl": "https://example.org/enrol/lti/manage_deployments.php?action=delete&id=2®istrationid=1"
|
|
|
45 |
}
|
|
|
46 |
],
|
|
|
47 |
"add_deployment_url": "https://example.org/enrol/lti/manage_deployments.php?action=add"
|
|
|
48 |
}
|
|
|
49 |
}}
|
|
|
50 |
<div id="lti_tool_deployments" class="mb-3">
|
|
|
51 |
<div class="alert alert-info alert-block">
|
|
|
52 |
{{{deployments_info}}}
|
|
|
53 |
</div>
|
|
|
54 |
{{#has_deployments}}
|
|
|
55 |
<table class="admintable generaltable">
|
|
|
56 |
<thead>
|
|
|
57 |
<tr>
|
|
|
58 |
<th>{{#str}}name, core{{/str}}</th>
|
|
|
59 |
<th>{{#str}}deploymentid, enrol_lti{{/str}}</th>
|
|
|
60 |
<th>{{#str}}actions, core{{/str}}</th>
|
|
|
61 |
</tr>
|
|
|
62 |
</thead>
|
|
|
63 |
<tbody>
|
|
|
64 |
{{#tool_deployments}}
|
|
|
65 |
<tr>
|
|
|
66 |
<th>{{name}}</th>
|
|
|
67 |
<td>{{deploymentid}}</td>
|
|
|
68 |
<td>
|
|
|
69 |
<a class="delete" href="{{deleteurl}}" title="{{#str}} delete {{/str}}">{{#pix}} t/delete, core, {{#str}} delete {{/str}}{{/pix}}</a>
|
|
|
70 |
</td>
|
|
|
71 |
</tr>
|
|
|
72 |
{{/tool_deployments}}
|
|
|
73 |
</tbody>
|
|
|
74 |
</table>
|
|
|
75 |
{{/has_deployments}}
|
|
|
76 |
{{^has_deployments}}
|
|
|
77 |
<div>
|
|
|
78 |
{{#str}}nodeployments, enrol_lti{{/str}}
|
|
|
79 |
</div>
|
|
|
80 |
<br>
|
|
|
81 |
{{/has_deployments}}
|
|
|
82 |
<div>
|
|
|
83 |
<a class="btn btn-secondary" href="{{add_deployment_url}}">{{#str}}deploymentadd, enrol_lti{{/str}}</a>
|
|
|
84 |
</div>
|
|
|
85 |
</div>
|