Пример #1
0
     }
     if (!$lp_found) {
         error_log('New LP - No learnpath given for delete', 0);
         require 'lp_list.php';
     } else {
         $_SESSION['refresh'] = 1;
         //remove lp from homepage if it is there
         //$_SESSION['oLP']->toggle_visibility((int)$_GET['lp_id'],'i');
         $_SESSION['oLP']->delete(null, (int) $_GET['lp_id'], 'remove');
         if (api_get_setting('search_enabled') === 'true' && extension_loaded('xapian')) {
             //delete from keyword
             $searchkey = new SearchEngineManager();
             $searchkey->idobj = $_GET['lp_id'];
             $searchkey->course_code = api_get_course_id();
             $searchkey->tool_id = TOOL_LEARNPATH;
             $searchkey->deleteKeyWord();
             $_SESSION['oLP']->delete_engine();
         }
         api_session_unregister('oLP');
         require 'lp_list.php';
     }
     break;
 case 'toggle_visible':
     //change lp visibility (inside lp tool)
     if (!$is_allowed_to_edit) {
         api_not_allowed(true);
     }
     if ($debug > 0) {
         error_log('New LP - visibility action triggered', 0);
     }
     if (!$lp_found) {