Test Setup Failed
Push — master ( b8241e...bfb5d5 )
by Angel Fernando Quiroz
228:00 queued 165:48
created
main/inc/ajax/course_home.ajax.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
         break;
68 68
     case 'show_course_information':
69 69
 
70
-		// Get the name of the database course.
71
-		$tbl_course_description = Database::get_course_table(TABLE_COURSE_DESCRIPTION);
72
-		$course_info = api_get_course_info($_GET['code']);
70
+        // Get the name of the database course.
71
+        $tbl_course_description = Database::get_course_table(TABLE_COURSE_DESCRIPTION);
72
+        $course_info = api_get_course_info($_GET['code']);
73 73
 
74 74
         if (
75 75
             api_get_setting('course_catalog_hide_private') === 'true' &&
@@ -79,24 +79,24 @@  discard block
 block discarded – undo
79 79
             break;
80 80
         }
81 81
 
82
-		$sql = "SELECT * FROM $tbl_course_description
82
+        $sql = "SELECT * FROM $tbl_course_description
83 83
 		        WHERE c_id = ".$course_info['real_id']." AND session_id = 0
84 84
 		        ORDER BY id";
85
-		$result = Database::query($sql);
86
-		if (Database::num_rows($result) > 0 ) {
87
-		    while ($description = Database::fetch_object($result)) {
88
-			    $descriptions[$description->id] = $description;
89
-		    }
85
+        $result = Database::query($sql);
86
+        if (Database::num_rows($result) > 0 ) {
87
+            while ($description = Database::fetch_object($result)) {
88
+                $descriptions[$description->id] = $description;
89
+            }
90 90
             // Function that displays the details of the course description in html.
91
-		    echo CourseManager::get_details_course_description_html(
91
+            echo CourseManager::get_details_course_description_html(
92 92
                 $descriptions,
93 93
                 api_get_system_encoding(),
94 94
                 false
95 95
             );
96
-		} else {
97
-		    echo get_lang('NoDescription');
98
-		}
99
-	    break;
96
+        } else {
97
+            echo get_lang('NoDescription');
98
+        }
99
+        break;
100 100
     case 'session_courses_lp_default':
101 101
         /**
102 102
          * @todo this functions need to belong to a class or a special
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
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']);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                     $my_session_list[] = $item['id_session'];
126 126
             }
127 127
             if (!in_array($session_id, $my_session_list)) {
128
-            	break;
128
+                break;
129 129
             }
130 130
         }
131 131
 
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
                     $date = '-';
316 316
                 }
317 317
 
318
-                 //Checking LP publicated and expired_on dates
318
+                    //Checking LP publicated and expired_on dates
319 319
 
320 320
                 if (!empty($lp_item['publicated_on']) && $lp_item['publicated_on'] != '0000-00-00 00:00:00') {
321 321
                     $week_data = date('Y', api_strtotime($lp_item['publicated_on'], 'UTC')).' - '.get_week_from_day($lp_item['publicated_on']);
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
                     $date = '-';
444 444
                 }
445 445
 
446
-                 //Checking LP publicated and expired_on dates
446
+                    //Checking LP publicated and expired_on dates
447 447
                 if (!empty($lp_item['publicated_on']) && $lp_item['publicated_on'] != '0000-00-00 00:00:00') {
448 448
                     if ($now < api_strtotime($lp_item['publicated_on'], 'UTC')) {
449 449
                         continue;
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
 
498 498
         echo json_encode($response);
499 499
         break;
500
-	default:
501
-		echo '';
500
+    default:
501
+        echo '';
502 502
 }
503 503
 exit;
Please login to merge, or discard this patch.