Passed
Push — 1.10.x ( f1db27...9c952d )
by Angel Fernando Quiroz
83:55 queued 35:13
created
main/inc/ajax/course_home.ajax.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
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' &&
@@ -77,27 +77,27 @@  discard block
 block discarded – undo
77 77
             echo get_lang('PrivateAccess');
78 78
             break;
79 79
         }
80
-		//echo Display::tag('h2', $course_info['name']);
81
-		//echo '<br />';
80
+        //echo Display::tag('h2', $course_info['name']);
81
+        //echo '<br />';
82 82
 
83
-		$sql = "SELECT * FROM $tbl_course_description
83
+        $sql = "SELECT * FROM $tbl_course_description
84 84
 		        WHERE c_id = ".$course_info['real_id']." AND session_id = 0
85 85
 		        ORDER BY id";
86
-		$result = Database::query($sql);
87
-		if (Database::num_rows($result) > 0 ) {
88
-		    while ($description = Database::fetch_object($result)) {
89
-			    $descriptions[$description->id] = $description;
90
-		    }
86
+        $result = Database::query($sql);
87
+        if (Database::num_rows($result) > 0 ) {
88
+            while ($description = Database::fetch_object($result)) {
89
+                $descriptions[$description->id] = $description;
90
+            }
91 91
             // Function that displays the details of the course description in html.
92
-		    echo CourseManager::get_details_course_description_html(
92
+            echo CourseManager::get_details_course_description_html(
93 93
                 $descriptions,
94 94
                 api_get_system_encoding(),
95 95
                 false
96 96
             );
97
-		} else {
98
-		    echo get_lang('NoDescription');
99
-		}
100
-	    break;
97
+        } else {
98
+            echo get_lang('NoDescription');
99
+        }
100
+        break;
101 101
     case 'session_courses_lp_default':
102 102
         /**
103 103
          * @todo this functions need to belong to a class or a special
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $sidx  = isset($_REQUEST['sidx']) && !empty($_REQUEST['sidx']) ? $_REQUEST['sidx'] : 'id';
113 113
         $sord  = $_REQUEST['sord'];    //asc or desc
114 114
         if (!in_array($sord, array('asc','desc'))) {
115
-        	$sord = 'desc';
115
+            $sord = 'desc';
116 116
         }
117 117
         $session_id  = intval($_REQUEST['session_id']);
118 118
         $course_id   = intval($_REQUEST['course_id']);
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                     $my_session_list[] = $item['id_session'];
128 128
             }
129 129
             if (!in_array($session_id, $my_session_list)) {
130
-            	break;
130
+                break;
131 131
             }
132 132
         }
133 133
 
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
                     $date = '-';
313 313
                 }
314 314
 
315
-                 //Checking LP publicated and expired_on dates
315
+                    //Checking LP publicated and expired_on dates
316 316
 
317 317
                 if (!empty($lp_item['publicated_on']) && $lp_item['publicated_on'] != '0000-00-00 00:00:00') {
318 318
                     $week_data = date('Y', api_strtotime($lp_item['publicated_on'], 'UTC')).' - '.get_week_from_day($lp_item['publicated_on']);
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
                     $date = '-';
441 441
                 }
442 442
 
443
-                 //Checking LP publicated and expired_on dates
443
+                    //Checking LP publicated and expired_on dates
444 444
                 if (!empty($lp_item['publicated_on']) && $lp_item['publicated_on'] != '0000-00-00 00:00:00') {
445 445
                     if ($now < api_strtotime($lp_item['publicated_on'], 'UTC')) {
446 446
                         continue;
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 
495 495
         echo json_encode($response);
496 496
         break;
497
-	default:
498
-		echo '';
497
+    default:
498
+        echo '';
499 499
 }
500 500
 exit;
Please login to merge, or discard this patch.