Completed
Push — 1.10.x ( fe0e5a...3a6f9c )
by Yannick
134:15 queued 86:39
created
main/dropbox/dropbox_submit.php 1 patch
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -33,21 +33,21 @@  discard block
 block discarded – undo
33 33
         $thisIsAMailing = false;
34 34
         $thisIsJustUpload = false;
35 35
 
36
-	    foreach ($_POST['recipients'] as $rec) {
36
+        foreach ($_POST['recipients'] as $rec) {
37 37
             if ($rec == 'mailing') {
38
-	            $thisIsAMailing = true;
38
+                $thisIsAMailing = true;
39 39
             } elseif ($rec == 'upload') {
40
-	            $thisIsJustUpload = true;
40
+                $thisIsJustUpload = true;
41 41
             } elseif (strpos($rec, 'user_') === 0 && !isCourseMember(substr($rec, strlen('user_')))) {
42
-	        	echo '401';
43
-	        	die(get_lang('BadFormData').' (code 401)');
44
-	        } elseif (strpos($rec, 'group_') !== 0 && strpos($rec, 'user_') !== 0) {
45
-	        	echo '402';
46
-	        	die(get_lang('BadFormData').' (code 402)');
47
-	        }
42
+                echo '401';
43
+                die(get_lang('BadFormData').' (code 401)');
44
+            } elseif (strpos($rec, 'group_') !== 0 && strpos($rec, 'user_') !== 0) {
45
+                echo '402';
46
+                die(get_lang('BadFormData').' (code 402)');
47
+            }
48 48
         }
49 49
 
50
-		// we are doing a mailing but an additional recipient is selected
50
+        // we are doing a mailing but an additional recipient is selected
51 51
         if ($thisIsAMailing && ( count($_POST['recipients']) != 1)) {
52 52
             $error = true;
53 53
             $errormsg = get_lang('MailingSelectNoOther');
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
         }
63 63
     }
64 64
 
65
-	//check if $_POST['cb_overwrite'] is true or false
66
-	$dropbox_overwrite = false;
67
-	if (isset($_POST['cb_overwrite']) && $_POST['cb_overwrite']) {
68
-		$dropbox_overwrite = true;
69
-	}
65
+    //check if $_POST['cb_overwrite'] is true or false
66
+    $dropbox_overwrite = false;
67
+    if (isset($_POST['cb_overwrite']) && $_POST['cb_overwrite']) {
68
+        $dropbox_overwrite = true;
69
+    }
70 70
 
71 71
     /**
72 72
      * FORM SUBMIT : UPLOAD NEW FILE
@@ -168,13 +168,13 @@  discard block
 block discarded – undo
168 168
                     }
169 169
                 }
170 170
 
171
-				// After uploading the file, create the db entries
171
+                // After uploading the file, create the db entries
172 172
 
173
-	        	if (!$error) {
174
-		            @move_uploaded_file($dropbox_filetmpname, dropbox_cnf('sysPath') . '/' . $dropbox_filename)
175
-		            	or die(get_lang('UploadError').' (code 407)');
176
-		            new Dropbox_SentWork($_user['user_id'], $dropbox_title, $_POST['description'], strip_tags($_POST['authors']), $dropbox_filename, $dropbox_filesize, $newWorkRecipients);
177
-	        	}
173
+                if (!$error) {
174
+                    @move_uploaded_file($dropbox_filetmpname, dropbox_cnf('sysPath') . '/' . $dropbox_filename)
175
+                        or die(get_lang('UploadError').' (code 407)');
176
+                    new Dropbox_SentWork($_user['user_id'], $dropbox_title, $_POST['description'], strip_tags($_POST['authors']), $dropbox_filename, $dropbox_filesize, $newWorkRecipients);
177
+                }
178 178
             }
179 179
         }
180 180
     } //end if(!$error)
@@ -183,9 +183,9 @@  discard block
 block discarded – undo
183 183
      * SUBMIT FORM RESULTMESSAGE
184 184
      */
185 185
     if (!$error) {
186
-		$return_message = get_lang('FileUploadSucces');
186
+        $return_message = get_lang('FileUploadSucces');
187 187
     } else {
188
-		$return_message = $errormsg;
188
+        $return_message = $errormsg;
189 189
     }
190 190
 }
191 191
 
@@ -199,25 +199,25 @@  discard block
 block discarded – undo
199 199
  */
200 200
 if (isset($_GET['deleteReceived']) || isset($_GET['deleteSent'])
201 201
          || isset( $_GET['showFeedback']) || isset( $_GET['editFeedback'])) {
202
-	if ($_GET['mailing']) {
203
-		getUserOwningThisMailing($_GET['mailing'], $_user['user_id'], '408');
204
-		$dropbox_person = new Dropbox_Person($_GET['mailing'], $is_courseAdmin, $is_courseTutor);
205
-	} else {
206
-	    $dropbox_person = new Dropbox_Person($_user['user_id'], $is_courseAdmin, $is_courseTutor);
202
+    if ($_GET['mailing']) {
203
+        getUserOwningThisMailing($_GET['mailing'], $_user['user_id'], '408');
204
+        $dropbox_person = new Dropbox_Person($_GET['mailing'], $is_courseAdmin, $is_courseTutor);
205
+    } else {
206
+        $dropbox_person = new Dropbox_Person($_user['user_id'], $is_courseAdmin, $is_courseTutor);
207 207
     }
208 208
 
209
-	if (isset($_SESSION['sentOrder'])) {
210
-		$dropbox_person->orderSentWork($_SESSION['sentOrder']);
211
-	}
212
-	if (isset($_SESSION['receivedOrder'])) {
213
-		$dropbox_person->orderReceivedWork($_SESSION['receivedOrder']);
214
-	}
209
+    if (isset($_SESSION['sentOrder'])) {
210
+        $dropbox_person->orderSentWork($_SESSION['sentOrder']);
211
+    }
212
+    if (isset($_SESSION['receivedOrder'])) {
213
+        $dropbox_person->orderReceivedWork($_SESSION['receivedOrder']);
214
+    }
215 215
 
216
-	/*if (!$dropbox_person->isCourseAdmin || ! $dropbox_person->isCourseTutor) {
216
+    /*if (!$dropbox_person->isCourseAdmin || ! $dropbox_person->isCourseTutor) {
217 217
 	    die(get_lang('GeneralError').' (code 408)');
218 218
 	}*/
219 219
 
220
-	$tellUser = get_lang('FileDeleted');
220
+    $tellUser = get_lang('FileDeleted');
221 221
 
222 222
     if (isset($_GET['deleteReceived'])) {
223 223
         if ($_GET['deleteReceived'] == 'all') {
@@ -236,20 +236,20 @@  discard block
 block discarded – undo
236 236
             die(get_lang('GeneralError').' (code 410)');
237 237
         }
238 238
     } elseif (isset($_GET['showFeedback'])) {
239
-		$w = new Dropbox_SentWork($id = $_GET['showFeedback']);
239
+        $w = new Dropbox_SentWork($id = $_GET['showFeedback']);
240 240
 
241
-		if ($w->uploader_id != $_user['user_id']) {
242
-		    getUserOwningThisMailing($w->uploader_id, $_user['user_id'], '411');
243
-		}
241
+        if ($w->uploader_id != $_user['user_id']) {
242
+            getUserOwningThisMailing($w->uploader_id, $_user['user_id'], '411');
243
+        }
244 244
 
245
-    	foreach ($w -> recipients as $r) {
246
-    		if (($fb = $r['feedback'])) {
247
-    			$fbarray[$r['feedback_date'].$r['name']] = $r['name'].' '.get_lang('SentOn', '').' '.$r['feedback_date'].":\n".$fb;
248
-    		}
249
-    	}
245
+        foreach ($w -> recipients as $r) {
246
+            if (($fb = $r['feedback'])) {
247
+                $fbarray[$r['feedback_date'].$r['name']] = $r['name'].' '.get_lang('SentOn', '').' '.$r['feedback_date'].":\n".$fb;
248
+            }
249
+        }
250 250
 
251
-    	if ($fbarray) {
252
-        	krsort($fbarray);
251
+        if ($fbarray) {
252
+            krsort($fbarray);
253 253
             echo '<textarea class="dropbox_feedbacks">',
254 254
                     htmlspecialchars(implode("\n\n", $fbarray), ENT_QUOTES, api_get_system_encoding()), '</textarea>', "\n";
255 255
         } else {
@@ -261,13 +261,13 @@  discard block
 block discarded – undo
261 261
     } else { // if ( isset( $_GET['editFeedback'])) {
262 262
         $id = $_GET['editFeedback'];
263 263
         $found = false;
264
-		foreach ($dropbox_person->receivedWork as $w) {
265
-			if ($w->id == $id) {
266
-			   $found = true;
267
-			   break;
268
-			}
269
-		}
270
-		if (!$found) die(get_lang('GeneralError').' (code 415)');
264
+        foreach ($dropbox_person->receivedWork as $w) {
265
+            if ($w->id == $id) {
266
+                $found = true;
267
+                break;
268
+            }
269
+        }
270
+        if (!$found) die(get_lang('GeneralError').' (code 415)');
271 271
 
272 272
         echo '<form method="post" action="index.php">', "\n",
273 273
             '<input type="hidden" name="feedbackid" value="',
Please login to merge, or discard this patch.
main/dropbox/dropbox_functions.inc.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,11 +83,11 @@
 block discarded – undo
83 83
     if (strstr($_POST['action'], 'move_')) {
84 84
         // check move_received_n or move_sent_n command
85 85
         if (strstr($_POST['action'], 'received')) {
86
-              $part = 'received';
87
-              $to_cat_id = str_replace('move_received_', '', $_POST['action']);
86
+                $part = 'received';
87
+                $to_cat_id = str_replace('move_received_', '', $_POST['action']);
88 88
         } else {
89
-              $part = 'sent';
90
-              $to_cat_id = str_replace('move_sent_', '', $_POST['action']);
89
+                $part = 'sent';
90
+                $to_cat_id = str_replace('move_sent_', '', $_POST['action']);
91 91
         }
92 92
 
93 93
         foreach ($checked_file_ids as $value) {
Please login to merge, or discard this patch.
main/course_progress/thematic_controller.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -390,7 +390,7 @@
 block discarded – undo
390 390
      *
391 391
      */
392 392
     public function thematic_advance($action)
393
-     {
393
+        {
394 394
         $thematic = new Thematic();
395 395
         $attendance = new Attendance();
396 396
         $data = array();
Please login to merge, or discard this patch.
main/course_progress/thematic_plan.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -47,15 +47,15 @@
 block discarded – undo
47 47
             $form->addElement('hidden', 'description_type['.$id.']', $id);
48 48
             $form->addText('title['.$id.']', get_lang('Title'), false, array('size'=>'50'));
49 49
             $form->addHtmlEditor(
50
-               'description['.$id.']',
51
-               get_lang('Description'),
52
-               false,
53
-               false,
54
-               array(
55
-                   'ToolbarStartExpanded' => 'false',
56
-                   'ToolbarSet' => 'TrainingDescription',
57
-                   'Height' => '150'
58
-               )
50
+                'description['.$id.']',
51
+                get_lang('Description'),
52
+                false,
53
+                false,
54
+                array(
55
+                    'ToolbarStartExpanded' => 'false',
56
+                    'ToolbarSet' => 'TrainingDescription',
57
+                    'Height' => '150'
58
+                )
59 59
             );
60 60
 
61 61
             if (!empty($thematic_simple_list) && in_array($id, $thematic_simple_list)) {
Please login to merge, or discard this patch.
main/newscorm/lp_admin_view.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
 // Using the resource linker as a tool for adding resources to the learning path.
42 42
 if ($action == 'add' and $type == 'learnpathitem') {
43
-     $htmlHeadXtra[] = "<script> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>";
43
+        $htmlHeadXtra[] = "<script> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>";
44 44
 }
45 45
 if ((!$is_allowed_to_edit) || ($isStudentView)) {
46 46
     error_log('New LP - User not authorized in lp_admin_view.php');
Please login to merge, or discard this patch.
main/newscorm/lp_edit.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
 $form->addElement('checkbox', 'activate_start_date_check', null,get_lang('EnableStartTime'), array('onclick' => 'activate_start_date()'));
161 161
 $display_date = 'none';
162 162
 if ($publicated_on!='0000-00-00 00:00:00' && !empty($publicated_on)) {
163
-	$display_date = 'block';
164
-	$defaults['activate_start_date_check'] = 1;
163
+    $display_date = 'block';
164
+    $defaults['activate_start_date_check'] = 1;
165 165
 }
166 166
 
167 167
 $form->addElement('html','<div id="start_date_div" style="display:'.$display_date.';">');
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
 $form->addElement('checkbox', 'activate_end_date_check',  null, get_lang('EnableEndTime'),  array('onclick' => 'activate_end_date()'));
173 173
 $display_date = 'none';
174 174
 if ($expired_on!='0000-00-00 00:00:00' && !empty($expired_on)) {
175
-	$display_date = 'block';
176
-	$defaults['activate_end_date_check'] = 1;
175
+    $display_date = 'block';
176
+    $defaults['activate_end_date_check'] = 1;
177 177
 }
178 178
 
179 179
 $form->addElement('html','<div id="end_date_div" style="display:'.$display_date.';">');
Please login to merge, or discard this patch.
main/newscorm/aicc_api.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
           <?php
143 143
             $who = addslashes(api_get_person_name($_user['firstName'], $_user['lastName']));
144 144
             echo "result='$who';";
145
-          ?>
145
+            ?>
146 146
     }else if(param == 'cmi.core.lesson_location'){
147 147
         result=lesson_location;
148 148
     }else if(param == 'cmi.core.total_time'){
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
           <?php
199 199
             $who = addslashes(api_get_person_name($_user['firstName'], $_user['lastName']));
200 200
             echo "result='$who';";
201
-          ?>	break;
201
+            ?>	break;
202 202
         case 'cmi.core.lesson_location'	:
203 203
             result='';
204 204
             break;
@@ -322,12 +322,12 @@  discard block
 block discarded – undo
322 322
 }
323 323
 <?php
324 324
 /**
325
- * Chamilo-specific code that deals with event handling and inter-frames
326
- * messaging/refreshing.
327
- * Note that from now on, the Chamilo JS code in this library will act as
328
- * a controller, of the MVC pattern, and receive all requests for frame
329
- * updates, then redispatch to any frame concerned.
330
- */
325
+     * Chamilo-specific code that deals with event handling and inter-frames
326
+     * messaging/refreshing.
327
+     * Note that from now on, the Chamilo JS code in this library will act as
328
+     * a controller, of the MVC pattern, and receive all requests for frame
329
+     * updates, then redispatch to any frame concerned.
330
+     */
331 331
 ?>
332 332
 /**
333 333
  * Defining the AJAX-object class to be made available from other frames.
Please login to merge, or discard this patch.
main/newscorm/content_makers.inc.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@
 block discarded – undo
13 13
     'Accent',
14 14
     'Accenture',
15 15
     'ADLNet',
16
-      'Articulate',
17
-      'ATutor',
18
-      'Blackboard',
19
-      'Calfat',
20
-      'Captivate',
16
+        'Articulate',
17
+        'ATutor',
18
+        'Blackboard',
19
+        'Calfat',
20
+        'Captivate',
21 21
     'Chamilo',
22 22
     'Chamilo 2',
23 23
     'Claroline',
Please login to merge, or discard this patch.
main/newscorm/lp_ajax_initialize.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
     if (!empty($myistring)) {
81 81
         $myistring = substr($myistring, 1);
82 82
     }
83
-	// Obtention des donnees d'objectifs
83
+    // Obtention des donnees d'objectifs
84 84
 
85
-	$mycoursedb = Database::get_course_table(TABLE_LP_IV_OBJECTIVE);
85
+    $mycoursedb = Database::get_course_table(TABLE_LP_IV_OBJECTIVE);
86 86
     $course_id = api_get_course_int_id();
87
-	$mylp_iv_id = $mylpi->db_item_view_id;
87
+    $mylp_iv_id = $mylpi->db_item_view_id;
88 88
 
89 89
     $phpobjectives = array();
90 90
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             $phpobjectives[] = $row;
99 99
         }
100 100
     }
101
-	$myobjectives = json_encode($phpobjectives);
101
+    $myobjectives = json_encode($phpobjectives);
102 102
 
103 103
     $return .=
104 104
             "olms.score=".$myscore.";" .
Please login to merge, or discard this patch.