From 9b56878e244db4a5a919cb626459741315356975 Mon Sep 17 00:00:00 2001 From: Christian Beeznest Date: Wed, 15 Oct 2025 16:11:45 -0500 Subject: [PATCH 1/2] Learnpath: Enable drag-and-drop reordering for categories and lessons - refs BT#22963 --- main/lp/lp_controller.php | 63 ++ main/lp/lp_list.php | 1 + main/template/default/learnpath/list.tpl | 1212 ++++++++++------------ 3 files changed, 635 insertions(+), 641 deletions(-) diff --git a/main/lp/lp_controller.php b/main/lp/lp_controller.php index c4700ef2198..7f0e6b55076 100755 --- a/main/lp/lp_controller.php +++ b/main/lp/lp_controller.php @@ -1238,6 +1238,69 @@ function(reponse) { require 'lp_list.php'; } break; + case 'reorder_categories': + if (!api_is_allowed_to_edit(null, true)) { + api_not_allowed(true); + } + $courseId = api_get_course_int_id(); + $sessionId = api_get_session_id(); + $catOrder = isset($_POST['order']) ? (array) $_POST['order'] : []; + $tableCategory = Database::get_course_table(TABLE_LP_CATEGORY); + + Database::query('START TRANSACTION'); + $pos = 1; + foreach ($catOrder as $catId) { + $catId = (int)$catId; + if ($catId > 0) { + $catSessionId = (int) learnpath::getCategorySessionId($catId); + if ($catSessionId !== 0 && $catSessionId !== $sessionId) { + continue; + } + } + $sql = "UPDATE $tableCategory SET position = $pos WHERE c_id = $courseId AND id = $catId"; + Database::query($sql); + $pos++; + } + Database::query('COMMIT'); + header('Content-Type: application/json'); + echo json_encode(['ok' => true]); + exit; + break; + + case 'reorder_lps': + if (!api_is_allowed_to_edit(null, true)) { + api_not_allowed(true); + } + $courseId = api_get_course_int_id(); + $sessionId = api_get_session_id(); + $tableLp = Database::get_course_table(TABLE_LP_MAIN); + + $lists = isset($_POST['lists']) ? (array) $_POST['lists'] : []; + + if (!empty($sessionId)) { + api_not_allowed(true); + } + + Database::query('START TRANSACTION'); + + foreach ($lists as $categoryIdStr => $lpIds) { + $categoryId = (int)$categoryIdStr; + $pos = 1; + foreach ((array)$lpIds as $lpId) { + $lpId = (int)$lpId; + $sql = "UPDATE $tableLp + SET category_id = ".($categoryId ?: 0).", display_order = $pos + WHERE c_id = $courseId AND id = $lpId"; + Database::query($sql); + $pos++; + } + } + + Database::query('COMMIT'); + header('Content-Type: application/json'); + echo json_encode(['ok' => true]); + exit; + break; case 'edit': if (!$is_allowed_to_edit) { api_not_allowed(true); diff --git a/main/lp/lp_list.php b/main/lp/lp_list.php index c1ff10f2292..afed0ab106b 100755 --- a/main/lp/lp_list.php +++ b/main/lp/lp_list.php @@ -942,6 +942,7 @@ function confirmation(name) { ); $listData[] = [ + 'lp_id' => $id, 'learnpath_icon' => $icon_learnpath, 'url_start' => $url_start_lp, 'title' => $my_title, diff --git a/main/template/default/learnpath/list.tpl b/main/template/default/learnpath/list.tpl index 571cf3794ce..81dc20c90a5 100644 --- a/main/template/default/learnpath/list.tpl +++ b/main/template/default/learnpath/list.tpl @@ -1,690 +1,620 @@ + {% set configuration = 'lp_category_accordion'|api_get_configuration_value %}
{% for lp_data in data %} - {% set show_category = true %} + {% 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 %} + {% 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 %} + {% endif %} -{# {% if not _c.session_id %}#} - {% if lp_data.category_is_published == 0 %} - - {{ 'LearnpathPublish'|get_lang }} - - {% else %} - - {{ 'Hide'|get_lang }} - - {% endif %} -{# {% endif %}#} + {% if lp_data.lp_list %} +
+ + + + + {% if is_allowed_to_edit %} + + + + {% if allow_min_time %}{% endif %} + + {% else %} + {% if allow_dates_for_student %} + + + {% endif %} + {% if not is_invitee %}{% endif %} + {% if allow_min_time %}{% endif %} + + {% endif %} + + - {% if lp_data.category.sessionId == _c.session_id %} - - {{ - - {% endif %} - {% endif %} - - {% elseif lp_data.lp_list is not empty %} - + {# >>> tbody is a sortable target. #} + + {% for row in lp_data.lp_list %} + + + {% if is_allowed_to_edit %} + + + + {% if allow_min_time %}{% endif %} + {% else %} + {% if allow_dates_for_student %} + + {% endif %} - - {% if lp_data.lp_list %} -
-
{{ "Title"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ "AuthoringOptions"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ "Actions"|get_lang }}
+ {% if is_allowed_to_edit %} + + drag + {% endif %} + {{ row.learnpath_icon }} + {{ row.title }} {{ row.session_image }} + {{ row.extra }} + {% if row.start_time %}{{ row.start_time }}{% endif %}{{ row.end_time }}{{ row.dsp_progress }}{% if row.info_time_prerequisite %}{{ row.info_time_prerequisite }}{% endif %}{% if row.start_time %}{{ row.start_time }}{% endif %}{{ row.end_time }}
- - - - {% if is_allowed_to_edit %} - - - - {% if allow_min_time %} - - {% endif %} - - {% else %} - {% if allow_dates_for_student %} - - - {% endif %} - {% if not is_invitee %} - - {% endif %} - {% if allow_min_time %} - - {% endif %} - - {% endif %} - - - - {% for row in lp_data.lp_list %} - - - {% if is_allowed_to_edit %} - - - - {% if allow_min_time %} - - {% endif %} - {% else %} - {% if allow_dates_for_student %} - - - {% endif %} - {% if not is_invitee %} - - {% endif %} - {% if allow_min_time %} - - {% endif %} - {% endif %} - - - {% endfor %} - -
- {{ "Title"|get_lang }} - {{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ "AuthoringOptions"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "TimeSpentTimeRequired"|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 }} - - {% if row.info_time_prerequisite %} - {{ row.info_time_prerequisite }} - {% endif %} - - {% if row.start_time %} - {{ row.start_time }} - {% endif %} - - {{ row.end_time }} - - {{ row.dsp_progress }} - - {% if row.info_time_prerequisite %} - {{ row.info_time_prerequisite }} - {% endif %} - - {{ 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 }} -
-
+ {% if not is_invitee %}{{ row.dsp_progress }}{% endif %} + {% if allow_min_time %}{% if row.info_time_prerequisite %}{{ row.info_time_prerequisite }}{% endif %}{% endif %} {% endif %} - - {% else %} - - {% if lp_data.category.id == 0 %} - {% if is_allowed_to_edit %} - {% if lp_data.lp_list %} -
- - - - - {% if is_allowed_to_edit %} - - - - {% if allow_min_time %} - - {% endif %} - - {% else %} - {% if allow_dates_for_student %} - - - {% endif %} - {% if not is_invitee %} - - {% endif %} - {% if allow_min_time %} - - {% endif %} - - {% endif %} - - - - {% for row in lp_data.lp_list %} - - - {% if is_allowed_to_edit %} - - - - {% if allow_min_time %} - - {% endif %} - {% else %} - {% if allow_dates_for_student %} - - - {% endif %} - {% if not is_invitee %} - - {% endif %} - {% if allow_min_time %} - - {% endif %} - {% endif %} - - - {% endfor %} - -
{{ "Title"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ "AuthoringOptions"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "TimeSpentTimeRequired"|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 }} - - {% if row.info_time_prerequisite %} - {{ row.info_time_prerequisite }} - {% endif %} - - {% if row.start_time %} - {{ row.start_time }} - {% endif %} - - {{ row.end_time }} - - {{ row.dsp_progress }} - - {% if row.info_time_prerequisite %} - {{ row.info_time_prerequisite }} - {% endif %} - - {{ 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 }} -
-
- {% endif %} - {% else %} -
-
- {% for row in lp_data.lp_list %} -
-
- -
- {{ row.dsp_progress }} -
- - {% if allow_dates_for_student %} -
- {% if row.start_time %} - {{ row.start_time }} - {% endif %} - {{ row.end_time }} -
- {% endif %} + + {{ 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 }} {# Hide arrow icons #} + {{ row.action_update_scorm }} + {{ row.action_export_to_course_build }} + + + {% endfor %} + + +
+ {% elseif is_allowed_to_edit %} + {# Empty category DROP TARGET (old view): allow dropping into empty categories #} +
+ + + + + {% if allow_min_time %}{% endif %} + + + + + {# Visual hint #} + +
{{ "Title"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ is_allowed_to_edit ? "AuthoringOptions"|get_lang : "Actions"|get_lang }}
Drop a learning path here
+
+ {% endif %} + + {% else %} + + {% if lp_data.category.id == 0 %} + {% if is_allowed_to_edit %} + {% if lp_data.lp_list %} +
+ + + + + {% if is_allowed_to_edit %} + + + + {% if allow_min_time %}{% endif %} + + {% else %} + {% if allow_dates_for_student %} + + + {% endif %} + {% if not is_invitee %}{% endif %} + {% if allow_min_time %}{% endif %} + + {% endif %} + + - {% if allow_min_time %} -
- {% if row.info_time_prerequisite %} - {{ row.info_time_prerequisite }} - {% endif %} -
- {% endif %} -
- {{ row.action_pdf }} - {{ row.action_export }} -
- - - {% endfor %} - - + + {% for row in lp_data.lp_list %} + + + {% if is_allowed_to_edit %} + + + + {% if allow_min_time %}{% endif %} + {% else %} + {% if allow_dates_for_student %} + + + {% endif %} + {% if not is_invitee %}{% endif %} + {% if allow_min_time %}{% endif %} {% endif %} + + + {% endfor %} + +
{{ "Title"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ "AuthoringOptions"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ "Actions"|get_lang }}
+ {% if is_allowed_to_edit %} + + + drag + {% endif %} + {{ row.learnpath_icon }} + {{ row.title }} {{ row.session_image }} {{ row.extra }} + {% if row.start_time %}{{ row.start_time }}{% endif %}{{ row.end_time }}{{ row.dsp_progress }}{% if row.info_time_prerequisite %}{{ row.info_time_prerequisite }}{% endif %}{% if row.start_time %}{{ row.start_time }}{% endif %}{{ row.end_time }}{{ row.dsp_progress }}{% if row.info_time_prerequisite %}{{ row.info_time_prerequisite }}{% endif %} + {{ 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 }} +
+
+ {% else %} + {# Empty NO-CATEGORY DROP TARGET (accordion) #} +
+ + + + + {% if allow_min_time %}{% endif %} + + + + + + +
{{ "Title"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ "AuthoringOptions"|get_lang }}
Drop a learning path here
+
+ {% endif %} + {% else %} +
+
+ {% for row in lp_data.lp_list %} +
+
+ +
{{ row.dsp_progress }}
+ {% if allow_dates_for_student %} +
+ {% if row.start_time %}{{ row.start_time }}{% endif %} + {{ row.end_time }} +
+ {% endif %} + {% if allow_min_time %} +
{% if row.info_time_prerequisite %}{{ row.info_time_prerequisite }}{% endif %}
+ {% endif %} +
{{ row.action_pdf }} {{ row.action_export }}
+
+
+ {% endfor %} +
+
+ {% endif %} + {% endif %} - {% if categories|length > 1 and lp_data.category.id %} - {% set number = number + 1 %} -
- +
+ {% endif %} + + {% endif %} + {% endif %} {% endfor %}
{% if not is_invitee and lp_is_shown and allow_min_time %} -
- {% if not is_ending %} - - {% else %} - - {{ 'IHaveFinishedTheLessonsNotifyTheTeacher'|get_lang }} - - {% endif %} -
+
+ {% if not is_ending %} + + {% else %} + + {{ 'IHaveFinishedTheLessonsNotifyTheTeacher'|get_lang }} + + {% endif %} +
{% endif %} {% if not is_invitee and lp_is_shown and allow_min_time and is_ending %} -
- {{ download_files_after_finish }} -
+
+ {{ download_files_after_finish }} +
{% endif %} {% if is_allowed_to_edit and not lp_is_shown %} -
-

{{ "LearningPaths"|get_lang }}

- - +
+

{{ "LearningPaths"|get_lang }}

+ + +
{% endif %} + From 5b1657af106554c2b6a7e87c0798650bd9fcf5ed Mon Sep 17 00:00:00 2001 From: Christian Beeznest Date: Mon, 20 Oct 2025 15:35:37 -0500 Subject: [PATCH 2/2] Learnpath: Enable drag-and-drop reordering for categories - refs BT#22963 --- main/lp/lp_controller.php | 48 ++- main/lp/lp_list.php | 1 + main/template/default/learnpath/list.tpl | 426 ++++++++++++----------- 3 files changed, 253 insertions(+), 222 deletions(-) diff --git a/main/lp/lp_controller.php b/main/lp/lp_controller.php index 7f0e6b55076..59d6c5d2483 100755 --- a/main/lp/lp_controller.php +++ b/main/lp/lp_controller.php @@ -1242,52 +1242,48 @@ function(reponse) { if (!api_is_allowed_to_edit(null, true)) { api_not_allowed(true); } - $courseId = api_get_course_int_id(); - $sessionId = api_get_session_id(); - $catOrder = isset($_POST['order']) ? (array) $_POST['order'] : []; + $courseId = api_get_course_int_id(); $tableCategory = Database::get_course_table(TABLE_LP_CATEGORY); - Database::query('START TRANSACTION'); + $catOrder = isset($_POST['order']) ? (array) $_POST['order'] : []; + $pos = 1; - foreach ($catOrder as $catId) { - $catId = (int)$catId; - if ($catId > 0) { - $catSessionId = (int) learnpath::getCategorySessionId($catId); - if ($catSessionId !== 0 && $catSessionId !== $sessionId) { - continue; - } + foreach ($catOrder as $catIid) { + $catIid = (int) $catIid; + if ($catIid <= 0) { + continue; } - $sql = "UPDATE $tableCategory SET position = $pos WHERE c_id = $courseId AND id = $catId"; + + $sql = "UPDATE $tableCategory + SET position = $pos + WHERE c_id = $courseId + AND iid = $catIid"; Database::query($sql); $pos++; } - Database::query('COMMIT'); + header('Content-Type: application/json'); echo json_encode(['ok' => true]); exit; - break; - case 'reorder_lps': if (!api_is_allowed_to_edit(null, true)) { api_not_allowed(true); } $courseId = api_get_course_int_id(); $sessionId = api_get_session_id(); - $tableLp = Database::get_course_table(TABLE_LP_MAIN); + $tableLp = Database::get_course_table(TABLE_LP_MAIN); $lists = isset($_POST['lists']) ? (array) $_POST['lists'] : []; - if (!empty($sessionId)) { - api_not_allowed(true); - } - - Database::query('START TRANSACTION'); - foreach ($lists as $categoryIdStr => $lpIds) { - $categoryId = (int)$categoryIdStr; + $categoryId = (int) $categoryIdStr; $pos = 1; - foreach ((array)$lpIds as $lpId) { - $lpId = (int)$lpId; + + foreach ((array) $lpIds as $lpId) { + $lpId = (int) $lpId; + if ($lpId <= 0) { + continue; + } $sql = "UPDATE $tableLp SET category_id = ".($categoryId ?: 0).", display_order = $pos WHERE c_id = $courseId AND id = $lpId"; @@ -1296,11 +1292,9 @@ function(reponse) { } } - Database::query('COMMIT'); header('Content-Type: application/json'); echo json_encode(['ok' => true]); exit; - break; case 'edit': if (!$is_allowed_to_edit) { api_not_allowed(true); diff --git a/main/lp/lp_list.php b/main/lp/lp_list.php index afed0ab106b..4f6913f4171 100755 --- a/main/lp/lp_list.php +++ b/main/lp/lp_list.php @@ -1050,6 +1050,7 @@ function confirmation(name) { $template->assign('filtered_category', $filteredCategoryId); $template->assign('allow_min_time', $allowMinTime); $template->assign('allow_dates_for_student', $allowDatesForStudent); +$template->assign('sec_token', $token); $templateName = $template->get_template('learnpath/list.tpl'); $content = $template->fetch($templateName); diff --git a/main/template/default/learnpath/list.tpl b/main/template/default/learnpath/list.tpl index 81dc20c90a5..1909a9d95bd 100644 --- a/main/template/default/learnpath/list.tpl +++ b/main/template/default/learnpath/list.tpl @@ -1,6 +1,7 @@ {% set configuration = 'lp_category_accordion'|api_get_configuration_value %}
+ {% set number = 0 %} {% for lp_data in data %} {% set show_category = true %} {% if filtered_category and filtered_category != lp_data.category.id %} @@ -39,169 +41,179 @@ {% 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 %} - {% endif %} - {% if lp_data.lp_list %} -
- - - - - {% if is_allowed_to_edit %} - - - - {% if allow_min_time %}{% endif %} - - {% else %} - {% if allow_dates_for_student %} - - - {% endif %} - {% if not is_invitee %}{% endif %} - {% if allow_min_time %}{% endif %} - - {% endif %} - - + {% if lp_data.lp_list %} +
+
{{ "Title"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ "AuthoringOptions"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ "Actions"|get_lang }}
+ + + + {% if is_allowed_to_edit %} + + + + {% if allow_min_time %}{% endif %} + + {% else %} + {% if allow_dates_for_student %} + + + {% endif %} + {% if not is_invitee %}{% endif %} + {% if allow_min_time %}{% endif %} + + {% endif %} + + - {# >>> tbody is a sortable target. #} - - {% for row in lp_data.lp_list %} - - + {% for row in lp_data.lp_list %} + + {% if is_allowed_to_edit %} - - drag - + + + + {% if allow_min_time %}{% endif %} + {% else %} + {% if allow_dates_for_student %} + + {% endif %} - {{ row.learnpath_icon }} - {{ row.title }} {{ row.session_image }} - {{ row.extra }} - - {% if is_allowed_to_edit %} - - - - {% if allow_min_time %}{% endif %} - {% else %} - {% if allow_dates_for_student %} - - - {% endif %} - {% if not is_invitee %}{% endif %} - {% if allow_min_time %}{% endif %} - {% endif %} - - - {% endfor %} - -
{{ "Title"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ "AuthoringOptions"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ "Actions"|get_lang }}
+
+ {% if is_allowed_to_edit %} + + + drag + + {% endif %} + {{ row.learnpath_icon }} + {{ row.title }} {{ row.session_image }} + {{ row.extra }} + {% if row.start_time %}{{ row.start_time }}{% endif %}{{ row.end_time }}{{ row.dsp_progress }}{% if row.info_time_prerequisite %}{{ row.info_time_prerequisite }}{% endif %}{% if row.start_time %}{{ row.start_time }}{% endif %}{{ row.end_time }}{% if row.start_time %}{{ row.start_time }}{% endif %}{{ row.end_time }}{{ row.dsp_progress }}{% if row.info_time_prerequisite %}{{ row.info_time_prerequisite }}{% endif %}{% if row.start_time %}{{ row.start_time }}{% endif %}{{ row.end_time }}{{ row.dsp_progress }}{% if row.info_time_prerequisite %}{{ row.info_time_prerequisite }}{% endif %} - {{ 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 }} {# Hide arrow icons #} - {{ row.action_update_scorm }} - {{ row.action_export_to_course_build }} -
-
- {% elseif is_allowed_to_edit %} - {# Empty category DROP TARGET (old view): allow dropping into empty categories #} -
- - - - - {% if allow_min_time %}{% endif %} - - - - - {# Visual hint #} - -
{{ "Title"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ is_allowed_to_edit ? "AuthoringOptions"|get_lang : "Actions"|get_lang }}
Drop a learning path here
+ {% if not is_invitee %}{{ row.dsp_progress }}{% endif %} + {% if allow_min_time %}{% if row.info_time_prerequisite %}{{ row.info_time_prerequisite }}{% endif %}{% endif %} + {% endif %} + + {{ 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 }} {# keep arrows, hide via CSS #} + {{ row.action_update_scorm }} + {{ row.action_export_to_course_build }} + + + {% endfor %} + + +
+ {% elseif is_allowed_to_edit %} + +
+ + + + + {% if allow_min_time %}{% endif %} + + + + + + +
{{ "Title"|get_lang }}{{ "TimeSpentTimeRequired"|get_lang }}{{ is_allowed_to_edit ? "AuthoringOptions"|get_lang : "Actions"|get_lang }}
Drop a learning path here
+
+ {% endif %}
- {% endif %} - + {% else %} - + {% if lp_data.category.id == 0 %} {% if is_allowed_to_edit %} {% if lp_data.lp_list %} @@ -280,7 +292,7 @@
{% else %} - {# Empty NO-CATEGORY DROP TARGET (accordion) #} +
@@ -327,50 +339,51 @@ {% if categories|length > 1 and lp_data.category.id %} {% set number = number + 1 %} - {# Mark each category panel as sortable item (new view) #} +
-
{% if lp_data.lp_list %} @@ -501,7 +515,7 @@ {% endfor %} {% endif %} {% elseif is_allowed_to_edit %} - {# Empty category DROP TARGET (accordion view) #} +
@@ -521,7 +535,7 @@ {% endif %} - + {% endif %} {% endif %} {% endfor %} @@ -560,23 +574,36 @@ {% endif %}