Completed
Pull Request — 1.11.x (#1661)
by José
27:18
created
main/document/document_quota.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         }
86 86
     }
87 87
     if ($quota_bytes != 0) {
88
-       $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100;
88
+        $quota_percentage = round($quota_bytes/$total_quota_bytes, 2)*100;
89 89
     }
90 90
 
91 91
     $session[] = array(addslashes(get_lang('Teacher').': '.$user_name).' ('.format_file_size($quota_bytes).')', $quota_percentage);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         }
104 104
         $session[] = array(addslashes(sprintf(get_lang('TeacherXInSession'),$user_name)), $quota_percentage);
105 105
 
106
-   }
106
+    }
107 107
 }
108 108
 
109 109
 $quota_percentage = round(($total_quota_bytes - $used_quota_bytes)/$total_quota_bytes, 2)*100;
Please login to merge, or discard this patch.
main/admin/access_url_edit_users_to_url.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@
 block discarded – undo
261 261
     ?>
262 262
     <option value="<?php echo $enreg['user_id']; ?>"><?php echo $enreg['username'].' - '.api_get_person_name($enreg['firstname'], $enreg['lastname']); ?></option>
263 263
     <?php
264
-     }
264
+        }
265 265
     unset($nosessionUsersList);
266 266
     ?>
267 267
     </select>
Please login to merge, or discard this patch.
main/admin/ldap_users_synchro.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,9 +60,9 @@
 block discarded – undo
60 60
 
61 61
 <?php
62 62
 if (isset($action) && ($action=="synchro")) {
63
-	$included=true;
64
-	require('ldap_synchro.php');
65
-	Display :: display_normal_message($message,false);
63
+    $included=true;
64
+    require('ldap_synchro.php');
65
+    Display :: display_normal_message($message,false);
66 66
 }
67 67
 Display::display_footer();
68 68
 ?>
Please login to merge, or discard this patch.
main/admin/course_create_content.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,15 +15,15 @@
 block discarded – undo
15 15
 Display::display_header($tool_name);
16 16
 //api_display_tool_title($tool_name);
17 17
 if (api_get_setting('server_type') != 'test') {
18
-	echo get_lang('DummyCourseOnlyOnTestServer');
18
+    echo get_lang('DummyCourseOnlyOnTestServer');
19 19
 } elseif( isset($_POST['action'])) {
20
-	require_once('../coursecopy/classes/DummyCourseCreator.class.php');
21
-	$dcc = new DummyCourseCreator();
22
-	$dcc->create_dummy_course($_POST['course_code']);
23
-	echo get_lang('Done');
20
+    require_once('../coursecopy/classes/DummyCourseCreator.class.php');
21
+    $dcc = new DummyCourseCreator();
22
+    $dcc->create_dummy_course($_POST['course_code']);
23
+    echo get_lang('Done');
24 24
 } else {
25
-	echo get_lang('DummyCourseDescription');
26
-	echo '<form method="post"><input type="hidden" name="course_code" value="'.Security::remove_XSS($_GET['course_code']).'"/><input type="submit" name="action" value="'.get_lang('Ok').'"/></form>';
25
+    echo get_lang('DummyCourseDescription');
26
+    echo '<form method="post"><input type="hidden" name="course_code" value="'.Security::remove_XSS($_GET['course_code']).'"/><input type="submit" name="action" value="'.get_lang('Ok').'"/></form>';
27 27
 }
28 28
 
29 29
 Display::display_footer();
Please login to merge, or discard this patch.
main/mySpace/progression.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -33,36 +33,36 @@
 block discarded – undo
33 33
 $result_course = Database::query($sql_course);
34 34
 
35 35
 if (Database::num_rows($result_course) > 0) {
36
-	if (isset($_POST['export'])) {
37
-		$export_result = export_csv($header, $data, 'test.csv'); // TODO: There is no data for exporting yet.
38
-		Display :: display_error_message($export_result);
39
-	}
40
-	echo '<table class="data_table"><tr><th>'.get_lang('Course').'</th><th>'.get_lang('TempsFrequentation').'</th><th>'.get_lang('Progression').'</th><th>'.get_lang('MoyenneTest').'</th></tr>';
41
-	$header = array(get_lang('Course', ''), get_lang('TempsFrequentation', ''), get_lang('Progression', ''), get_lang('MoyenneTest', ''));
42
-	while ($a_course = Database::fetch_array($result_course)) {
43
-		// TODO: This query is to be checked, there are no HotPotatoes tests results.
44
-		$sql_moy_test = "SELECT exe_result,exe_weighting
36
+    if (isset($_POST['export'])) {
37
+        $export_result = export_csv($header, $data, 'test.csv'); // TODO: There is no data for exporting yet.
38
+        Display :: display_error_message($export_result);
39
+    }
40
+    echo '<table class="data_table"><tr><th>'.get_lang('Course').'</th><th>'.get_lang('TempsFrequentation').'</th><th>'.get_lang('Progression').'</th><th>'.get_lang('MoyenneTest').'</th></tr>';
41
+    $header = array(get_lang('Course', ''), get_lang('TempsFrequentation', ''), get_lang('Progression', ''), get_lang('MoyenneTest', ''));
42
+    while ($a_course = Database::fetch_array($result_course)) {
43
+        // TODO: This query is to be checked, there are no HotPotatoes tests results.
44
+        $sql_moy_test = "SELECT exe_result,exe_weighting
45 45
 			FROM $tbl_track_exercice
46 46
 			WHERE c_id = ".$a_course['id'];
47
-		$result_moy_test = Database::query($sql_moy_test);
48
-		$result = 0;
49
-		$weighting = 0;
50
-		while ($moy_test = Database::fetch_array($result_moy_test)) {
51
-			$result = $result + $moy_test['exe_result'];
52
-			$weighting = $weighting + $moy_test['exe_weighting'];
53
-		}
54
-		if ($weighting != 0) {
55
-			$moyenne_test = round(($result * 100) / $weighting);
56
-		} else {
57
-			$moyenne_test = null;
58
-		}
59
-		echo '<tr><td>'.$a_course['title'].'</td><td> </td><td> </td><td>'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td> </tr>';
60
-	}
61
-	echo '</table>';
62
-	echo "<br /><br />";
63
-	echo "<form method='post'><input type='submit' name='export' value='".get_lang('ExportExcel')."'/><form>";
47
+        $result_moy_test = Database::query($sql_moy_test);
48
+        $result = 0;
49
+        $weighting = 0;
50
+        while ($moy_test = Database::fetch_array($result_moy_test)) {
51
+            $result = $result + $moy_test['exe_result'];
52
+            $weighting = $weighting + $moy_test['exe_weighting'];
53
+        }
54
+        if ($weighting != 0) {
55
+            $moyenne_test = round(($result * 100) / $weighting);
56
+        } else {
57
+            $moyenne_test = null;
58
+        }
59
+        echo '<tr><td>'.$a_course['title'].'</td><td> </td><td> </td><td>'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td> </tr>';
60
+    }
61
+    echo '</table>';
62
+    echo "<br /><br />";
63
+    echo "<form method='post'><input type='submit' name='export' value='".get_lang('ExportExcel')."'/><form>";
64 64
 } else {
65
-	echo get_lang('NoCourse');
65
+    echo get_lang('NoCourse');
66 66
 }
67 67
 
68 68
 Display :: display_footer();
Please login to merge, or discard this patch.
main/inc/lib/text.lib.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -693,8 +693,8 @@  discard block
 block discarded – undo
693 693
  */
694 694
 function get_week_from_day($date) {
695 695
     if (!empty($date)) {
696
-       $time = api_strtotime($date,'UTC');
697
-       return date('W', $time);
696
+        $time = api_strtotime($date,'UTC');
697
+        return date('W', $time);
698 698
     } else {
699 699
         return date('W');
700 700
     }
@@ -712,31 +712,31 @@  discard block
 block discarded – undo
712 712
 
713 713
 function substrwords($text,$maxchar,$end='...')
714 714
 {
715
-	if(strlen($text)>$maxchar)
716
-	{
717
-		$words=explode(" ",$text);
718
-		$output = '';
719
-		$i=0;
720
-		while(1)
721
-		{
722
-			$length = (strlen($output)+strlen($words[$i]));
723
-			if($length>$maxchar)
724
-			{
725
-				break;
726
-			}
727
-			else
728
-			{
729
-				$output = $output." ".$words[$i];
730
-				$i++;
731
-			};
732
-		};
733
-	}
734
-	else
735
-	{
736
-		$output = $text;
737
-		return $output;
738
-	}
739
-	return $output.$end;
715
+    if(strlen($text)>$maxchar)
716
+    {
717
+        $words=explode(" ",$text);
718
+        $output = '';
719
+        $i=0;
720
+        while(1)
721
+        {
722
+            $length = (strlen($output)+strlen($words[$i]));
723
+            if($length>$maxchar)
724
+            {
725
+                break;
726
+            }
727
+            else
728
+            {
729
+                $output = $output." ".$words[$i];
730
+                $i++;
731
+            };
732
+        };
733
+    }
734
+    else
735
+    {
736
+        $output = $text;
737
+        return $output;
738
+    }
739
+    return $output.$end;
740 740
 }
741 741
 
742 742
 function implode_with_key($glue, $array) {
Please login to merge, or discard this patch.
main/inc/lib/search/ChamiloQuery.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
  * @param   string    $query_string   The term string
34 34
  */
35 35
 function chamilo_get_boolean_query($term) {
36
-  return xapian_get_boolean_query($term);
36
+    return xapian_get_boolean_query($term);
37 37
 }
38 38
 
39 39
 /**
@@ -44,22 +44,22 @@  discard block
 block discarded – undo
44 44
     $results_by_tool = array();
45 45
     if (count($results)>0) {
46 46
 
47
-	    foreach ($results as $key => $row) {
48
-	        $results_by_tool[$row['toolid']][] = $row;
49
-	    }
47
+        foreach ($results as $key => $row) {
48
+            $results_by_tool[$row['toolid']][] = $row;
49
+        }
50 50
 
51
-	    $processed_results = array();
52
-	    foreach ($results_by_tool as $toolid => $rows) {
53
-	        $tool_processor_class = $toolid .'_processor';
54
-	        $tool_processor_path = api_get_path(LIBRARY_PATH) .'search/tool_processors/'. $tool_processor_class .'.class.php';
55
-	        if (file_exists($tool_processor_path)) {
56
-	            require_once($tool_processor_path);
57
-	            $tool_processor = new $tool_processor_class($rows);
58
-	            $processed_results = array_merge($tool_processor->process(), $processed_results);
59
-	        }
60
-	    }
51
+        $processed_results = array();
52
+        foreach ($results_by_tool as $toolid => $rows) {
53
+            $tool_processor_class = $toolid .'_processor';
54
+            $tool_processor_path = api_get_path(LIBRARY_PATH) .'search/tool_processors/'. $tool_processor_class .'.class.php';
55
+            if (file_exists($tool_processor_path)) {
56
+                require_once($tool_processor_path);
57
+                $tool_processor = new $tool_processor_class($rows);
58
+                $processed_results = array_merge($tool_processor->process(), $processed_results);
59
+            }
60
+        }
61 61
 
62
-	    return array(count($processed_results), $processed_results);
62
+        return array(count($processed_results), $processed_results);
63 63
     }
64 64
 }
65 65
 
@@ -72,5 +72,5 @@  discard block
 block discarded – undo
72 72
  * @return XapianQuery query joined
73 73
  */
74 74
 function chamilo_join_queries($query1, $query2=NULL, $op='or') {
75
-	return xapian_join_queries($query1, $query2, $op);
75
+    return xapian_join_queries($query1, $query2, $op);
76 76
 }
Please login to merge, or discard this patch.
main/dashboard/index.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 $actions = array('listing', 'store_user_block', 'disable_block');
27 27
 $action = 'listing';
28 28
 if (isset($_GET['action']) && in_array($_GET['action'],$actions)) {
29
-	$action = $_GET['action'];
29
+    $action = $_GET['action'];
30 30
 }
31 31
 
32 32
 // load styles from dashboard plugins
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 $dashboard_controller = new DashboardController();
38 38
 
39 39
 if (isset($_GET['path'])) {
40
-	$path = $_GET['path'];
40
+    $path = $_GET['path'];
41 41
 }
42 42
 
43 43
 // distpacher actions to controller
Please login to merge, or discard this patch.
main/auth/ldap/newUser.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,17 +21,17 @@
 block discarded – undo
21 21
 
22 22
 if ($ldap_login_success)
23 23
 {
24
-	//error_log('Found user '.$login.' on LDAP server',0);
25
-	/*
24
+    //error_log('Found user '.$login.' on LDAP server',0);
25
+    /*
26 26
 		In here, we know that
27 27
 		- the user does not exist in dokeos
28 28
 		- the users login and password are correct
29 29
 	*/
30
-	$info_array = ldap_find_user_info($login);
31
-	ldap_put_user_info_locally($login, $info_array);
30
+    $info_array = ldap_find_user_info($login);
31
+    ldap_put_user_info_locally($login, $info_array);
32 32
 } else {
33 33
     //error_log('Could not find '.$login.' on LDAP server',0);
34
-	$loginFailed = true;
35
-	unset($_user['user_id']);
36
-	$uidReset = false;
34
+    $loginFailed = true;
35
+    unset($_user['user_id']);
36
+    $uidReset = false;
37 37
 }
Please login to merge, or discard this patch.