/** * Prepare the environment. Set up breadcrumps and raise tracking event. */ protected function prolog() { global $interbreadcrumb; $interbreadcrumb = array(); $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Notebook')); global $this_section; $this_section = SECTION_COURSES; global $current_course_tool; $current_course_tool = TOOL_NOTEBOOK; // Tracking event_access_tool(TOOL_NOTEBOOK); }
<?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();
/** * Prepare the environment. Set up breadcrumps and raise tracking event. */ protected function prolog() { event_access_tool(TOOL_GLOSSARY); }
} } header('Location: ../newscorm/lp_controller.php?' . api_get_cidreq() . '&lp_id=' . $o_ppt->lp_id . '&action=view_item&id=' . $first_item_id); } else { if (!empty($o_ppt->error)) { $errorMessage = $o_ppt->error; } else { $errorMessage = get_lang('OogieUnknownError'); } } } else { $errorMessage = get_lang('OogieBadExtension'); } } } event_access_tool(TOOL_UPLOAD); // check access permissions (edit permission is needed to add a document or a LP) $is_allowed_to_edit = api_is_allowed_to_edit(); if (!$is_allowed_to_edit) { api_not_allowed(true); } $interbreadcrumb[] = array("url" => "../newscorm/lp_controller.php?action=list", "name" => get_lang("Doc")); $nameTools = get_lang("OogieConversionPowerPoint"); Display::display_header($nameTools); $message = get_lang("WelcomeOogieConverter"); if (!empty($errorMessage)) { echo Display::return_message($errorMessage, 'warning', false); } $form = new FormValidator('upload_ppt', 'POST', '', ''); $form->addElement('header', get_lang("WelcomeOogieSubtitle")); $form->addElement('html', Display::return_message($message, 'info', false));
} /* Header */ if (isset($origin) && $origin == 'learnpath') { Display::display_reduced_header(); } else { if (isset($_GET['keyword']) && !empty($_GET['keyword'])) { $interbreadcrumb[] = array("url" => "user.php", "name" => get_lang("Users")); $tool_name = get_lang('SearchResults'); } else { $tool_name = get_lang('Users'); $origin = 'users'; } Display::display_header($tool_name, "User"); } //statistics event_access_tool(TOOL_USER); /* Setting the permissions for this page */ $is_allowed_to_track = api_is_course_admin() || $is_courseTutor; // Tool introduction Display::display_introduction_section(TOOL_USER, 'left'); $actions = ''; if (api_is_allowed_to_edit(null, true)) { echo '<div class="actions">'; // the action links if (api_get_setting('allow_user_course_subscription_by_course_admin') == 'true' or api_is_platform_admin()) { $actions .= '<a href="subscribe_user.php?' . api_get_cidreq() . '">' . Display::return_icon('user_subscribe_course.png', get_lang("SubscribeUserToCourse"), '', ICON_SIZE_MEDIUM) . '</a> '; $actions .= "<a href=\"subscribe_user.php?" . api_get_cidreq() . "&type=teacher\">" . Display::return_icon('teacher_subscribe_course.png', get_lang("SubscribeUserToCourseAsTeacher"), '', ICON_SIZE_MEDIUM) . "</a> "; } $actions .= '<a href="user.php?' . api_get_cidreq() . '&action=export&type=csv">' . Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM) . '</a> '; $actions .= '<a href="user.php?' . api_get_cidreq() . '&action=export&type=xls">' . Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM) . '</a> '; if (api_get_setting('allow_user_course_subscription_by_course_admin') == 'true' or api_is_platform_admin()) {
* @package chamilo.learnpath * @author Diego Escalante Urrelo <*****@*****.**> * @author Marco Antonio Villegas Vega <*****@*****.**> * @author Julio Montoya <*****@*****.**> Lots of bug fixing * */ /** * Code */ require api_get_path(LIBRARY_PATH).'search/search_widget.php'; require api_get_path(LIBRARY_PATH).'search/ChamiloQuery.php'; require_once api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php'; require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; $htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'. api_get_path(WEB_PATH) .'main/newscorm/lp_list_search.css" />'; event_access_tool(TOOL_SEARCH); if (isset($_SESSION['gradebook'])){ $gradebook = $_SESSION['gradebook']; } if (!empty($gradebook) && $gradebook == 'view') { $interbreadcrumb[]= array ( 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('ToolGradebook') ); } $interbreadcrumb[] = array('url' => './index.php', 'name' => get_lang(ucfirst(TOOL_SEARCH))); search_widget_prepare($htmlHeadXtra); Display::display_header(null, 'Path');
/* For licensing terms, see /license.txt */ // The file that contains all the initialisation stuff (and includes all the configuration stuff) require_once 'dropbox_init.inc.php'; // get the last time the user accessed the tool 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']); }
<?php /* For licensing terms, see /license.txt */ // protect a course script api_protect_course_script(true); Display::display_reduced_header(); // Tracking event_access_tool($tool); // Display echo $content;
<?php /* For licensing terms, see /license.txt */ /** * Script allowing simple edition of learnpath information (title, description, etc) * @package chamilo.learnpath * @author Yannick Warnier <*****@*****.**> */ require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php'; global $charset; $show_description_field = false; //for now $nameTools = get_lang('Doc'); $this_section = SECTION_COURSES; event_access_tool(TOOL_LEARNPATH); api_protect_course_script(); if (isset($_SESSION['gradebook'])) { $gradebook = $_SESSION['gradebook']; } if (!empty($gradebook) && $gradebook == 'view') { $interbreadcrumb[] = array('url' => '../gradebook/' . $_SESSION['gradebook_dest'], 'name' => get_lang('ToolGradebook')); } $interbreadcrumb[] = array('url' => 'lp_controller.php?action=list', 'name' => get_lang('LearningPaths')); $interbreadcrumb[] = array('url' => api_get_self() . "?action=build&lp_id=" . $_SESSION['oLP']->get_id(), 'name' => $_SESSION['oLP']->get_name()); $htmlHeadXtra[] = '<script> function activate_start_date() { if(document.getElementById(\'start_date_div\').style.display == \'none\') { document.getElementById(\'start_date_div\').style.display = \'block\'; } else { document.getElementById(\'start_date_div\').style.display = \'none\'; }
/** * Prepare the environment. Set up breadcrumps and raise tracking event. */ protected function prolog() { global $interbreadcrumb; $interbreadcrumb = array(); $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('CourseProgram')); $type_id = Request::get_description_type(); $type = CourseDescriptionType::repository()->find_one_by_id($type_id); if ($type) { $interbreadcrumb[] = array('url' => '#', 'name' => $type->get_title()); } global $this_section; $this_section = SECTION_COURSES; global $current_course_tool; $current_course_tool = TOOL_COURSE_DESCRIPTION; // Tracking event_access_tool(TOOL_COURSE_DESCRIPTION); }
// the learning path, we do not include the banner so we have to explicitly // include the stylesheet, which is normally done in the header if (!empty($group_id)) { $group_properties = GroupManager::get_group_properties($group_id); $interbreadcrumb[] = array("url" => "../group/group.php", "name" => get_lang('Groups')); $interbreadcrumb[] = array("url" => "../group/group_space.php?gidReq=" . $group_id, "name" => get_lang('GroupSpace') . ' ' . $group_properties['name']); Display::display_header($nameTools, 'Agenda'); } elseif (empty($origin) or $origin != 'learnpath') { Display::display_header($nameTools, 'Agenda'); } else { echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . api_get_path(WEB_CODE_PATH) . "css/default.css\"/>"; } /* TRACKING */ event_access_tool(TOOL_CALENDAR_EVENT); /* SETTING SOME VARIABLES */ // Variable definitions // Defining the shorts for the days. We use camelcase because these are arrays of language variables $DaysShort = api_get_week_days_short(); // 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);
// Language file that needs to be included $language_file = 'survey'; if (!isset($_GET['cidReq'])) { $_GET['cidReq'] = 'none'; // Prevent sql errors $cidReset = true; } // Including the global initialization file require_once '../inc/global.inc.php'; $this_section = SECTION_COURSES; $current_course_tool = TOOL_SURVEY; api_protect_course_script(true); // Including additional libraries require_once 'survey.lib.php'; // Tracking event_access_tool(TOOL_SURVEY); /** @todo This has to be moved to a more appropriate place (after the display_header of the code) */ if (!api_is_allowed_to_edit(false, true)) { // Coach can see this Display::display_header(get_lang('SurveyList')); SurveyUtil::survey_list_user($_user['user_id']); Display::display_footer(); exit; } $extend_rights_for_coachs = api_get_setting('extend_rights_for_coach_on_survey'); // 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
// Additional javascript $htmlHeadXtra[] = NotebookManager::javascript_notebook(); $htmlHeadXtra[] = '<script type="text/javascript"> function setFocus(){ $("#note_title").focus(); } $(document).ready(function () { setFocus(); }); </script>'; // Setting the tool constants $tool = TOOL_NOTEBOOK; // Tracking 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
$("#end_date_toggle").click(function() { $("#end_date").toggle(); }); }); </script>'; /* Constants and variables */ $tool_name = get_lang('ToolWiki'); /* ACCESS */ api_protect_course_script(); api_block_anonymous_users(); /* TRACKING */ event_access_tool(TOOL_WIKI); if ($groupId) { $group_properties = GroupManager::get_group_properties($groupId); $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').' '.Security::remove_XSS($group_properties['name']) ); //ensure this tool in groups whe it's private or deactivated if ($group_properties['wiki_state'] == 0) { api_not_allowed(); } elseif ($group_properties['wiki_state']==2) {
handle: ".moved", //only the class "moved" }); }); </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
$course_id = api_get_course_int_id(); // Create default category if it doesn't exist when group categories aren't allowed if (api_get_setting('allow_group_categories') == 'false') { $cat_table = Database::get_course_table(TABLE_GROUP_CATEGORY); $sql = "SELECT * FROM {$cat_table} WHERE c_id = {$course_id} AND id = '" . GroupManager::DEFAULT_GROUP_CATEGORY . "'"; $res = Database::query($sql); $num = Database::num_rows($res); if ($num == 0) { $sql = "INSERT INTO " . $cat_table . "\n (c_id, id, title, description, forum_state, wiki_state, max_student, self_reg_allowed, self_unreg_allowed, groups_per_user, display_order)\n VALUES ({$course_id}, '2', '" . Database::escape_string(get_lang('DefaultGroupCategory')) . "', '', '1', '1', '8', '0', '0', '0', '0');"; Database::query($sql); } } /* Header */ if (!isset($_GET['origin']) || $_GET['origin'] != 'learnpath') { // So we are not in learnpath tool event_access_tool(TOOL_GROUP); if (!$is_allowed_in_course) { api_not_allowed(true); } } Display::display_header(get_lang('Groups')); // Tool introduction Display::display_introduction_section(TOOL_GROUP); /* * Self-registration and un-registration */ $my_group_id = isset($_GET['group_id']) ? intval($_GET['group_id']) : null; $my_msg = isset($_GET['msg']) ? Security::remove_XSS($_GET['msg']) : null; $my_group = isset($_REQUEST['group']) ? Security::remove_XSS($_REQUEST['group']) : null; $my_get_id1 = isset($_GET['id1']) ? Security::remove_XSS($_GET['id1']) : null; $my_get_id2 = isset($_GET['id2']) ? Security::remove_XSS($_GET['id2']) : null;
if (isset($_GET['action']) && $_GET['action'] == 'addcategory') { $nameTools = ''; $interbreadcrumb[] = array('url' => 'link.php', 'name' => get_lang('Links')); $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AddCategory')); } if (isset($_GET['action']) && $_GET['action'] == 'editlink') { $nameTools = ''; $interbreadcrumb[] = array('url' => 'link.php', 'name' => get_lang('Links')); $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditLink')); } // Database Table definitions $tbl_link = Database::get_course_table(TABLE_LINK); $tbl_categories = Database::get_course_table(TABLE_LINK_CATEGORY); $course_id = api_get_course_int_id(); // Statistics event_access_tool(TOOL_LINK); Display::display_header($nameTools, 'Links'); ?> <script type="text/javascript"> /* <![CDATA[ */ function MM_popupMsg(msg) { //v1.0 confirm(msg); } /* ]]> */ </script> <?php /* Action Handling */ $nameTools = get_lang('Links'); if (isset($_GET['action'])) { $check_token = true;
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('UploadADocument')); } if ($action == 'settings') { $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditToolOptions')); } if ($action == 'create_dir') { $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateAssignment')); } Display::display_header(null); } else { //we are in the learnpath tool Display::display_reduced_header(); } } //stats event_access_tool(TOOL_STUDENTPUBLICATION); $is_allowed_to_edit = api_is_allowed_to_edit(); $student_can_edit_in_session = api_is_allowed_to_session_edit(false, true); Display::display_introduction_section(TOOL_STUDENTPUBLICATION); // introduction section if ($origin == 'learnpath') { echo '<div style="height:15px"> </div>'; } /* Display links to upload form and tool options */ if (!in_array($action, array('add', 'create_dir'))) { $token = Security::get_token(); } display_action_links($work_id, $curdirpath, $action); // for teachers switch ($action) { case 'settings':
//if is called from a learning path lp_id $lp_id = isset($_REQUEST['lp_id']) ? Security::remove_XSS($_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(); $whatsnew_post_info = Session::read('whatsnew_post_info'); /* TRACKING */ event_access_tool(TOOL_FORUM); /* RETRIEVING ALL THE FORUM CATEGORIES AND FORUMS note: we do this here just after het handling of the actions to be sure that we already incorporate the latest changes */ // Step 1: We store all the forum categories in an array $forum_categories. $forumCategories = get_forum_categories(); // Step 2: We find all the forums (only the visible ones if it is a student). // display group forum in general forum tool depending to configuration option $forum_list = get_forums('', '', apiGetDisplayGroupsForumInGeneralTool()); $user_id = api_get_user_id(); /* RETRIEVING ALL GROUPS AND THOSE OF THE USER */ // The groups of the user. $groups_of_user = array(); $groups_of_user = GroupManager::get_group_ids($_course['real_id'], $user_id);
public function prolog() { event_access_tool(TOOL_LINK); //legacy global $interbreadcrumb; $interbreadcrumb = array(); $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Links')); global $current_course_tool; global $this_section; global $nameTools; $current_course_tool = TOOL_LINK; $this_section = SECTION_COURSES; $nameTools = get_lang('Links'); }
$tbl_sessions = Database::get_main_table(TABLE_MAIN_SESSION); $tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT); $tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY); /* Libraries */ $lib = api_get_path(LIBRARY_PATH); //avoid useless function calls require_once $lib . 'groupmanager.lib.php'; require_once $lib . 'mail.lib.inc.php'; require_once $lib . 'tracking.lib.php'; require_once $lib . 'fckeditor/fckeditor.php'; require_once $lib . 'fileUpload.lib.php'; require_once 'announcements.inc.php'; $course_id = api_get_course_int_id(); $_course = api_get_course_info(); /* Tracking */ event_access_tool(TOOL_ANNOUNCEMENT); /* POST TO */ $safe_emailTitle = isset($_POST['emailTitle']) ? $_POST['emailTitle'] : null; $safe_newContent = isset($_POST['newContent']) ? $_POST['newContent'] : null; $content_to_modify = $title_to_modify = ''; if (!empty($_POST['To'])) { if (api_get_session_id() != 0 && api_is_allowed_to_session_edit(false, true) == false) { api_not_allowed(true); } $display_form = true; $form_elements = array('emailTitle' => $safe_emailTitle, 'newContent' => $safe_newContent, 'id' => $_POST['id'], 'emailoption' => $_POST['email_ann']); $_SESSION['formelements'] = $form_elements; $form_elements = $_SESSION['formelements']; $title_to_modify = $form_elements["emailTitle"]; $content_to_modify = $form_elements["newContent"]; $announcement_to_modify = $form_elements["id"];
*/ $language_file = array('chat'); require_once '../inc/global.inc.php'; $current_course_tool = TOOL_CHAT; $this_section = SECTION_COURSES; $nameTools = get_lang('ToolChat'); if ($_GET["origin"] != 'whoisonline') { api_protect_course_script(true); } else { $origin = $_SESSION['origin']; $target = $_SESSION['target']; $_SESSION['origin'] = Security::remove_XSS($_GET["origin"]); $_SESSION['target'] = Security::remove_XSS($_GET["target"]); } /* TRACKING */ event_access_tool(TOOL_CHAT); header('Content-Type: text/html; charset=' . api_get_system_encoding()); /* * Choose CSS style (platform's, user's, or course's) */ $my_style = api_get_visual_theme(); $mycourseid = api_get_course_id(); if (!empty($mycourseid) && $mycourseid != -1) { $open_chat_window = api_get_course_setting('allow_open_chat_window'); } $cidreq = Security::remove_XSS($_GET['cidReq']); $toolgroup = Security::remove_XSS($_GET['toolgroup']); //fix when change by vertical or horizontal menu from a chat group to chat course. if (empty($toolgroup) && empty($open_chat_window)) { unset($_SESSION['_gid']); }
/** * Prepare the environment. Set up breadcrumps and raise tracking event. */ protected function prolog() { event_access_tool(TOOL_LINK); }
// Notification for unauthorized people. api_protect_course_script(true); // Additional javascripts. $htmlHeadXtra[] = GlossaryManager::javascript_glossary(); $htmlHeadXtra[] = '<script> function setFocus(){ $("#glossary_title").focus(); } $(document).ready(function () { setFocus(); }); </script>'; // setting the tool constants $tool = TOOL_GLOSSARY; // Tracking event_access_tool(TOOL_GLOSSARY); function sorter($item1, $item2) { if ($item1[2] == $item2[2]) { return 0; } return $item1[2] < $item2[2] ? -1 : 1; } // Displaying the header $action = isset($_GET['action']) ? $_GET['action'] : null; $tool = 'GlossaryManagement'; $interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('Glossary')); if (!empty($action)) { } switch ($action) { case 'addglossary':
/** * Prepare the environment. Set up breadcrumps and raise tracking event. */ protected function prolog() { event_access_tool(TOOL_NOTEBOOK); }
if ('/' . $path[1] != $group_properties['directory']) { api_not_allowed(true); } } $interbreadcrumb[] = array("url" => "./document.php?curdirpath=" . urlencode($dir) . $req_gid, "name" => get_lang('Documents')); } else { $interbreadcrumb[] = array('url' => '../gradebook/' . $_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook')); } if (!$is_allowed_in_course) { api_not_allowed(true); } if (!($is_allowed_to_edit || $_SESSION['group_member_with_upload_rights'] || is_my_shared_folder($userId, $dir, api_get_session_id()))) { api_not_allowed(true); } /* Header */ event_access_tool(TOOL_DOCUMENT); $display_dir = $dir; if (isset($group_properties)) { $display_dir = explode('/', $dir); unset($display_dir[0]); unset($display_dir[1]); $display_dir = implode('/', $display_dir); } $select_cat = isset($_GET['selectcat']) ? intval($_GET['selectcat']) : null; $curDirPath = isset($_GET['curdirpath']) ? Security::remove_XSS($_GET['curdirpath']) : null; // Create a new form $form = new FormValidator('create_document', 'post', api_get_self() . '?' . api_get_cidreq() . '&dir=' . Security::remove_XSS(urlencode($dir)) . '&selectcat=' . $select_cat, null, array('class' => 'form-vertical')); // form title $form->addElement('header', $nameTools); if ($is_certificate_mode) { //added condition for certicate in gradebook
/** * Prepare the environment. Set up breadcrumps and raise tracking event. */ protected function prolog() { event_access_tool(TOOL_COURSE_DESCRIPTION); }