You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					845 lines
				
				33 KiB
			
		
		
			
		
	
	
					845 lines
				
				33 KiB
			| 
								 
											15 years ago
										 
									 | 
							
								<?php
							 | 
						||
| 
								 
											16 years ago
										 
									 | 
							
								/* For licensing terms, see /license.txt */
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											17 years ago
										 
									 | 
							
								/**
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								 * This file was originally the copy of document.php, but many modifications happened since then ;
							 | 
						||
| 
								 | 
							
								 * the direct file view is not any more needed, if the user uploads a SCORM zip file, a directory
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								 * will be automatically created for it, and the files will be uncompressed there for example ;
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * @package chamilo.learnpath
							 | 
						||
| 
								 | 
							
								 * @author Yannick Warnier <ywarnier@beeznest.org>
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								use ChamiloSession as Session;
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								use Chamilo\CourseBundle\Entity\CLpCategory;
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								$this_section = SECTION_COURSES;
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								//@todo who turns on $lp_controller_touched?
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								if (empty($lp_controller_touched) || $lp_controller_touched != 1) {
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								    header('location: lp_controller.php?action=list');
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								    exit;
							 | 
						||
| 
								 
											17 years ago
										 
									 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								require_once '../inc/global.inc.php';
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								$courseDir = api_get_course_path().'/scorm';
							 | 
						||
| 
								 
											17 years ago
										 
									 | 
							
								$baseWordDir = $courseDir;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * Display initialisation and security checks
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								// Extra javascript functions for in html head:
							 | 
						||
| 
								 
											17 years ago
										 
									 | 
							
								$htmlHeadXtra[] =
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								    "<script>
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								function confirmation(name) {
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								    if (confirm(\" ".trim(get_lang('AreYouSureToDeleteJS'))." \"+name+\"?\"))
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								        {return true;}
							 | 
						||
| 
								 | 
							
								    else
							 | 
						||
| 
								 | 
							
								        {return false;}
							 | 
						||
| 
								 
											17 years ago
										 
									 | 
							
								}
							 | 
						||
| 
								 | 
							
								</script>";
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								$nameTools = get_lang('LearningPaths');
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								Event::event_access_tool(TOOL_LEARNPATH);
							 | 
						||
| 
								 
											17 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											14 years ago
										 
									 | 
							
								api_protect_course_script();
							 | 
						||
| 
								 
											17 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * Display
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								/* Require the search widget and prepare the header with its stuff. */
							 | 
						||
| 
								 
											17 years ago
										 
									 | 
							
								if (api_get_setting('search_enabled') == 'true') {
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								    require api_get_path(LIBRARY_PATH).'search/search_widget.php';
							 | 
						||
| 
								 | 
							
								    search_widget_prepare($htmlHeadXtra);
							 | 
						||
| 
								 
											17 years ago
										 
									 | 
							
								}
							 | 
						||
| 
								 
											16 years ago
										 
									 | 
							
								$current_session = api_get_session_id();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								/* Introduction section (editable by course admins) */
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								$introductionSection = Display::return_introduction_section(
							 | 
						||
| 
								 | 
							
								    TOOL_LEARNPATH,
							 | 
						||
| 
								 | 
							
								    array(
							 | 
						||
| 
								 | 
							
								        'CreateDocumentWebDir' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document/',
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								        'CreateDocumentDir' => '../..'.api_get_path(REL_COURSE_PATH).api_get_course_path().'/document/',
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								        'BaseHref' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/',
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								    )
							 | 
						||
| 
								 | 
							
								);
							 | 
						||
| 
								 
											17 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								$is_allowed_to_edit = api_is_allowed_to_edit(null, true);
							 | 
						||
| 
								 
											17 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								$message = '';
							 | 
						||
| 
								 | 
							
								$actions = '';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											16 years ago
										 
									 | 
							
								if ($is_allowed_to_edit) {
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								    if (!empty($dialog_box)) {
							 | 
						||
| 
								 | 
							
								        switch ($_GET['dialogtype']) {
							 | 
						||
| 
								 | 
							
								            case 'confirmation':
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                $message = Display::return_message($dialog_box, 'success');
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								                break;
							 | 
						||
| 
								 | 
							
								            case 'error':
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                $message = Display::return_message($dialog_box, 'danger');
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								                break;
							 | 
						||
| 
								 | 
							
								            case 'warning':
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                $message = Display::return_message($dialog_box, 'warning');
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								                break;
							 | 
						||
| 
								 | 
							
								            default:
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                $message = Display::return_message($dialog_box);
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								                break;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								    if (api_failure::get_last_failure()) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								        $message = Display::return_message(api_failure::get_last_failure());
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								    $actions .= Display::url(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								        Display::return_icon('new_folder.png', get_lang('AddCategory'), array(), ICON_SIZE_MEDIUM),
							 | 
						||
| 
								 | 
							
								        api_get_self().'?'.api_get_cidreq().'&action=add_lp_category'
							 | 
						||
| 
								 | 
							
								    );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								    $actions .= Display::url(
							 | 
						||
| 
								 | 
							
								        Display::return_icon('new_learnpath.png', get_lang('LearnpathAddLearnpath'), '', ICON_SIZE_MEDIUM),
							 | 
						||
| 
								 | 
							
								        api_get_self().'?'.api_get_cidreq().'&action=add_lp'
							 | 
						||
| 
								 | 
							
								    );
							 | 
						||
| 
								 | 
							
								    $actions .= Display::url(
							 | 
						||
| 
								 | 
							
								        Display::return_icon('import_scorm.png', get_lang('UploadScorm'), '', ICON_SIZE_MEDIUM),
							 | 
						||
| 
								 | 
							
								        '../upload/index.php?'.api_get_cidreq().'&curdirpath=/&tool='.TOOL_LEARNPATH
							 | 
						||
| 
								 | 
							
								    );
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								    if (api_get_setting('service_ppt2lp', 'active') == 'true') {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								        $actions .= Display::url(
							 | 
						||
| 
								 | 
							
								            Display::return_icon('import_powerpoint.png', get_lang('PowerPointConvert'), '', ICON_SIZE_MEDIUM),
							 | 
						||
| 
								 | 
							
								            '../upload/upload_ppt.php?'.api_get_cidreq().'&curdirpath=/&tool='.TOOL_LEARNPATH
							 | 
						||
| 
								 | 
							
								        );
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								    }
							 | 
						||
| 
								 
											17 years ago
										 
									 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								$token = Security::get_token();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								/* DISPLAY SCORM LIST */
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								$categoriesTempList = learnpath::getCategories(api_get_course_int_id());
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								$categoryTest = new CLpCategory();
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								$categoryTest->setId(0);
							 | 
						||
| 
								 | 
							
								$categoryTest->setName(get_lang('WithOutCategory'));
							 | 
						||
| 
								 | 
							
								$categoryTest->setPosition(0);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								$categories = array(
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								    $categoryTest,
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								if (!empty($categoriesTempList)) {
							 | 
						||
| 
								 | 
							
								    $categories = array_merge($categories, $categoriesTempList);
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											12 years ago
										 
									 | 
							
								$userId = api_get_user_id();
							 | 
						||
| 
								 | 
							
								$userInfo = api_get_user_info();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								$lpIsShown = false;
							 | 
						||
| 
								 
											14 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								$test_mode = api_get_setting('server_type');
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								$user = UserManager::getRepository()->find($userId);
							 | 
						||
| 
								 
											14 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								$data = [];
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								/** @var CLpCategory $item */
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								foreach ($categories as $item) {
							 | 
						||
| 
								 | 
							
								    $categoryId = $item->getId();
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								    if (!$is_allowed_to_edit) {
							 | 
						||
| 
								 | 
							
								        $users = $item->getUsers();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        if (!empty($users) && $users->count() > 0) {
							 | 
						||
| 
								 | 
							
								            if (!$item->hasUserAdded($user)) {
							 | 
						||
| 
								 | 
							
								                continue;
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								    $list = new LearnpathList(
							 | 
						||
| 
								 | 
							
								        api_get_user_id(),
							 | 
						||
| 
								 | 
							
								        null,
							 | 
						||
| 
								 | 
							
								        null,
							 | 
						||
| 
								 | 
							
								        null,
							 | 
						||
| 
								 | 
							
								        false,
							 | 
						||
| 
								 | 
							
								        $categoryId
							 | 
						||
| 
								 | 
							
								    );
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								    $flat_list = $list->get_flat_list();
							 | 
						||
| 
								 
											12 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								    // Hiding categories with out LPs (only for student)
							 | 
						||
| 
								 | 
							
								    if (empty($flat_list) && !api_is_allowed_to_edit()) {
							 | 
						||
| 
								 | 
							
								        continue;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 
											14 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								    $listData = [];
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								    if (!empty($flat_list)) {
							 | 
						||
| 
								 | 
							
								        $max = count($flat_list);
							 | 
						||
| 
								 | 
							
								        $counter = 0;
							 | 
						||
| 
								 | 
							
								        $current = 0;
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								        $autolaunch_exists = false;
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								        foreach ($flat_list as $id => $details) {
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            // Validation when belongs to a session.
							 | 
						||
| 
								 | 
							
								            $session_img = api_get_session_image(
							 | 
						||
| 
								 | 
							
								                $details['lp_session'],
							 | 
						||
| 
								 | 
							
								                $userInfo['status']
							 | 
						||
| 
								 | 
							
								            );
							 | 
						||
| 
								 
											14 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            if (!$is_allowed_to_edit && $details['lp_visibility'] == 0) {
							 | 
						||
| 
								 | 
							
								                // This is a student and this path is invisible, skip.
							 | 
						||
| 
								 | 
							
								                continue;
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 
											14 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            // Check if the learnpath is visible for student.
							 | 
						||
| 
								 | 
							
								            if (!$is_allowed_to_edit && !learnpath::is_lp_visible_for_student(
							 | 
						||
| 
								 | 
							
								                    $id,
							 | 
						||
| 
								 | 
							
								                    $userId
							 | 
						||
| 
								 | 
							
								                )
							 | 
						||
| 
								 | 
							
								            ) {
							 | 
						||
| 
								 | 
							
								                continue;
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $start_time = $end_time = '';
							 | 
						||
| 
								 | 
							
								            if (!$is_allowed_to_edit) {
							 | 
						||
| 
								 | 
							
								                $time_limits = false;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                //This is an old LP (from a migration 1.8.7) so we do nothing
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                if ((empty($details['created_on'])) &&
							 | 
						||
| 
								 | 
							
								                    (empty($details['modified_on']))
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                ) {
							 | 
						||
| 
								 | 
							
								                    $time_limits = false;
							 | 
						||
| 
								 | 
							
								                }
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                //Checking if expired_on is ON
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                if ($details['expired_on'] != '') {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    $time_limits = true;
							 | 
						||
| 
								 | 
							
								                }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                if ($time_limits) {
							 | 
						||
| 
								 | 
							
								                    // Check if start time
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                    if (!empty($details['publicated_on']) && !empty($details['expired_on'])) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $start_time = api_strtotime(
							 | 
						||
| 
								 | 
							
								                            $details['publicated_on'],
							 | 
						||
| 
								 | 
							
								                            'UTC'
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 | 
							
								                        $end_time = api_strtotime(
							 | 
						||
| 
								 | 
							
								                            $details['expired_on'],
							 | 
						||
| 
								 | 
							
								                            'UTC'
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 | 
							
								                        $now = time();
							 | 
						||
| 
								 | 
							
								                        $is_actived_time = false;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                        if ($now > $start_time && $end_time > $now) {
							 | 
						||
| 
								 | 
							
								                            $is_actived_time = true;
							 | 
						||
| 
								 | 
							
								                        }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                        if (!$is_actived_time) {
							 | 
						||
| 
								 | 
							
								                            continue;
							 | 
						||
| 
								 | 
							
								                        }
							 | 
						||
| 
								 | 
							
								                    }
							 | 
						||
| 
								 | 
							
								                }
							 | 
						||
| 
								 | 
							
								                $start_time = $end_time = '';
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								            } else {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                if (!empty($details['publicated_on'])) {
							 | 
						||
| 
								 | 
							
								                    $start_time = api_convert_and_format_date(
							 | 
						||
| 
								 | 
							
								                        $details['publicated_on'],
							 | 
						||
| 
								 | 
							
								                        DATE_TIME_FORMAT_LONG
							 | 
						||
| 
								 | 
							
								                    );
							 | 
						||
| 
								 | 
							
								                }
							 | 
						||
| 
								 | 
							
								                if (!empty($details['expired_on'])) {
							 | 
						||
| 
								 | 
							
								                    $end_time = api_convert_and_format_date(
							 | 
						||
| 
								 | 
							
								                        $details['expired_on'],
							 | 
						||
| 
								 | 
							
								                        DATE_TIME_FORMAT_LONG
							 | 
						||
| 
								 | 
							
								                    );
							 | 
						||
| 
								 | 
							
								                }
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								            }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $counter++;
							 | 
						||
| 
								 | 
							
								            if (($counter % 2) == 0) {
							 | 
						||
| 
								 | 
							
								                $oddclass = 'row_odd';
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								            } else {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                $oddclass = 'row_even';
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								            }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $url_start_lp = 'lp_controller.php?'.api_get_cidreq().'&action=view&lp_id='.$id;
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $name = Security::remove_XSS($details['lp_name']);
							 | 
						||
| 
								 | 
							
								            $extra = null;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            if ($is_allowed_to_edit) {
							 | 
						||
| 
								 | 
							
								                $url_start_lp .= '&isStudentView=true';
							 | 
						||
| 
								 | 
							
								                $studentVisibility = learnpath::is_lp_visible_for_student(
							 | 
						||
| 
								 | 
							
								                    $id,
							 | 
						||
| 
								 | 
							
								                    $userId
							 | 
						||
| 
								 | 
							
								                );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                $dsp_desc = '<em>'.$details['lp_maker'].'</em>   '.($studentVisibility ? '' : ' - ('.get_lang('LPNotVisibleToStudent').')');
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                $extra = '<div class ="lp_content_type_label">'.$dsp_desc.'</div>';
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            $my_title = $name;
							 | 
						||
| 
								 | 
							
								            $icon_learnpath = Display::return_icon(
							 | 
						||
| 
								 | 
							
								                'learnpath.png',
							 | 
						||
| 
								 | 
							
								                get_lang('LPName'),
							 | 
						||
| 
								 | 
							
								                '',
							 | 
						||
| 
								 | 
							
								                ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								            );
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								            if ($details['lp_visibility'] == 0) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                $my_title = Display::tag(
							 | 
						||
| 
								 | 
							
								                    'font',
							 | 
						||
| 
								 | 
							
								                    $name,
							 | 
						||
| 
								 | 
							
								                    array('class' => 'invisible')
							 | 
						||
| 
								 | 
							
								                );
							 | 
						||
| 
								 | 
							
								                $icon_learnpath = Display::return_icon(
							 | 
						||
| 
								 | 
							
								                    'learnpath_na.png',
							 | 
						||
| 
								 | 
							
								                    get_lang('LPName'),
							 | 
						||
| 
								 | 
							
								                    '',
							 | 
						||
| 
								 | 
							
								                    ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                );
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            $dsp_desc = '';
							 | 
						||
| 
								 | 
							
								            $dsp_export = '';
							 | 
						||
| 
								 | 
							
								            $dsp_build = '';
							 | 
						||
| 
								 | 
							
								            $dsp_delete = '';
							 | 
						||
| 
								 | 
							
								            $dsp_visible = '';
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								            $trackingAction = '';
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $dsp_default_view = '';
							 | 
						||
| 
								 | 
							
								            $dsp_debug = '';
							 | 
						||
| 
								 | 
							
								            $dsp_order = '';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            $progress = 0;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            if (!api_is_invitee()) {
							 | 
						||
| 
								 | 
							
								                $progress = learnpath::getProgress(
							 | 
						||
| 
								 | 
							
								                    $id,
							 | 
						||
| 
								 | 
							
								                    $userId,
							 | 
						||
| 
								 | 
							
								                    api_get_course_int_id(),
							 | 
						||
| 
								 | 
							
								                    api_get_session_id()
							 | 
						||
| 
								 | 
							
								                );
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            if ($is_allowed_to_edit) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                $dsp_progress = '<center>'.$progress.'</center>';
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								            } else {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                $dsp_progress = "";
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                if (!api_is_invitee()) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    $dsp_progress = learnpath::get_progress_bar($progress, '%');
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                }
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								            }
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $token_parameter = "&sec_token=$token";
							 | 
						||
| 
								 | 
							
								            $dsp_edit_lp = null;
							 | 
						||
| 
								 | 
							
								            $dsp_publish = null;
							 | 
						||
| 
								 | 
							
								            $dsp_reinit = null;
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $subscribeUsers = null;
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $dsp_disk = null;
							 | 
						||
| 
								 | 
							
								            $copy = null;
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $lp_auto_launch_icon = null;
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $actionSeriousGame = null;
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								            if ($is_allowed_to_edit) {
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                // EDIT LP
							 | 
						||
| 
								 | 
							
								                if ($current_session == $details['lp_session']) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    $dsp_edit_lp = Display::url(
							 | 
						||
| 
								 | 
							
								                        Display::return_icon('settings.png', get_lang('CourseSettings'), '', ICON_SIZE_SMALL),
							 | 
						||
| 
								 | 
							
								                        "lp_controller.php?" . api_get_cidreq() . "&action=edit&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                    );
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								                } else {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    $dsp_edit_lp = Display::return_icon(
							 | 
						||
| 
								 | 
							
								                        'settings_na.png',
							 | 
						||
| 
								 | 
							
								                        get_lang('CourseSettings'),
							 | 
						||
| 
								 | 
							
								                        '',
							 | 
						||
| 
								 | 
							
								                        ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                    );
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								                }
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                // BUILD
							 | 
						||
| 
								 | 
							
								                if ($current_session == $details['lp_session']) {
							 | 
						||
| 
								 | 
							
								                    if ($details['lp_type'] == 1 || $details['lp_type'] == 2) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $dsp_build = Display::url(
							 | 
						||
| 
								 | 
							
								                            Display::return_icon('edit.png', get_lang('LearnpathEditLearnpath'), '', ICON_SIZE_SMALL),
							 | 
						||
| 
								 | 
							
								                            'lp_controller.php?' . api_get_cidreq() . '&' . http_build_query([
							 | 
						||
| 
								 | 
							
								                                'action' => 'add_item',
							 | 
						||
| 
								 | 
							
								                                'type' => 'step',
							 | 
						||
| 
								 | 
							
								                                'lp_id' => $id,
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                                'isStudentView' => 'false',
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            ])
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    } else {
							 | 
						||
| 
								 | 
							
								                        $dsp_build = Display::return_icon(
							 | 
						||
| 
								 | 
							
								                            'edit_na.png',
							 | 
						||
| 
								 | 
							
								                            get_lang('LearnpathEditLearnpath'),
							 | 
						||
| 
								 | 
							
								                            '',
							 | 
						||
| 
								 | 
							
								                            ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 | 
							
								                    }
							 | 
						||
| 
								 | 
							
								                } else {
							 | 
						||
| 
								 | 
							
								                    $dsp_build = Display::return_icon(
							 | 
						||
| 
								 | 
							
								                        'edit_na.png',
							 | 
						||
| 
								 | 
							
								                        get_lang('LearnpathEditLearnpath'),
							 | 
						||
| 
								 | 
							
								                        '',
							 | 
						||
| 
								 | 
							
								                        ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                    );
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								                }
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								                /* VISIBILITY COMMAND */
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                /*  Session test not necessary if we want to show base course learning
							 | 
						||
| 
								 | 
							
								                    paths inside the session.
							 | 
						||
| 
								 | 
							
								                    See http://support.chamilo.org/projects/chamilo-18/wiki/Tools_and_sessions).
							 | 
						||
| 
								 | 
							
								                */
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                if (!isset($details['subscribe_users']) || $details['subscribe_users'] != 1) {
							 | 
						||
| 
								 | 
							
								                    if ($details['lp_visibility'] == 0) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $dsp_visible = Display::url(
							 | 
						||
| 
								 | 
							
								                            Display::return_icon('invisible.png', get_lang('Show'), '', ICON_SIZE_SMALL),
							 | 
						||
| 
								 | 
							
								                            api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_visible&new_status=1"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    } else {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $dsp_visible = Display::url(
							 | 
						||
| 
								 | 
							
								                            Display::return_icon('visible.png', get_lang('Hide'), '', ICON_SIZE_SMALL),
							 | 
						||
| 
								 | 
							
								                            api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_visible&new_status=0"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    }
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								                }
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                //Tracking command
							 | 
						||
| 
								 | 
							
								                $trackingActionUrl = 'lp_controller.php?'
							 | 
						||
| 
								 | 
							
								                    . api_get_cidreq() . '&'
							 | 
						||
| 
								 | 
							
								                    . http_build_query([
							 | 
						||
| 
								 | 
							
								                        'action' => 'report',
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                        'lp_id' => $id,
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                    ]);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                $trackingAction = Display::url(
							 | 
						||
| 
								 | 
							
								                    Display::return_icon('test_results.png', get_lang('Results'), array(), ICON_SIZE_SMALL),
							 | 
						||
| 
								 | 
							
								                    $trackingActionUrl
							 | 
						||
| 
								 | 
							
								                );
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                /* PUBLISH COMMAND */
							 | 
						||
| 
								 | 
							
								                if ($current_session == $details['lp_session']) {
							 | 
						||
| 
								 | 
							
								                    if ($details['lp_published'] == "i") {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $dsp_publish = Display::url(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            Display::return_icon(
							 | 
						||
| 
								 | 
							
								                                'lp_publish_na.png',
							 | 
						||
| 
								 | 
							
								                                get_lang('LearnpathPublish'),
							 | 
						||
| 
								 | 
							
								                                '',
							 | 
						||
| 
								 | 
							
								                                ICON_SIZE_SMALL
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            ),
							 | 
						||
| 
								 | 
							
								                            api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_publish&new_status=v"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    } else {
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                        $dsp_publish = "<a href='".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=i'>".
							 | 
						||
| 
								 | 
							
								                            Display::return_icon(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                                'lp_publish.png',
							 | 
						||
| 
								 | 
							
								                                get_lang('LearnpathDoNotPublish'),
							 | 
						||
| 
								 | 
							
								                                '',
							 | 
						||
| 
								 | 
							
								                                ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                            )."</a>";
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $dsp_publish = Display::url(
							 | 
						||
| 
								 | 
							
								                            Display::return_icon(
							 | 
						||
| 
								 | 
							
								                                'lp_publish.png',
							 | 
						||
| 
								 | 
							
								                                get_lang('LearnpathDoNotPublish'),
							 | 
						||
| 
								 | 
							
								                                '',
							 | 
						||
| 
								 | 
							
								                                ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                            ),
							 | 
						||
| 
								 | 
							
								                            api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_publish&new_status=i"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    }
							 | 
						||
| 
								 | 
							
								                } else {
							 | 
						||
| 
								 | 
							
								                    $dsp_publish = Display::return_icon(
							 | 
						||
| 
								 | 
							
								                        'lp_publish_na.png',
							 | 
						||
| 
								 | 
							
								                        get_lang('LearnpathDoNotPublish'),
							 | 
						||
| 
								 | 
							
								                        '',
							 | 
						||
| 
								 | 
							
								                        ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                    );
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								                }
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                /*  MULTIPLE ATTEMPTS OR SERIOUS GAME MODE
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                  SERIOUSGAME MODE is a special mode where :
							 | 
						||
| 
								 | 
							
								                 * If a user exits the learning path before finishing it, he comes back where he left next time he tries
							 | 
						||
| 
								 | 
							
								                 * When lp status is completed, user can still modify the attempt (adds/time change score, and browse it)
							 | 
						||
| 
								 | 
							
								                 * It is thus a mix betwenn multiple attempt and mono attempt
							 | 
						||
| 
								 | 
							
								                 */
							 | 
						||
| 
								 | 
							
								                if ($current_session == $details['lp_session']) {
							 | 
						||
| 
								 | 
							
								                    if ($details['seriousgame_mode'] == 1 && $details['lp_prevent_reinit'] == 1) { //seriousgame mode | next = single
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $dsp_reinit = Display::url(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            Display::return_icon(
							 | 
						||
| 
								 | 
							
								                                'reload.png',
							 | 
						||
| 
								 | 
							
								                                get_lang('PreventMultipleAttempts'),
							 | 
						||
| 
								 | 
							
								                                '',
							 | 
						||
| 
								 | 
							
								                                ICON_SIZE_SMALL
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            ),
							 | 
						||
| 
								 | 
							
								                            "lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    }
							 | 
						||
| 
								 | 
							
								                    if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 1) { //single mode | next = multiple
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $dsp_reinit = Display::url(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            Display::return_icon(
							 | 
						||
| 
								 | 
							
								                                'reload_na.png',
							 | 
						||
| 
								 | 
							
								                                get_lang('AllowMultipleAttempts'),
							 | 
						||
| 
								 | 
							
								                                '',
							 | 
						||
| 
								 | 
							
								                                ICON_SIZE_SMALL
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            ),
							 | 
						||
| 
								 | 
							
								                            "lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    }
							 | 
						||
| 
								 | 
							
								                    if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 0) { //multiple mode | next = seriousgame
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $dsp_reinit = Display::url(
							 | 
						||
| 
								 | 
							
								                            Display::return_icon(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                                'reload.png',
							 | 
						||
| 
								 | 
							
								                                get_lang('AllowMultipleAttempts'),
							 | 
						||
| 
								 | 
							
								                                '',
							 | 
						||
| 
								 | 
							
								                                ICON_SIZE_SMALL
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            ),
							 | 
						||
| 
								 | 
							
								                            "lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    }
							 | 
						||
| 
								 | 
							
								                } else {
							 | 
						||
| 
								 | 
							
								                    $dsp_reinit = Display::return_icon(
							 | 
						||
| 
								 | 
							
								                        'reload_na.png',
							 | 
						||
| 
								 | 
							
								                        get_lang('AllowMultipleAttempts'),
							 | 
						||
| 
								 | 
							
								                        '',
							 | 
						||
| 
								 | 
							
								                        ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                    );
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								                }
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								                /* SCREEN LP VIEW */
							 | 
						||
| 
								 | 
							
								                if ($current_session == $details['lp_session']) {
							 | 
						||
| 
								 | 
							
								                    switch ($details['lp_view_mode']) {
							 | 
						||
| 
								 | 
							
								                        case 'fullscreen':
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            $dsp_default_view = Display::url(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                                Display::return_icon(
							 | 
						||
| 
								 | 
							
								                                    'view_fullscreen.png',
							 | 
						||
| 
								 | 
							
								                                    get_lang('ViewModeFullScreen'),
							 | 
						||
| 
								 | 
							
								                                    '',
							 | 
						||
| 
								 | 
							
								                                    ICON_SIZE_SMALL
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                                ),
							 | 
						||
| 
								 | 
							
								                                'lp_controller.php?' . api_get_cidreq()
							 | 
						||
| 
								 | 
							
								                                . '&action=switch_view_mode&lp_id=' . $id . $token_parameter
							 | 
						||
| 
								 | 
							
								                            );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            break;
							 | 
						||
| 
								 | 
							
								                        case 'embedded':
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            $dsp_default_view = Display::url(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                                Display::return_icon(
							 | 
						||
| 
								 | 
							
								                                    'view_left_right.png',
							 | 
						||
| 
								 | 
							
								                                    get_lang('ViewModeEmbedded'),
							 | 
						||
| 
								 | 
							
								                                    '',
							 | 
						||
| 
								 | 
							
								                                    ICON_SIZE_SMALL
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                                ),
							 | 
						||
| 
								 | 
							
								                                'lp_controller.php?' . api_get_cidreq()
							 | 
						||
| 
								 | 
							
								                                . '&action=switch_view_mode&lp_id=' . $id . $token_parameter
							 | 
						||
| 
								 | 
							
								                            );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            break;
							 | 
						||
| 
								 | 
							
								                        case 'embedframe':
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            $dsp_default_view = Display::url(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                                Display::return_icon(
							 | 
						||
| 
								 | 
							
								                                    'view_nofullscreen.png',
							 | 
						||
| 
								 | 
							
								                                    get_lang('ViewModeEmbedFrame'),
							 | 
						||
| 
								 | 
							
								                                    '',
							 | 
						||
| 
								 | 
							
								                                    ICON_SIZE_SMALL
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                                ),
							 | 
						||
| 
								 | 
							
								                                'lp_controller.php?' . api_get_cidreq()
							 | 
						||
| 
								 | 
							
								                                . '&action=switch_view_mode&lp_id=' . $id . $token_parameter
							 | 
						||
| 
								 | 
							
								                            );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            break;
							 | 
						||
| 
								 | 
							
								                        case 'impress':
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            $dsp_default_view = Display::url(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                                Display::return_icon(
							 | 
						||
| 
								 | 
							
								                                    'window_list_slide.png',
							 | 
						||
| 
								 | 
							
								                                    get_lang('ViewModeImpress'),
							 | 
						||
| 
								 | 
							
								                                    '',
							 | 
						||
| 
								 | 
							
								                                    ICON_SIZE_SMALL
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                                ),
							 | 
						||
| 
								 | 
							
								                                'lp_controller.php?' . api_get_cidreq()
							 | 
						||
| 
								 | 
							
								                                . '&action=switch_view_mode&lp_id=' . $id . $token_parameter
							 | 
						||
| 
								 | 
							
								                            );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            break;
							 | 
						||
| 
								 | 
							
								                    }
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								                } else {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    if ($details['lp_view_mode'] == 'fullscreen') {
							 | 
						||
| 
								 | 
							
								                        $dsp_default_view = Display::return_icon(
							 | 
						||
| 
								 | 
							
								                            'view_fullscreen_na.png',
							 | 
						||
| 
								 | 
							
								                            get_lang('ViewModeEmbedded'),
							 | 
						||
| 
								 | 
							
								                            '',
							 | 
						||
| 
								 | 
							
								                            ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 | 
							
								                    } else {
							 | 
						||
| 
								 | 
							
								                        $dsp_default_view = Display::return_icon(
							 | 
						||
| 
								 | 
							
								                            'view_left_right_na.png',
							 | 
						||
| 
								 | 
							
								                            get_lang('ViewModeEmbedded'),
							 | 
						||
| 
								 | 
							
								                            '',
							 | 
						||
| 
								 | 
							
								                            ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 | 
							
								                    }
							 | 
						||
| 
								 | 
							
								                }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                /*  DEBUG  */
							 | 
						||
| 
								 | 
							
								                if ($test_mode == 'test' or api_is_platform_admin()) {
							 | 
						||
| 
								 | 
							
								                    if ($details['lp_scorm_debug'] == 1) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $dsp_debug = Display::url(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            Display::return_icon(
							 | 
						||
| 
								 | 
							
								                                'bug.png',
							 | 
						||
| 
								 | 
							
								                                get_lang('HideDebug'),
							 | 
						||
| 
								 | 
							
								                                '',
							 | 
						||
| 
								 | 
							
								                                ICON_SIZE_SMALL
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            ),
							 | 
						||
| 
								 | 
							
								                            "lp_controller.php?" . api_get_cidreq() . "&action=switch_scorm_debug&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    } else {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $dsp_debug = Display::url(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            Display::return_icon(
							 | 
						||
| 
								 | 
							
								                                'bug_na.png',
							 | 
						||
| 
								 | 
							
								                                get_lang('ShowDebug'),
							 | 
						||
| 
								 | 
							
								                                '',
							 | 
						||
| 
								 | 
							
								                                ICON_SIZE_SMALL
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            ),
							 | 
						||
| 
								 | 
							
								                            "lp_controller.php?" . api_get_cidreq() . "&action=switch_scorm_debug&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    }
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								                }
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                /* Export */
							 | 
						||
| 
								 | 
							
								                if ($details['lp_type'] == 1) {
							 | 
						||
| 
								 | 
							
								                    $dsp_disk = Display::url(
							 | 
						||
| 
								 | 
							
								                        Display::return_icon(
							 | 
						||
| 
								 | 
							
								                            'cd.gif',
							 | 
						||
| 
								 | 
							
								                            get_lang('Export'),
							 | 
						||
| 
								 | 
							
								                            array(),
							 | 
						||
| 
								 | 
							
								                            ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                        ),
							 | 
						||
| 
								 | 
							
								                        api_get_self()."?".api_get_cidreq(
							 | 
						||
| 
								 | 
							
								                        )."&action=export&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                    );
							 | 
						||
| 
								 | 
							
								                } elseif ($details['lp_type'] == 2) {
							 | 
						||
| 
								 | 
							
								                    $dsp_disk = Display::url(
							 | 
						||
| 
								 | 
							
								                        Display::return_icon(
							 | 
						||
| 
								 | 
							
								                            'cd.gif',
							 | 
						||
| 
								 | 
							
								                            get_lang('Export'),
							 | 
						||
| 
								 | 
							
								                            array(),
							 | 
						||
| 
								 | 
							
								                            ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                        ),
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                        api_get_self()."?".api_get_cidreq()."&action=export&lp_id=$id&export_name=".api_replace_dangerous_char($name, 'strict' ).".zip"
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    );
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								                } else {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    $dsp_disk = Display::return_icon(
							 | 
						||
| 
								 | 
							
								                        'cd_gray.gif',
							 | 
						||
| 
								 | 
							
								                        get_lang('Export'),
							 | 
						||
| 
								 | 
							
								                        array(),
							 | 
						||
| 
								 | 
							
								                        ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                    );
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								                }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                // Copy
							 | 
						||
| 
								 | 
							
								                $copy = Display::url(
							 | 
						||
| 
								 | 
							
								                    Display::return_icon(
							 | 
						||
| 
								 | 
							
								                        'cd_copy.png',
							 | 
						||
| 
								 | 
							
								                        get_lang('Copy'),
							 | 
						||
| 
								 | 
							
								                        array(),
							 | 
						||
| 
								 | 
							
								                        ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                    ),
							 | 
						||
| 
								 | 
							
								                    api_get_self()."?".api_get_cidreq()."&action=copy&lp_id=$id"
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                );
							 | 
						||
| 
								 
											14 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                // Subscribe users
							 | 
						||
| 
								 | 
							
								                $subscribeUsers = null;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                if ($details['subscribe_users'] == 1) {
							 | 
						||
| 
								 | 
							
								                    $subscribeUsers = Display::url(
							 | 
						||
| 
								 | 
							
								                        Display::return_icon('user.png', get_lang('SubscribeUsersToLp')),
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                        api_get_path(WEB_CODE_PATH) . "lp/lp_subscribe_users.php?lp_id=$id&".api_get_cidreq()
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    );
							 | 
						||
| 
								 | 
							
								                }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                /* Auto launch LP code */
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                if (api_get_course_setting('enable_lp_auto_launch') == 1) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    if ($details['autolaunch'] == 1 && $autolaunch_exists == false) {
							 | 
						||
| 
								 | 
							
								                        $autolaunch_exists = true;
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $lp_auto_launch_icon = Display::url(
							 | 
						||
| 
								 | 
							
								                            Display::return_icon('launch.png', get_lang('DisableLPAutoLaunch')),
							 | 
						||
| 
								 | 
							
								                            api_get_self() . '?' . api_get_cidreq() . "&action=auto_launch&status=0&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    } else {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $lp_auto_launch_icon = Display::url(
							 | 
						||
| 
								 | 
							
								                            Display::return_icon('launch_na.png', get_lang('EnableLPAutoLaunch')),
							 | 
						||
| 
								 | 
							
								                            api_get_self() . '?' . api_get_cidreq() . "&action=auto_launch&status=1&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    }
							 | 
						||
| 
								 | 
							
								                }
							 | 
						||
| 
								 
											14 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                // Export to PDF
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                $export_icon = Display::url(
							 | 
						||
| 
								 | 
							
								                    Display::return_icon(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        'pdf.png',
							 | 
						||
| 
								 | 
							
								                        get_lang('ExportToPDFOnlyHTMLAndImages'),
							 | 
						||
| 
								 | 
							
								                        '',
							 | 
						||
| 
								 | 
							
								                        ICON_SIZE_SMALL
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    ),
							 | 
						||
| 
								 | 
							
								                    api_get_self() . '?' . api_get_cidreq() . "&action=export_to_pdf&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								                /* Delete */
							 | 
						||
| 
								 | 
							
								                if ($current_session == $details['lp_session']) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    $dsp_delete = Display::url(
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        Display::return_icon(
							 | 
						||
| 
								 | 
							
								                            'delete.png',
							 | 
						||
| 
								 | 
							
								                            get_lang('LearnpathDeleteLearnpath'),
							 | 
						||
| 
								 | 
							
								                            '',
							 | 
						||
| 
								 | 
							
								                            ICON_SIZE_SMALL
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        ),
							 | 
						||
| 
								 | 
							
								                        'lp_controller.php?' . api_get_cidreq() . "&action=delete&lp_id=$id",
							 | 
						||
| 
								 | 
							
								                        ['onclick' => "javascript: return confirmation('" . addslashes($name) . "');"]
							 | 
						||
| 
								 | 
							
								                    );
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								                } else {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    $dsp_delete = Display::return_icon(
							 | 
						||
| 
								 | 
							
								                        'delete_na.png',
							 | 
						||
| 
								 | 
							
								                        get_lang('LearnpathDeleteLearnpath'),
							 | 
						||
| 
								 | 
							
								                        '',
							 | 
						||
| 
								 | 
							
								                        ICON_SIZE_SMALL
							 | 
						||
| 
								 | 
							
								                    );
							 | 
						||
| 
								 
											14 years ago
										 
									 | 
							
								                }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                /* COLUMN ORDER	 */
							 | 
						||
| 
								 | 
							
								                // Only active while session mode is not active
							 | 
						||
| 
								 | 
							
								                if ($current_session == 0) {
							 | 
						||
| 
								 | 
							
								                    if ($details['lp_display_order'] == 1 && $max != 1) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $dsp_order .= Display::url(
							 | 
						||
| 
								 | 
							
								                            Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL),
							 | 
						||
| 
								 | 
							
								                            "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_down&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    } elseif ($current == $max - 1 && $max != 1) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $dsp_order .= Display::url(
							 | 
						||
| 
								 | 
							
								                            Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL),
							 | 
						||
| 
								 | 
							
								                            "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_up&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    } elseif ($max == 1) {
							 | 
						||
| 
								 | 
							
								                        $dsp_order = '';
							 | 
						||
| 
								 | 
							
								                    } else {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                        $dsp_order .= Display::url(
							 | 
						||
| 
								 | 
							
								                            Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL),
							 | 
						||
| 
								 | 
							
								                            "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_down&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 | 
							
								                        $dsp_order .= Display::url(
							 | 
						||
| 
								 | 
							
								                            Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL),
							 | 
						||
| 
								 | 
							
								                            "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_up&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    }
							 | 
						||
| 
								 | 
							
								                }
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                if ($is_allowed_to_edit) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    $start_time = $start_time;
							 | 
						||
| 
								 | 
							
								                    $end_time = $end_time;
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                } else {
							 | 
						||
| 
								 | 
							
								                    $start_time = $end_time = '';
							 | 
						||
| 
								 | 
							
								                }
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                if (api_get_setting('gamification_mode') == 1) {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                    if ($details['seriousgame_mode'] == 0) {
							 | 
						||
| 
								 | 
							
								                        $actionSeriousGame = Display::toolbarButton(
							 | 
						||
| 
								 | 
							
								                            null,
							 | 
						||
| 
								 | 
							
								                            api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_seriousgame",
							 | 
						||
| 
								 | 
							
								                            'trophy',
							 | 
						||
| 
								 | 
							
								                            'default',
							 | 
						||
| 
								 | 
							
								                            [
							 | 
						||
| 
								 | 
							
								                                'class' => 'btn-xs',
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                                'title' => get_lang('EnableGamificationMode'),
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            ]
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 | 
							
								                    } else {
							 | 
						||
| 
								 | 
							
								                        $actionSeriousGame = Display::toolbarButton(
							 | 
						||
| 
								 | 
							
								                            null,
							 | 
						||
| 
								 | 
							
								                            api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_seriousgame",
							 | 
						||
| 
								 | 
							
								                            'trophy',
							 | 
						||
| 
								 | 
							
								                            'warning',
							 | 
						||
| 
								 | 
							
								                            [
							 | 
						||
| 
								 | 
							
								                                'class' => 'btn-xs active',
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                                'title' => get_lang('DisableGamificationMode'),
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                            ]
							 | 
						||
| 
								 | 
							
								                        );
							 | 
						||
| 
								 | 
							
								                    }
							 | 
						||
| 
								 | 
							
								                }
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								            } else {
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                // Student
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                $export_icon = Display::url(
							 | 
						||
| 
								 | 
							
								                    Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_SMALL),
							 | 
						||
| 
								 | 
							
								                    api_get_self() . '?' . api_get_cidreq() . "&action=export_to_pdf&lp_id=$id"
							 | 
						||
| 
								 | 
							
								                );
							 | 
						||
| 
								 
											14 years ago
										 
									 | 
							
								            }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $hideScormExportLink = api_get_setting('hide_scorm_export_link');
							 | 
						||
| 
								 | 
							
								            if ($hideScormExportLink === 'true') {
							 | 
						||
| 
								 | 
							
								                $dsp_disk = null;
							 | 
						||
| 
								 
											15 years ago
										 
									 | 
							
								            }
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								            $hideScormCopyLink = api_get_setting('hide_scorm_copy_link');
							 | 
						||
| 
								 | 
							
								            if ($hideScormCopyLink === 'true') {
							 | 
						||
| 
								 | 
							
								                $copy = null;
							 | 
						||
| 
								 
											14 years ago
										 
									 | 
							
								            }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $hideScormPdfLink = api_get_setting('hide_scorm_pdf_link');
							 | 
						||
| 
								 | 
							
								            if ($hideScormPdfLink === 'true') {
							 | 
						||
| 
								 | 
							
								                $export_icon = null;
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $listData[] = [
							 | 
						||
| 
								 | 
							
								                'learnpath_icon' => $icon_learnpath,
							 | 
						||
| 
								 | 
							
								                'url_start' => $url_start_lp,
							 | 
						||
| 
								 | 
							
								                'title' => $my_title,
							 | 
						||
| 
								 | 
							
								                'session_image' => $session_img,
							 | 
						||
| 
								 | 
							
								                'extra' => $extra,
							 | 
						||
| 
								 | 
							
								                'start_time' => $start_time,
							 | 
						||
| 
								 | 
							
								                'end_time' => $end_time,
							 | 
						||
| 
								 | 
							
								                'dsp_progress' => $dsp_progress,
							 | 
						||
| 
								 | 
							
								                'action_build' => $dsp_build,
							 | 
						||
| 
								 | 
							
								                'action_edit' => $dsp_edit_lp,
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                'action_tracking' => $trackingAction,
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                'action_visible' => $dsp_visible,
							 | 
						||
| 
								 | 
							
								                'action_publish' => $dsp_publish,
							 | 
						||
| 
								 | 
							
								                'action_reinit' => $dsp_reinit,
							 | 
						||
| 
								 | 
							
								                'action_default_view' => $dsp_default_view,
							 | 
						||
| 
								 | 
							
								                'action_debug' => $dsp_debug,
							 | 
						||
| 
								 | 
							
								                'action_export' => $dsp_disk,
							 | 
						||
| 
								 | 
							
								                'action_copy' => $copy,
							 | 
						||
| 
								 | 
							
								                'action_auto_launch' => $lp_auto_launch_icon,
							 | 
						||
| 
								 | 
							
								                'action_pdf' => $export_icon,
							 | 
						||
| 
								 | 
							
								                'action_delete' => $dsp_delete,
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                'action_order' => $dsp_order,
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								                'action_serious_game' => $actionSeriousGame,
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								                'action_subscribe_users' => $subscribeUsers,
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            ];
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            $lpIsShown = true;
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								            //counter for number of elements treated
							 | 
						||
| 
								 | 
							
								            $current++;
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								        } // end foreach ($flat_list)
							 | 
						||
| 
								 
											14 years ago
										 
									 | 
							
								    }
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								    $data[] = [
							 | 
						||
| 
								 | 
							
								        'category' => $item,
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								        'lp_list' => $listData,
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								    ];
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								}
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								$template = new Template($nameTools);
							 | 
						||
| 
								 | 
							
								$template->assign('is_allowed_to_edit', $is_allowed_to_edit);
							 | 
						||
| 
								 | 
							
								$template->assign('is_invitee', api_is_invitee());
							 | 
						||
| 
								 | 
							
								$template->assign('actions', $actions);
							 | 
						||
| 
								 
											10 years ago
										 
									 | 
							
								$template->assign('categories', $categories);
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								$template->assign('message', $message);
							 | 
						||
| 
								 | 
							
								$template->assign('introduction_section', $introductionSection);
							 | 
						||
| 
								 | 
							
								$template->assign('data', $data);
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								$template->assign('lp_is_shown', $lpIsShown);
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								$content = $template->fetch('default/learnpath/list.tpl');
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								$template->assign('content', $content);
							 | 
						||
| 
								 | 
							
								$template->display_one_col_template();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											14 years ago
										 
									 | 
							
								$course_info = api_get_course_info();
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								learnpath::generate_learning_path_folder($course_info);
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											11 years ago
										 
									 | 
							
								// Deleting the objects
							 | 
						||
| 
								 
											13 years ago
										 
									 | 
							
								Session::erase('oLP');
							 | 
						||
| 
								 | 
							
								Session::erase('lpobject');
							 | 
						||
| 
								 
											12 years ago
										 
									 | 
							
								DocumentManager::removeGeneratedAudioTempFile();
							 |