From cb29b4ab515f51c3eca9f2bc55344fca1b5f367f Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Tue, 4 Apr 2017 09:03:08 +0200 Subject: [PATCH] Minor - format code --- main/lp/lp_add_item.php | 9 ++------- main/lp/lp_view.php | 35 ++++++++++++++++++----------------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/main/lp/lp_add_item.php b/main/lp/lp_add_item.php index a85e6fc3c6..e0f8cca949 100755 --- a/main/lp/lp_add_item.php +++ b/main/lp/lp_add_item.php @@ -79,10 +79,9 @@ $(function() { $('.lp_resource_element').click(function() { window.location.href = $('a', this).attr('href'); }); - - CKEDITOR.on('instanceReady', function (e) { + CKEDITOR.on('instanceReady', function (e) { showTemplates('content_lp'); - }); + }); }); "; @@ -203,9 +202,7 @@ $(document).ready(function() { // document template for new document tab handler $(document).on( 'shown.bs.tab', 'a[data-toggle="tab"]', function (e) { - var id = e.target.id; - if (id == 'subtab2') { $('#frmModel').show(); } else { @@ -214,9 +211,7 @@ $(document).on( 'shown.bs.tab', 'a[data-toggle="tab"]', function (e) { }) build_action_menu(); echo '
'; echo '
'; diff --git a/main/lp/lp_view.php b/main/lp/lp_view.php index 7b8da34790..8e8cf71cdb 100755 --- a/main/lp/lp_view.php +++ b/main/lp/lp_view.php @@ -54,7 +54,9 @@ $visibility = api_get_item_visibility( $sessionId ); -if (!api_is_allowed_to_edit(false, true, false, false) && intval($visibility) == 0) { +if (!api_is_allowed_to_edit(false, true, false, false) && + intval($visibility) == 0 +) { api_not_allowed(true); } @@ -63,7 +65,6 @@ if (empty($_SESSION['oLP'])) { } $debug = 0; - if ($debug) { error_log('------ Entering lp_view.php -------'); } @@ -96,7 +97,7 @@ $user_id = api_get_user_id(); $platform_theme = api_get_setting('stylesheets'); // Platform's css. $my_style = $platform_theme; -$htmlHeadXtra[] = '"; } @@ -369,7 +365,6 @@ $display_none = ''; $margin_left = '340px'; //Media player code - $display_mode = $_SESSION['oLP']->mode; $scorm_css_header = true; $lp_theme_css = $_SESSION['oLP']->get_theme(); @@ -449,14 +444,20 @@ if ($_SESSION['oLP']->get_preview_image()) { } if ($_SESSION['oLP']->current == $_SESSION['oLP']->get_last()) { - $categories = Category::load(null, null, $course_code, null, null, $sessionId); + $categories = Category::load( + null, + null, + $course_code, + null, + null, + $sessionId + ); if (!empty($categories)) { $gradebookEvaluations = $categories[0]->get_evaluations(); $gradebookLinks = $categories[0]->get_links(); - if ( - count($gradebookEvaluations) === 0 && + if (count($gradebookEvaluations) === 0 && count($gradebookLinks) === 1 && $gradebookLinks[0]->get_type() == LINK_LEARNPATH && $gradebookLinks[0]->get_ref_id() == $_SESSION['oLP']->lp_id