@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | echo json_encode($response_data); |
64 | 64 | } |
65 | 65 | break; |
66 | - case 'show_course_information' : |
|
67 | - require_once '../global.inc.php'; |
|
66 | + case 'show_course_information' : |
|
67 | + require_once '../global.inc.php'; |
|
68 | 68 | |
69 | - // Get the name of the database course. |
|
70 | - $tbl_course_description = Database::get_course_table(TABLE_COURSE_DESCRIPTION); |
|
71 | - $course_info = api_get_course_info($_GET['code']); |
|
69 | + // Get the name of the database course. |
|
70 | + $tbl_course_description = Database::get_course_table(TABLE_COURSE_DESCRIPTION); |
|
71 | + $course_info = api_get_course_info($_GET['code']); |
|
72 | 72 | |
73 | 73 | if ( |
74 | 74 | api_get_setting('course_catalog_hide_private') === 'true' && |
@@ -78,24 +78,24 @@ discard block |
||
78 | 78 | break; |
79 | 79 | } |
80 | 80 | |
81 | - $sql = "SELECT * FROM $tbl_course_description |
|
81 | + $sql = "SELECT * FROM $tbl_course_description |
|
82 | 82 | WHERE c_id = ".$course_info['real_id']." AND session_id = 0 |
83 | 83 | ORDER BY id"; |
84 | - $result = Database::query($sql); |
|
85 | - if (Database::num_rows($result) > 0 ) { |
|
86 | - while ($description = Database::fetch_object($result)) { |
|
87 | - $descriptions[$description->id] = $description; |
|
88 | - } |
|
84 | + $result = Database::query($sql); |
|
85 | + if (Database::num_rows($result) > 0 ) { |
|
86 | + while ($description = Database::fetch_object($result)) { |
|
87 | + $descriptions[$description->id] = $description; |
|
88 | + } |
|
89 | 89 | // Function that displays the details of the course description in html. |
90 | - echo CourseManager::get_details_course_description_html( |
|
90 | + echo CourseManager::get_details_course_description_html( |
|
91 | 91 | $descriptions, |
92 | 92 | api_get_system_encoding(), |
93 | 93 | false |
94 | 94 | ); |
95 | - } else { |
|
96 | - echo get_lang('NoDescription'); |
|
97 | - } |
|
98 | - break; |
|
95 | + } else { |
|
96 | + echo get_lang('NoDescription'); |
|
97 | + } |
|
98 | + break; |
|
99 | 99 | case 'session_courses_lp_default': |
100 | 100 | /** |
101 | 101 | * @todo this functions need to belong to a class or a special |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $sidx = isset($_REQUEST['sidx']) && !empty($_REQUEST['sidx']) ? $_REQUEST['sidx'] : 'id'; |
111 | 111 | $sord = $_REQUEST['sord']; //asc or desc |
112 | 112 | if (!in_array($sord, array('asc','desc'))) { |
113 | - $sord = 'desc'; |
|
113 | + $sord = 'desc'; |
|
114 | 114 | } |
115 | 115 | $session_id = intval($_REQUEST['session_id']); |
116 | 116 | $course_id = intval($_REQUEST['course_id']); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $my_session_list[] = $item['id_session']; |
125 | 125 | } |
126 | 126 | if (!in_array($session_id, $my_session_list)) { |
127 | - break; |
|
127 | + break; |
|
128 | 128 | } |
129 | 129 | } |
130 | 130 | |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | $date = '-'; |
446 | 446 | } |
447 | 447 | |
448 | - //Checking LP publicated and expired_on dates |
|
448 | + //Checking LP publicated and expired_on dates |
|
449 | 449 | if (!empty($lp_item['publicated_on']) && $lp_item['publicated_on'] != '0000-00-00 00:00:00') { |
450 | 450 | if ($now < api_strtotime($lp_item['publicated_on'], 'UTC')) { |
451 | 451 | continue; |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | |
500 | 500 | echo json_encode($response); |
501 | 501 | break; |
502 | - default: |
|
503 | - echo ''; |
|
502 | + default: |
|
503 | + echo ''; |
|
504 | 504 | } |
505 | 505 | exit; |