Minor - format code

pull/2487/head
jmontoyaa 9 years ago
parent 5cb56ac03c
commit a897a0b576
  1. 20
      main/inc/ajax/course_home.ajax.php

@ -48,13 +48,13 @@ switch ($action) {
$na_image = CourseHome::getCustomWebIconPath().CourseHome::getDisableIcon($tool_info['custom_icon']); $na_image = CourseHome::getCustomWebIconPath().CourseHome::getDisableIcon($tool_info['custom_icon']);
} }
$requested_image = ($tool_visibility == 0) ? $tool_image : $na_image; $requested_image = $tool_visibility == 0 ? $tool_image : $na_image;
$requested_class = ($tool_visibility == 0) ? '' : 'text-muted'; $requested_class = $tool_visibility == 0 ? '' : 'text-muted';
$requested_message = ($tool_visibility == 0) ? 'is_active' : 'is_inactive'; $requested_message = $tool_visibility == 0 ? 'is_active' : 'is_inactive';
$requested_view = ($tool_visibility == 0) ? 'visible.png' : 'invisible.png'; $requested_view = $tool_visibility == 0 ? 'visible.png' : 'invisible.png';
$requested_visible = ($tool_visibility == 0) ? 1 : 0; $requested_visible = $tool_visibility == 0 ? 1 : 0;
$requested_view = ($tool_visibility == 0) ? 'visible.png' : 'invisible.png'; $requested_view = $tool_visibility == 0 ? 'visible.png' : 'invisible.png';
$requested_visible = ($tool_visibility == 0) ? 1 : 0; $requested_visible = $tool_visibility == 0 ? 1 : 0;
// HIDE AND REACTIVATE TOOL // HIDE AND REACTIVATE TOOL
if ($_GET["id"] == strval(intval($_GET["id"]))) { if ($_GET["id"] == strval(intval($_GET["id"]))) {
@ -79,8 +79,7 @@ switch ($action) {
$tbl_course_description = Database::get_course_table(TABLE_COURSE_DESCRIPTION); $tbl_course_description = Database::get_course_table(TABLE_COURSE_DESCRIPTION);
$course_info = api_get_course_info($_GET['code']); $course_info = api_get_course_info($_GET['code']);
if ( if (api_get_setting('course_catalog_hide_private') === 'true' &&
api_get_setting('course_catalog_hide_private') === 'true' &&
$course_info['visibility'] == COURSE_VISIBILITY_REGISTERED $course_info['visibility'] == COURSE_VISIBILITY_REGISTERED
) { ) {
echo get_lang('PrivateAccess'); echo get_lang('PrivateAccess');
@ -459,7 +458,7 @@ switch ($action) {
$date = '-'; $date = '-';
} }
//Checking LP publicated and expired_on dates // Checking LP publicated and expired_on dates
if (!empty($lp_item['publicated_on'])) { if (!empty($lp_item['publicated_on'])) {
if ($now < api_strtotime($lp_item['publicated_on'], 'UTC')) { if ($now < api_strtotime($lp_item['publicated_on'], 'UTC')) {
continue; continue;
@ -478,7 +477,6 @@ switch ($action) {
$temp[$count]['course'] = strip_tags($item['title']); $temp[$count]['course'] = strip_tags($item['title']);
$temp[$count]['lp'] = $lp_item['lp_name']; $temp[$count]['lp'] = $lp_item['lp_name'];
$temp[$count]['date'] = $lp_item['publicated_on']; $temp[$count]['date'] = $lp_item['publicated_on'];
$count++; $count++;
} }
} }

Loading…
Cancel
Save