//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);
//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';
// 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();
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));
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>';
$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();
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;
$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();
<?php /* For licensing terms, see /license.txt */ /** * Layout (principal view) used for structuring other views * @author Christian Fasanando <*****@*****.**> * @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();
}); </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();
// 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'])) {
} $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;
$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'));
$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'));
<?php /* For licensing terms, see /license.txt */ /** * Layout (principal view) used for structuring other views * @author Christian Fasanando <*****@*****.**> * @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();
/** * Show the search widget * * The form will post to index.php by default, you can pass a value to * $action to use a custom action. * IMPORTANT: you have to call search_widget_prepare() before calling this * function or otherwise the form will not behave correctly. * * @param string $action Just in case your action is not * index.php */ function search_widget_show($action = 'index.php') { require_once api_get_path(LIBRARY_PATH) . 'search/ChamiloQuery.php'; // TODO: load images dinamically when they're avalaible from specific field ui to add $groupId = api_get_group_id(); $sf_terms = array(); $specific_fields = get_specific_field_list(); $url_params = array(); if (($cid = api_get_course_id()) != -1) { // with cid // get search engine terms $course_filter = chamilo_get_boolean_query(XAPIAN_PREFIX_COURSEID . $cid); $dkterms = chamilo_query_simple_query('', 0, 1000, array($course_filter)); //prepare specific fields names (and also get possible URL param names) foreach ($specific_fields as $specific_field) { $temp = array(); if (is_array($dkterms) && count($dkterms) > 0) { foreach ($dkterms[1] as $obj) { $temp = array_merge($obj['sf-' . $specific_field['code']], $temp); } } $sf_terms[$specific_field['code']] = $temp; $url_params[] = 'sf_' . $specific_field['code']; unset($temp); } } else { // without cid // prepare specific fields names (and also get possible URL param names) foreach ($specific_fields as $specific_field) { //get Xapian terms for a specific term prefix, in ISO, apparently $sf_terms[$specific_field['code']] = xapian_get_all_terms(1000, $specific_field['code']); $url_params[] = 'sf_' . $specific_field['code']; } } echo '<h2>' . get_lang('Search') . '</h2>'; // Tool introduction // TODO: Settings for the online editor to be checked (insert an image for example). Probably this is a special case here. if (api_get_course_id() !== -1) { if (!empty($groupId)) { Display::display_introduction_section(TOOL_SEARCH . $groupId); } else { Display::display_introduction_section(TOOL_SEARCH); } } $op = 'or'; if (!empty($_REQUEST['operator']) && in_array($op, array('or', 'and'))) { $op = $_REQUEST['operator']; } //check if URL params are defined (to see if we show the thesaurus or not) $show_thesaurus = false; foreach ($url_params as $param) { if (isset($_REQUEST[$param]) && is_array($_REQUEST[$param])) { $thesaurus_decided = FALSE; foreach ($_REQUEST[$param] as $term) { if (!empty($term)) { $show_thesaurus = true; $thesaurus_decided = TRUE; break; } } if ($thesaurus_decided) { break; } } } // create the form // TODO: use FormValidator display_search_form($action, $show_thesaurus, $sf_terms, $op); }
$certificate = Category::register_user_certificate($category_id, $stud_id); if (isset($certificate['pdf_url'])) { $actionsLeft .= Display::url(Display::returnFontAwesomeIcon('file-pdf-o') . get_lang('DownloadCertificatePdf'), $certificate['pdf_url'], ['class' => 'btn btn-default']); } $currentScore = Category::getCurrentScore($stud_id, $category_id, $course_code, $session_id, true); Category::registerCurrentScore($currentScore, $stud_id, $category_id); } } } if (!api_is_allowed_to_edit(null, true)) { $actionsLeft .= Display::url(Display::returnFontAwesomeIcon('file-pdf-o') . get_lang('DownloadReportPdf'), api_get_self() . "?" . api_get_self() . "&action=export_table", ['class' => 'btn btn-default']); } echo $toolbar = Display::toolbarAction('gradebook-student-actions', array(0 => $actionsLeft, 1 => '')); if (api_is_allowed_to_edit(null, true)) { // Tool introduction Display::display_introduction_section(TOOL_GRADEBOOK, array('ToolbarSet' => 'AssessmentsIntroduction')); if (isset($_GET['selectcat']) && $_GET['selectcat'] != 0) { // } else { if (isset($_GET['selectcat']) && $_GET['selectcat'] == 0 || isset($_GET['cidReq']) && $_GET['cidReq'] !== '' || isset($_GET['isStudentView']) && $_GET['isStudentView'] == 'false') { $cats = Category::load(null, null, $course_code, null, null, $session_id, false); } } } if (isset($first_time) && $first_time == 1 && api_is_allowed_to_edit(null, true)) { echo '<meta http-equiv="refresh" content="0;url=' . api_get_self() . '?cidReq=' . $course_code . '" />'; } else { $cats = Category::load(null, null, $course_code, null, null, $session_id, false); if (!empty($cats)) { if (api_get_setting('gradebook.gradebook_enable_grade_model') == 'true' && (api_is_platform_admin() || api_is_allowed_to_edit(null, true) && api_get_setting('gradebook.teachers_can_change_grade_model_settings') == 'true')) { // Getting grade models.
} if (!empty($_GET['remind_inactive'])) { $to[] = 'USER:'******'remind_inactive']); } if (!empty($group_id)) { $group_properties = GroupManager::get_group_properties($group_id); $interbreadcrumb[] = array("url" => api_get_path(WEB_CODE_PATH) . "group/group.php?" . api_get_cidreq(), "name" => get_lang('Groups')); $interbreadcrumb[] = array("url" => api_get_path(WEB_CODE_PATH) . "group/group_space.php?" . api_get_cidreq(), "name" => get_lang('GroupSpace') . ' ' . $group_properties['name']); } if (empty($_GET['origin']) or $_GET['origin'] !== 'learnpath') { //we are not in the learning path Display::display_header($nameTools, get_lang('Announcements')); } // Tool introduction if (empty($_GET['origin']) || $_GET['origin'] !== 'learnpath') { Display::display_introduction_section(TOOL_ANNOUNCEMENT); } // Actions $show_actions = false; $actionsLeft = ''; if ((api_is_allowed_to_edit(false, true) || api_get_course_setting('announcement.allow_user_edit_announcement') && !api_is_anonymous()) && (empty($_GET['origin']) || $_GET['origin'] !== 'learnpath')) { if (in_array($action, array('add', 'modify', 'view'))) { $actionsLeft .= "<a href='" . api_get_self() . "?" . api_get_cidreq() . "&origin=" . $origin . "'>" . Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM) . "</a>"; } else { $actionsLeft .= "<a href='" . api_get_self() . "?" . api_get_cidreq() . "&action=add&origin=" . $origin . "'>" . Display::return_icon('new_announce.png', get_lang('AddAnnouncement'), '', ICON_SIZE_MEDIUM) . "</a>"; } $show_actions = true; } else { if (in_array($action, array('view'))) { $actionsLeft .= "<a href='" . api_get_self() . "?" . api_get_cidreq() . "&origin=" . $origin . "'>" . Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM) . "</a>"; echo '</div>';
Link::change_visibility_link($id, $scope); header('Location: ' . $linkListUrl); exit; break; case 'invisible': // Here we edit a category Link::change_visibility_link($id, $scope); header('Location: ' . $linkListUrl); exit; break; case 'up': Link::movecatlink('up', $up); header('Location: ' . $linkListUrl); exit; break; case 'down': Link::movecatlink('down', $down); header('Location: ' . $linkListUrl); exit; break; case 'list': default: ob_start(); Link::listLinksAndCategories($course_id, $session_id, $categoryId, $show); $content = ob_get_clean(); break; } //Display::display_header($nameTools, 'Links'); /* Introduction section */ Display::display_introduction_section(TOOL_LINK); echo $content;
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, 'left'); $actions = ''; $type = isset($_REQUEST['type']) ? intval($_REQUEST['type']) : STUDENT; $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; break; case COURSEMANAGER: $selectedTab = 2; $url = api_get_path(WEB_CODE_PATH) . 'user/subscribe_user.php?' . api_get_cidreq() . '&type=' . COURSEMANAGER; break; }
$form_action['set_invisible'] = get_lang('SetInvisible'); $form_action['set_visible'] = get_lang('SetVisible'); $form_action['delete'] = get_lang('Delete'); $portfolio_actions = Portfolio::actions(); foreach ($portfolio_actions as $action) { $form_action[$action->get_name()] = $action->get_title(); } $table->set_form_actions($form_action, 'ids'); } } //Display::display_header('', 'Doc'); /* Introduction section (editable by course admins) */ if (!empty($groupId)) { Display::display_introduction_section(TOOL_DOCUMENT . $groupId); } else { Display::display_introduction_section(TOOL_DOCUMENT); } $toolbar = Display::toolbarAction('toolbar-document', array(0 => $actionsLeft, 1 => $actionsRight)); echo $toolbar; echo $templateForm; echo $moveForm; echo $dirForm; echo $selector; $table->display(); if (count($documentAndFolders) > 1) { if ($is_allowed_to_edit || $group_member_with_upload_rights) { // Getting the course quota $course_quota = DocumentManager::get_course_quota(); // Calculating the total space $already_consumed_space_course = DocumentManager::documents_total_space(api_get_course_int_id()); // Displaying the quota
echo api_get_self(); ?> ?action=manage_members&blog_id=<?php echo $blog_id; ?> " title="<?php echo get_lang('ManageMembers'); ?> "><?php echo Display::return_icon('blog_admin_users.png', get_lang('MemberManager'), '', ICON_SIZE_MEDIUM); ?> </a><?php } echo '</div>'; // Tool introduction Display::display_introduction_section(TOOL_BLOG); //Display::display_header($nameTools,'Blogs'); ?> <div class="sectiontitle"><?php echo Blog::get_blog_title($blog_id); ?> </div> <div class="sectioncomment"><?php echo Blog::get_blog_subtitle($blog_id); ?> </div> <table width="100%"> <tr> <td width="10%" style="float;left;" class="blog_left" valign="top"> <?php
Display::display_header($nameTools, "Path"); //api_display_tool_title($nameTools); /* ----------------------------------------------------------- Introduction section (editable by course admins) ----------------------------------------------------------- */ $fck_attribute['Width'] = '100%'; $fck_attribute['Height'] = '300'; $fck_attribute['ToolbarSet'] = 'Introduction'; // These settings should stay here. $fck_attribute['Config']['CreateDocumentWebDir'] = api_get_path('WEB_COURSE_PATH') . api_get_course_path() . '/document/'; $fck_attribute['Config']['CreateDocumentDir'] = '../../courses/' . api_get_course_path() . '/document/'; $fck_attribute['Config']['BaseHref'] = api_get_path('WEB_COURSE_PATH') . api_get_course_path() . '/'; Display::display_introduction_section(TOOL_LEARNPATH); $fck_attribute = null; // Clearing this global variable immediatelly after it has been used. if (api_is_allowed_to_edit()) { /*-------------------------------------- DIALOG BOX SECTION --------------------------------------*/ if (!empty($dialog_box)) { switch ($_GET['dialogtype']) { case 'confirmation': Display::display_confirmation_message($dialog_box); break; case 'error': Display::display_error_message($dialog_box); break; case 'warning':