From 6b5d3d779aaaa03e25d82223a378652464810e9e Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 15 Aug 2018 13:53:35 +0200 Subject: [PATCH] Minor - update from 1.11.x --- .../default/learnpath/impress.html.twig | 14 +- .../template/default/learnpath/list.html.twig | 825 ++++++++++-------- .../default/learnpath/record_voice.html.twig | 18 +- .../default/learnpath/report.html.twig | 100 +-- .../default/learnpath/scorm_list.html.twig | 111 ++- .../template/default/learnpath/view.html.twig | 445 +++++----- 6 files changed, 836 insertions(+), 677 deletions(-) diff --git a/main/template/default/learnpath/impress.html.twig b/main/template/default/learnpath/impress.html.twig index 8dcd49e6f9..24428f1d5e 100644 --- a/main/template/default/learnpath/impress.html.twig +++ b/main/template/default/learnpath/impress.html.twig @@ -11,14 +11,14 @@

Use a spacebar or arrow keys to navigate

- \ No newline at end of file diff --git a/main/template/default/learnpath/list.html.twig b/main/template/default/learnpath/list.html.twig index 673bcf5587..9ce5801951 100644 --- a/main/template/default/learnpath/list.html.twig +++ b/main/template/default/learnpath/list.html.twig @@ -7,410 +7,483 @@ } } - -{{ introduction_section }} - {% set configuration = 'lp_category_accordion'|api_get_configuration_value %}
-{% 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 %} - - {% if categories|length > 1 and lp_data.category.id %} - {% if is_allowed_to_edit %} - + {% elseif lp_data.lp_list is not empty %} + {% endif %} - - {% elseif lp_data.lp_list is not empty %} - - {% endif %} - {% endif %} + {% endif %} - {% if lp_data.lp_list %} -
- - - - - {% if is_allowed_to_edit %} - - - - - {% else %} - {% if not is_invitee %} + {% if lp_data.lp_list %} +
+
{{ "Title"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "AuthoringOptions"|get_lang }}
+ + + + {% if is_allowed_to_edit %} + + + + {% else %} + {% if not is_invitee %} + + {% endif %} + {% endif %} - - - {% endif %} - - - - {% for row in lp_data.lp_list %} - - - {% if is_allowed_to_edit %} - + + + {% for row in lp_data.lp_list %} + + + {% if is_allowed_to_edit %} + + + + {% else %} + {% if not is_invitee %} + + {% endif %} {% endif %} - - - - {% else %} - {% if not is_invitee %} - {% endif %} - {% endif %} - - - {% endfor %} - -
{{ "Title"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }} {{ "Progress"|get_lang }}{{ "AuthoringOptions"|get_lang }}{{ "Progress"|get_lang }}{{ "Actions"|get_lang }}{{ "Actions"|get_lang }}
- {{ row.learnpath_icon }} - - {{ row.title }} - {{ row.session_image }} - {{ row.extra }} - - - {% if row.start_time %} - {{ row.start_time }} +
+ {{ row.learnpath_icon }} + + {{ row.title }} + {{ row.session_image }} + {{ row.extra }} + + + {% if row.start_time %} + {{ row.start_time }} + {% endif %} + + {{ row.end_time }} + + {{ row.dsp_progress }} + + {{ row.dsp_progress }} + - {{ row.end_time }} - - {{ row.dsp_progress }} - - {{ 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 }} - {{ 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 }} -
-
- {% endif %} - - {% else %} - - {% if lp_data.category.id == 0 %} - {% if lp_data.lp_list %} -
- - - - - {% if is_allowed_to_edit %} - - - - - {% else %} - {% if not is_invitee %} - - {% endif %} + + {% endfor %} + +
{{ "Title"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "AuthoringOptions"|get_lang }}{{ "Progress"|get_lang }}
+
+ {% endif %} + + {% else %} + + {% if lp_data.category.id == 0 %} + {% if is_allowed_to_edit %} + {% if lp_data.lp_list %} +
+ + + + + {% if is_allowed_to_edit %} + + + + + {% else %} + {% if not is_invitee %} + + {% endif %} - - {% endif %} - - - - {% for row in lp_data.lp_list %} - - - {% if is_allowed_to_edit %} - - - - {% else %} - {% if not is_invitee %} - - {% endif %} - {% endif %} + + {% endif %} + + + + {% for row in lp_data.lp_list %} + + + {% if is_allowed_to_edit %} + + + + {% else %} + {% if not is_invitee %} + + {% endif %} + {% endif %} - - - {% endfor %} - -
{{ "Title"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "AuthoringOptions"|get_lang }}{{ "Progress"|get_lang }}{{ "Actions"|get_lang }}
- {{ row.learnpath_icon }} - - {{ row.title }} - {{ row.session_image }} - {{ row.extra }} - - - {% if row.start_time %} - {{ row.start_time }} - {% endif %} - - {{ row.end_time }} - - {{ row.dsp_progress }} - - {{ row.dsp_progress }} - {{ "Actions"|get_lang }}
+ {{ row.learnpath_icon }} + + {{ row.title }} + {{ row.session_image }} + {{ row.extra }} + + + {% if row.start_time %} + {{ row.start_time }} + {% endif %} + + {{ row.end_time }} + + {{ row.dsp_progress }} + + {{ 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 }} -
-
- {% endif %} - {% endif %} - {% if categories|length > 1 and lp_data.category.id %} -
- + + {% endif %} + + {% endif %} {% endif %} - - {% endif %} - {% endif %} -{% endfor %} + {% endfor %}
{% if is_allowed_to_edit and not lp_is_shown %}
@@ -422,4 +495,4 @@
-{% endif %} \ No newline at end of file +{% endif %} diff --git a/main/template/default/learnpath/record_voice.html.twig b/main/template/default/learnpath/record_voice.html.twig index d88040f0c6..ebd9494182 100644 --- a/main/template/default/learnpath/record_voice.html.twig +++ b/main/template/default/learnpath/record_voice.html.twig @@ -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(); diff --git a/main/template/default/learnpath/report.html.twig b/main/template/default/learnpath/report.html.twig index f1d74d280e..ed81137639 100644 --- a/main/template/default/learnpath/report.html.twig +++ b/main/template/default/learnpath/report.html.twig @@ -1,66 +1,66 @@
- - - - {% if show_email %} - - {% endif %} - - - - - {% if not export %} + + + + {% if show_email %} + + {% endif %} + + + + + {% if not export %} - {% endif %} - + {% endif %} + - {% for user in user_list %} - - - - {% if show_email %} - - {% endif %} - - - - - {% if not export %} + {% for user in user_list %} + + + + {% if show_email %} + + {% endif %} + + + + + {% if not export %} - {% endif %} - - - {% endfor %} + {% endif %} + + + {% endfor %}
{{ 'FirstName'|get_lang }}{{ 'LastName'|get_lang }}{{ 'Email'|get_lang }}{{ 'ScormTime'|get_lang }}{{ 'Progress'|get_lang }}{{ 'ScormScore'|get_lang }}{{ 'LastConnection'|get_lang }}
{{ 'FirstName'|get_lang }}{{ 'LastName'|get_lang }}{{ 'Email'|get_lang }}{{ 'ScormTime'|get_lang }}{{ 'Progress'|get_lang }}{{ 'ScormScore'|get_lang }}{{ 'LastConnection'|get_lang }}{{ 'Actions'|get_lang }}
{{ user.first_name }}{{ user.last_name }}{{ user.email }}{{ user.lp_time }}{{ user.lp_progress }}{{ user.lp_score }}{{ user.lp_last_connection }}
{{ user.first_name }}{{ user.last_name }}{{ user.email }}{{ user.lp_time }}{{ user.lp_progress }}{{ user.lp_score }}{{ user.lp_last_connection }}
diff --git a/main/template/default/learnpath/scorm_list.html.twig b/main/template/default/learnpath/scorm_list.html.twig index 2e0bc046cd..36370da6c5 100644 --- a/main/template/default/learnpath/scorm_list.html.twig +++ b/main/template/default/learnpath/scorm_list.html.twig @@ -1,26 +1,99 @@ {% if data_list is not empty %} -
-
-

{{ lp_title_scorm }}

-
- {% for item in data_list %} -
- {% if item.type == 'dir' %} -
- {{ item.title }} -
- {% else %} -
- - + +{% endif %} +{% if data_panel is not empty %} +
+
+

+ {{ lp_title_scorm }} +

+
+
+ {% if data_panel.not_parents %} + + {% endif %} + + {% for item in data_panel.are_parents %} + +
+
+ - {% endif %} +
+
+
+
    + {% set counter = 0 %} + {% set final = item.children|length %} + {% for subitem in item.children %} + {% set counter = counter + 1 %} +
  • + +
  • + + {% endfor %} +
+
+
{% endfor %} +
-
-{% endif %} -{{ accorden_toc }} \ No newline at end of file +{% endif %} \ No newline at end of file diff --git a/main/template/default/learnpath/view.html.twig b/main/template/default/learnpath/view.html.twig index 179dae4930..b6d89a3f98 100644 --- a/main/template/default/learnpath/view.html.twig +++ b/main/template/default/learnpath/view.html.twig @@ -1,90 +1,90 @@
{% if show_left_column == 1 %} -