Merge pull request #4580 from christianbeeznest/Majorel-20362-3

Learnpath: Fix order menu tree when it has final item - refs BT#20362
pull/4586/head
Nicolas Ducoulombier 3 years ago committed by GitHub
commit 9eed3f67f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      main/lp/learnpath.class.php
  2. 2
      main/lp/lp_controller.php

@ -6775,6 +6775,9 @@ class learnpath
{
$return = '';
foreach ($elements as $key => $item) {
if (TOOL_LP_FINAL_ITEM === $item['type']) {
$key = 'final_item';
}
if (isset($item['load_data']) || empty($item['data'])) {
$item['data'] = $default_data[$item['load_data']];
$item['type'] = $default_content[$item['load_data']]['item_type'];
@ -13507,7 +13510,7 @@ EOD;
);
$form->addHtml(
Display::return_message(
get_lang('LPEndStepAddTagsToShowCertificateOrSkillAutomatically') . '</br></br> <b>((certificate))</b> </br> <b>((skill))</b>',
get_lang('LPEndStepAddTagsToShowCertificateOrSkillAutomatically').'</br></br> <b>((certificate))</b> </br> <b>((skill))</b>',
'normal',
false
)

@ -102,7 +102,7 @@ $htmlHeadXtra[] = '
$(".li_container .order_items").click(function(e) {
var dir = $(this).data("dir");
var itemId = $(this).data("id");
var jItems = $("#lp_item_list li.li_container");
var jItems = $("#lp_item_list li.li_container:not(#final_item)");
var jItem = $("#"+ itemId);
var index = jItems.index(jItem);
var total = jItems.length;

Loading…
Cancel
Save