upgrade
This commit is contained in:
68
plugin/ims_lti/view/add.tpl
Normal file
68
plugin/ims_lti/view/add.tpl
Normal file
@@ -0,0 +1,68 @@
|
||||
<div class="row">
|
||||
{% if global_tools|length or added_tools|length %}
|
||||
<div class="col-sm-3">
|
||||
{% if added_tools|length %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h2 class="panel-title">{{ 'ToolsAdded'|get_plugin_lang('ImsLtiPlugin') }}</h2>
|
||||
</div>
|
||||
<ul class="list-group">
|
||||
{% for tool in added_tools %}
|
||||
<li class="list-group-item {{ type == tool.id ? 'active' : '' }}">
|
||||
<div class="pull-right">
|
||||
{% if tool.isActiveDeepLinking %}
|
||||
<a href="{{ _p.web_plugin }}ims_lti/start.php?id={{ tool.id }}&{{ _p.web_cid_query }}">
|
||||
{{ 'settings.png'|img(22, 'Configure'|get_lang) }}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if tool.version == 'lti1p3' %}
|
||||
<a href="{{ _p.web_plugin }}ims_lti/tool_settings.php?{{ {'id': tool.id}|url_encode }}" class="ajax"
|
||||
data-title="{{ 'ConfigSettingsForTool'|get_plugin_lang('ImsLtiPlugin') }}">
|
||||
{{ 'webservices.png'|img(22, 'ConfigSettingsForTool'|get_plugin_lang('ImsLtiPlugin')) }}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ _p.web_plugin }}ims_lti/configure.php?action=edit&id={{ tool.id }}&{{ _p.web_cid_query }}">
|
||||
{{ 'edit.png'|img(22, 'Edit'|get_lang) }}
|
||||
</a>
|
||||
</div>
|
||||
{{ tool.name|e }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if global_tools|length %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h2 class="panel-title">{{ 'AvailableTools'|get_plugin_lang('ImsLtiPlugin') }}</h2>
|
||||
</div>
|
||||
<ul class="list-group">
|
||||
{% for tool in global_tools %}
|
||||
<li class="list-group-item {{ type == tool.id ? 'active' : '' }}">
|
||||
<div class="pull-right">
|
||||
{% if tool.isActiveDeepLinking %}
|
||||
<a href="{{ _p.web_plugin }}ims_lti/start.php?id={{ tool.id }}&{{ _p.web_cid_query }}">
|
||||
{{ 'settings.png'|img(22, 'Configure'|get_lang) }}
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ _p.web_self }}?type={{ tool.id }}&{{ _p.web_cid_query }}">
|
||||
{{ 'add.png'|img(22, 'Add'|get_lang) }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ tool.name|e }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="col-sm-9 {{ not global_tools|length and not added_tools|length ? 'col-md-offset-3' : '' }}">
|
||||
{{ form }}
|
||||
</div>
|
||||
</div>
|
||||
104
plugin/ims_lti/view/admin.tpl
Normal file
104
plugin/ims_lti/view/admin.tpl
Normal file
@@ -0,0 +1,104 @@
|
||||
{% import _self as table_tool %}
|
||||
|
||||
{% macro row_tool(tool, is_child, categories, _p) %}
|
||||
{% set url_params = {'id': tool.id}|url_encode() %}
|
||||
<tr class="{{ is_child ? 'child' : '' }}">
|
||||
<td {% if is_child %} colspan="2" {% endif %}>
|
||||
{{ tool.name }}
|
||||
{% if not is_child %}
|
||||
<br><span class="badge badge-warning">{{ tool.versionName }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if not is_child %}
|
||||
<td>{{ tool.launchUrl }}</td>
|
||||
{% endif %}
|
||||
<td class="text-center">
|
||||
{% if tool.course is not empty %}
|
||||
{{ tool.course.title }}
|
||||
{% endif %}
|
||||
{% if tool.session is not empty %}
|
||||
({{ tool.session.name }})
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% if not is_child and tool.version == 'lti1p3' %}
|
||||
<a href="{{ _p.web_plugin }}ims_lti/tool_settings.php?{{ url_params }}" class="ajax"
|
||||
data-title="{{ 'ConfigSettingsForTool'|get_plugin_lang('ImsLtiPlugin') }}">
|
||||
{{ 'webservices.png'|img(22, 'ConfigSettingsForTool'|get_plugin_lang('ImsLtiPlugin')) }}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if not is_child %}
|
||||
<a href="{{ _p.web_plugin }}ims_lti/multiply.php?{{ url_params }}">
|
||||
{{ 'multiplicate_survey.png'|img(22, 'AddInCourses'|get_plugin_lang('ImsLtiPlugin')) }}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if not is_child %}
|
||||
<a href="{{ _p.web_plugin }}ims_lti/session.php?{{ url_params }}">
|
||||
{{ 'session.png'|img(22, 'AddInSessions'|get_plugin_lang('ImsLtiPlugin')) }}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if is_child %}
|
||||
{% for category in categories %}
|
||||
{% set url_eval_params = null %}
|
||||
{% if tool.session is not empty %}
|
||||
{% if category.get_course_code == tool.course.code and category.get_session_id == tool.session.id %}
|
||||
{% set url_eval_params = {'selectcat': category.get_id, 'cidReq': tool.course.code, 'id_session': tool.session.id, 'gidReq': 0, 'gradebook': 0}|url_encode() %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if category.get_course_code == tool.course.code %}
|
||||
{% set url_eval_params = {'selectcat': category.get_id, 'cidReq': tool.course.code, 'id_session': 0, 'gidReq': 0, 'gradebook': 0}|url_encode() %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if url_eval_params is not null %}
|
||||
<a href="{{ _p.web_plugin }}ims_lti/gradebook/add_eval.php?{{ url_eval_params }}">
|
||||
{{ 'gradebook.png'|img(22, 'MakeQualifiable'|get_lang) }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ _p.web_plugin }}ims_lti/edit.php?{{ url_params }}">
|
||||
{{ 'edit.png'|img(22, 'Edit'|get_lang) }}
|
||||
</a>
|
||||
<a href="{{ _p.web_plugin }}ims_lti/delete.php?{{ url_params }}">
|
||||
{{ 'delete.png'|img(22, 'Delete'|get_lang) }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endmacro %}
|
||||
|
||||
{{ 'ImsLtiDescription'|get_plugin_lang('ImsLtiPlugin') }}
|
||||
|
||||
{% autoescape 'html' %}
|
||||
<div class="btn-toolbar">
|
||||
<a href="{{ _p.web_plugin }}ims_lti/platform.php" class="btn btn-link pull-right">
|
||||
<span class="fa fa-cogs fa-fw" aria-hidden="true"></span> {{ 'PlatformKeys'|get_plugin_lang('ImsLtiPlugin') }}
|
||||
</a>
|
||||
<a href="{{ _p.web_plugin }}ims_lti/create.php" class="btn btn-primary">
|
||||
<span class="fa fa-plus fa-fw" aria-hidden="true"></span> {{ 'AddExternalTool'|get_plugin_lang('ImsLtiPlugin') }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover admin-tools">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Name'|get_lang }}</th>
|
||||
<th>{{ 'LaunchUrl'|get_plugin_lang('ImsLtiPlugin') }}</th>
|
||||
<th class="text-center">{{ 'Course'|get_lang }}</th>
|
||||
<th class="text-right">{{ 'Actions'|get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for tool in tools %}
|
||||
{{ table_tool.row_tool(tool, false, categories, _p) }}
|
||||
{% for child_tool in tool.getChildren %}
|
||||
{{ table_tool.row_tool(child_tool, true, categories, _p) }}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endautoescape %}
|
||||
6
plugin/ims_lti/view/start.tpl
Normal file
6
plugin/ims_lti/view/start.tpl
Normal file
@@ -0,0 +1,6 @@
|
||||
{% if tool.description %}
|
||||
<p class="lead">{{ tool.description|e|nl2br }}</p>
|
||||
{% endif %}
|
||||
<div class="embed-responsive embed-responsive-4by3">
|
||||
<iframe src="{{ launch_url }}" class="plugin-ims-lti-iframe"></iframe>
|
||||
</div>
|
||||
Reference in New Issue
Block a user