upgrade
This commit is contained in:
25
main/template/default/learnpath/impress.tpl
Normal file
25
main/template/default/learnpath/impress.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
<div class="fallback-message">
|
||||
<p>Your browser <b>doesn't support the features required</b> by impress.js, so you are presented with a simplified version of this presentation.</p>
|
||||
<p>For the best experience please use the latest <b>Chrome</b>, <b>Safari</b> or <b>Firefox</b> browser.</p>
|
||||
</div>
|
||||
|
||||
<div id="impress">
|
||||
{{ html }}
|
||||
</div>
|
||||
<div id="impress-toolbar"></div>
|
||||
|
||||
<div class="hint">
|
||||
<p>Use a spacebar or arrow keys to navigate</p>
|
||||
</div>
|
||||
<script>
|
||||
if ("ontouchstart" in document.documentElement) {
|
||||
document.querySelector(".hint").innerHTML = "<p>Tap on the left or right to navigate</p>";
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
impress().init();
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="{{_p.web_lib}}javascript/impress/impress.js"></script>
|
||||
690
main/template/default/learnpath/list.tpl
Normal file
690
main/template/default/learnpath/list.tpl
Normal file
@@ -0,0 +1,690 @@
|
||||
<script>
|
||||
function confirmation(name) {
|
||||
if (confirm("{{ "AreYouSureToDeleteJS"|get_lang }} \"" + name + "\" ?")) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
if (urlParams.has("reduced")) {
|
||||
document.body.addEventListener("click", function (event) {
|
||||
let target = event.target;
|
||||
while (target && target.tagName !== "A" && target.tagName !== "BUTTON") {
|
||||
target = target.parentElement;
|
||||
}
|
||||
if (target && target.tagName === "A" && target.href) {
|
||||
event.preventDefault();
|
||||
let newUrl = new URL(target.href, window.location.origin);
|
||||
newUrl.searchParams.delete("reduced");
|
||||
window.top.location.href = newUrl.href;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% set configuration = 'lp_category_accordion'|api_get_configuration_value %}
|
||||
<div class="lp-accordion panel-group" id="lp-accordion" role="tablist" aria-multiselectable="true">
|
||||
{% for lp_data in data %}
|
||||
{% set show_category = true %}
|
||||
|
||||
{% if filtered_category and filtered_category != lp_data.category.id %}
|
||||
{% set show_category = false %}
|
||||
{% endif %}
|
||||
|
||||
{% if show_category %}
|
||||
{% if configuration == 0 %}
|
||||
<!--- old view -->
|
||||
{% if categories|length > 1 and lp_data.category.id %}
|
||||
{% if is_allowed_to_edit %}
|
||||
<h3 class="page-header">
|
||||
{{ lp_data.category.getName() | trim }}
|
||||
|
||||
{% if lp_data.category.sessionId %}
|
||||
{{ session_star_icon }}
|
||||
{% endif %}
|
||||
|
||||
{% if lp_data.category.getId() > 0 %}
|
||||
{% if lp_data.category.sessionId == _c.session_id %}
|
||||
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=add_lp_category&id=' ~ lp_data.category.getId() }}"
|
||||
title="{{ "Edit"|get_lang }}">
|
||||
<img src="{{ "edit.png"|icon }}" alt="{{ "Edit"|get_lang }}">
|
||||
</a>
|
||||
|
||||
{% if subscription_settings.allow_add_users_to_lp_category %}
|
||||
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=add_users_to_category&id=' ~ lp_data.category.getId() }}"
|
||||
title="{{ "AddUsers"|get_lang }}">
|
||||
<img src="{{ "user.png"|icon }}" alt="{{ "AddUsers"|get_lang }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if lp_data.category.sessionId == _c.session_id %}
|
||||
{% if loop.index0 == 1 or first_session_category == lp_data.category.id %}
|
||||
<a href="#">
|
||||
<img src="{{ "up_na.png"|icon }}" alt="{{ "Move"|get_lang }}">
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_up_category&id=' ~ lp_data.category.getId() }}"
|
||||
title="{{ "Move"|get_lang }}">
|
||||
<img src="{{ "up.png"|icon }}" alt="{{ "Move"|get_lang }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if (data|length - 1) == loop.index0 %}
|
||||
<a href="#">
|
||||
<img src="{{ "down_na.png"|icon }}" alt="{{ "Move"|get_lang }}">
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_down_category&id=' ~ lp_data.category.getId() }}"
|
||||
title="{{ "Move"|get_lang }}">
|
||||
<img src="{{ "down.png"|icon }}" alt="{{ "Move"|get_lang }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{# {% if lp_data.category.sessionId == _c.session_id %}#}
|
||||
{% if lp_data.category_visibility == 0 %}
|
||||
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
|
||||
title="{{ 'Show'|get_lang }}">
|
||||
<img src="{{ 'invisible.png'|icon }}" alt="{{ 'Show'|get_lang }}">
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
|
||||
title="{{ 'Hide'|get_lang }}">
|
||||
<img src="{{ 'visible.png'|icon }}" alt="{{ 'Hide'|get_lang }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
{# {% endif %}#}
|
||||
|
||||
{# {% if not _c.session_id %}#}
|
||||
{% if lp_data.category_is_published == 0 %}
|
||||
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
|
||||
title="{{ 'LearnpathPublish'|get_lang }}">
|
||||
<img src="{{ 'lp_publish_na.png'|icon }}"
|
||||
alt="{{ 'LearnpathPublish'|get_lang }}">
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
|
||||
title="{{ 'LearnpathDoNotPublish'|get_lang }}">
|
||||
<img src="{{ 'lp_publish.png'|icon }}" alt="{{ 'Hide'|get_lang }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
{# {% endif %}#}
|
||||
|
||||
{% if lp_data.category.sessionId == _c.session_id %}
|
||||
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=delete_lp_category&id=' ~ lp_data.category.getId() }}"
|
||||
title="{{ "Delete"|get_lang }}">
|
||||
<img src="{{ "delete.png"|icon }}" alt="{{ "Delete"|get_lang }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% elseif lp_data.lp_list is not empty %}
|
||||
<h3 class="page-header">{{ lp_data.category.getName() }}</h3>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if lp_data.lp_list %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{{ "Title"|get_lang }}
|
||||
</th>
|
||||
{% if is_allowed_to_edit %}
|
||||
<th>{{ "PublicationDate"|get_lang }}</th>
|
||||
<th>{{ "ExpirationDate"|get_lang }}</th>
|
||||
<th>{{ "Progress"|get_lang }}</th>
|
||||
{% if allow_min_time %}
|
||||
<th>{{ "TimeSpentTimeRequired"|get_lang }}</th>
|
||||
{% endif %}
|
||||
<th>{{ "AuthoringOptions"|get_lang }}</th>
|
||||
{% else %}
|
||||
{% if allow_dates_for_student %}
|
||||
<th>{{ "PublicationDate"|get_lang }}</th>
|
||||
<th>{{ "ExpirationDate"|get_lang }}</th>
|
||||
{% endif %}
|
||||
{% if not is_invitee %}
|
||||
<th>{{ "Progress"|get_lang }}</th>
|
||||
{% endif %}
|
||||
{% if allow_min_time %}
|
||||
<th>{{ "TimeSpentTimeRequired"|get_lang }}</th>
|
||||
{% endif %}
|
||||
<th>{{ "Actions"|get_lang }}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in lp_data.lp_list %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ row.learnpath_icon }}
|
||||
<a href="{{ row.url_start }}">
|
||||
{{ row.title }}
|
||||
{{ row.session_image }}
|
||||
</a>
|
||||
{{ row.extra }}
|
||||
</td>
|
||||
{% if is_allowed_to_edit %}
|
||||
<td>
|
||||
{% if row.start_time %}
|
||||
<span class="small">{{ row.start_time }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<span class="small">{{ row.end_time }}</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ row.dsp_progress }}
|
||||
</td>
|
||||
{% if allow_min_time %}
|
||||
<td>
|
||||
{% if row.info_time_prerequisite %}
|
||||
{{ row.info_time_prerequisite }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if allow_dates_for_student %}
|
||||
<td>
|
||||
{% if row.start_time %}
|
||||
<span class="small">{{ row.start_time }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<span class="small">{{ row.end_time }}</span>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if not is_invitee %}
|
||||
<td>
|
||||
{{ row.dsp_progress }}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if allow_min_time %}
|
||||
<td>
|
||||
{% if row.info_time_prerequisite %}
|
||||
{{ row.info_time_prerequisite }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td>
|
||||
{{ row.action_build }}
|
||||
{{ row.action_edit }}
|
||||
{{ row.action_visible }}
|
||||
{{ row.action_tracking }}
|
||||
{{ row.action_publish }}
|
||||
{{ row.action_subscribe_users }}
|
||||
{{ row.action_serious_game }}
|
||||
{{ row.action_reinit }}
|
||||
{{ row.action_default_view }}
|
||||
{{ row.action_debug }}
|
||||
{{ row.action_export }}
|
||||
{{ row.action_copy }}
|
||||
{{ row.action_auto_launch }}
|
||||
{{ row.action_pdf }}
|
||||
{{ row.action_delete }}
|
||||
{{ row.action_order }}
|
||||
{{ row.action_update_scorm }}
|
||||
{{ row.action_export_to_course_build }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
<!--- end old view -->
|
||||
{% else %}
|
||||
<!-- new view block accordeon -->
|
||||
{% if lp_data.category.id == 0 %}
|
||||
{% if is_allowed_to_edit %}
|
||||
{% if lp_data.lp_list %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ "Title"|get_lang }}</th>
|
||||
{% if is_allowed_to_edit %}
|
||||
<th>{{ "PublicationDate"|get_lang }}</th>
|
||||
<th>{{ "ExpirationDate"|get_lang }}</th>
|
||||
<th>{{ "Progress"|get_lang }}</th>
|
||||
{% if allow_min_time %}
|
||||
<th>{{ "TimeSpentTimeRequired"|get_lang }}</th>
|
||||
{% endif %}
|
||||
<th>{{ "AuthoringOptions"|get_lang }}</th>
|
||||
{% else %}
|
||||
{% if allow_dates_for_student %}
|
||||
<th>{{ "PublicationDate"|get_lang }}</th>
|
||||
<th>{{ "ExpirationDate"|get_lang }}</th>
|
||||
{% endif %}
|
||||
{% if not is_invitee %}
|
||||
<th>{{ "Progress"|get_lang }}</th>
|
||||
{% endif %}
|
||||
{% if allow_min_time %}
|
||||
<th>{{ "TimeSpentTimeRequired"|get_lang }}</th>
|
||||
{% endif %}
|
||||
<th>{{ "Actions"|get_lang }}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in lp_data.lp_list %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ row.learnpath_icon }}
|
||||
<a href="{{ row.url_start }}">
|
||||
{{ row.title }}
|
||||
{{ row.session_image }}
|
||||
{{ row.extra }}
|
||||
</a>
|
||||
</td>
|
||||
{% if is_allowed_to_edit %}
|
||||
<td>
|
||||
{% if row.start_time %}
|
||||
<span class="small">{{ row.start_time }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<span class="small">{{ row.end_time }}</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ row.dsp_progress }}
|
||||
</td>
|
||||
{% if allow_min_time %}
|
||||
<td>
|
||||
{% if row.info_time_prerequisite %}
|
||||
{{ row.info_time_prerequisite }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if allow_dates_for_student %}
|
||||
<td>
|
||||
{% if row.start_time %}
|
||||
<span class="small">{{ row.start_time }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<span class="small">{{ row.end_time }}</span>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if not is_invitee %}
|
||||
<td>
|
||||
{{ row.dsp_progress }}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if allow_min_time %}
|
||||
<td>
|
||||
{% if row.info_time_prerequisite %}
|
||||
{{ row.info_time_prerequisite }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td>
|
||||
{{ row.action_build }}
|
||||
{{ row.action_edit }}
|
||||
{{ row.action_visible }}
|
||||
{{ row.action_tracking }}
|
||||
{{ row.action_publish }}
|
||||
{{ row.action_subscribe_users }}
|
||||
{{ row.action_serious_game }}
|
||||
{{ row.action_reinit }}
|
||||
{{ row.action_default_view }}
|
||||
{{ row.action_debug }}
|
||||
{{ row.action_export }}
|
||||
{{ row.action_copy }}
|
||||
{{ row.action_auto_launch }}
|
||||
{{ row.action_pdf }}
|
||||
{{ row.action_delete }}
|
||||
{{ row.action_order }}
|
||||
{{ row.action_update_scorm }}
|
||||
{{ row.action_export_to_course_build }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div id="not-category" class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
{% for row in lp_data.lp_list %}
|
||||
<div class="lp-item">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<i class="fa fa-chevron-circle-right" aria-hidden="true"></i>
|
||||
<a href="{{ row.url_start }}">
|
||||
{{ row.title }}
|
||||
{{ row.session_image }}
|
||||
{{ row.extra }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
{{ row.dsp_progress }}
|
||||
</div>
|
||||
|
||||
{% if allow_dates_for_student %}
|
||||
<div class="col-md-2">
|
||||
{% if row.start_time %}
|
||||
<span class="small">{{ row.start_time }}</span>
|
||||
{% endif %}
|
||||
<span class="small">{{ row.end_time }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if allow_min_time %}
|
||||
<div class="col-md-2">
|
||||
{% if row.info_time_prerequisite %}
|
||||
{{ row.info_time_prerequisite }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col-md-1">
|
||||
{{ row.action_pdf }}
|
||||
{{ row.action_export }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if categories|length > 1 and lp_data.category.id %}
|
||||
{% set number = number + 1 %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab" id="heading-{{ lp_data.category.getId() }}">
|
||||
{% if is_allowed_to_edit %}
|
||||
<div class="tools-actions pull-right">
|
||||
{% if lp_data.category.getId() > 0 %}
|
||||
{# {% if not _c.session_id %}#}
|
||||
{% if lp_data.category.sessionId == _c.session_id %}
|
||||
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=add_lp_category&id=' ~ lp_data.category.getId() }}"
|
||||
title="{{ "Edit"|get_lang }}">
|
||||
<img src="{{ "edit.png"|icon }}" alt="{{ "Edit"|get_lang }}">
|
||||
</a>
|
||||
|
||||
{% if subscription_settings.allow_add_users_to_lp_category %}
|
||||
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=add_users_to_category&id=' ~ lp_data.category.getId() }}"
|
||||
title="{{ "AddUsers"|get_lang }}">
|
||||
<img src="{{ "user.png"|icon }}" alt="{{ "AddUsers"|get_lang }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if loop.index0 == 1 %}
|
||||
<a href="#">
|
||||
<img src="{{ "up_na.png"|icon }}" alt="{{ "Move"|get_lang }}">
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_up_category&id=' ~ lp_data.category.getId() }}"
|
||||
title="{{ "Move"|get_lang }}">
|
||||
<img src="{{ "up.png"|icon }}" alt="{{ "Move"|get_lang }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if (data|length - 1) == loop.index0 %}
|
||||
<a href="#">
|
||||
<img src="{{ "down_na.png"|icon }}" alt="{{ "Move"|get_lang }}">
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_down_category&id=' ~ lp_data.category.getId() }}"
|
||||
title="{{ "Move"|get_lang }}">
|
||||
<img src="{{ "down.png"|icon }}" alt="{{ "Move"|get_lang }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if lp_data.category_visibility == 0 %}
|
||||
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
|
||||
title="{{ 'Show'|get_lang }}">
|
||||
<img src="{{ 'invisible.png'|icon }}" alt="{{ 'Show'|get_lang }}">
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
|
||||
title="{{ 'Hide'|get_lang }}">
|
||||
<img src="{{ 'visible.png'|icon }}" alt="{{ 'Hide'|get_lang }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if lp_data.category_visibility == 1 %}
|
||||
{% if lp_data.category_is_published == 0 %}
|
||||
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
|
||||
title="{{ 'LearnpathPublish'|get_lang }}">
|
||||
<img src="{{ 'lp_publish_na.png'|icon }}"
|
||||
alt="{{ 'LearnpathPublish'|get_lang }}">
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
|
||||
title="{{ 'LearnpathDoNotPublish'|get_lang }}">
|
||||
<img src="{{ 'lp_publish.png'|icon }}" alt="{{ 'Hide'|get_lang }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<img src="{{ 'lp_publish_na.png'|icon }}"
|
||||
alt="{{ 'LearnpathPublish'|get_lang }}">
|
||||
{% endif %}
|
||||
|
||||
{% if not _c.session_id %}
|
||||
<a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=delete_lp_category&id=' ~ lp_data.category.getId() }}"
|
||||
title="{{ "Delete"|get_lang }}">
|
||||
<img src="{{ "delete.png"|icon }}" alt="{{ "Delete"|get_lang }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<h4 class="panel-title">
|
||||
<a role="button" data-toggle="collapse" data-parent="#lp-accordion"
|
||||
href="#collapse-{{ lp_data.category.getId() }}" aria-expanded="{{ number == 1 ? 'true' : 'false' }}"
|
||||
aria-controls="collapse-{{ lp_data.category.getId() }}">
|
||||
{{ lp_data.category.getName() }}
|
||||
|
||||
{% if lp_data.category.sessionId %}
|
||||
{{ session_star_icon }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse-{{ lp_data.category.getId() }}" class="panel-collapse collapse {{ (number == 1 ? 'in':'') }}"
|
||||
role="tabpanel" aria-labelledby="heading-{{ lp_data.category.getId() }}">
|
||||
<div class="panel-body">
|
||||
{% if lp_data.lp_list %}
|
||||
{% if is_allowed_to_edit %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ "Title"|get_lang }}</th>
|
||||
{% if is_allowed_to_edit %}
|
||||
<th>{{ "PublicationDate"|get_lang }}</th>
|
||||
<th>{{ "ExpirationDate"|get_lang }}</th>
|
||||
<th>{{ "Progress"|get_lang }}</th>
|
||||
{% if allow_min_time %}
|
||||
<th>{{ "TimeSpentTimeRequired"|get_lang }}</th>
|
||||
{% endif %}
|
||||
<th>{{ "AuthoringOptions"|get_lang }}</th>
|
||||
{% else %}
|
||||
{% if allow_dates_for_student %}
|
||||
<th>{{ "PublicationDate"|get_lang }}</th>
|
||||
<th>{{ "ExpirationDate"|get_lang }}</th>
|
||||
{% endif %}
|
||||
{% if not is_invitee %}
|
||||
<th>{{ "Progress"|get_lang }}</th>
|
||||
{% endif %}
|
||||
{% if allow_min_time %}
|
||||
<th>{{ "TimeSpentTimeRequired"|get_lang }}</th>
|
||||
{% endif %}
|
||||
|
||||
<th>{{ "Actions"|get_lang }}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in lp_data.lp_list %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ row.learnpath_icon }}
|
||||
<a href="{{ row.url_start }}">
|
||||
{{ row.title }}
|
||||
{{ row.session_image }}
|
||||
{{ row.extra }}
|
||||
</a>
|
||||
</td>
|
||||
{% if is_allowed_to_edit %}
|
||||
<td>
|
||||
{% if row.start_time %}
|
||||
<span class="small">{{ row.start_time }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<span class="small">{{ row.end_time }}</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ row.dsp_progress }}
|
||||
</td>
|
||||
{% if allow_min_time %}
|
||||
<td>
|
||||
{% if row.info_time_prerequisite %}
|
||||
{{ row.info_time_prerequisite }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if allow_dates_for_student %}
|
||||
<td>
|
||||
{% if row.start_time %}
|
||||
<span class="small">{{ row.start_time }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<span class="small">{{ row.end_time }}</span>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if not is_invitee %}
|
||||
<td>
|
||||
{{ row.dsp_progress }}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if allow_min_time %}
|
||||
<td>
|
||||
{% if row.info_time_prerequisite %}
|
||||
{{ row.info_time_prerequisite }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td>
|
||||
{{ row.action_build }}
|
||||
{{ row.action_edit }}
|
||||
{{ row.action_visible }}
|
||||
{{ row.action_tracking }}
|
||||
{{ row.action_publish }}
|
||||
{{ row.action_subscribe_users }}
|
||||
{{ row.action_serious_game }}
|
||||
{{ row.action_reinit }}
|
||||
{{ row.action_default_view }}
|
||||
{{ row.action_debug }}
|
||||
{{ row.action_export }}
|
||||
{{ row.action_copy }}
|
||||
{{ row.action_auto_launch }}
|
||||
{{ row.action_pdf }}
|
||||
{{ row.action_delete }}
|
||||
{{ row.action_order }}
|
||||
{{ row.action_update_scorm }}
|
||||
{{ row.action_export_to_course_build }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
{% for row in lp_data.lp_list %}
|
||||
<div class="lp-item">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<i class="fa fa-chevron-circle-right" aria-hidden="true"></i>
|
||||
<a href="{{ row.url_start }}">
|
||||
{{ row.title }}
|
||||
{{ row.session_image }}
|
||||
{{ row.extra }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
{{ row.dsp_progress }}
|
||||
</div>
|
||||
|
||||
{% if allow_dates_for_student %}
|
||||
<div class="col-md-2">
|
||||
{% if row.start_time %}
|
||||
<span class="small">{{ row.start_time }}</span>
|
||||
{% endif %}
|
||||
<span class="small">{{ row.end_time }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if allow_min_time %}
|
||||
<div class="col-md-2">
|
||||
{% if row.info_time_prerequisite %}
|
||||
{{ row.info_time_prerequisite }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col-md-1">
|
||||
{{ row.action_pdf }}
|
||||
{{ row.action_export }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- end view block accordeon -->
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if not is_invitee and lp_is_shown and allow_min_time %}
|
||||
<div id="lp_notification_control" class="controls text-center">
|
||||
{% if not is_ending %}
|
||||
<button class="btn btn-primary" type="button" disabled>
|
||||
{{ 'IHaveFinishedTheLessonsNotifyTheTeacher'|get_lang }}
|
||||
</button>
|
||||
{% else %}
|
||||
<a href="{{ web_self ~ "?" ~ _p.web_cid_query ~ "&action=send_notify_teacher" }}" class="btn btn-primary">
|
||||
{{ 'IHaveFinishedTheLessonsNotifyTheTeacher'|get_lang }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not is_invitee and lp_is_shown and allow_min_time and is_ending %}
|
||||
<div id="lp_download_file_after_finish" class="controls text-center">
|
||||
{{ download_files_after_finish }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if is_allowed_to_edit and not lp_is_shown %}
|
||||
<div id="no-data-view">
|
||||
<h2>{{ "LearningPaths"|get_lang }}</h2>
|
||||
<img src="{{ "scorms.png"|icon(64) }}" width="64" height="64">
|
||||
<div class="controls">
|
||||
<a href="{{ web_self ~ "?" ~ _p.web_cid_query ~ "&action=add_lp" }}" class="btn btn-default">
|
||||
{{ "LearnpathAddLearnpath"|get_lang }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
40
main/template/default/learnpath/menubar.tpl
Normal file
40
main/template/default/learnpath/menubar.tpl
Normal file
@@ -0,0 +1,40 @@
|
||||
{% if navigation_in_the_middle %}
|
||||
<style>
|
||||
.c-menu-left {
|
||||
top: 50% !important;
|
||||
}
|
||||
.menu-button a{
|
||||
text-underline: none !important;
|
||||
}
|
||||
</style>
|
||||
{% endif %}
|
||||
<nav id="btn-menu-float" class="c-menu-{{ menu_location }}">
|
||||
<div class="circle {{ show_toolbar_by_default == 1 ? 'open' : '' }}">
|
||||
{% if show_left_column == 1 %}
|
||||
{% set label = "Collapse" | get_lang %}
|
||||
{% set icon_expand = "fa-compress" %}
|
||||
{% if lp_mode == 'embedframe' %}
|
||||
{% set label = "Expand" | get_lang %}
|
||||
{% set icon_expand = "fa-expand" %}
|
||||
{% endif %}
|
||||
<a href="#"
|
||||
id="lp-view-expand-toggle"
|
||||
class="icon-toolbar expand"
|
||||
role="button"
|
||||
title="{{ label }}"
|
||||
>
|
||||
<span class="fa {{ icon_expand }}" aria-hidden="true"></span>
|
||||
<span class="sr-only"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a id="home-course"
|
||||
title="{{ 'Home'|get_lang }}"
|
||||
href="{{ button_home_url }}"
|
||||
class="icon-toolbar" target="_self"
|
||||
onclick="javascript: window.parent.API.save_asset();">
|
||||
<em class="fa fa-home"></em> <span class="hidden-xs hidden-sm"></span>
|
||||
</a>
|
||||
{{ navigation_bar }}
|
||||
</div>
|
||||
<a title="{{ 'Options'|get_lang }}" class="menu-button fa fa-bars icons" href="#"></a>
|
||||
</nav>
|
||||
20
main/template/default/learnpath/my_list.tpl
Normal file
20
main/template/default/learnpath/my_list.tpl
Normal file
@@ -0,0 +1,20 @@
|
||||
<h3>
|
||||
{{ 'MyLps' | get_lang }}
|
||||
</h3>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
{{ 'Title' | get_lang }}
|
||||
</th>
|
||||
</tr>
|
||||
{% for lp in lps %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ lp.icon }}
|
||||
<a href="{{ lp.link }}" target="_blank">
|
||||
{{ lp.name }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
201
main/template/default/learnpath/record_voice.tpl
Normal file
201
main/template/default/learnpath/record_voice.tpl
Normal file
@@ -0,0 +1,201 @@
|
||||
<div id="record-audio-recordrtc" class="text-center">
|
||||
<p>
|
||||
<span class="fa fa-microphone fa-5x fa-fw" aria-hidden="true"></span>
|
||||
<span class="sr-only">{{ 'RecordAudio'|get_lang }}</span>
|
||||
<div id="timer" style="display: none">
|
||||
<h2>
|
||||
<div class="label label-danger">
|
||||
<span id="hour">00</span>
|
||||
<span class="divider">:</span>
|
||||
<span id="minute">00</span>
|
||||
<span class="divider">:</span>
|
||||
<span id="second">00</span>
|
||||
</div>
|
||||
</h2>
|
||||
<br />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" name="audio_title" id="audio-title-rtc" class="form-control" placeholder="{{ 'InputNameHere'|get_lang }}" />
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<button class="btn btn-primary" type="button" id="btn-start-record">
|
||||
<span class="fa fa-circle fa-fw" aria-hidden="true"></span> {{ 'StartRecordingAudio'|get_lang }}
|
||||
</button>
|
||||
<button class="btn btn-success" type="button" id="btn-stop-record" disabled>
|
||||
<span class="fa fa-square fa-fw" aria-hidden="true"></span> {{ 'StopRecordingAudio'|get_lang }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="record-audio-wami" class="wami-container"></div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
function startTimer() {
|
||||
$("#timer").show();
|
||||
var timerData = {
|
||||
hour: parseInt($("#hour").text()),
|
||||
minute: parseInt($("#minute").text()),
|
||||
second: parseInt($("#second").text())
|
||||
};
|
||||
|
||||
clearInterval(window.timerInterval);
|
||||
window.timerInterval = setInterval(function(){
|
||||
// Seconds
|
||||
timerData.second++;
|
||||
if (timerData.second >= 60) {
|
||||
timerData.second = 0;
|
||||
timerData.minute++;
|
||||
}
|
||||
|
||||
// Minutes
|
||||
if (timerData.minute >= 60) {
|
||||
timerData.minute = 0;
|
||||
timerData.hour++;
|
||||
}
|
||||
|
||||
$("#hour").text(timerData.hour < 10 ? '0' + timerData.hour : timerData.hour);
|
||||
$("#minute").text(timerData.minute < 10 ? '0' + timerData.minute : timerData.minute);
|
||||
$("#second").text(timerData.second < 10 ? '0' + timerData.second : timerData.second);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function stopTimer() {
|
||||
$("#hour").text('00');
|
||||
$("#minute").text('00');
|
||||
$("#second").text('00');
|
||||
$("#timer").hide();
|
||||
}
|
||||
|
||||
function pauseTimer() {
|
||||
clearInterval(window.timerInterval);
|
||||
}
|
||||
|
||||
function useRecordRTC() {
|
||||
$('#record-audio-recordrtc').show();
|
||||
|
||||
var audioTitle = $('#audio-title-rtc');
|
||||
var mediaConstraints = {audio: true},
|
||||
recordRTC = null,
|
||||
btnStart = $('#btn-start-record'),
|
||||
btnStop = $('#btn-stop-record');
|
||||
|
||||
btnStart.on('click', function () {
|
||||
if ('' === audioTitle.val()) {
|
||||
alert('{{ 'TitleIsRequired'|get_lang | escape }} ');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function successCallback(stream) {
|
||||
stopTimer();
|
||||
startTimer();
|
||||
recordRTC = RecordRTC(stream, {
|
||||
recorderType: RecordRTC.StereoAudioRecorder,
|
||||
type: 'audio',
|
||||
mimeType: 'audio/wav',
|
||||
numberOfAudioChannels: 2
|
||||
});
|
||||
recordRTC.startRecording();
|
||||
|
||||
btnStop.prop('disabled', false);
|
||||
btnStart.prop('disabled', true);
|
||||
}
|
||||
|
||||
function errorCallback(error) {
|
||||
stopTimer();
|
||||
alert(error);
|
||||
}
|
||||
|
||||
if(!!(navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia)) {
|
||||
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
|
||||
navigator.getUserMedia(mediaConstraints, successCallback, errorCallback);
|
||||
return;
|
||||
}
|
||||
|
||||
navigator.mediaDevices.getUserMedia(mediaConstraints)
|
||||
.then(successCallback)
|
||||
.catch(errorCallback);
|
||||
});
|
||||
|
||||
btnStop.on('click', function () {
|
||||
if (!recordRTC) {
|
||||
return;
|
||||
}
|
||||
|
||||
stopTimer();
|
||||
recordRTC.stopRecording(function (audioURL) {
|
||||
var recordedBlob = recordRTC.getBlob(),
|
||||
fileName = Math.round(Math.random() * 99999999) + 99999999,
|
||||
fileExtension = '.' + recordedBlob.type.split('/')[1];
|
||||
|
||||
var formData = new FormData();
|
||||
formData.append('audio-filename', fileName + fileExtension);
|
||||
formData.append('audio-blob', recordedBlob, 'audio' + fileExtension);
|
||||
formData.append('audio-title', audioTitle.val());
|
||||
|
||||
$.ajax({
|
||||
url: '{{ _p.web_ajax }}lp.ajax.php?a=record_audio&lp_item_id={{ lp_item_id }}',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
type: 'POST',
|
||||
success: function (fileURL) {
|
||||
if (!fileURL) {
|
||||
return;
|
||||
}
|
||||
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
btnStop.prop('disabled', true);
|
||||
btnStart.prop('disabled', false);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function useWami(){
|
||||
$('#record-audio-wami').show();
|
||||
|
||||
function setupGUI() {
|
||||
var gui = new Wami.GUI({
|
||||
id : 'record-audio-wami',
|
||||
singleButton : true,
|
||||
recordUrl : '{{ _p.web_ajax }}record_audio_wami.ajax.php?' + $.param({
|
||||
waminame: 'rec_' + (new Date()).getTime() + '.wav',
|
||||
wamidir: '{{ cur_dir_path }}',
|
||||
wamiuserid: {{ _u.user_id }},
|
||||
lp_item_id: {{ lp_item_id }}
|
||||
}),
|
||||
buttonUrl : '{{ _p.web_lib }}wami-recorder/buttons.png',
|
||||
buttonNoUrl: '{{ _p.web_img }}blank.gif',
|
||||
onRecordFinish: function() {
|
||||
$('#start-recording').hide();
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
gui.setPlayEnabled(false);
|
||||
}
|
||||
|
||||
Wami.setup({
|
||||
id : "record-audio-wami",
|
||||
onReady : setupGUI,
|
||||
swfUrl: '{{ _p.web_lib }}wami-recorder/Wami.swf'
|
||||
});
|
||||
}
|
||||
|
||||
$('#record-audio-recordrtc, #record-audio-wami').hide();
|
||||
var webRTCIsEnabled = navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.getUserMedia ||
|
||||
(navigator.mediaDevices && navigator.mediaDevices.getUserMedia);
|
||||
|
||||
if (webRTCIsEnabled) {
|
||||
useRecordRTC();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
useWami();
|
||||
});
|
||||
</script>
|
||||
100
main/template/default/learnpath/report.tpl
Normal file
100
main/template/default/learnpath/report.tpl
Normal file
@@ -0,0 +1,100 @@
|
||||
{{ group_form }}
|
||||
|
||||
{{ table }}
|
||||
|
||||
<div id="dialog-form" style="display:none;">
|
||||
<div class="dialog-form-content">
|
||||
{{ 'AreYouSureToDeleteResults' | get_lang | e('html') }} <span id="user_title"></span>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input id="delete_exercise_attempts" type="checkbox"> {{ 'DeleteExerciseAttempts' | get_lang }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#dialog-form").dialog({
|
||||
autoOpen : false,
|
||||
modal : false,
|
||||
width : 300,
|
||||
height : 250,
|
||||
zIndex : 20000
|
||||
});
|
||||
|
||||
$('.delete_attempt').on('click', function() {
|
||||
var userId = $(this).data('id');
|
||||
var username = $(this).data('username');
|
||||
$('#user_title').html(username);
|
||||
$("#dialog-form").dialog({
|
||||
buttons: {
|
||||
'{{ "Delete" | get_lang }}' : function() {
|
||||
var deleteExercises = $('#delete_exercise_attempts').prop('checked');
|
||||
var urlDelete = '&delete_exercise_attempts=0';
|
||||
if (deleteExercises) {
|
||||
urlDelete = '&delete_exercise_attempts=1'
|
||||
}
|
||||
window.location.href = "{{ url }}"+urlDelete+"&reset=student&student_id=" + userId;
|
||||
}
|
||||
},
|
||||
close: function() {
|
||||
$('#user_title').html('');
|
||||
$('#delete_exercise_attempt').prop('checked', false);
|
||||
}
|
||||
});
|
||||
$("#dialog-form").dialog("open");
|
||||
});
|
||||
|
||||
$('.delete_all').on('click', function() {
|
||||
var users = $(this).data('users');
|
||||
$('#user_title').html(users);
|
||||
$("#dialog-form").dialog({
|
||||
buttons: {
|
||||
'{{ "Delete" | get_lang }}' : function() {
|
||||
var deleteExercises = $('#delete_exercise_attempts').prop('checked');
|
||||
var urlDelete = '&delete_exercise_attempts=0';
|
||||
if (deleteExercises) {
|
||||
urlDelete = '&delete_exercise_attempts=1'
|
||||
}
|
||||
window.location.href = "{{ url }}"+urlDelete+"&reset=all&student_id=0";
|
||||
}
|
||||
},
|
||||
close: function() {
|
||||
$('#user_title').html('');
|
||||
$('#delete_exercise_attempt').prop('checked', false);
|
||||
}
|
||||
});
|
||||
$("#dialog-form").dialog("open");
|
||||
});
|
||||
|
||||
|
||||
$('#group_filter').on('change', function() {
|
||||
var groupId = $(this).val();
|
||||
window.location.href = "{{ url_base }}&group_filter=" + groupId;
|
||||
});
|
||||
|
||||
$('tr td .details').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var self = $(this);
|
||||
var userId = self.data('id') || 0;
|
||||
var trHead = self.parents('tr');
|
||||
var trDetail = trHead.next();
|
||||
if (self.is('.active')) {
|
||||
self.removeClass('active');
|
||||
trDetail.html('').addClass('hide');
|
||||
} else {
|
||||
self.addClass('active');
|
||||
var newTD = $('<td>', {
|
||||
colspan: 7
|
||||
});
|
||||
newTD.load('{{ _p.web_main ~ 'mySpace/lp_tracking.php?action=stats&extend_all=0&id_session=' ~ session_id ~ '&course=' ~ course_code ~ '&lp_id=' ~ lp_id ~ '&student_id=\' + userId + \'&origin=tracking_course&allow_extend=0' }} .table-responsive', function () {
|
||||
newTD.insertAfter(trHead);
|
||||
});
|
||||
trDetail.removeClass('hide');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
91
main/template/default/learnpath/scorm_list.tpl
Normal file
91
main/template/default/learnpath/scorm_list.tpl
Normal file
@@ -0,0 +1,91 @@
|
||||
{% if data_list is not empty %}
|
||||
<div id="learning_path_toc" class="scorm-list">
|
||||
<div class="scorm-title">
|
||||
<h4>{{ lp_title_scorm }}</h4>
|
||||
</div>
|
||||
<div class="scorm-body">
|
||||
<div id="inner_lp_toc" class="inner_lp_toc scrollbar-light">
|
||||
{% for item in data_list %}
|
||||
<div id="toc_{{ item.id }}" class="{{ item.class }} item-{{ item.type }}">
|
||||
{% if item.type == 'dir' %}
|
||||
<div class="section {{ item.css_level }}" title="{{ item.description | striptags | e('html') }}">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="item {{ item.css_level }}" title="{{ item.description | striptags | e('html') }}">
|
||||
<a name="atoc_{{ item.id }}"></a>
|
||||
<a data-type="type-{{ item.type }}" class="items-list" href="#"
|
||||
onclick="switch_item('{{ item.current_id }}','{{ item.id }}'); return false;">
|
||||
{{ item.title }}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if data_panel is not empty %}
|
||||
<div id="learning_path_toc">
|
||||
<div class="scorm-title">
|
||||
<h4>
|
||||
{{ lp_title_scorm }}
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
{% macro tree(item) %}
|
||||
{% import _self as self %}
|
||||
<div id="toc_{{ item.id }}"
|
||||
class="panel panel-default
|
||||
{{ item.parent_id ? 'child_item':'root_item' }}
|
||||
lp_item_type_{{ item.type|replace({' ': '_'}) }}
|
||||
{{ item.status_css_class_name }}
|
||||
{{ item.is_current ? 'current_item scorm_highlight' : '' }}
|
||||
{{ item.is_parent_of_current ? 'parent_of_current_item' : '' }}
|
||||
{{ item.is_chapter ? 'chapter' : '' }}
|
||||
"
|
||||
data-lp-id="{{ item.id }}"
|
||||
>
|
||||
<div class="status-heading">
|
||||
<div id="heading_item_{{item.id}}" class="panel-heading" role="tab">
|
||||
{% if item.children|length %}
|
||||
<a class="item-header" role="button"
|
||||
data-toggle="collapse" data-parent="#tocchildren_{{ item.parent_id }}"
|
||||
href="#tocchildren_{{ item.id }}"
|
||||
aria-expanded="true" aria-controls="tocchildren_{{ item.id }}">
|
||||
{{ item.title }}
|
||||
</a>
|
||||
{% else %}
|
||||
<a data-type="type-{{ item.type }}" class="item-action" href="#"
|
||||
onclick="switch_item('{{ item.current_id }}','{{ item.id }}'); return false;">
|
||||
<i class="fa fa-chevron-circle-right" aria-hidden="true"></i>
|
||||
{{ item.title }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if item.children|length %}
|
||||
<div id="tocchildren_{{ item.id }}"
|
||||
class="panel-collapse collapse {{ item.is_parent_of_current ? 'in' : '' }}"
|
||||
role="tabpanel"
|
||||
aria-labelledby="heading_item_{{item.id}}">
|
||||
<div class="panel-body">
|
||||
{% for child in item.children %}
|
||||
{{ self.tree(child) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% from _self import tree %}
|
||||
<div id="tocchildren_" class="panel-group" role="tablist" aria-multiselectable="true">
|
||||
{% for item in data_panel %}
|
||||
{{ tree(item) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
425
main/template/default/learnpath/view.tpl
Normal file
425
main/template/default/learnpath/view.tpl
Normal file
@@ -0,0 +1,425 @@
|
||||
<div id="learning_path_main" class="{{ is_allowed_to_edit ? 'lp-view-include-breadcrumb' }} {{ lp_mode == 'embedframe' ? 'lp-view-collapsed' : '' }}">
|
||||
{% if show_left_column == 1 %}
|
||||
<div id="learning_path_left_zone" class="sidebar-scorm">
|
||||
<div class="lp-view-zone-container">
|
||||
<div id="scorm-info">
|
||||
<div id="panel-scorm" class="panel-body">
|
||||
<div class="image-avatar">
|
||||
{% if lp_author == '' %}
|
||||
<div class="text-center">
|
||||
{{ lp_preview_image }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="media-author">
|
||||
<div class="media-author-avatar">
|
||||
{{ lp_preview_image }}
|
||||
</div>
|
||||
<div class="media-author-description">
|
||||
{{ lp_author }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if show_audio_player %}
|
||||
<div id="lp_media_file" class="audio-scorm">
|
||||
{{ media_player }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if lp_accumulate_work_time != '' %}
|
||||
{% set lp_progress %}
|
||||
<style>
|
||||
#timer .container{display:table;background:#777;color:#eee;font-weight:bold;width:100%;text-align:center;text-shadow:1px 1px 4px #999;}
|
||||
#timer .container div{display:table-cell;font-size:24px;padding:0px;width:20px;}
|
||||
#timer .container .divider{width:10px;color:#ddd;}
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
var timerData = {
|
||||
hour: parseInt($("#hour").text()),
|
||||
minute: parseInt($("#minute").text()),
|
||||
second: parseInt($("#second").text())
|
||||
};
|
||||
clearInterval(window.timerInterval);
|
||||
window.timerInterval = setInterval(function(){
|
||||
// Seconds
|
||||
timerData.second++;
|
||||
if (timerData.second >= 60) {
|
||||
timerData.second = 0;
|
||||
timerData.minute++;
|
||||
}
|
||||
|
||||
// Minutes
|
||||
if (timerData.minute >= 60) {
|
||||
timerData.minute = 0;
|
||||
timerData.hour++;
|
||||
}
|
||||
|
||||
$("#hour").text(timerData.hour < 10 ? '0' + timerData.hour : timerData.hour);
|
||||
$("#minute").text(timerData.minute < 10 ? '0' + timerData.minute : timerData.minute);
|
||||
$("#second").text(timerData.second < 10 ? '0' + timerData.second : timerData.second);
|
||||
}, 1000);
|
||||
})
|
||||
</script>
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<b>
|
||||
{{ "ProgressSpentInLp"|get_lang|format(lp_accumulate_work_time) }}
|
||||
</b>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
<div id="progress_bar">
|
||||
{{ progress_bar }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<b>
|
||||
{{ "TimeSpentInLp"|get_lang|format(lp_accumulate_work_time) }}
|
||||
</b>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
<div id="timer">
|
||||
<div class="container">
|
||||
<div id="hour">{{ hour }}</div>
|
||||
<div class="divider">:</div>
|
||||
<div id="minute">{{ minute }}</div>
|
||||
<div class="divider">:</div>
|
||||
<div id="second">{{ second }}</div>
|
||||
<div id="slash"> / </div>
|
||||
<div>{{ hour_min }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endset %}
|
||||
{% else %}
|
||||
{% set lp_progress %}
|
||||
<div id="progress_bar">
|
||||
{{ progress_bar }}
|
||||
</div>
|
||||
{% endset %}
|
||||
{% endif %}
|
||||
|
||||
{% if gamification_mode == 1 %}
|
||||
<!--- gamification -->
|
||||
<div id="scorm-gamification">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
{% if gamification_stars > 0 %}
|
||||
{% for i in 1..gamification_stars %}
|
||||
<em class="fa fa-star level"></em>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if gamification_stars < 4 %}
|
||||
{% for i in 1..4 - gamification_stars %}
|
||||
<em class="fa fa-star"></em>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
{{ "XPoints"|get_lang|format(gamification_points) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 navegation-bar">
|
||||
{{ lp_progress }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--- end gamification -->
|
||||
{% else %}
|
||||
{{ lp_progress }}
|
||||
{% endif %}
|
||||
|
||||
{{ teacher_toc_buttons }}
|
||||
{{ flow_buttons }}
|
||||
</div>
|
||||
</div>
|
||||
{# TOC layout #}
|
||||
<div id="toc_id" class="scorm-body" name="toc_name">
|
||||
{# div#flab-mobile is to know when the user is on mobile view. Don't delete. #}
|
||||
<div id="flag-mobile" class="visible-xs-block" aria-hidden="true"></div>
|
||||
{% include 'learnpath/scorm_list.tpl'|get_template %}
|
||||
</div>
|
||||
{# end TOC layout #}
|
||||
</div>
|
||||
</div>
|
||||
{# end left zone #}
|
||||
{% endif %}
|
||||
|
||||
{# Right zone #}
|
||||
<div id="learning_path_right_zone" class="{{ show_left_column == 1 ? 'content-scorm' : 'no-right-col' }}">
|
||||
<div class="lp-view-zone-container">
|
||||
<div class="lp-view-tabs">
|
||||
<div id="navTabsbar" class="nav-tabs-bar">
|
||||
{% if add_extra_quit_to_home_icon %}
|
||||
<div id="extra-quit-lp">
|
||||
<a style="margin: 3px 10px 0 0; position: relative; z-index: 10"
|
||||
role="button"
|
||||
title="{{ 'Close'|get_lang }}"
|
||||
href="{{ button_home_url }}"
|
||||
class="icon-toolbar pull-right" target="_self"
|
||||
onclick="window.parent.API.save_asset();"
|
||||
>
|
||||
<em class="fa fa-times" aria-hidden="true"></em>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<ul id="navTabs" class="nav nav-tabs tabs-right" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#lp-view-content" title="{{ 'Lesson'|get_lang }}"
|
||||
aria-controls="lp-view-content" role="tab" data-toggle="tab">
|
||||
<span class="fa fa-book fa-2x fa-fw" aria-hidden="true"></span>
|
||||
<span class="sr-only">{{ 'Lesson'|get_lang }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#lp-view-forum" title="{{ 'Forum'|get_lang }}"
|
||||
aria-controls="lp-view-forum" role="tab" data-toggle="tab">
|
||||
<span class="fa fa-commenting-o fa-2x fa-fw" aria-hidden="true"></span>
|
||||
<span class="sr-only">{{ 'Forum'|get_lang }}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% include 'learnpath/menubar.tpl'|get_template %}
|
||||
|
||||
<div id="tab-iframe" class="tab-content">
|
||||
|
||||
<div role="tabpanel" class="tab-pane active" id="lp-view-content">
|
||||
<div id="wrapper-iframe">
|
||||
{% if lp_mode == 'fullscreen' %}
|
||||
<iframe
|
||||
id="content_id_blank"
|
||||
name="content_name_blank"
|
||||
src="blank.php"
|
||||
style="width:100%; height:100%"
|
||||
border="0"
|
||||
frameborder="0"
|
||||
allowfullscreen="true"
|
||||
webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
|
||||
{% else %}
|
||||
<iframe
|
||||
id="content_id"
|
||||
name="content_name"
|
||||
src="{{ iframe_src }}"
|
||||
style="width:100%; height:100%"
|
||||
border="0"
|
||||
frameborder="0"
|
||||
allowfullscreen="true"
|
||||
webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="lp-view-forum">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{# end right Zone #}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var LPViewUtils = {
|
||||
setHeightLPToc: function () {
|
||||
var scormInfoHeight = $('#scorm-info').outerHeight(true);
|
||||
$('#learning_path_toc').css({
|
||||
top: scormInfoHeight
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
$('.menu-button').on('click', function() {
|
||||
$('.circle').toggleClass('open');
|
||||
if ($('.circle').hasClass('open')) {
|
||||
$('.menu-button').css('background', '#00829C');
|
||||
$('.menu-button').css('color', '#fff');
|
||||
} else {
|
||||
$('.menu-button').css('background', '#fff');
|
||||
$('.menu-button').css('color', '#000');
|
||||
}
|
||||
});
|
||||
|
||||
if (/iPhone|iPod|iPad|Safari/.test(navigator.userAgent)) {
|
||||
if (!/Chrome/.test(navigator.userAgent)) {
|
||||
// Fix an issue where you cannot scroll below first screen in
|
||||
// learning paths on Apple devices
|
||||
document.getElementById('wrapper-iframe').setAttribute(
|
||||
'style',
|
||||
'width:100%; overflow:auto; position:auto; -webkit-overflow-scrolling:touch !important;'
|
||||
);
|
||||
|
||||
{% if ios_hide_open_in_new_window == false %}
|
||||
$('<a>')
|
||||
.attr({
|
||||
'id': 'btn-content-new-tab',
|
||||
'target': '_blank',
|
||||
'href': '{{ iframe_src }}'
|
||||
})
|
||||
.css({
|
||||
'position': 'absolute',
|
||||
'right': '5px',
|
||||
'top': '5px',
|
||||
'z-index': '9999',
|
||||
'font-weight': 'bold'
|
||||
})
|
||||
.addClass('btn btn-default btn-sm')
|
||||
.text('{{ 'OpenContentInNewTab'|get_lang|escape('js') }}')
|
||||
.prependTo('#wrapper-iframe');
|
||||
$('#wrapper-iframe').css('position', 'relative');
|
||||
{% endif %}
|
||||
|
||||
// Fix another issue whereby buttons do not react to click below
|
||||
// second screen in learning paths on Apple devices
|
||||
document.getElementById('content_id').setAttribute('style', 'overflow: auto;');
|
||||
}
|
||||
}
|
||||
|
||||
{% if lp_mode == 'embedframe' %}
|
||||
$('#lp-view-expand-button, #lp-view-expand-toggle').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
$('#learning_path_main').toggleClass('lp-view-collapsed');
|
||||
$('#lp-view-expand-toggle span.fa').toggleClass('fa-compress');
|
||||
$('#lp-view-expand-toggle span.fa').toggleClass('fa-expand');
|
||||
var className = $('#lp-view-expand-toggle span.fa').attr('class');
|
||||
if (className == 'fa fa-expand') {
|
||||
$(this).attr('title', '{{ "Expand" | get_lang }}');
|
||||
} else {
|
||||
$(this).attr('title', '{{ "Collapse" | get_lang }}');
|
||||
}
|
||||
|
||||
if($('#navTabsbar').is(':hidden')) {
|
||||
$('#navTabsbar').show();
|
||||
} else {
|
||||
$('#navTabsbar').hide();
|
||||
}
|
||||
});
|
||||
{% else %}
|
||||
$('#lp-view-expand-button, #lp-view-expand-toggle').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
$('#learning_path_main').toggleClass('lp-view-collapsed');
|
||||
$('#lp-view-expand-toggle span.fa').toggleClass('fa-expand');
|
||||
$('#lp-view-expand-toggle span.fa').toggleClass('fa-compress');
|
||||
|
||||
var className = $('#lp-view-expand-toggle span.fa').attr('class');
|
||||
if (className == 'fa fa-expand') {
|
||||
$(this).attr('title', '{{ "Expand" | get_lang }}');
|
||||
} else {
|
||||
$(this).attr('title', '{{ "Collapse" | get_lang }}');
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
$('.lp-view-tabs').on('click', '.disabled', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('a#ui-option').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var icon = $(this).children('.fa');
|
||||
if (icon.is('.fa-chevron-up')) {
|
||||
icon.removeClass('fa-chevron-up').addClass('fa-chevron-down');
|
||||
|
||||
return;
|
||||
}
|
||||
icon.removeClass('fa-chevron-down').addClass('fa-chevron-up');
|
||||
});
|
||||
|
||||
LPViewUtils.setHeightLPToc();
|
||||
|
||||
$('.image-avatar img').load(function () {
|
||||
LPViewUtils.setHeightLPToc();
|
||||
});
|
||||
|
||||
$('.scorm_item_normal a, #scorm-previous, #scorm-next').on('click', function () {
|
||||
$('.lp-view-tabs').animate({opacity: 0}, 500);
|
||||
});
|
||||
|
||||
$('#learning_path_right_zone #lp-view-content iframe').on('load', function () {
|
||||
$('.lp-view-tabs a[href="#lp-view-content"]').tab('show');
|
||||
$('.lp-view-tabs').animate({opacity: 1}, 500);
|
||||
|
||||
$('#btn-content-new-tab').attr('href', this.src);
|
||||
});
|
||||
|
||||
{% if lp_mode == 'embedded' %}
|
||||
$('.scorm_item_normal a, #scorm-previous, #scorm-next').on('click', function () {
|
||||
$('.lp-view-tabs').animate({opacity: 0}, 500);
|
||||
|
||||
if ($('#flag-mobile').is(':visible') && !$('#learning_path_main').is('.lp-view-collapsed')) {
|
||||
$('#lp-view-expand-toggle').trigger('click');
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
loadForumThread({{ lp_id }}, {{ lp_current_item_id }});
|
||||
checkCurrentItemPosition({{ lp_current_item_id }});
|
||||
|
||||
{% if glossary_extra_tools in glossary_tool_available_list %}
|
||||
// Loads the glossary library.
|
||||
(function () {
|
||||
{% if show_glossary_in_documents == 'ismanual' %}
|
||||
$.frameReady(
|
||||
function(){
|
||||
// $("<div>I am a div courses</div>").prependTo("body");
|
||||
},
|
||||
"#content_id",
|
||||
[
|
||||
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}", deps: [
|
||||
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
|
||||
{ type:"script", id:"_fr2", src:"{{ _p.web_lib }}javascript/jquery.highlight.js"},
|
||||
{{ fix_link }}
|
||||
]},
|
||||
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
|
||||
]
|
||||
);
|
||||
{% elseif show_glossary_in_documents == 'isautomatic' %}
|
||||
$.frameReady(
|
||||
function(){
|
||||
// $("<div>I am a div courses</div>").prependTo("body");
|
||||
},
|
||||
"#content_id",
|
||||
[
|
||||
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}", deps: [
|
||||
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
|
||||
{ type:"script", id:"_fr2", src:"{{ _p.web_lib }}javascript/jquery.highlight.js"},
|
||||
{{ fix_link }}
|
||||
]},
|
||||
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
|
||||
]
|
||||
);
|
||||
{% elseif fix_link != '' %}
|
||||
$.frameReady(
|
||||
function(){
|
||||
// $("<div>I am a div courses</div>").prependTo("body");
|
||||
},
|
||||
"#content_id",
|
||||
[
|
||||
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}", deps: [
|
||||
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
|
||||
{{ fix_link }}
|
||||
]},
|
||||
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
|
||||
]
|
||||
);
|
||||
{% endif %}
|
||||
})();
|
||||
{% endif %}
|
||||
{% if disable_js_in_lp_view == 0 %}
|
||||
$(function() {
|
||||
{{ frame_ready }}
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
$(window).on('resize', function () {
|
||||
LPViewUtils.setHeightLPToc();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user