From efbc92df0823d5c0adb283b875840ee737232ba7 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Fri, 23 Mar 2018 11:48:38 +0100 Subject: [PATCH] First be sure to delete LP sessions see BT#14149 --- main/course_home/course_home.php | 14 +++++++------- main/lp/lp_list.php | 5 ++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/main/course_home/course_home.php b/main/course_home/course_home.php index 4730f4b49f..97832fc126 100755 --- a/main/course_home/course_home.php +++ b/main/course_home/course_home.php @@ -330,6 +330,13 @@ if ($allow === true) { $content = '
'.$diagram.$content.'
'; +// Deleting the objects +Session::erase('_gid'); +Session::erase('oLP'); +Session::erase('lpobject'); +api_remove_in_gradebook(); +DocumentManager::removeGeneratedAudioTempFile(); + $tpl = new Template(null); $tpl->assign('message', $show_message); $tpl->assign('content', $content); @@ -337,10 +344,3 @@ $tpl->assign('content', $content); // Direct login to course $tpl->assign('course_code', $course_code); $tpl->display_one_col_template(); - -// Deleting the objects -Session::erase('_gid'); -Session::erase('oLP'); -Session::erase('lpobject'); -api_remove_in_gradebook(); -DocumentManager::removeGeneratedAudioTempFile(); diff --git a/main/lp/lp_list.php b/main/lp/lp_list.php index bffa25a990..61b3c51937 100755 --- a/main/lp/lp_list.php +++ b/main/lp/lp_list.php @@ -889,6 +889,8 @@ foreach ($categories as $item) { // Deleting the objects Session::erase('oLP'); Session::erase('lpobject'); +learnpath::generate_learning_path_folder($courseInfo); +DocumentManager::removeGeneratedAudioTempFile(); $template = new Template($nameTools); $template->assign('subscription_settings', $subscriptionSettings); @@ -905,6 +907,3 @@ $templateName = $template->get_template('learnpath/list.tpl'); $content = $template->fetch($templateName); $template->assign('content', $content); $template->display_one_col_template(); -learnpath::generate_learning_path_folder($courseInfo); - -DocumentManager::removeGeneratedAudioTempFile();