Completed
Push — 1.10.x ( a26f23...c6c321 )
by Julito
59:04
created
main/newscorm/lp_add_category.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 
74 74
 echo '<div class="actions">';
75 75
 echo '<a href="lp_controller.php?'.api_get_cidreq().'">'.
76
-    Display::return_icon('back.png', get_lang('ReturnToLearningPaths'),'',ICON_SIZE_MEDIUM).'</a>';
76
+    Display::return_icon('back.png', get_lang('ReturnToLearningPaths'), '', ICON_SIZE_MEDIUM).'</a>';
77 77
 echo '</div>';
78 78
 
79 79
 $form->display();
Please login to merge, or discard this patch.
main/newscorm/lp_edit_item_prereq.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 }
40 40
 if ((!$is_allowed_to_edit) || ($isStudentView)) {
41 41
     error_log('New LP - User not authorized in lp_edit_item_prereq.php');
42
-    header('location:lp_controller.php?action=view&lp_id=' . $learnpath_id);
42
+    header('location:lp_controller.php?action=view&lp_id='.$learnpath_id);
43 43
 }
44 44
 $course_id = api_get_course_int_id();
45 45
 
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
 
56 56
 if (!empty($gradebook) && $gradebook == 'view') {
57 57
     $interbreadcrumb[] = array(
58
-        'url' => '../gradebook/' . $_SESSION['gradebook_dest'],
58
+        'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
59 59
         'name' => get_lang('ToolGradebook')
60 60
     );
61 61
 }
62 62
 
63 63
 $interbreadcrumb[] = array('url' => 'lp_controller.php?action=list', 'name' => get_lang('LearningPaths'));
64
-$interbreadcrumb[] = array('url' => api_get_self() . "?action=build&lp_id=$learnpath_id", 'name' => stripslashes("{$therow['name']}"));
65
-$interbreadcrumb[] = array('url' => api_get_self() . "?action=add_item&type=step&lp_id=$learnpath_id", 'name' => get_lang('NewStep'));
64
+$interbreadcrumb[] = array('url' => api_get_self()."?action=build&lp_id=$learnpath_id", 'name' => stripslashes("{$therow['name']}"));
65
+$interbreadcrumb[] = array('url' => api_get_self()."?action=add_item&type=step&lp_id=$learnpath_id", 'name' => get_lang('NewStep'));
66 66
 
67 67
 // Theme calls.
68 68
 $show_learn_path = true;
Please login to merge, or discard this patch.
main/newscorm/lp_report.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 // View
108 108
 $interbreadcrumb[] = [
109
-    'url' => api_get_path(WEB_CODE_PATH) . 'newscorm/lp_controller.php?'.api_get_cidreq(),
109
+    'url' => api_get_path(WEB_CODE_PATH).'newscorm/lp_controller.php?'.api_get_cidreq(),
110 110
     'name' => get_lang('LearningPaths')
111 111
 ];
112 112
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         array(),
118 118
         ICON_SIZE_MEDIUM
119 119
     ),
120
-    api_get_path(WEB_CODE_PATH) . 'newscorm/lp_controller.php?' . api_get_cidreq()
120
+    api_get_path(WEB_CODE_PATH).'newscorm/lp_controller.php?'.api_get_cidreq()
121 121
 );
122 122
 
123 123
 $template = new Template(get_lang('StudentScore'));
Please login to merge, or discard this patch.
main/newscorm/lp_ajax_save_objectives.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@
 block discarded – undo
28 28
         error_log('In xajax_save_objectives('.$lp_id.','.$user_id.','.$view_id.','.$item_id.',"'.(count($objectives) > 0 ? count($objectives) : '').'")', 0);
29 29
     }
30 30
     $mylp = learnpath::getLpFromSession(api_get_course_id(), $lp_id, $user_id);
31
-    $mylpi =& $mylp->items[$item_id];
32
-    if (is_array($objectives) && count($objectives)>0){
33
-        foreach ($objectives as $index=>$objective){
34
-            $mylpi->add_objective($index,$objectives[$index]);
31
+    $mylpi = & $mylp->items[$item_id];
32
+    if (is_array($objectives) && count($objectives) > 0) {
33
+        foreach ($objectives as $index=>$objective) {
34
+            $mylpi->add_objective($index, $objectives[$index]);
35 35
         }
36 36
         $mylpi->write_objectives_to_db();
37 37
     }
Please login to merge, or discard this patch.
main/cron/cleanup.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 $a_dir = realpath($dir.'/../../archive/');
16 16
 $list = scandir($a_dir);
17 17
 // calculate 7 days
18
-$t = time()-(86400*7);
18
+$t = time() - (86400 * 7);
19 19
 foreach ($list as $item) {
20
-    if (substr($item,0,1) == '.') {
20
+    if (substr($item, 0, 1) == '.') {
21 21
         continue;
22 22
     }
23 23
     $stat = @stat($a_dir.'/'.$item);
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
  * Delete a file or recursively delete a directory
35 35
  * @param string $str Path to file or directory
36 36
  */
37
-function recursive_delete($str){
37
+function recursive_delete($str) {
38 38
     if (is_file($str)) {
39 39
         return @unlink($str);
40 40
     } elseif (is_dir($str)) {
41
-        $scan = glob(rtrim($str,'/').'/*');
41
+        $scan = glob(rtrim($str, '/').'/*');
42 42
         foreach ($scan as $index=>$path) {
43 43
             recursive_delete($path);
44 44
         }
Please login to merge, or discard this patch.
main/cron/remind_course_expiration.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * @package chamilo.cron
6 6
  * @author Imanol Losada <[email protected]>
7 7
  */
8
-require_once __DIR__ . '/../inc/global.inc.php';
8
+require_once __DIR__.'/../inc/global.inc.php';
9 9
 
10 10
 /**
11 11
  * Initialization
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
 foreach ($sessions as $sessionId => $userIds) {
66 66
     $userId = 0;
67
-    $userIds = $userIds ? " AND sessionUser.user_id NOT IN (" . implode(", ", $userIds) . ")" : null;
67
+    $userIds = $userIds ? " AND sessionUser.user_id NOT IN (".implode(", ", $userIds).")" : null;
68 68
     $query = "
69 69
         SELECT sessionUser.session_id, sessionUser.user_id, session.name, session.access_end_date 
70 70
         FROM $sessionUserTable AS sessionUser
@@ -156,10 +156,10 @@  discard block
 block discarded – undo
156 156
                 $administrator['completeName'],
157 157
                 $administrator['email']
158 158
             );
159
-            echo "Email sent to $userCompleteName (" . $user['email'] . ")\n";
160
-            echo "Session: " . $session['name'] . "\n";
161
-            echo "Date end: " . $session['access_end_date'] . "\n";
162
-            echo "Days remaining: " . $daysRemaining->format("%d") . "\n\n";
159
+            echo "Email sent to $userCompleteName (".$user['email'].")\n";
160
+            echo "Session: ".$session['name']."\n";
161
+            echo "Date end: ".$session['access_end_date']."\n";
162
+            echo "Days remaining: ".$daysRemaining->format("%d")."\n\n";
163 163
         }
164 164
         echo "======================================================================\n\n";
165 165
     }
Please login to merge, or discard this patch.
main/cron/course_finished.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @author Angel Fernando Quiroz Campos <[email protected]>
7 7
  * @package chamilo.cron
8 8
  */
9
-require_once __DIR__ . '/../inc/global.inc.php';
9
+require_once __DIR__.'/../inc/global.inc.php';
10 10
 
11 11
 if (php_sapi_name() != 'cli') {
12 12
     exit; //do not run from browser
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     ->getResult();
33 33
 
34 34
 if (empty($sessions)) {
35
-    echo "No sessions finishing today $endDate" . PHP_EOL;
35
+    echo "No sessions finishing today $endDate".PHP_EOL;
36 36
     exit;
37 37
 }
38 38
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     $sessionUsers = $session->getUsers();
51 51
 
52 52
     if (empty($sessionUsers)) {
53
-        echo 'No users to send mail' . PHP_EOL;
53
+        echo 'No users to send mail'.PHP_EOL;
54 54
         exit;
55 55
     }
56 56
 
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
             $administrator['email']
82 82
         );
83 83
 
84
-        echo '============' . PHP_EOL;
85
-        echo "Email sent to: {$user->getCompleteName()} ({$user->getEmail()})" . PHP_EOL;
86
-        echo "Session: {$session->getName()}" . PHP_EOL;
87
-        echo "End date: {$session->getAccessEndDate()->format('Y-m-d h:i')}" . PHP_EOL;
84
+        echo '============'.PHP_EOL;
85
+        echo "Email sent to: {$user->getCompleteName()} ({$user->getEmail()})".PHP_EOL;
86
+        echo "Session: {$session->getName()}".PHP_EOL;
87
+        echo "End date: {$session->getAccessEndDate()->format('Y-m-d h:i')}".PHP_EOL;
88 88
     }
89 89
 }
Please login to merge, or discard this patch.
main/cron/hosting_total_size_limit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     $totalSize = $row['total'];
98 98
 
99 99
     if ($debug) {
100
-        echo "Total size in table $table " . (round($totalSize / 1024)) . " MB \n";
100
+        echo "Total size in table $table ".(round($totalSize / 1024))." MB \n";
101 101
     }
102 102
 
103 103
     $table = Database::get_course_table(TABLE_FORUM_ATTACHMENT);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     $subTotal = $row['total'];
108 108
     $totalSize += $subTotal;
109 109
     if ($debug) {
110
-        echo "Total size in table $table " . (round($subTotal / 1024)) . " MB \n";
110
+        echo "Total size in table $table ".(round($subTotal / 1024))." MB \n";
111 111
     }
112 112
 
113 113
     $totalSize = $totalSize / 1024;
Please login to merge, or discard this patch.
main/cron/notification.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 /**
8 8
  * Initialization
9 9
  */
10
-if (PHP_SAPI!='cli') {
10
+if (PHP_SAPI != 'cli') {
11 11
     die('Run this script through the command line or comment this line in the code');
12 12
 }
13 13
 
Please login to merge, or discard this patch.