diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 3eda5f8d3a..e9f14a9b57 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -6061,8 +6061,7 @@ class learnpath ICON_SIZE_MEDIUM ).'';*/ - $return .= ''.Display :: return_icon( + $return .= ''.Display :: return_icon( 'settings.png', get_lang('CourseSettings'), '', diff --git a/main/newscorm/lp_controller.php b/main/newscorm/lp_controller.php index 0ed8055f05..54508d0fa1 100644 --- a/main/newscorm/lp_controller.php +++ b/main/newscorm/lp_controller.php @@ -455,7 +455,6 @@ switch ($action) { $_SESSION['oLP']->edit_document($_course); } $is_success = true; - $url = api_get_self().'?action=add_item&type=step&lp_id='.intval($_SESSION['oLP']->lp_id); header('Location: '.$url); exit; @@ -752,7 +751,18 @@ switch ($action) { } } } - $url = api_get_self().'?action=add_item&type=step&lp_id='.intval($_SESSION['oLP']->lp_id).'&'.api_get_cidreq(); + + + $referer = isset($_REQUEST['referer']) ? $_REQUEST['referer'] : 'add_item'; + switch ($referer) { + case 'lplist': + $url = api_get_self().'?action=list&'.api_get_cidreq(); + break; + default: + case 'add_item': + $url = api_get_self().'?action=add_item&type=step&lp_id='.intval($_SESSION['oLP']->lp_id).'&'.api_get_cidreq(); + break; + } header('Location: '.$url); exit; } diff --git a/main/newscorm/lp_edit.php b/main/newscorm/lp_edit.php index d19fb225ed..9f2d2cffb0 100644 --- a/main/newscorm/lp_edit.php +++ b/main/newscorm/lp_edit.php @@ -69,6 +69,9 @@ $form->addRule('lp_name', get_lang('ThisFieldIsRequired'), 'required'); $form->addElement('hidden', 'lp_encoding'); +$referer = isset($_REQUEST['referer']) ? Security::remove_XSS($_REQUEST['referer']) : null; +$form->addElement('hidden', 'referer', $referer); + $items = learnpath::get_category_from_course_into_select(api_get_course_int_id()); if (!empty($items)) { diff --git a/main/newscorm/lp_list.php b/main/newscorm/lp_list.php index 68bafd3fd3..eb385ee139 100644 --- a/main/newscorm/lp_list.php +++ b/main/newscorm/lp_list.php @@ -288,7 +288,7 @@ foreach ($categories as $item) { if ($is_allowed_to_edit) { // EDIT LP if ($current_session == $details['lp_session']) { - $dsp_edit_lp = ''.Display::return_icon('settings.png', get_lang('CourseSettings'), '', ICON_SIZE_SMALL).''; + $dsp_edit_lp = ''.Display::return_icon('settings.png', get_lang('CourseSettings'), '', ICON_SIZE_SMALL).''; } else { $dsp_edit_lp = Display::return_icon('settings_na.png', get_lang('CourseSettings'), '', ICON_SIZE_SMALL); }