Minor - update from 1.11.x

pull/2635/head
Julio Montoya 7 years ago
parent a29a50dd78
commit 6b5d3d779a
  1. 14
      main/template/default/learnpath/impress.html.twig
  2. 825
      main/template/default/learnpath/list.html.twig
  3. 18
      main/template/default/learnpath/record_voice.html.twig
  4. 100
      main/template/default/learnpath/report.html.twig
  5. 111
      main/template/default/learnpath/scorm_list.html.twig
  6. 445
      main/template/default/learnpath/view.html.twig

@ -11,14 +11,14 @@
<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>";
}
if ("ontouchstart" in document.documentElement) {
document.querySelector(".hint").innerHTML = "<p>Tap on the left or right to navigate</p>";
}
</script>
<script>
$(document).ready(function() {
impress().init();
});
<script>
$(document).ready(function() {
impress().init();
});
</script>
<script type="text/javascript" src="{{_p.web_lib}}javascript/impress/impress.js"></script>

@ -7,410 +7,483 @@
}
}
</script>
{{ introduction_section }}
{% 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 %}
{% 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 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() }}
{% 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() }}
{% if lp_data.category.getId() > 0 %}
{% if not _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 lp_data.category.getId() > 0 %}
{% if not _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 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 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 (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 == 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_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 %}
{% 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 %}
{% 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 %}
{% 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 %}
</h3>
{% elseif lp_data.lp_list is not empty %}
<h3 class="page-header">{{ lp_data.category.getName() }}</h3>
{% endif %}
</h3>
{% elseif lp_data.lp_list is not empty %}
<h3 class="page-header">{{ lp_data.category.getName() }}</h3>
{% endif %}
{% 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>
<th>{{ "AuthoringOptions"|get_lang }}</th>
{% else %}
{% if not is_invitee %}
{% 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>
<th>{{ "AuthoringOptions"|get_lang }}</th>
{% else %}
{% if not is_invitee %}
<th>{{ "Progress"|get_lang }}</th>
{% endif %}
<th>{{ "Actions"|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>
</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>
{% else %}
{% if not is_invitee %}
<td>
{{ row.dsp_progress }}
</td>
{% endif %}
{% endif %}
</td>
<td>
<span class="small">{{ row.end_time }}</span>
</td>
<td>
{{ row.dsp_progress }}
</td>
{% else %}
{% if not is_invitee %}
<td>
{{ row.dsp_progress }}
{{ 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>
{% 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 }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
<!--- end old view -->
{% else %}
<!-- new view block accordeon -->
{% if lp_data.category.id == 0 %}
{% 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>
<th>{{ "AuthoringOptions"|get_lang }}</th>
{% else %}
{% if not is_invitee %}
<th>{{ "Progress"|get_lang }}</th>
{% endif %}
</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>
<th>{{ "AuthoringOptions"|get_lang }}</th>
{% else %}
{% if not is_invitee %}
<th>{{ "Progress"|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>
{% else %}
{% if not is_invitee %}
<td>
{{ row.dsp_progress }}
</td>
{% endif %}
{% 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>
{% else %}
{% if not is_invitee %}
<td>
{{ row.dsp_progress }}
</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 }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endif %}
{% if categories|length > 1 and lp_data.category.id %}
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="heading-{{ lp_data.category.getId() }}">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#lp-accordion" href="#collapse-{{ lp_data.category.getId() }}" aria-expanded="true" aria-controls="collapse-{{ lp_data.category.getId() }}">
{{ lp_data.category.getName() }}
</a>
</h4>
{% if is_allowed_to_edit %}
<div class="tools-actions pull-right">
{% if lp_data.category.getId() > 0 %}
{% if not _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>
<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 }}
</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-8">
<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>
<div class="col-md-1">
{{ row.action_pdf }}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% endif %}
{% 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 categories|length > 1 and lp_data.category.id %}
<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 %}
<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 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 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 (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 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 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 (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_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 %}
{% 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 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 %}
</div>
<div id="collapse-{{ lp_data.category.getId() }}" class="panel-collapse collapse " role="tabpanel" aria-labelledby="heading-{{ lp_data.category.getId() }}">
<div class="panel-body">
{% 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>
<th>{{ "AuthoringOptions"|get_lang }}</th>
{% else %}
{% if not is_invitee %}
<th>{{ "Progress"|get_lang }}</th>
{% 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 %}
<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>
{% else %}
{% if not is_invitee %}
<td>
{{ row.dsp_progress }}
</td>
{% endif %}
{% 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="true"
aria-controls="collapse-{{ lp_data.category.getId() }}">
{{ lp_data.category.getName() }}
</a>
</h4>
</div>
<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 }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
</div>
</div>
</div>
<div id="collapse-{{ lp_data.category.getId() }}" class="panel-collapse collapse {{ (categories|length > 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>
<th>{{ "AuthoringOptions"|get_lang }}</th>
{% else %}
{% if not is_invitee %}
<th>{{ "Progress"|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>
{% else %}
{% if not is_invitee %}
<td>
{{ row.dsp_progress }}
</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 }}
</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-8">
<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>
<div class="col-md-1">
{{ row.action_pdf }}
</div>
</div>
</div>
{% endfor %}
{% endif %}
{% endif %}
</div>
</div>
</div>
{% endif %}
<!-- end view block accordeon -->
{% endif %}
{% endif %}
<!-- end view block accordeon -->
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
</div>
{% if is_allowed_to_edit and not lp_is_shown %}
<div id="no-data-view">
@ -422,4 +495,4 @@
</a>
</div>
</div>
{% endif %}
{% endif %}

@ -19,20 +19,20 @@
$('#record-audio-recordrtc').show();
var mediaConstraints = {audio: true},
recordRTC = null,
btnStart = $('#btn-start-record'),
btnStop = $('#btn-stop-record');
recordRTC = null,
btnStart = $('#btn-start-record'),
btnStop = $('#btn-stop-record');
btnStart.on('click', function () {
navigator.getUserMedia = navigator.getUserMedia ||
navigator.mozGetUserMedia ||
navigator.webkitGetUserMedia;
navigator.mozGetUserMedia ||
navigator.webkitGetUserMedia;
if (navigator.getUserMedia) {
navigator.getUserMedia(mediaConstraints, successCallback, errorCallback);
} else if (navigator.mediaDevices.getUserMedia) {
navigator.mediaDevices.getUserMedia(mediaConstraints)
.then(successCallback).error(errorCallback);
.then(successCallback).error(errorCallback);
}
function successCallback(stream) {
@ -58,8 +58,8 @@
recordRTC.stopRecording(function (audioURL) {
var recordedBlob = recordRTC.getBlob(),
fileName = Math.round(Math.random() * 99999999) + 99999999,
fileExtension = '.' + recordedBlob.type.split('/')[1];
fileName = Math.round(Math.random() * 99999999) + 99999999,
fileExtension = '.' + recordedBlob.type.split('/')[1];
var formData = new FormData();
formData.append('audio-filename', fileName + fileExtension);
@ -120,7 +120,7 @@
$('#record-audio-recordrtc, #record-audio-wami').hide();
var webRTCIsEnabled = navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.getUserMedia ||
navigator.mediaDevices.getUserMedia;
navigator.mediaDevices.getUserMedia;
if (webRTCIsEnabled) {
useRecordRTC();

@ -1,66 +1,66 @@
<div class="table-responsive">
<table class="table table-hover table-striped table-bordered">
<thead>
<tr>
<th>{{ 'FirstName'|get_lang }}</th>
<th>{{ 'LastName'|get_lang }}</th>
{% if show_email %}
<th>{{ 'Email'|get_lang }}</th>
{% endif %}
<th class="text-center">{{ 'ScormTime'|get_lang }}</th>
<th class="text-right">{{ 'Progress'|get_lang }}</th>
<th class="text-right">{{ 'ScormScore'|get_lang }}</th>
<th class="text-center">{{ 'LastConnection'|get_lang }}</th>
{% if not export %}
<tr>
<th>{{ 'FirstName'|get_lang }}</th>
<th>{{ 'LastName'|get_lang }}</th>
{% if show_email %}
<th>{{ 'Email'|get_lang }}</th>
{% endif %}
<th class="text-center">{{ 'ScormTime'|get_lang }}</th>
<th class="text-right">{{ 'Progress'|get_lang }}</th>
<th class="text-right">{{ 'ScormScore'|get_lang }}</th>
<th class="text-center">{{ 'LastConnection'|get_lang }}</th>
{% if not export %}
<th>{{ 'Actions'|get_lang }}</th>
{% endif %}
</tr>
{% endif %}
</tr>
</thead>
<tbody>
{% for user in user_list %}
<tr id="row-{{ user.id }}">
<td>{{ user.first_name }}</td>
<td>{{ user.last_name }}</td>
{% if show_email %}
<td>{{ user.email }}</td>
{% endif %}
<td class="text-center">{{ user.lp_time }}</td>
<td class="text-right">{{ user.lp_progress }}</td>
<td class="text-right">{{ user.lp_score }}</td>
<td class="text-center">{{ user.lp_last_connection }}</td>
{% if not export %}
{% for user in user_list %}
<tr id="row-{{ user.id }}">
<td>{{ user.first_name }}</td>
<td>{{ user.last_name }}</td>
{% if show_email %}
<td>{{ user.email }}</td>
{% endif %}
<td class="text-center">{{ user.lp_time }}</td>
<td class="text-right">{{ user.lp_progress }}</td>
<td class="text-right">{{ user.lp_score }}</td>
<td class="text-center">{{ user.lp_last_connection }}</td>
{% if not export %}
<td>
<button class="btn btn-primary btn-sm" data-id="{{ user.id }}">{{ 'Details'|get_lang }}</button>
</td>
{% endif %}
</tr>
<tr class="hide"></tr>
{% endfor %}
{% endif %}
</tr>
<tr class="hide"></tr>
{% endfor %}
</tbody>
</table>
</div>
<script>
$(document).on('ready', function () {
$('tr td button').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.appendTo(trDetail);
});
trDetail.removeClass('hide');
}
$(document).on('ready', function () {
$('tr td button').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.appendTo(trDetail);
});
trDetail.removeClass('hide');
}
});
});
});
</script>

@ -1,26 +1,99 @@
{% if data_list is not empty %}
<div id="learning_path_toc" class="scorm-list">
<div class="scorm-body">
<h1 class="scorm-title">{{ lp_title_scorm }}</h1>
<div id="inner_lp_toc" class="inner_lp_toc scrollbar-light">
{% for item in data_list %}
<div id="toc_{{ item.id }}" class="{{ item.class }}">
{% if item.type == 'dir' %}
<div class="section {{ item.css_level }}" title="{{ item.description }}">
{{ item.title }}
</div>
{% else %}
<div class="item {{ item.css_level }}" title="{{ item.description }}">
<a name="atoc_{{ item.id }}"></a>
<a class="items-list" href="#" onclick="switch_item('{{ item.current_id }}','{{ item.id }}'); return false;" >
<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 }}">
{{ item.title }}
</a>
</div>
{% else %}
<div class="item {{ item.css_level }}" title="{{ item.description }}">
<a name="atoc_{{ item.id }}"></a>
<a 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" class="scorm-collapse">
<div class="scorm-title">
<h4>
{{ lp_title_scorm }}
</h4>
</div>
<div class="panel-group" role="tablist" aria-multiselectable="true">
{% if data_panel.not_parents %}
<ul class="scorm-collapse-list">
{% for item in data_panel.not_parents %}
<li id="toc_{{ item.id }}" class="{{ item.class }} item-{{ item.type }}">
<div class="sub-item type-{{ item.type }}">
<a name="atoc_{{ item.id }}"></a>
<a 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>
</div>
</li>
{% endfor %}
</ul>
{% endif %}
{% for item in data_panel.are_parents %}
<div class="panel panel-default {{ item.parent ? 'lower':'higher' }}" data-lp-id="{{ item.id }}"
{{ item.parent ? 'data-lp-parent="' ~ item.parent ~ '"' : '' }}>
<div class="status-heading">
<div class="panel-heading" role="tab" id="heading-{{ item.id }}">
<h4>
<a class="item-header" role="button" data-toggle="collapse"
data-parent="#scorm-panel{{ item.parent ? '-' ~ item.parent : '' }}"
href="#collapse-{{ item.id }}" aria-expanded="true"
aria-controls="collapse-{{ item.id }}">
{{ item.title }}
</a>
</h4>
</div>
{% endif %}
</div>
<div id="collapse-{{ item.id }}" class="panel-collapse collapse {{ item.parent_current }}"
role="tabpanel" aria-labelledby="heading-{{ item.id }}">
<div class="panel-body">
<ul class="list">
{% set counter = 0 %}
{% set final = item.children|length %}
{% for subitem in item.children %}
{% set counter = counter + 1 %}
<li id="toc_{{ subitem.id }}"
class="{{ subitem.class }} {{ subitem.type }} {{ counter == final ? 'final':'' }}">
<div class="sub-item item-{{ subitem.type }}">
<a name="atoc_{{ subitem.id }}"></a>
<a class="item-action" href="#"
onclick="switch_item('{{ subitem.current_id }}','{{ subitem.id }}'); return false;">
<i class="fa fa-chevron-circle-right" aria-hidden="true"></i>
{{ subitem.title }}
</a>
</div>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{{ accorden_toc }}
{% endif %}

@ -1,90 +1,90 @@
<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">
<div class="media-left">
<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>
<div class="media-body">
<div class="description-autor"> {{ lp_author }} </div>
{% else %}
<div class="media">
<div class="media-left">
{{ lp_preview_image }}
</div>
<div class="media-body">
<div class="description-autor"> {{ lp_author }} </div>
</div>
</div>
{% endif %}
</div>
{% if show_audio_player %}
<div id="lp_media_file" class="audio-scorm">
{{ media_player }}
</div>
{% endif %}
</div>
{% if show_audio_player %}
<div id="lp_media_file" class="audio-scorm">
{{ media_player }}
</div>
{% 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_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) }}
{% 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>
<div class="row">
<div class="col-xs-12 navegation-bar">
<div id="progress_bar">
{{ progress_bar }}
<div class="row">
<div class="col-xs-12 navegation-bar">
<div id="progress_bar">
{{ progress_bar }}
</div>
</div>
</div>
</div>
</div>
<!--- end gamification -->
{% else %}
<div id="progress_bar">
{{ progress_bar }}
</div>
{% endif %}
{{ teacher_toc_buttons }}
<!--- end gamification -->
{% else %}
<div id="progress_bar">
{{ progress_bar }}
</div>
{% endif %}
{{ teacher_toc_buttons }}
</div>
</div>
{# TOC layout #}
<div id="toc_id" class="scorm-body" name="toc_name">
{% include template ~ '/learnpath/scorm_list.html.twig' %}
</div>
{# end TOC layout #}
</div>
{# TOC layout #}
<div id="toc_id" class="scorm-body" name="toc_name">
{% include template ~ '/learnpath/scorm_list.html.twig' %}
</div>
{# end TOC layout #}
</div>
</div>
{# end left zone #}
{# end left zone #}
{% endif %}
<div id="lp_navigation_elem" class="navegation-bar">
{% if show_left_column == 1 %}
<a href="#" title = "{{ 'Expand'|get_lang }}" id="lp-view-expand-toggle" class="icon-toolbar expand" role="button">
{% if lp_mode == 'embedframe' %}
<span class="fa fa-compress" aria-hidden="true"></span>
<span class="sr-only">{{ 'Expand'|get_lang }}</span>
{% else %}
<span class="fa fa-expand" aria-hidden="true"></span>
<span class="sr-only">{{ 'Expand'|get_lang }}</span>
{% endif %}
</a>
<a href="#" title = "{{ 'Expand'|get_lang }}" id="lp-view-expand-toggle" class="icon-toolbar expand" role="button">
{% if lp_mode == 'embedframe' %}
<span class="fa fa-compress" aria-hidden="true"></span>
<span class="sr-only">{{ 'Expand'|get_lang }}</span>
{% else %}
<span class="fa fa-expand" aria-hidden="true"></span>
<span class="sr-only">{{ 'Expand'|get_lang }}</span>
{% endif %}
</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();">
@ -116,11 +116,11 @@
<div 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 %}
{% 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">
@ -133,181 +133,194 @@
</div>
<script>
(function () {
var LPViewUtils = {
setHeightLPToc: function () {
var scormInfoHeight = $('#scorm-info').outerHeight(true);
(function () {
var LPViewUtils = {
setHeightLPToc: function () {
var scormInfoHeight = $('#scorm-info').outerHeight(true);
$('#learning_path_toc').css({
top: scormInfoHeight
});
}
};
$('#learning_path_toc').css({
top: scormInfoHeight
});
}
};
$(document).on('ready', function () {
if (/iPhone|iPod|iPad/.test(navigator.userAgent)) {
document.getElementById('wrapper-iframe')
.setAttribute(
'style',
'width:100%; overflow:auto; position:auto; -webkit-overflow-scrolling:touch !important;'
);
}
$(document).on('ready', function () {
if (/iPhone|iPod|iPad/.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;'
);
// 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' %}
{% if lp_mode == 'embedframe' %}
//$('#learning_path_main').addClass('lp-view-collapsed');
$('#lp-view-expand-button, #lp-view-expand-toggle').on('click', function (e) {
e.preventDefault();
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 }}');
}
$('#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();
}
if($('#navTabsbar').is(':hidden')){
$('#navTabsbar').show();
} else {
$('#navTabsbar').hide();
}
});
{% else %}
$('#lp-view-expand-button, #lp-view-expand-toggle').on('click', function (e) {
e.preventDefault();
});
{% else %}
$('#lp-view-expand-button, #lp-view-expand-toggle').on('click', function (e) {
e.preventDefault();
$('#learning_path_main').toggleClass('lp-view-collapsed');
$('#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');
$('#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 }}');
}
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();
}
});
{% endif %}
if($('#navTabsbar').is(':hidden')){
$('#navTabsbar').show();
} else {
$('#navTabsbar').hide();
}
});
{% endif %}
$('.lp-view-tabs').on('click', '.disabled', function (e) {
e.preventDefault();
});
$('.lp-view-tabs').on('click', '.disabled', function (e) {
e.preventDefault();
});
$('a#ui-option').on('click', function (e) {
e.preventDefault();
$('a#ui-option').on('click', function (e) {
e.preventDefault();
var icon = $(this).children('.fa');
var icon = $(this).children('.fa');
if (icon.is('.fa-chevron-up')) {
icon.removeClass('fa-chevron-up').addClass('fa-chevron-down');
if (icon.is('.fa-chevron-up')) {
icon.removeClass('fa-chevron-up').addClass('fa-chevron-down');
return;
}
return;
}
icon.removeClass('fa-chevron-down').addClass('fa-chevron-up');
});
icon.removeClass('fa-chevron-down').addClass('fa-chevron-up');
});
LPViewUtils.setHeightLPToc();
LPViewUtils.setHeightLPToc();
$('.scorm_item_normal a, #scorm-previous, #scorm-next').on('click', function () {
$('.lp-view-tabs').animate({opacity: 0}, 500);
});
$('.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');
$('#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);
});
$('.lp-view-tabs').animate({opacity: 1}, 500);
});
loadForumThread({{ lp_id }}, {{ lp_current_item_id }});
checkCurrentItemPosition({{ lp_current_item_id }});
loadForumThread({{ lp_id }}, {{ lp_current_item_id }});
checkCurrentItemPosition({{ lp_current_item_id }});
{% if glossary_extra_tools in glossary_tool_available_list %}
{% 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");
},
"top.content_name",
{
load: [
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}"},
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
{ type:"script", id:"_fr2", src:"{{ _p.web_lib }}javascript/jquery.highlight.js"},
{{ fix_link }}
]
}
);
$.frameReady(
function(){
// $("<div>I am a div courses</div>").prependTo("body");
},
"top.content_name",
{
load: [
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}"},
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
{ type:"script", id:"_fr2", src:"{{ _p.web_lib }}javascript/jquery.highlight.js"},
{{ fix_link }}
]
}
);
{% elseif show_glossary_in_documents == 'isautomatic' %}
$.frameReady(
function(){
// $("<div>I am a div courses</div>").prependTo("body");
},
"top.content_name",
{
load: [
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}"},
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
{ type:"script", id:"_fr2", src:"{{ _p.web_lib }}javascript/jquery.highlight.js"},
{{ fix_link }}
]
}
);
$.frameReady(
function(){
// $("<div>I am a div courses</div>").prependTo("body");
},
"top.content_name",
{
load: [
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}"},
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
{ type:"script", id:"_fr2", src:"{{ _p.web_lib }}javascript/jquery.highlight.js"},
{{ fix_link }}
]
}
);
{% elseif fix_link != '' %}
$.frameReady(
function(){
// $("<div>I am a div courses</div>").prependTo("body");
},
"top.content_name",
{
load: [
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}"},
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
{{ fix_link }}
]
}
);
$.frameReady(
function(){
// $("<div>I am a div courses</div>").prependTo("body");
},
"top.content_name",
{
load: [
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}"},
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
{{ fix_link }}
]
}
);
{% endif %}
})();
{% endif %}
{% endif %}
{% if disable_js_in_lp_view == 0 %}
$('iframe#content_id').on('load', function () {
if ('link' !== olms.lms_item_type) {
$.frameReady(function () {
}, 'top.content_name', {
load: [
{type: 'script', id: '_fr1', src: '{{ _p.web }}web/assets/jquery/dist/jquery.min.js'},
{type: 'script', id: '_fr7', src: '{{ _p.web }}web/assets/MathJax/MathJax.js?config=AM_HTMLorMML'},
{type: 'script', id: '_fr4', src: '{{ _p.web }}web/assets/jquery-ui/jquery-ui.min.js'},
{type: 'stylesheet', id: '_fr5', src: '{{ _p.web }}web/assets/jquery-ui/themes/smoothness/jquery-ui.min.css'},
{type: 'stylesheet', id: '_fr6', src: '{{ _p.web }}web/assets/jquery-ui/themes/smoothness/theme.css'},
{type: 'script', id: '_fr2', src: '{{ _p.web_lib }}javascript/jquery.highlight.js'},
{type: 'script', id: '_fr3', src: '{{ _p.web_main }}glossary/glossary.js.php?{{ _p.web_cid_req }}'}
]
});
}
{% if disable_js_in_lp_view == 0 %}
$('iframe#content_id').on('load', function () {
if ('link' !== olms.lms_item_type) {
$.frameReady(function () {
}, 'top.content_name', {
load: [
{type: 'script', id: '_fr1', src: '{{ _p.web }}web/assets/jquery/dist/jquery.min.js'},
{type: 'script', id: '_fr7', src: '{{ _p.web }}web/assets/MathJax/MathJax.js?config=AM_HTMLorMML'},
{type: 'script', id: '_fr4', src: '{{ _p.web }}web/assets/jquery-ui/jquery-ui.min.js'},
{type: 'stylesheet', id: '_fr5', src: '{{ _p.web }}web/assets/jquery-ui/themes/smoothness/jquery-ui.min.css'},
{type: 'stylesheet', id: '_fr6', src: '{{ _p.web }}web/assets/jquery-ui/themes/smoothness/theme.css'},
{type: 'script', id: '_fr2', src: '{{ _p.web_lib }}javascript/jquery.highlight.js'},
{type: 'script', id: '_fr3', src: '{{ _p.web_main }}glossary/glossary.js.php?{{ _p.web_cid_query }}'},
{type: 'script', id: '_media1', src: '{{ _p.web }}web/assets/mediaelement/build/mediaelement-and-player.min.js'},
{type: 'stylesheet', id: '_media2', src: '{{ _p.web }}web/assets/mediaelement/build/mediaelementplayer.min.css'},
{type: 'script', id: '_media3', src: '{{ _p.web_lib }}javascript/iframe-js-loader.js'}
]
});
}
});
{% endif %}
});
{% endif %}
});
$(window).on('resize', function () {
LPViewUtils.setHeightLPToc();
});
})();
$(window).on('resize', function () {
LPViewUtils.setHeightLPToc();
});
})();
</script>

Loading…
Cancel
Save