Completed
Push — 1.11.x ( 5cb77e...c87450 )
by José
367:19 queued 327:00
created
main/course_info/download.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
 $this_section = SECTION_COURSES;
11 11
 
12 12
 if (isset($_GET['session']) && $_GET['session']) {
13
-	$archive_path = api_get_path(SYS_ARCHIVE_PATH).'temp/';
14
-	$_cid = true;
15
-	$is_courseAdmin = true;
13
+    $archive_path = api_get_path(SYS_ARCHIVE_PATH).'temp/';
14
+    $_cid = true;
15
+    $is_courseAdmin = true;
16 16
 } else {
17
-	$archive_path = api_get_path(SYS_ARCHIVE_PATH);
17
+    $archive_path = api_get_path(SYS_ARCHIVE_PATH);
18 18
 }
19 19
 
20 20
 $archive_file = isset($_GET['archive']) ? $_GET['archive'] : null;
@@ -23,16 +23,16 @@  discard block
 block discarded – undo
23 23
 list($extension) = getextension($archive_file);
24 24
 
25 25
 if (empty($extension) || !file_exists($archive_path.$archive_file)) {
26
-	exit;
26
+    exit;
27 27
 }
28 28
 
29 29
 $extension = strtolower($extension);
30 30
 $content_type = '';
31 31
 
32 32
 if (in_array($extension, array('xml', 'csv')) && (api_is_platform_admin(true) || api_is_drh())) {
33
-	$content_type = 'application/force-download';
33
+    $content_type = 'application/force-download';
34 34
 } elseif ($extension === 'zip' && $_cid && (api_is_platform_admin(true) || $is_courseAdmin)) {
35
-	$content_type = 'application/force-download';
35
+    $content_type = 'application/force-download';
36 36
 }
37 37
 
38 38
 if (empty($content_type)) {
Please login to merge, or discard this patch.
main/course_description/add.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -20,32 +20,32 @@  discard block
 block discarded – undo
20 20
 $i=1;
21 21
 echo '<div class="actions" style="margin-bottom:30px">';
22 22
 echo '<a href="index.php?'.api_get_cidreq().'">'.
23
-	Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('ToolCourseDescription'),'',ICON_SIZE_MEDIUM).
24
-	'</a>';
23
+    Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('ToolCourseDescription'),'',ICON_SIZE_MEDIUM).
24
+    '</a>';
25 25
 ksort($categories);
26 26
 foreach ($categories as $id => $title) {
27
-	if ($i == ADD_BLOCK) {
28
-		echo '<a href="index.php?'.api_get_cidreq().'&action=add">'.
29
-			Display::return_icon($default_description_icon[$id], $title, '',ICON_SIZE_MEDIUM).'</a>';
30
-		break;
31
-	} else {
32
-		echo '<a href="index.php?action=edit&'.api_get_cidreq().'&description_type='.$id.'">'.
33
-			Display::return_icon($default_description_icon[$id], $title,'',ICON_SIZE_MEDIUM).'</a>';
34
-		$i++;
35
-	}
27
+    if ($i == ADD_BLOCK) {
28
+        echo '<a href="index.php?'.api_get_cidreq().'&action=add">'.
29
+            Display::return_icon($default_description_icon[$id], $title, '',ICON_SIZE_MEDIUM).'</a>';
30
+        break;
31
+    } else {
32
+        echo '<a href="index.php?action=edit&'.api_get_cidreq().'&description_type='.$id.'">'.
33
+            Display::return_icon($default_description_icon[$id], $title,'',ICON_SIZE_MEDIUM).'</a>';
34
+        $i++;
35
+    }
36 36
 }
37 37
 echo '</div>';
38 38
 
39 39
 // error messages
40 40
 if (isset($error) && intval($error) == 1) {
41
-	Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'), false);
41
+    Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'), false);
42 42
 }
43 43
 
44 44
 // default header title form
45 45
 $header = '';
46 46
 $description_type = intval($description_type);
47 47
 if ($description_type >= ADD_BLOCK) {
48
-	$header = $default_description_titles[ADD_BLOCK];
48
+    $header = $default_description_titles[ADD_BLOCK];
49 49
 }
50 50
 
51 51
 // display form
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
 
74 74
 // display default questions
75 75
 if (isset ($question[$description_type])) {
76
-	$message = '<strong>'.get_lang('QuestionPlan').'</strong><br />';
77
-	$message .= $question[$description_type];
78
-	Display::display_normal_message($message, false);
76
+    $message = '<strong>'.get_lang('QuestionPlan').'</strong><br />';
77
+    $message .= $question[$description_type];
78
+    Display::display_normal_message($message, false);
79 79
 }
80 80
 $form->display();
Please login to merge, or discard this patch.
main/calendar/ical_export.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 $event = $agenda->get_event($id);
44 44
 
45 45
 if (!empty($event)) {
46
-	define('ICAL_LANG',api_get_language_isocode());
46
+    define('ICAL_LANG',api_get_language_isocode());
47 47
 
48 48
     $ical = new vcalendar();
49 49
     $ical->setConfig('unique_id',api_get_path(WEB_PATH));
@@ -137,6 +137,6 @@  discard block
 block discarded – undo
137 137
             die();
138 138
     }
139 139
 } else {
140
-	header('location:'.Security::remove_XSS($_SERVER['HTTP_REFERER']));
141
-	exit;
140
+    header('location:'.Security::remove_XSS($_SERVER['HTTP_REFERER']));
141
+    exit;
142 142
 }
Please login to merge, or discard this patch.
main/inc/lib/add_courses_to_session_functions.lib.php 1 patch
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -6,47 +6,47 @@  discard block
 block discarded – undo
6 6
  */
7 7
 class AddCourseToSession
8 8
 {
9
-	/**
10
-	 * Searches a course, given a search string and a type of search box
11
-	 * @param string $needle Search string
12
-	 * @param string $type Type of search box ('single' or anything else)
13
-	 * @return xajaxResponse XajaxResponse
14
-	 * @assert ('abc', 'single') !== null
15
-	 * @assert ('abc', 'multiple') !== null
16
-	 */
17
-	public static function search_courses($needle, $type)
18
-	{
19
-		global $tbl_session_rel_course, $id_session;
9
+    /**
10
+     * Searches a course, given a search string and a type of search box
11
+     * @param string $needle Search string
12
+     * @param string $type Type of search box ('single' or anything else)
13
+     * @return xajaxResponse XajaxResponse
14
+     * @assert ('abc', 'single') !== null
15
+     * @assert ('abc', 'multiple') !== null
16
+     */
17
+    public static function search_courses($needle, $type)
18
+    {
19
+        global $tbl_session_rel_course, $id_session;
20 20
         $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
21
-		$course_title = null;
22
-		$xajax_response = new xajaxResponse();
23
-		$return = '';
24
-		if(!empty($needle) && !empty($type)) {
25
-			// xajax send utf8 datas... datas in db can be non-utf8 datas
26
-			$charset = api_get_system_encoding();
27
-			$needle = api_convert_encoding($needle, $charset, 'utf-8');
21
+        $course_title = null;
22
+        $xajax_response = new xajaxResponse();
23
+        $return = '';
24
+        if(!empty($needle) && !empty($type)) {
25
+            // xajax send utf8 datas... datas in db can be non-utf8 datas
26
+            $charset = api_get_system_encoding();
27
+            $needle = api_convert_encoding($needle, $charset, 'utf-8');
28 28
 
29
-			$cond_course_code = '';
30
-			if (!empty($id_session)) {
31
-				$id_session = intval($id_session);
32
-				// check course_code from session_rel_course table
33
-				$sql = 'SELECT c_id FROM '.$tbl_session_rel_course.'
29
+            $cond_course_code = '';
30
+            if (!empty($id_session)) {
31
+                $id_session = intval($id_session);
32
+                // check course_code from session_rel_course table
33
+                $sql = 'SELECT c_id FROM '.$tbl_session_rel_course.'
34 34
 						WHERE session_id = '.$id_session;
35
-				$res = Database::query($sql);
36
-				$course_codes = '';
37
-				if (Database::num_rows($res) > 0) {
38
-					while ($row = Database::fetch_row($res)) {
39
-						$course_codes .= '\''.$row[0].'\',';
40
-					}
41
-					$course_codes = substr($course_codes,0,(strlen($course_codes)-1));
35
+                $res = Database::query($sql);
36
+                $course_codes = '';
37
+                if (Database::num_rows($res) > 0) {
38
+                    while ($row = Database::fetch_row($res)) {
39
+                        $course_codes .= '\''.$row[0].'\',';
40
+                    }
41
+                    $course_codes = substr($course_codes,0,(strlen($course_codes)-1));
42 42
 
43
-					$cond_course_code = ' AND course.id NOT IN('.$course_codes.') ';
44
-				}
45
-			}
43
+                    $cond_course_code = ' AND course.id NOT IN('.$course_codes.') ';
44
+                }
45
+            }
46 46
 
47 47
             if ($type == 'single') {
48
-				// search users where username or firstname or lastname begins likes $needle
49
-				$sql = 'SELECT
48
+                // search users where username or firstname or lastname begins likes $needle
49
+                $sql = 'SELECT
50 50
 							course.code,
51 51
 						 	course.visual_code,
52 52
 						 	course.title,
@@ -58,21 +58,21 @@  discard block
 block discarded – undo
58 58
 						WHERE
59 59
 							course.visual_code LIKE "'.$needle.'%" OR
60 60
 							course.title LIKE "'.$needle.'%"';
61
-			} else {
62
-				$sql = 'SELECT course.code, course.visual_code, course.title
61
+            } else {
62
+                $sql = 'SELECT course.code, course.visual_code, course.title
63 63
 						FROM '.$tbl_course.' course
64 64
 						WHERE
65 65
 							course.visual_code LIKE "'.$needle.'%" '.$cond_course_code.'
66 66
 						ORDER BY course.code ';
67
-			}
67
+            }
68 68
 
69
-			if (api_is_multiple_url_enabled()) {
70
-				$tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
71
-				$access_url_id = api_get_current_access_url_id();
72
-				if ($access_url_id != -1){
69
+            if (api_is_multiple_url_enabled()) {
70
+                $tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
71
+                $access_url_id = api_get_current_access_url_id();
72
+                if ($access_url_id != -1){
73 73
 
74
-					if ($type=='single') {
75
-						$sql = 'SELECT
74
+                    if ($type=='single') {
75
+                        $sql = 'SELECT
76 76
 						            course.code,
77 77
 						            course.visual_code,
78 78
 						            course.title,
@@ -87,41 +87,41 @@  discard block
 block discarded – undo
87 87
 									access_url_id = '.$access_url_id.' AND
88 88
 									(course.visual_code LIKE "'.$needle.'%" OR
89 89
 									course.title LIKE "'.$needle.'%" )';
90
-					} else {
91
-						$sql = 'SELECT course.code, course.visual_code, course.title
90
+                    } else {
91
+                        $sql = 'SELECT course.code, course.visual_code, course.title
92 92
 								FROM '.$tbl_course.' course, '.$tbl_course_rel_access_url.' url_course
93 93
 								WHERE
94 94
 									url_course.c_id = course.id AND
95 95
 									access_url_id = '.$access_url_id.' AND
96 96
 									course.visual_code LIKE "'.$needle.'%" '.$cond_course_code.'
97 97
 								ORDER BY course.code ';
98
-					}
99
-				}
100
-			}
98
+                    }
99
+                }
100
+            }
101 101
 
102
-			$rs = Database::query($sql);
103
-			$course_list = array();
102
+            $rs = Database::query($sql);
103
+            $course_list = array();
104 104
             if ($type == 'single') {
105
-				while ($course = Database :: fetch_array($rs)) {
106
-					$course_list[] = $course['code'];
107
-					$course_title=str_replace("'","\'",$course_title);
108
-					$return .= '<a href="javascript: void(0);" onclick="javascript: add_course_to_session(\''.$course['code'].'\',\''.$course_title.' ('.$course['visual_code'].')'.'\')">'.$course['title'].' ('.$course['visual_code'].')</a><br />';
109
-				}
110
-				$xajax_response -> addAssign('ajax_list_courses_single','innerHTML',api_utf8_encode($return));
111
-			} else {
112
-				$return .= '<select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" style="width:340px;">';
113
-				while($course = Database :: fetch_array($rs)) {
114
-					$course_list[] = $course['code'];
115
-					$course_title=str_replace("'","\'",$course_title);
116
-					$return .= '<option value="'.$course['code'].'" title="'.htmlspecialchars($course['title'].' ('.$course['visual_code'].')',ENT_QUOTES).'">'.$course['title'].' ('.$course['visual_code'].')</option>';
117
-				}
118
-				$return .= '</select>';
105
+                while ($course = Database :: fetch_array($rs)) {
106
+                    $course_list[] = $course['code'];
107
+                    $course_title=str_replace("'","\'",$course_title);
108
+                    $return .= '<a href="javascript: void(0);" onclick="javascript: add_course_to_session(\''.$course['code'].'\',\''.$course_title.' ('.$course['visual_code'].')'.'\')">'.$course['title'].' ('.$course['visual_code'].')</a><br />';
109
+                }
110
+                $xajax_response -> addAssign('ajax_list_courses_single','innerHTML',api_utf8_encode($return));
111
+            } else {
112
+                $return .= '<select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" style="width:340px;">';
113
+                while($course = Database :: fetch_array($rs)) {
114
+                    $course_list[] = $course['code'];
115
+                    $course_title=str_replace("'","\'",$course_title);
116
+                    $return .= '<option value="'.$course['code'].'" title="'.htmlspecialchars($course['title'].' ('.$course['visual_code'].')',ENT_QUOTES).'">'.$course['title'].' ('.$course['visual_code'].')</option>';
117
+                }
118
+                $return .= '</select>';
119 119
 
120
-				$xajax_response -> addAssign('ajax_list_courses_multiple','innerHTML',api_utf8_encode($return));
121
-			}
122
-		}
123
-		$_SESSION['course_list'] = $course_list;
120
+                $xajax_response -> addAssign('ajax_list_courses_multiple','innerHTML',api_utf8_encode($return));
121
+            }
122
+        }
123
+        $_SESSION['course_list'] = $course_list;
124 124
 
125
-		return $xajax_response;
126
-	}
125
+        return $xajax_response;
126
+    }
127 127
 }
Please login to merge, or discard this patch.
main/inc/lib/export.lib.inc.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
     }
116 116
 
117 117
     /**
118
-    * Export tabular data to XML-file
119
-    * @param array  Simple array of data to put in XML
120
-    * @param string Name of file to be given to the user
121
-    * @param string Name of common tag to place each line in
122
-    * @param string Name of the root element. A root element should always be given.
123
-    * @param string Encoding in which the data is provided
124
-    */
118
+     * Export tabular data to XML-file
119
+     * @param array  Simple array of data to put in XML
120
+     * @param string Name of file to be given to the user
121
+     * @param string Name of common tag to place each line in
122
+     * @param string Name of the root element. A root element should always be given.
123
+     * @param string Encoding in which the data is provided
124
+     */
125 125
     public static function arrayToXml(
126 126
         $data,
127 127
         $filename = 'export',
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         foreach ($data as $row) {
201 201
             $string .= "\n".str_repeat("\t",$level).'<'.$row['name'].'>';
202 202
             if (is_array($row['value'])) {
203
-            	$string .= self::_export_complex_table_xml_helper($row['value'],$level+1)."\n";
203
+                $string .= self::_export_complex_table_xml_helper($row['value'],$level+1)."\n";
204 204
                 $string .= str_repeat("\t",$level).'</'.$row['name'].'>';
205 205
             } else {
206 206
                 $string .= $row['value'];
Please login to merge, or discard this patch.
main/inc/lib/add_many_session_to_category_functions.lib.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -25,29 +25,29 @@
 block discarded – undo
25 25
     function search_courses($needle,$type)
26 26
     {
27 27
         $tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION);
28
-		$xajax_response = new xajaxResponse();
29
-		$return = '';
30
-		if(!empty($needle) && !empty($type)) {
31
-			// xajax send utf8 datas... datas in db can be non-utf8 datas
32
-			$charset = api_get_system_encoding();
33
-			$needle = api_convert_encoding($needle, $charset, 'utf-8');
34
-			$needle = Database::escape_string($needle);
28
+        $xajax_response = new xajaxResponse();
29
+        $return = '';
30
+        if(!empty($needle) && !empty($type)) {
31
+            // xajax send utf8 datas... datas in db can be non-utf8 datas
32
+            $charset = api_get_system_encoding();
33
+            $needle = api_convert_encoding($needle, $charset, 'utf-8');
34
+            $needle = Database::escape_string($needle);
35 35
 
36
-			$sql = 'SELECT * FROM '.$tbl_session.' WHERE name LIKE "'.$needle.'%" ORDER BY id';
36
+            $sql = 'SELECT * FROM '.$tbl_session.' WHERE name LIKE "'.$needle.'%" ORDER BY id';
37 37
 
38
-			$rs = Database::query($sql);
39
-			$course_list = array();
38
+            $rs = Database::query($sql);
39
+            $course_list = array();
40 40
 
41
-			$return .= '<select id="origin" name="NoSessionCategoryList[]" multiple="multiple" size="20" style="width:340px;">';
42
-			while($course = Database :: fetch_array($rs)) {
43
-				$course_list[] = $course['id'];
44
-				$return .= '<option value="'.$course['id'].'" title="'.htmlspecialchars($course['name'],ENT_QUOTES).'">'.$course['name'].'</option>';
45
-			}
46
-			$return .= '</select>';
47
-			$xajax_response -> addAssign('ajax_list_courses_multiple','innerHTML',api_utf8_encode($return));
48
-		}
49
-		$_SESSION['course_list'] = $course_list;
41
+            $return .= '<select id="origin" name="NoSessionCategoryList[]" multiple="multiple" size="20" style="width:340px;">';
42
+            while($course = Database :: fetch_array($rs)) {
43
+                $course_list[] = $course['id'];
44
+                $return .= '<option value="'.$course['id'].'" title="'.htmlspecialchars($course['name'],ENT_QUOTES).'">'.$course['name'].'</option>';
45
+            }
46
+            $return .= '</select>';
47
+            $xajax_response -> addAssign('ajax_list_courses_multiple','innerHTML',api_utf8_encode($return));
48
+        }
49
+        $_SESSION['course_list'] = $course_list;
50 50
         
51
-		return $xajax_response;
52
-	}
51
+        return $xajax_response;
52
+    }
53 53
 }
Please login to merge, or discard this patch.
main/inc/lib/grade_model.lib.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -51,15 +51,15 @@  discard block
 block discarded – undo
51 51
     /**
52 52
      * Displays the title + grid
53 53
      */
54
-	public function display()
54
+    public function display()
55 55
     {
56
-		// action links
57
-		echo '<div class="actions" style="margin-bottom:20px">';
56
+        // action links
57
+        echo '<div class="actions" style="margin-bottom:20px">';
58 58
         echo '<a href="grade_models.php">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
59
-		echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('add.png',get_lang('Add'),'','32').'</a>';
60
-		echo '</div>';
59
+        echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('add.png',get_lang('Add'),'','32').'</a>';
60
+        echo '</div>';
61 61
         echo Display::grid_html('grade_model');
62
-	}
62
+    }
63 63
 
64 64
     /**
65 65
      * Returns a Form validator Obj
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         }
117 117
 
118 118
         $form->addElement('hidden', 'maxvalue', '100');
119
-		$form->addElement('hidden', 'minvalue', '0');
119
+        $form->addElement('hidden', 'minvalue', '0');
120 120
         $renderer = & $form->defaultRenderer();
121 121
 
122 122
         $component_array = array();
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         // Setting the rules
194 194
         $form->addRule('name', get_lang('ThisFieldIsRequired'), 'required');
195 195
 
196
-		return $form;
196
+        return $form;
197 197
     }
198 198
 
199 199
     /**
@@ -216,8 +216,8 @@  discard block
 block discarded – undo
216 216
      */
217 217
     public function save($params, $show_query = false)
218 218
     {
219
-	    $id = parent::save($params, $show_query);
220
-	    if (!empty($id)) {
219
+        $id = parent::save($params, $show_query);
220
+        if (!empty($id)) {
221 221
             foreach ($params['components'] as $component) {
222 222
                 if (!empty($component['title']) && !empty($component['percentage']) && !empty($component['acronym'])) {
223 223
                     $obj = new GradeModelComponents();
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         }
229 229
 
230 230
         //event_system(LOG_CAREER_CREATE, LOG_CAREER_ID, $id, api_get_utc_datetime(), api_get_user_id());
231
-   		return $id;
231
+            return $id;
232 232
     }
233 233
 
234 234
     /**
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
      */
258 258
     public function delete($id)
259 259
     {
260
-	    parent::delete($id);
260
+        parent::delete($id);
261 261
     }
262 262
 
263 263
     public function fill_grade_model_select_in_form(&$form, $name = 'gradebook_model_id', $default_value = null)
@@ -305,11 +305,11 @@  discard block
 block discarded – undo
305 305
     /**
306 306
      * GradeModelComponents constructor.
307 307
      */
308
-	public function __construct()
308
+    public function __construct()
309 309
     {
310 310
         parent::__construct();
311 311
         $this->table = Database::get_main_table(TABLE_GRADE_MODEL_COMPONENTS);
312
-	}
312
+    }
313 313
 
314 314
     /**
315 315
      * @param array $params
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
      */
319 319
     public function save($params, $show_query = false)
320 320
     {
321
-	    $id = parent::save($params, $show_query);
321
+        $id = parent::save($params, $show_query);
322 322
         
323 323
         return $id;
324 324
     }
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/Editor.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
137 137
                     array('\r', '\n', '\x3c', '\x3e', '\x26'),
138 138
                     addslashes($var)
139 139
                 ).'"';
140
-             case 'array':
140
+                case 'array':
141 141
                 // Arrays in JSON can't be associative. If the array is empty or if it
142 142
                 // has sequential whole number keys starting with 0, it's not associative
143 143
                 // so we can go ahead and convert it as an array.
Please login to merge, or discard this patch.
main/inc/lib/banner.lib.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -47,20 +47,20 @@  discard block
 block discarded – undo
47 47
     $navigation['myprofile']['url'] = api_get_path(WEB_CODE_PATH).'auth/profile.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&amp;courseCode='.$_course['official_code'] : '' );
48 48
     $navigation['myprofile']['title'] = get_lang('ModifyProfile');
49 49
     $navigation['myprofile']['key'] = 'profile';
50
-	// Link to my agenda
50
+    // Link to my agenda
51 51
     $navigation['myagenda']['url'] = api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=personal';
52 52
     $navigation['myagenda']['title'] = get_lang('MyAgenda');
53 53
     $navigation['myagenda']['key'] = 'agenda';
54 54
 
55
-	// Gradebook
56
-	if (api_get_setting('gradebook_enable') == 'true') {
55
+    // Gradebook
56
+    if (api_get_setting('gradebook_enable') == 'true') {
57 57
         $navigation['mygradebook']['url'] = api_get_path(WEB_CODE_PATH).'gradebook/gradebook.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&amp;courseCode='.$_course['official_code'] : '' );
58 58
         $navigation['mygradebook']['title'] = get_lang('MyGradebook');
59 59
         $navigation['mygradebook']['key'] = 'gradebook';
60
-	}
60
+    }
61 61
 
62
-	// Reporting
63
-	if (api_is_allowed_to_create_course() || api_is_drh() || api_is_session_admin()) {
62
+    // Reporting
63
+    if (api_is_allowed_to_create_course() || api_is_drh() || api_is_session_admin()) {
64 64
         // Link to my space
65 65
         $navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH).'mySpace/'.(api_is_drh()?'session.php':'');
66 66
         $navigation['session_my_space']['title'] = get_lang('MySpace');
@@ -84,21 +84,21 @@  discard block
 block discarded – undo
84 84
         $navigation['session_my_progress']['key'] = 'my-progress';
85 85
     }
86 86
 
87
-	// Social
88
-	if (api_get_setting('allow_social_tool')=='true') {
87
+    // Social
88
+    if (api_get_setting('allow_social_tool')=='true') {
89 89
         $navigation['social']['url'] = api_get_path(WEB_CODE_PATH).'social/home.php';
90 90
         $navigation['social']['title'] = get_lang('SocialNetwork');
91 91
         $navigation['social']['key'] = 'social-network';
92
-	}
92
+    }
93 93
 
94
-	// Dashboard
95
-	if (api_is_platform_admin() || api_is_drh() || api_is_session_admin()) {
94
+    // Dashboard
95
+    if (api_is_platform_admin() || api_is_drh() || api_is_session_admin()) {
96 96
         $navigation['dashboard']['url'] = api_get_path(WEB_CODE_PATH).'dashboard/index.php';
97 97
         $navigation['dashboard']['title'] = get_lang('Dashboard');
98 98
         $navigation['dashboard']['key'] = 'dashboard';
99
-	}
99
+    }
100 100
 
101
-	// Reports
101
+    // Reports
102 102
     /*
103 103
 	if (api_is_platform_admin() || api_is_drh() || api_is_session_admin()) {
104 104
         $navigation['reports']['url'] = api_get_path(WEB_CODE_PATH).'reports/index.php';
@@ -121,14 +121,14 @@  discard block
 block discarded – undo
121 121
     }
122 122
     // End Custom Tabs
123 123
 
124
-	// Platform administration
125
-	if (api_is_platform_admin(true)) {
124
+    // Platform administration
125
+    if (api_is_platform_admin(true)) {
126 126
         $navigation['platform_admin']['url'] = api_get_path(WEB_CODE_PATH).'admin/';
127 127
         $navigation['platform_admin']['title'] = get_lang('PlatformAdmin');
128 128
         $navigation['platform_admin']['key'] = 'admin';
129
-	}
129
+    }
130 130
 
131
-	return $navigation;
131
+    return $navigation;
132 132
 }
133 133
 
134 134
 /**
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
         if ($number &&
255 255
             (api_get_setting('showonline', 'world') == 'true' && !$user_id) ||
256 256
                 (api_get_setting('showonline', 'users') == 'true' && $user_id)
257
-           )
257
+            )
258 258
         {
259 259
                 $html .= '<li><a href="'.api_get_path(WEB_PATH).'whoisonline.php" target="_self" title="'.get_lang('UsersOnline').'" >'.
260 260
                             Display::return_icon('user.png', get_lang('UsersOnline'), array(), ICON_SIZE_TINY).' '.$number.'</a></li>';
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
             (is_array($_course) &&
266 266
                api_get_setting('showonline', 'course') == 'true' && isset($_course['sysCode'])
267 267
             )
268
-           )
268
+            )
269 269
         {
270 270
                 $html .= '<li><a href="'.api_get_path(WEB_PATH).'whoisonline.php?cidReq='.$_course['sysCode'].'" target="_self">'.
271 271
                         Display::return_icon('course.png', get_lang('UsersOnline').' '.get_lang('InThisCourse'), array(), ICON_SIZE_TINY).' '.$number_online_in_course.' </a></li>';
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
             }
377 377
         }
378 378
 
379
-		// Reports
379
+        // Reports
380 380
         if (!empty($possible_tabs['reports'])) {
381 381
             if (api_get_setting('show_tabs', 'reports') == 'true') {
382 382
                 if ((api_is_platform_admin() || api_is_drh() || api_is_session_admin()) && Rights::hasRight('show_tabs:reports')) {
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
         $navigation_item_my_courses['title'] = get_lang('MyCourses');
624 624
         $navigation_item_my_courses['url'] = api_get_path(WEB_PATH).'user_portal.php';
625 625
         $navigation[] = $navigation_item_my_courses;
626
-        */
626
+         */
627 627
         $navigation[] = $navigation_item;
628 628
     }
629 629
 
Please login to merge, or discard this patch.