예제 #1
0
                if (!$is_ical) {
                    Display::return_message(get_lang('IsNotiCalFormatFile'), 'error');
                    $form = $agenda->getImportCalendarForm();
                    $content = $form->return_form();
                    break;
                } else {
                    Display::return_message(get_lang('AddSuccess'), 'error');
                    $content = $result;
                }
            }
            break;
        case "delete":
            if (!(api_is_course_coach() && !api_is_element_in_the_session(TOOL_AGENDA, $eventId))) {
                // a coach can only delete an element belonging to his session
                $content = $agenda->delete_event($eventId);
            }
            break;
    }
}
if (!empty($group_id)) {
    $group_properties = GroupManager::get_group_properties($group_id);
    $interbreadcrumb[] = array("url" => api_get_path(WEB_CODE_PATH) . "group/group.php", "name" => get_lang('Groups'));
    $interbreadcrumb[] = array("url" => api_get_path(WEB_CODE_PATH) . "group/group_space.php?gidReq=" . $group_id, "name" => get_lang('GroupSpace') . ' ' . $group_properties['name']);
}
if (!empty($actionName)) {
    $interbreadcrumb[] = array("url" => $url, "name" => get_lang('Agenda'));
}
// Tool introduction
$introduction = Display::return_introduction_section(TOOL_CALENDAR_EVENT);
echo $actions;
echo $content;
예제 #2
0
// Extra javascript functions for in html head:
$htmlHeadXtra[] = "<script>\nfunction confirmation(name) {\n    if (confirm(\" " . trim(get_lang('AreYouSureToDelete')) . " \"+name+\"?\"))\n        {return true;}\n    else\n        {return false;}\n}\n</script>";
$nameTools = get_lang('LearningPaths');
Event::event_access_tool(TOOL_LEARNPATH);
api_protect_course_script();
/**
 * Display
 */
/* Require the search widget and prepare the header with its stuff. */
if (api_get_setting('search_enabled') == 'true') {
    require api_get_path(LIBRARY_PATH) . 'search/search_widget.php';
    search_widget_prepare($htmlHeadXtra);
}
$current_session = api_get_session_id();
/* Introduction section (editable by course admins) */
$introductionSection = Display::return_introduction_section(TOOL_LEARNPATH, array('CreateDocumentWebDir' => api_get_path(WEB_COURSE_PATH) . api_get_course_path() . '/document/', 'CreateDocumentDir' => '../../courses/' . api_get_course_path() . '/document/', 'BaseHref' => api_get_path(WEB_COURSE_PATH) . api_get_course_path() . '/'));
$is_allowed_to_edit = api_is_allowed_to_edit(null, true);
$message = '';
$actions = '';
if ($is_allowed_to_edit) {
    if (!empty($dialog_box)) {
        switch ($_GET['dialogtype']) {
            case 'confirmation':
                $message = Display::return_message($dialog_box, 'success');
                break;
            case 'error':
                $message = Display::return_message($dialog_box, 'danger');
                break;
            case 'warning':
                $message = Display::return_message($dialog_box, 'warning');
                break;
예제 #3
0
                        $url = api_get_path(WEB_CODE_PATH) . 'newscorm/lp_controller.php?' . api_get_cidreq() . '&action=view&lp_id=' . $lp_data['id'];
                        $_SESSION[$session_key] = true;
                        header("Location: {$url}");
                        exit;
                    }
                }
            }
        }
    }
}
$tool_table = Database::get_course_table(TABLE_TOOL_LIST);
$temps = time();
$reqdate = "&reqdate={$temps}";
/*	MAIN CODE */
/*	Introduction section (editable by course admins) */
$content = Display::return_introduction_section(TOOL_COURSE_HOMEPAGE, array('CreateDocumentWebDir' => api_get_path(WEB_COURSE_PATH) . api_get_course_path() . '/document/', 'CreateDocumentDir' => 'document/', 'BaseHref' => api_get_path(WEB_COURSE_PATH) . api_get_course_path() . '/'));
/*	SWITCH TO A DIFFERENT HOMEPAGE VIEW
	the setting homepage_view is adjustable through
	the platform administration section */
if ($show_autolunch_lp_warning) {
    $show_message .= Display::return_message(get_lang('TheLPAutoLaunchSettingIsONStudentsWillBeRedirectToAnSpecificLP'), 'warning');
}
if (api_get_setting('homepage_view') == 'activity' || api_get_setting('homepage_view') == 'activity_big') {
    require 'activity.php';
} elseif (api_get_setting('homepage_view') == '2column') {
    require '2column.php';
} elseif (api_get_setting('homepage_view') == '3column') {
    require '3column.php';
} elseif (api_get_setting('homepage_view') == 'vertical_activity') {
    require 'vertical_activity.php';
}
예제 #4
0
// Extra javascript functions for in html head:
$htmlHeadXtra[] = "<script>\nfunction confirmation(name) {\n    if (confirm(\" " . trim(get_lang('AreYouSureToDeleteJS')) . " \"+name+\"?\"))\n        {return true;}\n    else\n        {return false;}\n}\n</script>";
$nameTools = get_lang('LearningPaths');
Event::event_access_tool(TOOL_LEARNPATH);
api_protect_course_script();
/**
 * Display
 */
/* Require the search widget and prepare the header with its stuff. */
if (api_get_setting('search.search_enabled') == 'true') {
    require api_get_path(LIBRARY_PATH) . 'search/search_widget.php';
    search_widget_prepare($htmlHeadXtra);
}
$current_session = api_get_session_id();
/* Introduction section (editable by course admins) */
$introductionSection = Display::return_introduction_section(TOOL_LEARNPATH);
$is_allowed_to_edit = api_is_allowed_to_edit(null, true);
$message = '';
$actions = '';
if ($is_allowed_to_edit) {
    $actions .= Display::url(Display::return_icon('new_folder.png', get_lang('AddCategory'), array(), ICON_SIZE_MEDIUM), api_get_self() . '?' . api_get_cidreq() . '&action=add_lp_category');
    $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);
    if (api_get_setting('ppt_to_lp.active') == 'true') {
        $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);
    }
}
$token = Security::get_token();
/* DISPLAY SCORM LIST */
$categoriesTempList = learnpath::getCategories(api_get_course_int_id());
$categoryTest = new CLpCategory();