Completed
Push — 1.10.x ( 3c9fe3...995e8b )
by Yannick
116:12 queued 73:22
created
main/course_home/vertical_activity.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
         $content .= '<div class="courseadminview-activity-3col"><span class="viewcaption">'.get_lang('SessionData').'</span>
92 92
             <table width="100%">';
93 93
                 $content .= CourseHome::show_session_data($session_id);
94
-             $content .=  '</table></div>';
94
+                $content .=  '</table></div>';
95 95
     }
96 96
 
97 97
     $content .=  '<div class="Authoringview">';
Please login to merge, or discard this patch.
main/course_home/course_home.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             if (Database::num_rows($result) ==  0) {
229 229
                 $condition = '';
230 230
             } else {
231
-            	//great, there is an specific auto launch for this session we leave the $condition
231
+                //great, there is an specific auto launch for this session we leave the $condition
232 232
             }
233 233
         }
234 234
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             $lp_data = Database::fetch_array($result,'ASSOC');
241 241
             if (!empty($lp_data['id'])) {
242 242
                 if (api_is_platform_admin() || api_is_allowed_to_edit()) {
243
-                	$show_autolaunch_lp_warning = true;
243
+                    $show_autolaunch_lp_warning = true;
244 244
                 } else {
245 245
                     $session_key = 'lp_autolaunch_'.$session_id.'_'.api_get_course_int_id().'_'.api_get_user_id();
246 246
                     if (!isset($_SESSION[$session_key])) {
@@ -265,10 +265,10 @@  discard block
 block discarded – undo
265 265
 
266 266
 /*	Introduction section (editable by course admins) */
267 267
 $content = Display::return_introduction_section(TOOL_COURSE_HOMEPAGE, array(
268
-		'CreateDocumentWebDir' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document/',
269
-		'CreateDocumentDir'    => 'document/',
270
-		'BaseHref'             => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/'
271
-	)
268
+        'CreateDocumentWebDir' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document/',
269
+        'CreateDocumentDir'    => 'document/',
270
+        'BaseHref'             => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/'
271
+    )
272 272
 );
273 273
 
274 274
 /*	SWITCH TO A DIFFERENT HOMEPAGE VIEW
@@ -285,13 +285,13 @@  discard block
 block discarded – undo
285 285
 if (api_get_setting('homepage_view') == 'activity' ||
286 286
     api_get_setting('homepage_view') == 'activity_big'
287 287
 ) {
288
-	require 'activity.php';
288
+    require 'activity.php';
289 289
 } elseif (api_get_setting('homepage_view') == '2column') {
290
-	require '2column.php';
290
+    require '2column.php';
291 291
 } elseif (api_get_setting('homepage_view') == '3column') {
292
-	require '3column.php';
292
+    require '3column.php';
293 293
 } elseif (api_get_setting('homepage_view') == 'vertical_activity') {
294
-	require 'vertical_activity.php';
294
+    require 'vertical_activity.php';
295 295
 }
296 296
 
297 297
 
Please login to merge, or discard this patch.
main/glossary/index.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 Event::event_access_tool(TOOL_GLOSSARY);
35 35
 
36 36
 function sorter($item1, $item2) {
37
-	if ($item1[2] == $item2[2])
38
-		return 0;
39
-	return $item1[2] < $item2[2] ? -1 : 1;
37
+    if ($item1[2] == $item2[2])
38
+        return 0;
39
+    return $item1[2] < $item2[2] ? -1 : 1;
40 40
 }
41 41
 
42 42
 // Displaying the header
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $list[] = array ($line[0], $line[1]);
81 81
     }
82 82
     $filename = 'glossary_course_'.api_get_course_id();
83
-	Export::arrayToCsv($list, $filename);
83
+    Export::arrayToCsv($list, $filename);
84 84
 }
85 85
 if (isset($_GET['action']) && $_GET['action'] == 'export_to_pdf') {
86 86
     GlossaryManager::export_to_pdf();
Please login to merge, or discard this patch.
main/inc/global_error_message.inc.php 1 patch
Indentation   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -56,40 +56,40 @@  discard block
 block discarded – undo
56 56
         $theme = 'chamilo';
57 57
     }
58 58
 
59
-	$css_path = 'app/Resources/public/css/';
60
-	$css_web_assets = 'web/assets/';
61
-	$css_web_path = 'web/css/';
59
+    $css_path = 'app/Resources/public/css/';
60
+    $css_web_assets = 'web/assets/';
61
+    $css_web_path = 'web/css/';
62 62
     $themePath = $css_path.'themes/'.$theme.'/default.css';
63 63
     $css_web_fontawesome = $css_web_assets.'fontawesome/css/font-awesome.css';
64
-	$bootstrap_file = $css_web_assets.'bootstrap/dist/css/bootstrap.min.css';
65
-	$css_base_file = $css_web_path.'base.css';
64
+    $bootstrap_file = $css_web_assets.'bootstrap/dist/css/bootstrap.min.css';
65
+    $css_base_file = $css_web_path.'base.css';
66 66
 
67 67
     $css_list = array($bootstrap_file, $css_base_file, $themePath);
68 68
 
69 69
     $web_img = 'main/img';
70
-	$root_sys = str_replace('\\', '/', realpath(dirname(__FILE__).'/../../')).'/';
71
-	$root_rel = htmlentities($_SERVER['PHP_SELF']);
72
-	if (!empty($root_rel)) {
73
-		$pos = strrpos($root_rel, '/');
74
-		$root_rel = substr($root_rel, 0, $pos - strlen($root_rel) + 1);
75
-		if (strpos($root_rel, '/main/') !== false) {
76
-			$pos = 0;
77
-			while (($test_pos = strpos(substr($root_rel, $pos, strlen($root_rel)), '/main/')) !== false) {
78
-				$pos = $test_pos + 1;
79
-			}
80
-			$root_rel = substr($root_rel, 0, $pos);
81
-		} elseif (strpos($root_rel, '/courses/') !== false) {
82
-			$pos = 0;
83
-			while (($test_pos = strpos(substr($root_rel, $pos, strlen($root_rel)), '/courses/')) !== false) {
84
-				$pos = $test_pos + 1;
85
-			}
86
-			$root_rel = substr($root_rel, 0, $pos);
87
-		}
88
-	}
89
-
90
-	$installation_guide_url = $root_rel.'documentation/installation_guide.html';
91
-
92
-	$css_def = '';
70
+    $root_sys = str_replace('\\', '/', realpath(dirname(__FILE__).'/../../')).'/';
71
+    $root_rel = htmlentities($_SERVER['PHP_SELF']);
72
+    if (!empty($root_rel)) {
73
+        $pos = strrpos($root_rel, '/');
74
+        $root_rel = substr($root_rel, 0, $pos - strlen($root_rel) + 1);
75
+        if (strpos($root_rel, '/main/') !== false) {
76
+            $pos = 0;
77
+            while (($test_pos = strpos(substr($root_rel, $pos, strlen($root_rel)), '/main/')) !== false) {
78
+                $pos = $test_pos + 1;
79
+            }
80
+            $root_rel = substr($root_rel, 0, $pos);
81
+        } elseif (strpos($root_rel, '/courses/') !== false) {
82
+            $pos = 0;
83
+            while (($test_pos = strpos(substr($root_rel, $pos, strlen($root_rel)), '/courses/')) !== false) {
84
+                $pos = $test_pos + 1;
85
+            }
86
+            $root_rel = substr($root_rel, 0, $pos);
87
+        }
88
+    }
89
+
90
+    $installation_guide_url = $root_rel.'documentation/installation_guide.html';
91
+
92
+    $css_def = '';
93 93
     foreach ($css_list as $css_item) {
94 94
         $css_base_chamilo_file = $root_sys.$css_item;
95 95
         if (file_exists($css_base_chamilo_file)) {
@@ -97,33 +97,33 @@  discard block
 block discarded – undo
97 97
         }
98 98
     }
99 99
 
100
-	$global_error_message = array();
101
-
102
-	switch ($global_error_code) {
103
-		case 1:
104
-			$global_error_message['section'] = $SectionSystemRequirementsProblem;
105
-			$global_error_message['title'] = $IncorrectPhpVersionTitle;
106
-			$php_version = function_exists('phpversion') ? phpversion() : (defined('PHP_VERSION') ? PHP_VERSION : '');
107
-			$php_version = empty($php_version) ? '' : '(PHP '.$php_version.')';
108
-			$IncorrectPhpVersionDescription = str_replace('%s1', $php_version, $IncorrectPhpVersionDescription);
109
-			$IncorrectPhpVersionDescription = str_replace('%s2', REQUIRED_PHP_VERSION, $IncorrectPhpVersionDescription);
110
-			$pos = strpos($IncorrectPhpVersionDescription, '%s3');
111
-			if ($pos !== false) {
112
-				$length = strlen($IncorrectPhpVersionDescription);
113
-				$read_installation_guide = substr($IncorrectPhpVersionDescription, $pos + 3, $length);
114
-				$IncorrectPhpVersionDescription = substr($IncorrectPhpVersionDescription, 0, $pos);
115
-				$IncorrectPhpVersionDescription .= '<br /><a class="btn btn-default" href="'.$installation_guide_url.'" target="_blank">'.$read_installation_guide.'</a>';
116
-			}
117
-			$global_error_message['description'] = $IncorrectPhpVersionDescription;
118
-			break;
119
-		case 2:
120
-			$global_error_message['section'] = $SectionInstallation;
121
-			$global_error_message['title'] = $InstallationTitle;
122
-			if (($pos = strpos($InstallationDescription, '%s')) === false) {
123
-				$InstallationDescription = 'Click to INSTALL Chamilo %s or read the installation guide';
124
-			}
125
-			$read_installation_guide = substr($InstallationDescription, $pos + 2);
126
-			$InstallationDescription = '<form action="'.$root_rel.'main/install/index.php" method="get">
100
+    $global_error_message = array();
101
+
102
+    switch ($global_error_code) {
103
+        case 1:
104
+            $global_error_message['section'] = $SectionSystemRequirementsProblem;
105
+            $global_error_message['title'] = $IncorrectPhpVersionTitle;
106
+            $php_version = function_exists('phpversion') ? phpversion() : (defined('PHP_VERSION') ? PHP_VERSION : '');
107
+            $php_version = empty($php_version) ? '' : '(PHP '.$php_version.')';
108
+            $IncorrectPhpVersionDescription = str_replace('%s1', $php_version, $IncorrectPhpVersionDescription);
109
+            $IncorrectPhpVersionDescription = str_replace('%s2', REQUIRED_PHP_VERSION, $IncorrectPhpVersionDescription);
110
+            $pos = strpos($IncorrectPhpVersionDescription, '%s3');
111
+            if ($pos !== false) {
112
+                $length = strlen($IncorrectPhpVersionDescription);
113
+                $read_installation_guide = substr($IncorrectPhpVersionDescription, $pos + 3, $length);
114
+                $IncorrectPhpVersionDescription = substr($IncorrectPhpVersionDescription, 0, $pos);
115
+                $IncorrectPhpVersionDescription .= '<br /><a class="btn btn-default" href="'.$installation_guide_url.'" target="_blank">'.$read_installation_guide.'</a>';
116
+            }
117
+            $global_error_message['description'] = $IncorrectPhpVersionDescription;
118
+            break;
119
+        case 2:
120
+            $global_error_message['section'] = $SectionInstallation;
121
+            $global_error_message['title'] = $InstallationTitle;
122
+            if (($pos = strpos($InstallationDescription, '%s')) === false) {
123
+                $InstallationDescription = 'Click to INSTALL Chamilo %s or read the installation guide';
124
+            }
125
+            $read_installation_guide = substr($InstallationDescription, $pos + 2);
126
+            $InstallationDescription = '<form action="'.$root_rel.'main/install/index.php" method="get">
127 127
 			<div class="row"><div class="col-md-12">
128 128
 
129 129
                     <div class="office">
@@ -135,38 +135,38 @@  discard block
 block discarded – undo
135 135
                           </p>
136 136
                     </div>
137 137
             </form>';
138
-			$global_error_message['description'] = $InstallationDescription;
139
-			break;
140
-		case 3:
141
-		case 4:
142
-		case 5:
143
-			$global_error_message['section'] = $SectionDatabaseUnavailable;
144
-			$global_error_message['title'] = $DatabaseUnavailableTitle;
145
-			$global_error_message['description'] = $DatabaseUnavailableDescription;
146
-			break;
147
-		case 6:
148
-			$global_error_message['section'] = $SectionProtection;
149
-			$global_error_message['title'] = $AlreadyInstalledTitle;
150
-			$global_error_message['description'] = $AlreadyInstalledDescription;
151
-			break;
152
-		default:
153
-			$global_error_message['section'] = $SectionTechnicalIssues;
154
-			$global_error_message['title'] = $TechnicalIssuesTitle;
155
-			$global_error_message['description'] = $TechnicalIssuesDescription;
156
-			break;
157
-	}
158
-
159
-	$show_error_codes = defined('SHOW_ERROR_CODES') && SHOW_ERROR_CODES && $global_error_code != 2;
160
-	$global_error_message['code'] = $show_error_codes ? $ErrorCode.': '.$global_error_code.'<br /><br />' : '';
161
-	$global_error_message['details'] = empty($global_error_message['details']) ? '' : ($show_error_codes ? ': '.$global_error_message['details'] : $global_error_message['details']);
162
-	$global_error_message['organisation'] = $Organisation;
163
-	$global_error_message['powered_by'] = $PoweredBy;
164
-	$global_error_message['encoding'] = 'UTF-8';
165
-	$global_error_message['chamilo_logo'] = "data:image/png;base64,".base64_encode(file_get_contents($root_sys.'web/css/themes/'.$theme.'/images/header-logo.png'));
138
+            $global_error_message['description'] = $InstallationDescription;
139
+            break;
140
+        case 3:
141
+        case 4:
142
+        case 5:
143
+            $global_error_message['section'] = $SectionDatabaseUnavailable;
144
+            $global_error_message['title'] = $DatabaseUnavailableTitle;
145
+            $global_error_message['description'] = $DatabaseUnavailableDescription;
146
+            break;
147
+        case 6:
148
+            $global_error_message['section'] = $SectionProtection;
149
+            $global_error_message['title'] = $AlreadyInstalledTitle;
150
+            $global_error_message['description'] = $AlreadyInstalledDescription;
151
+            break;
152
+        default:
153
+            $global_error_message['section'] = $SectionTechnicalIssues;
154
+            $global_error_message['title'] = $TechnicalIssuesTitle;
155
+            $global_error_message['description'] = $TechnicalIssuesDescription;
156
+            break;
157
+    }
158
+
159
+    $show_error_codes = defined('SHOW_ERROR_CODES') && SHOW_ERROR_CODES && $global_error_code != 2;
160
+    $global_error_message['code'] = $show_error_codes ? $ErrorCode.': '.$global_error_code.'<br /><br />' : '';
161
+    $global_error_message['details'] = empty($global_error_message['details']) ? '' : ($show_error_codes ? ': '.$global_error_message['details'] : $global_error_message['details']);
162
+    $global_error_message['organisation'] = $Organisation;
163
+    $global_error_message['powered_by'] = $PoweredBy;
164
+    $global_error_message['encoding'] = 'UTF-8';
165
+    $global_error_message['chamilo_logo'] = "data:image/png;base64,".base64_encode(file_get_contents($root_sys.'web/css/themes/'.$theme.'/images/header-logo.png'));
166 166
 
167 167
     $installChamiloImage = base64_encode(file_get_contents("$root_sys/main/img/install-chamilo.gif"));
168 168
 
169
-	$global_error_message_page =
169
+    $global_error_message_page =
170 170
 <<<EOM
171 171
 <!DOCTYPE html>
172 172
 <html>
@@ -236,9 +236,9 @@  discard block
 block discarded – undo
236 236
 		</body>
237 237
 </html>
238 238
 EOM;
239
-	foreach ($global_error_message as $key => $value) {
240
-		$global_error_message_page = str_replace('{'.strtoupper($key).'}', $value, $global_error_message_page);
241
-	}
242
-	header('Content-Type: text/html; charset='.$global_error_message['encoding']);
243
-	die($global_error_message_page);
239
+    foreach ($global_error_message as $key => $value) {
240
+        $global_error_message_page = str_replace('{'.strtoupper($key).'}', $value, $global_error_message_page);
241
+    }
242
+    header('Content-Type: text/html; charset='.$global_error_message['encoding']);
243
+    die($global_error_message_page);
244 244
 }
Please login to merge, or discard this patch.
main/inc/ajax/exercise.ajax.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -488,7 +488,7 @@
 block discarded – undo
488 488
                     $remind_list
489 489
                 );
490 490
 
491
-                 // Destruction of the Question object
491
+                    // Destruction of the Question object
492 492
                 unset($objQuestionTmp);
493 493
                 if ($debug) {
494 494
                     error_log(" -- end question -- ");
Please login to merge, or discard this patch.
main/inc/ajax/course.ajax.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -258,13 +258,13 @@
 block discarded – undo
258 258
                 ), 'first');
259 259
 
260 260
                 $coachName = api_get_person_name($userResult['firstname'], $userResult['lastname']);
261
-           }
261
+            }
262 262
 
263
-           $courses[] = array(
264
-               'id' => $courseId,
265
-               'name' => $course['title'],
266
-               'coachName' => $coachName,
267
-           );
263
+            $courses[] = array(
264
+                'id' => $courseId,
265
+                'name' => $course['title'],
266
+                'coachName' => $coachName,
267
+            );
268 268
         }
269 269
 
270 270
         echo json_encode($courses);
Please login to merge, or discard this patch.
main/inc/ajax/thematic.ajax.php 1 patch
Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 $thematic = new Thematic();
12 12
 
13 13
 switch ($action) {
14
-	case 'save_thematic_plan':
15
-		/*$title_list         = $_REQUEST['title'];
14
+    case 'save_thematic_plan':
15
+        /*$title_list         = $_REQUEST['title'];
16 16
 		$description_list   = $_REQUEST['desc'];
17 17
 		//$description_list   = $_REQUEST['description'];
18 18
 		$description_type   = $_REQUEST['description_type'];
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
 		$thematic_plan_data = $thematic->get_thematic_plan_data();
26 26
 		$return = $thematic->get_thematic_plan_div($thematic_plan_data);
27 27
 		echo $return[$_REQUEST['thematic_id']];*/
28
-		break;
29
-	case 'save_thematic_advance':
30
-		if (!api_is_allowed_to_edit(null, true)) {
31
-			echo '';
32
-			exit;
33
-		}
34
-		/*
28
+        break;
29
+    case 'save_thematic_advance':
30
+        if (!api_is_allowed_to_edit(null, true)) {
31
+            echo '';
32
+            exit;
33
+        }
34
+        /*
35 35
         if (($_REQUEST['start_date_type'] == 1 && empty($_REQUEST['start_date_by_attendance'])) || (!empty($_REQUEST['duration_in_hours']) && !is_numeric($_REQUEST['duration_in_hours'])) ) {
36 36
             if ($_REQUEST['start_date_type'] == 1 && empty($_REQUEST['start_date_by_attendance'])) {
37 37
                 $start_date_error = true;
@@ -79,80 +79,80 @@  discard block
 block discarded – undo
79 79
         $thematic_advance_data = $thematic->get_thematic_advance_list(null, null, true);
80 80
         $return = $thematic->get_thematic_advance_div($thematic_advance_data);
81 81
         echo $return[$_REQUEST['thematic_id']][$_REQUEST['thematic_advance_id']];*/
82
-		break;
83
-	case 'get_datetime_by_attendance':
84
-		$attendance_id       = intval($_REQUEST['attendance_id']);
85
-		$thematic_advance_id = intval($_REQUEST['thematic_advance_id']);
82
+        break;
83
+    case 'get_datetime_by_attendance':
84
+        $attendance_id       = intval($_REQUEST['attendance_id']);
85
+        $thematic_advance_id = intval($_REQUEST['thematic_advance_id']);
86 86
 
87
-		$label = '';
88
-		$input_select = '';
89
-		if (!empty($attendance_id)) {
90
-			$attendance = new Attendance();
91
-			$thematic   = new Thematic();
92
-			$thematic_list = $thematic->get_thematic_list();
87
+        $label = '';
88
+        $input_select = '';
89
+        if (!empty($attendance_id)) {
90
+            $attendance = new Attendance();
91
+            $thematic   = new Thematic();
92
+            $thematic_list = $thematic->get_thematic_list();
93 93
 
94
-			$my_list = $thematic_list_temp = array();
95
-			foreach ($thematic_list as $item) {
96
-				$my_list = $thematic->get_thematic_advance_by_thematic_id($item['id']);
97
-				$thematic_list_temp = array_merge($my_list, $thematic_list_temp);
98
-			}
99
-			$new_thematic_list = array();
94
+            $my_list = $thematic_list_temp = array();
95
+            foreach ($thematic_list as $item) {
96
+                $my_list = $thematic->get_thematic_advance_by_thematic_id($item['id']);
97
+                $thematic_list_temp = array_merge($my_list, $thematic_list_temp);
98
+            }
99
+            $new_thematic_list = array();
100 100
 
101
-			foreach($thematic_list_temp as $item) {
102
-				if (!empty($item['attendance_id']) ) {
103
-					$new_thematic_list[$item['id']] = array('attendance_id' =>$item['attendance_id'], 'start_date'=>$item['start_date']);
104
-				}
105
-			}
101
+            foreach($thematic_list_temp as $item) {
102
+                if (!empty($item['attendance_id']) ) {
103
+                    $new_thematic_list[$item['id']] = array('attendance_id' =>$item['attendance_id'], 'start_date'=>$item['start_date']);
104
+                }
105
+            }
106 106
 
107
-			$attendance_calendar = $attendance->get_attendance_calendar($attendance_id);
107
+            $attendance_calendar = $attendance->get_attendance_calendar($attendance_id);
108 108
 
109
-			$label = get_lang('StartDate');
110
-			if (!empty($attendance_calendar)) {
111
-				$input_select .= '<select id="start_date_select_calendar" name="start_date_by_attendance" size="5">';
112
-				foreach ($attendance_calendar as $calendar) {
113
-					$selected = null;
114
-					$insert = true;
115
-					//checking if was already taken
116
-					foreach ($new_thematic_list as $key => $thematic_item) {
117
-						//if ($calendar['db_date_time'] == $thematic_item['start_date'] && $calendar['attendance_id'] == $thematic_item['attendance_id'] ) {
118
-						if ($calendar['db_date_time'] == $thematic_item['start_date'] ) {
119
-							$insert = false;
120
-							if ($thematic_advance_id == $key) {
121
-								$insert = true;
122
-								$selected = 'selected';
123
-							}
124
-							break;
125
-						}
126
-					}
127
-					if ($insert == true) {
128
-						$input_select .= '<option '.$selected.' value="'.$calendar['date_time'].'">'.$calendar['date_time'].'</option>';
129
-					}
130
-				}
131
-				$input_select .= '</select>';
132
-			} else {
133
-				$input_select .= '<em>'.get_lang('ThereAreNoRegisteredDatetimeYet').'</em>';
134
-			}
135
-		}
136
-		?>
109
+            $label = get_lang('StartDate');
110
+            if (!empty($attendance_calendar)) {
111
+                $input_select .= '<select id="start_date_select_calendar" name="start_date_by_attendance" size="5">';
112
+                foreach ($attendance_calendar as $calendar) {
113
+                    $selected = null;
114
+                    $insert = true;
115
+                    //checking if was already taken
116
+                    foreach ($new_thematic_list as $key => $thematic_item) {
117
+                        //if ($calendar['db_date_time'] == $thematic_item['start_date'] && $calendar['attendance_id'] == $thematic_item['attendance_id'] ) {
118
+                        if ($calendar['db_date_time'] == $thematic_item['start_date'] ) {
119
+                            $insert = false;
120
+                            if ($thematic_advance_id == $key) {
121
+                                $insert = true;
122
+                                $selected = 'selected';
123
+                            }
124
+                            break;
125
+                        }
126
+                    }
127
+                    if ($insert == true) {
128
+                        $input_select .= '<option '.$selected.' value="'.$calendar['date_time'].'">'.$calendar['date_time'].'</option>';
129
+                    }
130
+                }
131
+                $input_select .= '</select>';
132
+            } else {
133
+                $input_select .= '<em>'.get_lang('ThereAreNoRegisteredDatetimeYet').'</em>';
134
+            }
135
+        }
136
+        ?>
137 137
 		<div class="form-group">
138 138
 			<label class="col-sm-2 control-label"><?php echo $label ?></label>
139 139
 			<div class="col-sm-10"><?php echo $input_select ?></div>
140 140
 		</div>
141 141
 		<?php
142
-		break;
143
-	case 'update_done_thematic_advance':
144
-		$thematic_advance_id = intval($_GET['thematic_advance_id']);
145
-		$total_average = 0;
146
-		if (!empty($thematic_advance_id)) {
147
-			$thematic = new Thematic();
148
-			$affected_rows  = $thematic->update_done_thematic_advances($thematic_advance_id);
149
-			//if ($affected_rows) {
150
-			$total_average  = $thematic->get_total_average_of_thematic_advances(api_get_course_id(), api_get_session_id());
151
-			//}
152
-		}
153
-		echo $total_average;
154
-		break;
155
-	default:
156
-		echo '';
142
+        break;
143
+    case 'update_done_thematic_advance':
144
+        $thematic_advance_id = intval($_GET['thematic_advance_id']);
145
+        $total_average = 0;
146
+        if (!empty($thematic_advance_id)) {
147
+            $thematic = new Thematic();
148
+            $affected_rows  = $thematic->update_done_thematic_advances($thematic_advance_id);
149
+            //if ($affected_rows) {
150
+            $total_average  = $thematic->get_total_average_of_thematic_advances(api_get_course_id(), api_get_session_id());
151
+            //}
152
+        }
153
+        echo $total_average;
154
+        break;
155
+    default:
156
+        echo '';
157 157
 }
158 158
 exit;
Please login to merge, or discard this patch.
main/inc/ajax/model.ajax.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -731,7 +731,7 @@  discard block
 block discarded – undo
731 731
         }
732 732
 
733 733
         break;
734
-	case 'get_user_skill_ranking':
734
+    case 'get_user_skill_ranking':
735 735
         $columns = array('photo', 'firstname', 'lastname', 'skills_acquired', 'currently_learning', 'rank');
736 736
         $result = $skill->get_user_list_skill_ranking($start, $limit, $sidx, $sord, $whereCondition);
737 737
         $result = msort($result, 'skills_acquired', 'asc');
@@ -1281,7 +1281,7 @@  discard block
 block discarded – undo
1281 1281
 
1282 1282
             if (!empty($item['certif_min_score']) && !empty($item['document_id'])) {
1283 1283
                 $item['certificates'] = Display::return_icon('accept.png', get_lang('WithCertificate'), array(), ICON_SIZE_SMALL);
1284
-                 $item['has_certificates'] = '1';
1284
+                    $item['has_certificates'] = '1';
1285 1285
             } else {
1286 1286
                 $item['certificates'] = Display::return_icon('warning.png', get_lang('NoCertificate'), array(), ICON_SIZE_SMALL);
1287 1287
                 $item['has_certificates'] = '0';
Please login to merge, or discard this patch.
main/inc/local.inc.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -758,7 +758,7 @@
 block discarded – undo
758 758
     //    $gidReset = true;
759 759
 } // end else
760 760
 
761
- // Now check for anonymous user mode
761
+    // Now check for anonymous user mode
762 762
 if (isset($use_anonymous) && $use_anonymous) {
763 763
     //if anonymous mode is set, then try to set the current user as anonymous
764 764
     //if he doesn't have a login yet
Please login to merge, or discard this patch.