} api_not_allowed(); } if (api_is_in_gradebook()) { $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'gradebook/index.php?' . api_get_cidreq(), 'name' => get_lang('ToolGradebook')); } $nameTools = get_lang('Exercises'); $interbreadcrumb[] = array("url" => "exercise.php?" . api_get_cidreq(), "name" => get_lang('Exercises')); $htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/js/hotspot.js"></script>'; $htmlHeadXtra[] = '<link rel="stylesheet" href="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/css/hotspot.css">'; if ($origin != 'learnpath') { // So we are not in learnpath tool Display::display_header($nameTools, get_lang('Exercise')); } else { $htmlHeadXtra[] = "\n <style>\n body { background: none;}\n </style>\n "; Display::display_reduced_header(); } /* DISPLAY AND MAIN PROCESS */ // I'm in a preview mode as course admin. Display the action menu. if (api_is_course_admin() && $origin != 'learnpath') { echo '<div class="actions">'; echo '<a href="admin.php?' . api_get_cidreq() . '&exerciseId=' . $objExercise->id . '">' . Display::return_icon('back.png', get_lang('GoBackToQuestionList'), array(), 32) . '</a>'; echo '<a href="exercise_admin.php?' . api_get_cidreq() . '&modifyExercise=yes&exerciseId=' . $objExercise->id . '">' . Display::return_icon('edit.png', get_lang('ModifyExercise'), array(), 32) . '</a>'; echo '</div>'; } $feedback_type = $objExercise->feedback_type; $exercise_stat_info = $objExercise->get_stat_track_exercise_info_by_exe_id($exe_id); if (!empty($exercise_stat_info['data_tracking'])) { $question_list = explode(',', $exercise_stat_info['data_tracking']); } $learnpath_id = $exercise_stat_info['orig_lp_id'];
$_SESSION['oLP']->set_previous_item($lp_item_id); $nameTools = Security::remove_XSS($_SESSION['oLP']->get_name()); $save_setting = api_get_setting('show_navigation_menu'); global $_setting; $_setting['show_navigation_menu'] = 'false'; $scorm_css_header = true; $lp_theme_css = $_SESSION['oLP']->get_theme(); // Sets the css theme of the LP this call is also use at the frames (toc, nav, message). if ($_SESSION['oLP']->mode == 'fullscreen') { $htmlHeadXtra[] = "<script>window.open('$src','content_id','toolbar=0,location=0,status=0,scrollbars=1,resizable=1');</script>"; } // Not in fullscreen mode. Display::display_reduced_header($nameTools); // Check if audio recorder needs to be in studentview. if (isset($_SESSION['status']) && $_SESSION['status'][$course_code] == 5) { $audio_recorder_studentview = true; } else { $audio_recorder_studentview = false; } // Set flag to ensure lp_header.php is loaded by this script (flag is unset in lp_header.php). $_SESSION['loaded_lp_view'] = true; $display_none = ''; $margin_left = '340px'; //Media player code
} exit; } /* BREADCRUMBS */ if ($view == 'received') { $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'dropbox/index.php?' . api_get_cidreq(), 'name' => get_lang('Dropbox', '')); $nameTools = get_lang('ReceivedFiles'); if ($action == 'addreceivedcategory') { $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'dropbox/index.php?view=received&' . api_get_cidreq(), 'name' => get_lang('ReceivedFiles')); $nameTools = get_lang('AddNewCategory'); } } if ($view == 'sent' || empty($view)) { $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'dropbox/index.php?' . api_get_cidreq(), 'name' => get_lang('Dropbox')); $nameTools = get_lang('SentFiles'); if ($action == 'addsentcategory') { $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'dropbox/index.php?view=sent&' . api_get_cidreq(), 'name' => get_lang('SentFiles')); $nameTools = get_lang('AddNewCategory'); } if ($action == 'add') { $interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'dropbox/index.php?view=sent&' . api_get_cidreq(), 'name' => get_lang('SentFiles')); $nameTools = get_lang('UploadNewFile'); } } /* HEADER & TITLE */ if (isset($origin) && $origin == 'learnpath') { $htmlHeadXtra[] = $javascript; Display::display_reduced_header($nameTools, 'Dropbox'); } else { Display::display_header($nameTools, 'Dropbox'); }
$my_file = str_replace(array('../', '\\..', '\\0', '..\\'), array('', '', '', ''), urldecode($my_file)); $title = GetQuizName($my_file, $documentPath); if ($title == '') { $title = basename($my_file); } $nameTools = $title; $noPHP_SELF = true; if (isset($_SESSION['gradebook'])) { $gradebook = $_SESSION['gradebook']; } if (!empty($gradebook) && $gradebook == 'view') { $interbreadcrumb[] = array('url' => '../gradebook/' . $_SESSION['gradebook_dest'], 'name' => get_lang('ToolGradebook')); } $htmlHeadXtra[] = ' <script> $(document).ready( function(){ var height = $(this).innerHeight() - 20; $("#hotpotatoe").css("height", height) }); </script>'; $interbreadcrumb[] = array("url" => "./exercice.php", "name" => get_lang('Exercices')); if ($origin == 'learnpath') { Display::display_reduced_header($nameTools, "Exercise"); } else { Display::display_header($nameTools, "Exercise"); } $url = $document_web_path . $doc_url . $user_id . '.t.html?time=' . Security::remove_XSS($time); echo '<iframe id="hotpotatoe" width="100%" frameborder="0" src="' . $url . '"></iframe>'; echo '</body></html>'; Display::display_footer(); exit;
/** * Shows the student's certificate (HTML file). If the global setting * allow_public_certificates is set to 'false', no certificate can be printed. * If the global allow_public_certificates is set to 'true' and the course * setting allow_public_certificates is set to 0, no certificate *in this * course* can be printed (for anonymous users). Connected users can always * print them. */ public function show() { // Special rules for anonymous users $failed = false; if (api_is_anonymous()) { if (api_get_setting('allow_public_certificates') != 'true') { // The "non-public" setting is set, so do not print $failed = true; } else { // Check the course-level setting to make sure the certificate // can be printed publicly if (isset($this->certificate_data) && isset($this->certificate_data['cat_id'])) { $gradebook = new Gradebook(); $gradebook_info = $gradebook->get($this->certificate_data['cat_id']); if (!empty($gradebook_info['course_code'])) { $allow_public_certificates = api_get_course_setting('allow_public_certificates', $gradebook_info['course_code']); if ($allow_public_certificates == 0) { // Printing not allowed $failed = true; } } else { // No course ID defined (should never get here) Display::display_reduced_header(); Display::display_warning_message(get_lang('NoCertificateAvailable')); exit; } } } } if ($failed) { Display::display_reduced_header(); Display::display_warning_message(get_lang('CertificateExistsButNotPublic')); exit; } //Read file or preview file if (!empty($this->certificate_data['path_certificate'])) { $user_certificate = $this->certification_user_path . basename($this->certificate_data['path_certificate']); if (file_exists($user_certificate)) { header('Content-Type: text/html; charset=' . api_get_system_encoding()); echo @file_get_contents($user_certificate); } } else { Display::display_reduced_header(); Display::display_warning_message(get_lang('NoCertificateAvailable')); } exit; }