本文整理汇总了PHP中Display::display_introduction_section方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::display_introduction_section方法的具体用法?PHP Display::display_introduction_section怎么用?PHP Display::display_introduction_section使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::display_introduction_section方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_formatter
//With this function we can add actions to the jgrid
$action_links = 'function action_formatter (cellvalue, options, rowObject) {
return \'' . ' <a href="add_users_to_usergroup.php?id=\'+options.rowId+\'">' . Display::return_icon('user_to_class.png', get_lang('SubscribeUsersToClass'), null, ICON_SIZE_SMALL) . '</a>' . ' <a href="add_courses_to_usergroup.php?id=\'+options.rowId+\'">' . Display::return_icon('course_to_class.png', get_lang('SubscribeClassToCourses'), null, ICON_SIZE_SMALL) . '</a>' . ' <a href="add_sessions_to_usergroup.php?id=\'+options.rowId+\'">' . Display::return_icon('sessions_to_class.png', get_lang('SubscribeClassToSessions'), null, ICON_SIZE_SMALL) . '</a>' . ' <a href="?action=edit&id=\'+options.rowId+\'">' . Display::return_icon('edit.png', get_lang('Edit'), null, ICON_SIZE_TINY) . '</a>' . ' <a onclick="javascript:if(!confirm(' . "\\'" . addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES)) . "\\'" . ')) return false;" href="?action=delete&id=\'+options.rowId+\'">' . Display::return_icon('delete.png', get_lang('Delete'), null, ICON_SIZE_TINY) . '</a>\';
}';
?>
<script>
$(function() {
<?php
// grid definition see the $usergroup>display() function
echo Display::grid_js('usergroups', $url, $columns, $column_model, $extra_params, array(), $action_links, true);
?>
});
</script>
<?php
// Tool introduction
Display::display_introduction_section(get_lang('Classes'));
$usergroup = new UserGroup();
$usergroup->showGroupTypeSetting = true;
// Action handling: Adding a note
if (isset($_GET['action']) && $_GET['action'] == 'add') {
if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) {
api_not_allowed();
}
$form = new FormValidator('usergroup', 'post', api_get_self() . '?action=' . Security::remove_XSS($_GET['action']));
$usergroup->setForm($form, 'add');
// Setting the defaults
$form->setDefaults(['visibility' => 2]);
// The validation or display
if ($form->validate()) {
$values = $form->exportValues();
$res = $usergroup->save($values);
示例2: import_exercise
//include needed librabries for treatment
$result_log = import_exercise($_FILES['uploadedExercise']['name']);
//display the result message (fail or success)
$dialogBox = '';
foreach ($result_log as $log) {
$dialogBox .= $log . '<br>';
}
break;
}
//----------------------------------
// FIND INFORMATION
//----------------------------------
//empty!
//----------------------------------
// DISPLAY
//----------------------------------
include api_get_path(INCLUDE_PATH) . '/header.inc.php';
//display title
// Tool introduction
// TODO: These settings to be checked when it is possible.
Display::display_introduction_section(TOOL_QUIZ, 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() . '/'));
//Display Forms or dialog box(if needed)
if (isset($dialogBox)) {
echo Display::display_normal_message($dialogBox, false);
}
//display content
if (isset($display)) {
echo $display;
}
//footer display
include api_get_path(INCLUDE_PATH) . '/footer.inc.php';
示例3: api_get_week_days_long
// Defining the days of the week to allow translation of the days. We use camelcase because these are arrays of language variables
$DaysLong = api_get_week_days_long();
// Defining the months of the year to allow translation of the months. We use camelcase because these are arrays of language variables
$MonthsLong = api_get_months_long();
// Database table definitions
$TABLEAGENDA = Database::get_course_table(TABLE_AGENDA);
$TABLE_ITEM_PROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY);
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
$tbl_courseUser = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$tbl_group = Database::get_course_table(TABLE_GROUP);
$tbl_groupUser = Database::get_course_table(TABLE_GROUP_USER);
/* ACCESS RIGHTS */
// permission stuff - also used by loading from global in agenda.inc.php
$is_allowed_to_edit = api_is_allowed_to_edit(false, true) or api_get_course_setting('allow_user_edit_agenda') && !api_is_anonymous();
// Tool introduction
Display::display_introduction_section(TOOL_CALENDAR_EVENT);
/* MAIN SECTION */
//setting the default year and month
$select_year = '';
$select_month = '';
$select_day = '';
if (!empty($_GET['year'])) {
$select_year = (int) $_GET['year'];
}
if (!empty($_GET['month'])) {
$select_month = (int) $_GET['month'];
}
if (!empty($_GET['day'])) {
$select_day = (int) $_GET['day'];
}
$today = getdate();
示例4: get_last_tool_access
if ($_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX] == '') {
$last_access = get_last_tool_access(TOOL_DROPBOX);
$_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX] = $last_access;
} else {
$last_access = $_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX];
}
$postAction = isset($_POST['action']) ? $_POST['action'] : null;
$view = isset($_GET['view']) ? Security::remove_XSS($_GET['view']) : null;
$viewReceivedCategory = isset($_GET['view_received_category']) ? Security::remove_XSS($_GET['view_received_category']) : null;
$viewSentCategory = isset($_GET['view_sent_category']) ? Security::remove_XSS($_GET['view_sent_category']) : null;
// Do the tracking
event_access_tool(TOOL_DROPBOX);
// This var is used to give a unique value to every page request. This is to prevent resubmiting data
$dropbox_unid = md5(uniqid(rand(), true));
/* DISPLAY SECTION */
Display::display_introduction_section(TOOL_DROPBOX);
// Build URL-parameters for table-sorting
$sort_params = array();
if (isset($_GET['dropbox_column'])) {
$sort_params[] = 'dropbox_column=' . $_GET['dropbox_column'];
}
if (isset($_GET['dropbox_page_nr'])) {
$sort_params[] = 'page_nr=' . intval($_GET['page_nr']);
}
if (isset($_GET['dropbox_per_page'])) {
$sort_params[] = 'dropbox_per_page=' . intval($_GET['dropbox_per_page']);
}
if (isset($_GET['dropbox_direction'])) {
$sort_params[] = 'dropbox_direction=' . $_GET['dropbox_direction'];
}
$sort_params = Security::remove_XSS(implode('&', $sort_params));
示例5: array
break;
}
}
/* Header */
$interbreadcrumb[] = array('url' => 'group.php?' . api_get_cidReq(), 'name' => get_lang('Groups'));
if (!isset($_GET['origin']) || $_GET['origin'] != 'learnpath') {
// So we are not in learnpath tool
if (!$is_allowed_in_course) {
api_not_allowed(true);
}
if (!api_is_allowed_to_edit(false, true)) {
api_not_allowed(true);
} else {
Display::display_header($nameTools, 'Group');
// Tool introduction
Display::display_introduction_section(TOOL_GROUP);
}
} else {
Display::display_reduced_header();
}
$actions = '<a href="group_creation.php?' . api_get_cidreq() . '">' . Display::return_icon('add.png', get_lang('NewGroupCreate'), '', ICON_SIZE_MEDIUM) . '</a>';
if (api_get_setting('group.allow_group_categories') == 'true') {
$actions .= '<a href="group_category.php?' . api_get_cidreq() . '&action=add_category">' . Display::return_icon('new_folder.png', get_lang('AddCategory'), '', ICON_SIZE_MEDIUM) . '</a>';
} else {
$actions .= '<a href="group_category.php?' . api_get_cidreq() . '&id=2">' . Display::return_icon('settings.png', get_lang('PropModify'), '', ICON_SIZE_MEDIUM) . '</a>';
}
$actions .= '<a href="import.php?' . api_get_cidreq() . '&action=import">' . Display::return_icon('import_csv.png', get_lang('Import'), '', ICON_SIZE_MEDIUM) . '</a>';
$actions .= '<a href="group_overview.php?' . api_get_cidreq() . '&action=export_all&type=csv">' . Display::return_icon('export_csv.png', get_lang('Export'), '', ICON_SIZE_MEDIUM) . '</a>';
$actions .= '<a href="group_overview.php?' . api_get_cidreq() . '&action=export&type=xls">' . Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM) . '</a>';
$actions .= '<a href="group_overview.php?' . api_get_cidreq() . '&action=export_pdf">' . Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM) . '</a>';
$actions .= '<a href="group.php?' . api_get_cidreq() . '">' . Display::return_icon('group.png', get_lang('Groups'), '', ICON_SIZE_MEDIUM) . '</a>';
示例6: array
$interbreadcrumb[] = array('url' => 'index.php?search=' . $search_forum . '&' . api_get_cidreq(), 'name' => get_lang('Forum'));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AddForum'));
break;
case 'forumcategory':
$interbreadcrumb[] = array('url' => 'index.php?search=' . $search_forum . '&' . api_get_cidreq(), 'name' => get_lang('Forum'));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AddForumCategory'));
break;
default:
break;
}
} else {
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('ForumCategories'));
}
Display::display_header('');
// Tool introduction
Display::display_introduction_section(TOOL_FORUM);
$form_count = 0;
if (api_is_allowed_to_edit(false, true)) {
//if is called from a learning path lp_id
$lp_id = isset($_REQUEST['lp_id']) ? intval($_REQUEST['lp_id']) : null;
handle_forum_and_forumcategories($lp_id);
}
// Notification
if ($actions == 'notify' && isset($_GET['content']) && isset($_GET['id'])) {
if (api_get_session_id() != 0 && api_is_allowed_to_session_edit(false, true) == false) {
api_not_allowed();
}
$return_message = set_notification($_GET['content'], $_GET['id']);
Display::display_confirmation_message($return_message, false);
}
get_whats_new();
示例7: array
if (isset($origin) && $origin == 'learnpath') {
Display::display_reduced_header();
} else {
if (isset($_GET['keyword']) && !empty($_GET['keyword'])) {
$interbreadcrumb[] = array("url" => "user.php?" . api_get_cidreq(), "name" => get_lang("Users"));
$tool_name = get_lang('SearchResults');
} else {
$tool_name = get_lang('Users');
$origin = 'users';
}
Display::display_header($tool_name, "User");
}
/* Setting the permissions for this page */
$is_allowed_to_track = $is_courseAdmin || $is_courseTutor;
// Tool introduction
Display::display_introduction_section(TOOL_USER);
$actions = '';
$selectedTab = 1;
if (api_is_allowed_to_edit(null, true)) {
echo '<div class="actions">';
switch ($type) {
case STUDENT:
$selectedTab = 1;
$url = api_get_path(WEB_CODE_PATH) . 'user/subscribe_user.php?' . api_get_cidreq() . '&type=' . STUDENT;
$icon = Display::url(Display::return_icon('add-user.png', get_lang('Add'), '', ICON_SIZE_MEDIUM), $url);
break;
case COURSEMANAGER:
$selectedTab = 2;
$url = api_get_path(WEB_CODE_PATH) . 'user/subscribe_user.php?' . api_get_cidreq() . '&type=' . COURSEMANAGER;
$icon = Display::url(Display::return_icon('add-teacher.png', get_lang('Add'), '', ICON_SIZE_MEDIUM), $url);
break;
示例8: get_lang
$content = '<p><div><strong>' . get_lang('Description') . ':</strong><p>' . Security::remove_XSS($my_folder_data['description'], STUDENT) . '</p></div></p>';
}
if (api_is_allowed_to_edit() || api_is_coach()) {
// Work list
$content .= '<div class="toolbar-works"><a id="open-view-list" class="btn btn-primary" href="#"><i class="fa fa-users"></i> Ver Estudiantes</a></div>';
$content .= '<div class="row">';
$content .= '<div class="col-md-12">';
$content .= '<div id="work-list" class="table-responsive">';
$content .= showTeacherWorkGrid();
$content .= '</div>';
$content .= '</div>';
$content .= '<div id="student-list-work" style="display: none" class="table-responsive">';
$content .= '<div class="toolbar"><a id="closed-view-list" href="#"><i class="fa fa-times-circle"></i> ' . get_lang('Close') . '</a></div>';
$content .= showStudentList($work_id);
$content .= '</div>';
} else {
$content .= showStudentWorkGrid();
}
break;
}
Display::display_header(null);
Display::display_introduction_section(TOOL_STUDENTPUBLICATION);
if ($origin == 'learnpath') {
echo '<div style="height:15px"> </div>';
}
display_action_links($work_id, $curdirpath, $action);
$message = Session::read('message');
echo $message;
Session::erase('message');
echo $content;
Display::display_footer();
示例9: api_protect_course_script
<?php
/* For licensing terms, see /license.txt */
/**
* Layout (principal view) used for structuring other views
* @author Christian Fasanando <christian1827@gmail.com>
* @package chamilo.course_description
*/
// protect a course script
api_protect_course_script(true);
// Header
Display::display_header('');
// Introduction section
Display::display_introduction_section(TOOL_COURSE_DESCRIPTION);
// Tracking
event_access_tool(TOOL_COURSE_DESCRIPTION);
// Display
echo $content;
// Footer
Display::display_footer();
示例10: get_lang
});
</script>';
if ($origin != 'learnpath') {
//so we are not in learnpath tool
Display::display_header($nameTools, get_lang('Exercise'));
if (isset($_GET['message'])) {
if (in_array($_GET['message'], array('ExerciseEdited'))) {
Display::display_confirmation_message(get_lang($_GET['message']));
}
}
} else {
Display::display_reduced_header();
}
event_access_tool(TOOL_QUIZ);
// Tool introduction
Display::display_introduction_section(TOOL_QUIZ);
HotPotGCt($documentPath, 1, api_get_user_id());
// Only for administrator
if ($is_allowedToEdit) {
if (!empty($choice)) {
// Construction of Exercise
$objExerciseTmp = new Exercise();
$check = Security::check_token('get');
$exercise_action_locked = api_resource_is_locked_by_gradebook($exerciseId, LINK_EXERCISE);
if ($objExerciseTmp->read($exerciseId)) {
if ($check) {
switch ($choice) {
case 'delete':
// deletes an exercise
if ($exercise_action_locked == false) {
$objExerciseTmp->delete();
示例11: array
// Database table definitions
$table_survey = Database::get_course_table(TABLE_SURVEY);
$table_survey_question = Database::get_course_table(TABLE_SURVEY_QUESTION);
$table_course = Database::get_main_table(TABLE_MAIN_COURSE);
$table_user = Database::get_main_table(TABLE_MAIN_USER);
// Language variables
if (isset($_GET['search']) && $_GET['search'] == 'advanced') {
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'survey/survey_list.php', 'name' => get_lang('SurveyList'));
$tool_name = get_lang('SearchASurvey');
} else {
$tool_name = get_lang('SurveyList');
}
// Header
Display::display_header($tool_name, 'Survey');
// Tool introduction
Display::display_introduction_section('survey', 'left');
// Action handling: searching
if (isset($_GET['search']) && $_GET['search'] == 'advanced') {
SurveyUtil::display_survey_search_form();
}
// Action handling: deleting a survey
if (isset($_GET['action']) && $_GET['action'] == 'delete' && isset($_GET['survey_id'])) {
// Getting the information of the survey (used for when the survey is shared)
$survey_data = survey_manager::get_survey($_GET['survey_id']);
if (api_is_course_coach() && intval($_SESSION['id_session']) != $survey_data['session_id']) {
// The coach can't delete a survey not belonging to his session
api_not_allowed();
exit;
}
// If the survey is shared => also delete the shared content
if (is_numeric($survey_data['survey_share'])) {
示例12: api_is_allowed_to_edit
}
$is_allowed_to_edit = api_is_allowed_to_edit(false, true);
// The page we are dealing with
$page = isset($_GET['title']) ? $_GET['title'] : 'index';
$action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : 'showpage';
$view = isset($_GET['view']) ? Security::remove_XSS($_GET['view']) : null;
$wiki->page = $page;
$wiki->action = $action;
// Setting wiki data
if (!empty($view)) {
$wiki->setWikiData($view);
}
$wiki->blockConcurrentEditions(api_get_user_id(), $action);
/* MAIN WIKI AREA */
ob_start();
$handleAction = $wiki->handleAction($action);
if (!$handleAction && $action == 'export_to_pdf') {
$wiki->handleAction('showpage');
}
$content = ob_get_contents();
ob_end_clean();
Display::display_header($tool_name, 'Wiki');
// check last version
if (!empty($view)) {
$wiki->checkLastVersion($view);
}
// Tool introduction
Display::display_introduction_section(TOOL_WIKI);
$wiki->showActionBar();
echo $wiki->getMessages();
echo $content;
示例13: array
$tool = TOOL_NOTEBOOK;
// Tracking
Event::event_access_tool(TOOL_NOTEBOOK);
// Tool name
if (isset($_GET['action']) && $_GET['action'] == 'addnote') {
$tool = 'NoteAddNew';
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('ToolNotebook'));
}
if (isset($_GET['action']) && $_GET['action'] == 'editnote') {
$tool = 'ModifyNote';
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('ToolNotebook'));
}
// Displaying the header
Display::display_header(get_lang(ucfirst($tool)));
// Tool introduction
Display::display_introduction_section(TOOL_NOTEBOOK);
// Action handling: Adding a note
if (isset($_GET['action']) && $_GET['action'] == 'addnote') {
if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) {
api_not_allowed();
}
if (!empty($_GET['isStudentView'])) {
NotebookManager::display_notes();
exit;
}
$_SESSION['notebook_view'] = 'creation_date';
// Initiate the object
$form = new FormValidator('note', 'post', api_get_self() . '?action=' . Security::remove_XSS($_GET['action']));
// Settting the form elements
$form->addElement('header', '', get_lang('NoteAddNew'));
$form->addElement('text', 'note_title', get_lang('NoteTitle'), array('size' => '95', 'id' => 'note_title'));
示例14: usort
$data = GlossaryManager::get_glossary_data(0, GlossaryManager::get_number_glossary_terms(api_get_session_id()), 0, 'ASC');
usort($data, "sorter");
$list = array();
$list[] = array('term', 'definition');
foreach ($data as $line) {
$list[] = array($line[0], $line[1]);
}
$filename = 'glossary_course_' . api_get_course_id();
Export::export_table_csv_utf8($list, $filename);
}
if (isset($_GET['action']) && $_GET['action'] == 'export_to_pdf') {
GlossaryManager::export_to_pdf();
}
Display::display_header($tool_name);
// Tool introduction
Display::display_introduction_section(TOOL_GLOSSARY);
if (isset($_GET['action']) && $_GET['action'] == 'changeview' and in_array($_GET['view'], array('list', 'table'))) {
$_SESSION['glossary_view'] = $_GET['view'];
} else {
if (!isset($_SESSION['glossary_view'])) {
$_SESSION['glossary_view'] = 'table';
//Default option
}
}
if (api_is_allowed_to_edit(null, true)) {
switch ($action) {
case 'addglossary':
$form = new FormValidator('glossary', 'post', api_get_self() . '?action=' . Security::remove_XSS($_GET['action']));
// Setting the form elements
$form->addElement('header', '', get_lang('TermAddNew'));
$form->addElement('text', 'glossary_title', get_lang('TermName'), array('size' => '80', 'id' => 'glossary_title'));
示例15: api_protect_course_script
<?php
/* For licensing terms, see /license.txt */
/**
* Layout (principal view) used for structuring other views
* @author Christian Fasanando <christian1827@gmail.com>
* @package chamilo.course_progress
*/
// protect a course script
api_protect_course_script(true);
// Header
$tool = TOOL_COURSE_PROGRESS;
Display::display_header('');
// Introduction section
Display::display_introduction_section($tool);
// Tracking
Event::event_access_tool($tool);
// Display
echo $content;
// Footer
Display::display_footer();