lp_view.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * This file was originally the copy of document.php, but many modifications happened since then ;
  5. * the direct file view is not needed anymore, if the user uploads a scorm zip file, a directory
  6. * will be automatically created for it, and the files will be uncompressed there for example ;
  7. *
  8. * @package chamilo.learnpath
  9. * @author Yannick Warnier <ywarnier@beeznest.org> - redesign
  10. * @author Denes Nagy, principal author
  11. * @author Isthvan Mandak, several new features
  12. * @author Roan Embrechts, code improvements and refactoring
  13. */
  14. use \ChamiloSession as Session;
  15. $use_anonymous = true;
  16. $_SESSION['whereami'] = 'lp/view';
  17. $this_section = SECTION_COURSES;
  18. if ($lp_controller_touched != 1) {
  19. header('location: lp_controller.php?action=view&item_id='.intval($_REQUEST['item_id']));
  20. exit;
  21. }
  22. require_once '../inc/global.inc.php';
  23. //To prevent the template class
  24. $show_learnpath = true;
  25. api_protect_course_script();
  26. $lp_id = intval($_GET['lp_id']);
  27. // Check if the learning path is visible for student - (LP requisites)
  28. if (!api_is_platform_admin()) {
  29. if (!api_is_allowed_to_edit(null, true) &&
  30. !learnpath::is_lp_visible_for_student($lp_id, api_get_user_id())
  31. ) {
  32. api_not_allowed(true);
  33. }
  34. }
  35. // Checking visibility (eye icon)
  36. $visibility = api_get_item_visibility(
  37. api_get_course_info(),
  38. TOOL_LEARNPATH,
  39. $lp_id,
  40. $action,
  41. api_get_user_id(),
  42. api_get_session_id()
  43. );
  44. if (!api_is_allowed_to_edit(false, true, false, false) && intval($visibility) == 0) {
  45. api_not_allowed(true);
  46. }
  47. if (empty($_SESSION['oLP'])) {
  48. api_not_allowed(true);
  49. }
  50. $debug = 0;
  51. if ($debug) {
  52. error_log('------ Entering lp_view.php -------');
  53. }
  54. $_SESSION['oLP']->error = '';
  55. $lp_item_id = $_SESSION['oLP']->get_current_item_id();
  56. $lp_type = $_SESSION['oLP']->get_type();
  57. $course_code = api_get_course_id();
  58. $course_id = api_get_course_int_id();
  59. $user_id = api_get_user_id();
  60. $platform_theme = api_get_setting('stylesheets'); // Platform's css.
  61. $my_style = $platform_theme;
  62. $htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.lp_minipanel.js" type="text/javascript" language="javascript"></script>';
  63. $htmlHeadXtra[] = '<script>
  64. $(document).ready(function() {
  65. $("div#log_content_cleaner").bind("click", function() {
  66. $("div#log_content").empty();
  67. });
  68. });
  69. var chamilo_xajax_handler = window.oxajax;
  70. </script>';
  71. if ($_SESSION['oLP']->mode == 'embedframe' || $_SESSION['oLP']->get_hide_toc_frame()==1 ) {
  72. $htmlHeadXtra[] = 'hello';
  73. }
  74. //Impress js
  75. if ($_SESSION['oLP']->mode == 'impress') {
  76. $lp_id = $_SESSION['oLP']->get_id();
  77. $url = api_get_path(WEB_CODE_PATH)."newscorm/lp_impress.php?lp_id=$lp_id&".api_get_cidreq();
  78. header("Location: $url");
  79. exit;
  80. }
  81. // Prepare variables for the test tool (just in case) - honestly, this should disappear later on.
  82. $_SESSION['scorm_view_id'] = $_SESSION['oLP']->get_view_id();
  83. $_SESSION['scorm_item_id'] = $lp_item_id;
  84. // Reinit exercises variables to avoid spacename clashes (see exercise tool)
  85. if (isset($exerciseResult) || isset($_SESSION['exerciseResult'])) {
  86. Session::erase('exerciseResult');
  87. Session::erase('objExercise');
  88. Session::erase('questionList');
  89. }
  90. // additional APIs
  91. $htmlHeadXtra[] = '<script>
  92. chamilo_courseCode = "'.$course_code.'";
  93. </script>';
  94. // Document API
  95. $htmlHeadXtra[] = '<script src="js/documentapi.js" type="text/javascript" language="javascript"></script>';
  96. // Storage API
  97. $htmlHeadXtra[] = '<script>
  98. var sv_user = \''.api_get_user_id().'\';
  99. var sv_course = chamilo_courseCode;
  100. var sv_sco = \''.intval($_REQUEST['lp_id']).'\';
  101. </script>'; // FIXME fetch sco and userid from a more reliable source directly in sotrageapi.js
  102. $htmlHeadXtra[] = '<script type="text/javascript" src="js/storageapi.js"></script>';
  103. /**
  104. * Get a link to the corresponding document.
  105. */
  106. if ($debug) {
  107. error_log(" src: $src ");
  108. error_log(" lp_type: $lp_type ");
  109. }
  110. $get_toc_list = $_SESSION['oLP']->get_toc();
  111. $type_quiz = false;
  112. foreach ($get_toc_list as $toc) {
  113. if ($toc['id'] == $lp_item_id && $toc['type'] == 'quiz') {
  114. $type_quiz = true;
  115. }
  116. }
  117. if (!isset($src)) {
  118. $src = null;
  119. switch ($lp_type) {
  120. case 1:
  121. $_SESSION['oLP']->stop_previous_item();
  122. $htmlHeadXtra[] = '<script src="scorm_api.php" type="text/javascript" language="javascript"></script>';
  123. $prereq_check = $_SESSION['oLP']->prerequisites_match($lp_item_id);
  124. if ($prereq_check === true) {
  125. $src = $_SESSION['oLP']->get_link('http', $lp_item_id, $get_toc_list);
  126. // Prevents FF 3.6 + Adobe Reader 9 bug see BT#794 when calling a pdf file in a LP.
  127. $file_info = parse_url($src);
  128. $file_info = pathinfo($file_info['path']);
  129. if (isset($file_info['extension']) &&
  130. api_strtolower(substr($file_info['extension'], 0, 3) == 'pdf')
  131. ) {
  132. $src = api_get_path(WEB_CODE_PATH).'newscorm/lp_view_item.php?lp_item_id='.$lp_item_id.'&'.api_get_cidreq();
  133. }
  134. $_SESSION['oLP']->start_current_item(); // starts time counter manually if asset
  135. } else {
  136. $src = 'blank.php?error=prerequisites';
  137. }
  138. break;
  139. case 2:
  140. // save old if asset
  141. $_SESSION['oLP']->stop_previous_item(); // save status manually if asset
  142. $htmlHeadXtra[] = '<script src="scorm_api.php" type="text/javascript" language="javascript"></script>';
  143. $prereq_check = $_SESSION['oLP']->prerequisites_match($lp_item_id);
  144. if ($prereq_check === true) {
  145. $src = $_SESSION['oLP']->get_link('http', $lp_item_id, $get_toc_list);
  146. $_SESSION['oLP']->start_current_item(); // starts time counter manually if asset
  147. } else {
  148. $src = 'blank.php?error=prerequisites';
  149. }
  150. break;
  151. case 3:
  152. // aicc
  153. $_SESSION['oLP']->stop_previous_item(); // save status manually if asset
  154. $htmlHeadXtra[] = '<script src="'.$_SESSION['oLP']->get_js_lib().'" type="text/javascript" language="javascript"></script>';
  155. $prereq_check = $_SESSION['oLP']->prerequisites_match($lp_item_id);
  156. if ($prereq_check === true) {
  157. $src = $_SESSION['oLP']->get_link('http', $lp_item_id, $get_toc_list);
  158. $_SESSION['oLP']->start_current_item(); // starts time counter manually if asset
  159. } else {
  160. $src = 'blank.php';
  161. }
  162. break;
  163. case 4:
  164. break;
  165. }
  166. }
  167. $autostart = 'true';
  168. // Update status, total_time from lp_item_view table when you finish the exercises in learning path.
  169. if ($debug) {
  170. error_log('$type_quiz: '.$type_quiz);
  171. error_log('$_REQUEST[exeId]: '.intval($_REQUEST['exeId']));
  172. error_log('$lp_id: '.$lp_id);
  173. error_log('$_GET[lp_item_id]: '.intval($_GET['lp_item_id']));
  174. }
  175. if (!empty($_REQUEST['exeId']) &&
  176. isset($lp_id) &&
  177. isset($_GET['lp_item_id'])
  178. ) {
  179. global $src;
  180. $_SESSION['oLP']->items[$_SESSION['oLP']->current]->write_to_db();
  181. $TBL_TRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
  182. $TBL_LP_ITEM_VIEW = Database::get_course_table(TABLE_LP_ITEM_VIEW);
  183. $TBL_LP_ITEM = Database::get_course_table(TABLE_LP_ITEM);
  184. $safe_item_id = intval($_GET['lp_item_id']);
  185. $safe_id = $lp_id;
  186. $safe_exe_id = intval($_REQUEST['exeId']);
  187. if ($safe_id == strval(intval($safe_id)) &&
  188. $safe_item_id == strval(intval($safe_item_id))
  189. ) {
  190. $sql = 'SELECT start_date, exe_date, exe_result, exe_weighting
  191. FROM ' . $TBL_TRACK_EXERCICES . '
  192. WHERE exe_id = '.$safe_exe_id;
  193. $res = Database::query($sql);
  194. $row_dates = Database::fetch_array($res);
  195. $time_start_date = api_strtotime($row_dates['start_date'],'UTC');
  196. $time_exe_date = api_strtotime($row_dates['exe_date'],'UTC');
  197. $mytime = ((int)$time_exe_date-(int)$time_start_date);
  198. $score = (float)$row_dates['exe_result'];
  199. $max_score = (float)$row_dates['exe_weighting'];
  200. $sql = "UPDATE $TBL_LP_ITEM SET
  201. max_score = '$max_score'
  202. WHERE c_id = $course_id AND id = '".$safe_item_id."'";
  203. Database::query($sql);
  204. $sql = "SELECT id FROM $TBL_LP_ITEM_VIEW
  205. WHERE
  206. c_id = $course_id AND
  207. lp_item_id = '$safe_item_id' AND
  208. lp_view_id = '".$_SESSION['oLP']->lp_view_id."'
  209. ORDER BY id DESC
  210. LIMIT 1";
  211. $res_last_attempt = Database::query($sql);
  212. if (Database::num_rows($res_last_attempt) && !api_is_invitee()) {
  213. $row_last_attempt = Database::fetch_row($res_last_attempt);
  214. $lp_item_view_id = $row_last_attempt[0];
  215. $sql = "UPDATE $TBL_LP_ITEM_VIEW SET
  216. status = 'completed' ,
  217. score = $score,
  218. total_time = $mytime
  219. WHERE id='".$lp_item_view_id."' AND c_id = $course_id ";
  220. if ($debug) error_log($sql);
  221. Database::query($sql);
  222. $sql = "UPDATE $TBL_TRACK_EXERCICES SET
  223. orig_lp_item_view_id = $lp_item_view_id
  224. WHERE exe_id = ".$safe_exe_id;
  225. Database::query($sql);
  226. }
  227. }
  228. if (intval($_GET['fb_type']) > 0) {
  229. $src = 'blank.php?msg=exerciseFinished';
  230. } else {
  231. $src = api_get_path(WEB_CODE_PATH).'exercice/result.php?origin=learnpath&id='.$safe_exe_id;
  232. if ($debug) error_log('Calling URL: '.$src);
  233. }
  234. $autostart = 'false';
  235. }
  236. $_SESSION['oLP']->set_previous_item($lp_item_id);
  237. $nameTools = Security::remove_XSS($_SESSION['oLP']->get_name());
  238. $save_setting = api_get_setting('show_navigation_menu');
  239. global $_setting;
  240. $_setting['show_navigation_menu'] = 'false';
  241. $scorm_css_header = true;
  242. $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).
  243. if ($_SESSION['oLP']->mode == 'fullscreen') {
  244. $htmlHeadXtra[] = "<script>window.open('$src','content_id','toolbar=0,location=0,status=0,scrollbars=1,resizable=1');</script>";
  245. }
  246. // Not in fullscreen mode.
  247. Display::display_reduced_header($nameTools);
  248. // Check if audio recorder needs to be in studentview.
  249. if (isset($_SESSION['status']) && $_SESSION['status'][$course_code] == 5) {
  250. $audio_recorder_studentview = true;
  251. } else {
  252. $audio_recorder_studentview = false;
  253. }
  254. // Set flag to ensure lp_header.php is loaded by this script (flag is unset in lp_header.php).
  255. $_SESSION['loaded_lp_view'] = true;
  256. $display_none = '';
  257. $margin_left = '340px';
  258. //Media player code
  259. $display_mode = $_SESSION['oLP']->mode;
  260. $scorm_css_header = true;
  261. $lp_theme_css = $_SESSION['oLP']->get_theme();
  262. // Setting up the CSS theme if exists.
  263. if (!empty ($lp_theme_css) && !empty ($mycourselptheme) && $mycourselptheme != -1 && $mycourselptheme == 1) {
  264. global $lp_theme_css;
  265. } else {
  266. $lp_theme_css = $my_style;
  267. }
  268. $progress_bar = "";
  269. if (!api_is_invitee()) {
  270. $progress_bar = $_SESSION['oLP']->getProgressBar();
  271. }
  272. $navigation_bar = $_SESSION['oLP']->get_navigation_bar();
  273. $navigation_bar_bottom = $_SESSION['oLP']->get_navigation_bar("control-bottom","display:none");
  274. $mediaplayer = $_SESSION['oLP']->get_mediaplayer($autostart);
  275. $tbl_lp_item = Database::get_course_table(TABLE_LP_ITEM);
  276. $show_audioplayer = false;
  277. // Getting all the information about the item.
  278. $sql = "SELECT audio FROM " . $tbl_lp_item . "
  279. WHERE c_id = $course_id AND lp_id = '" . $_SESSION['oLP']->lp_id."'";
  280. $res_media= Database::query($sql);
  281. if (Database::num_rows($res_media) > 0) {
  282. while ($row_media = Database::fetch_array($res_media)) {
  283. if (!empty($row_media['audio'])) {
  284. $show_audioplayer = true;
  285. break;
  286. }
  287. }
  288. }
  289. echo '<div id="learning_path_main" style="width:100%;height:100%;">';
  290. $is_allowed_to_edit = api_is_allowed_to_edit(false, true, true, false);
  291. if ($is_allowed_to_edit) {
  292. echo '<div class="row">';
  293. echo '<div id="learning_path_breadcrumb_zone" class="col-md-12">';
  294. global $interbreadcrumb;
  295. $interbreadcrumb[] = array('url' => 'lp_controller.php?action=list&isStudentView=false', 'name' => get_lang('LearningPaths'));
  296. $interbreadcrumb[] = array('url' => api_get_self()."?action=add_item&type=step&lp_id=".$_SESSION['oLP']->lp_id."&isStudentView=false", 'name' => $_SESSION['oLP']->get_name());
  297. $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Preview'));
  298. echo return_breadcrumb($interbreadcrumb, null, null);
  299. echo '</div>';
  300. echo '</div>';
  301. }
  302. /* button hiden left zone */
  303. echo '<a id="touch-button" class="hidden-touch" href="#"></a>';
  304. /* Fin left zone */
  305. echo '<div class="container-fluid"><div class="row">';
  306. echo '<div id="learning_path_left_zone" class="sidebar-scorm"> ';
  307. echo '<div id="scorm-info" class="panel panel-default">';
  308. echo '<div class="panel-heading">
  309. <a id="ui-option">
  310. <i id="icon-down"class="fa fa-chevron-down hidden"></i>
  311. <i id="icon-up" class="fa fa-chevron-up"></i>
  312. </a></div>';
  313. ?>
  314. <!-- end header -->
  315. <!-- Author image preview -->
  316. <div id="panel-scorm" class="panel-body">
  317. <?php
  318. // Return to course home.
  319. if ($is_allowed_to_edit) {
  320. $url = 'lp_controller.php?isStudentView=false&action=return_to_course_homepage&' . api_get_cidreq();
  321. } else {
  322. $url = 'lp_controller.php?action=return_to_course_homepage&' . api_get_cidreq();
  323. }
  324. $iconHome='<i class="fa fa-home"></i>';
  325. $name = get_lang('CourseHomepageLink');
  326. // Return to lp list
  327. if (api_get_course_setting('lp_return_link') == 1) {
  328. $url .= '&redirectTo=lp_list';
  329. $name = get_lang('LearningPathList');
  330. }
  331. echo Display::url(
  332. $iconHome.' '.$name,
  333. $url,
  334. array(
  335. 'class' => 'btn btn-success btn-block',
  336. 'target' => '_self',
  337. 'onclick' => 'javascript: window.parent.API.save_asset();'
  338. )
  339. );
  340. ?>
  341. <div class="image-avatar">
  342. <?php
  343. if ($_SESSION['oLP']->get_preview_image() != '') {
  344. $picture = getimagesize(api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/learning_path/images/'.$_SESSION['oLP']->get_preview_image());
  345. $style = null;
  346. if ($picture['1'] < 96) {
  347. $style = ' style="padding-top:'.((94 -$picture['1'])/2).'px;" ';
  348. }
  349. $size = ($picture['0'] > 104 && $picture['1'] > 96 )? ' width="104" height="96" ': $style;
  350. $my_path = $_SESSION['oLP']->get_preview_image_path();
  351. echo '<img src="'.$my_path.'">';
  352. } else {
  353. echo Display :: display_icon('unknown_250_100.jpg');
  354. }
  355. ?>
  356. </div>
  357. <div id="lp_navigation_elem" class="navegation-bar">
  358. <?php echo $navigation_bar; ?>
  359. <div id="progress_bar">
  360. <?php echo $progress_bar; ?>
  361. </div>
  362. </div>
  363. <div class="description-autor">
  364. <?php echo $_SESSION['oLP']->get_author(); ?>
  365. </div>
  366. <?php
  367. if ($show_audioplayer) {
  368. echo '<div id="lp_media_file">';
  369. echo $mediaplayer;
  370. echo '</div>';
  371. }
  372. ?>
  373. </div>
  374. </div>
  375. <!-- TOC layout -->
  376. <div id="toc_id" name="toc_name">
  377. <div id="learning_path_toc" class="scorm-list">
  378. <?php echo $_SESSION['oLP']->get_html_toc($get_toc_list); ?>
  379. </div>
  380. </div>
  381. <!-- end TOC layout -->
  382. </div>
  383. <!-- end left zone
  384. <div id="hide_bar" class="scorm-toggle" style="display:inline-block; width: 25px; height: 1000px;"></div>-->
  385. <!-- right zone -->
  386. <div id="learning_path_right_zone" style="height:100%" class="content-scorm">
  387. <?php
  388. // hub 26-05-2010 Fullscreen or not fullscreen
  389. $height = '100%';
  390. if ($_SESSION['oLP']->mode == 'fullscreen') {
  391. echo '<iframe id="content_id_blank" name="content_name_blank" src="blank.php" border="0" frameborder="0" style="width:100%;height:'.$height.'" ></iframe>';
  392. } else {
  393. echo '<iframe id="content_id" name="content_name" src="'.$src.'" border="0" frameborder="0" style="display: block; width:100%;height:'.$height.'"></iframe>';
  394. }
  395. ?>
  396. </div>
  397. <!-- end right Zone -->
  398. </div>
  399. <?php echo $navigation_bar_bottom; ?>
  400. </div></div>
  401. <script>
  402. // Resize right and left pane to full height (HUB 20-05-2010).
  403. function updateContentHeight() {
  404. document.body.style.overflow = 'hidden';
  405. var IE = window.navigator.appName.match(/microsoft/i);
  406. /* Identified new height */
  407. var heightControl = $('#control-bottom').height();
  408. var heightBreadcrumb = ($('#learning_path_breadcrumb_zone').height())? $('#learning_path_breadcrumb_zone').height() : 0 ;
  409. var heightScormInfo = $('#scorm-info').height();
  410. var heightTop = heightScormInfo + 100;
  411. //heightTop = (heightTop > 300)? heightTop : 300;
  412. var innerHeight = $(window).height();
  413. if(innerHeight<=640){
  414. $('#inner_lp_toc').css('height', innerHeight - heightTop + "px");
  415. $('#content_id').css('height', innerHeight - heightControl + "px");
  416. }else{
  417. $('#inner_lp_toc').css('height', innerHeight - heightBreadcrumb - heightTop + "px");
  418. $('#content_id').css('height', innerHeight - heightControl + "px");
  419. }
  420. //var innerHeight = (IE) ? document.body.clientHeight : window.innerHeight ;
  421. // Loads the glossary library.
  422. <?php
  423. $glossaryExtraTools = api_get_setting('show_glossary_in_extra_tools');
  424. if (in_array($glossaryExtraTools, array('true', 'lp', 'exercise_and_lp'))) {
  425. if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
  426. ?>
  427. $.frameReady(function(){
  428. // $("<div>I am a div courses</div>").prependTo("body");
  429. }, "top.content_name",
  430. { load: [
  431. { type:"script", id:"_fr1", src:"<?php echo api_get_jquery_web_path(); ?>"},
  432. { type:"script", id:"_fr4", src:"<?php echo api_get_jquery_ui_js_web_path(); ?>"},
  433. { type:"stylesheet", id:"_fr5", src:"<?php echo api_get_jquery_ui_css_web_path(); ?>"},
  434. { type:"script", id:"_fr2", src:"<?php echo api_get_path(WEB_LIBRARY_PATH); ?>javascript/jquery.highlight.js"}
  435. ] }
  436. );
  437. <?php } elseif (api_get_setting('show_glossary_in_documents') == 'isautomatic') { ?>
  438. $.frameReady(function(){
  439. // $("<div>I am a div courses</div>").prependTo("body");
  440. },
  441. "top.content_name",
  442. {
  443. load: [
  444. { type:"script", id:"_fr1", src:"<?php echo api_get_jquery_web_path(); ?>"},
  445. { type:"script", id:"_fr4", src:"<?php echo api_get_jquery_ui_js_web_path(); ?>"},
  446. { type:"stylesheet", id:"_fr5", src:"<?php echo api_get_jquery_ui_css_web_path(); ?>"},
  447. { type:"script", id:"_fr2", src:"<?php echo api_get_path(WEB_LIBRARY_PATH); ?>javascript/jquery.highlight.js"}
  448. ]}
  449. );
  450. <?php }
  451. }
  452. ?>
  453. }
  454. $(document).ready(function() {
  455. updateContentHeight();
  456. $('#touch-button').children().click(function(){
  457. updateContentHeight();
  458. });
  459. $(window).resize(function() {
  460. updateContentHeight();
  461. });
  462. });
  463. window.onload = updateContentHeight();
  464. window.onresize = updateContentHeight();
  465. $(document).ready(function(){
  466. $("#icon-down").click(function(){
  467. $("#icon-up").removeClass("hidden");
  468. $(this).addClass("hidden");
  469. $('#panel-scorm').slideDown("slow",function(){
  470. updateContentHeight();
  471. });
  472. });
  473. $("#icon-up").click(function(){
  474. $("#icon-down").removeClass("hidden");
  475. $(this).addClass("hidden");
  476. $('#panel-scorm').slideUp("slow",function(){
  477. updateContentHeight();
  478. });
  479. });
  480. });
  481. </script>
  482. <?php
  483. // Restore a global setting.
  484. $_setting['show_navigation_menu'] = $save_setting;
  485. if ($debug) {
  486. error_log(' ------- end lp_view.php ------');
  487. }