Completed
Push — 1.10.x ( 986d2b...f19030 )
by Angel Fernando Quiroz
69:29 queued 19:50
created
main/newscorm/openoffice_text_document.class.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,8 +119,9 @@
 block discarded – undo
119 119
 
120 120
         for ($i = 0; $i<count($matches[0]); $i++) {
121 121
 
122
-            if (empty($matches[1][$i]))
123
-                continue;
122
+            if (empty($matches[1][$i])) {
123
+                            continue;
124
+            }
124 125
 
125 126
             $content = api_strstr($content, $matches[0][$i]);
126 127
             if ($i + 1 !== count($matches[0])) {
Please login to merge, or discard this patch.
main/newscorm/resourcelinker.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -341,8 +341,7 @@
 block discarded – undo
341 341
         case '1': // coming from Agenda
342 342
             if ($action == 'edit') {
343 343
                 $url = "../calendar/agenda.php?action=edit&id=49&originalresource=$originalresource";
344
-            }
345
-            elseif ($action == 'add') {
344
+            } elseif ($action == 'add') {
346 345
                 $url = "../calendar/agenda.php?action=add&originalresource=$originalresource";
347 346
             } else {
348 347
                 $url = "../calendar/agenda.php?action=add";
Please login to merge, or discard this patch.
main/newscorm/aicc.class.php 1 patch
Braces   +24 added lines, -15 removed lines patch added patch discarded remove patch
@@ -459,11 +459,12 @@  discard block
 block discarded – undo
459 459
             }
460 460
         }
461 461
 
462
-        if ($package_type == '' || !$mandatory)
463
-        // && defined('CHECK_FOR_AICC') && CHECK_FOR_AICC)
462
+        if ($package_type == '' || !$mandatory) {
463
+                // && defined('CHECK_FOR_AICC') && CHECK_FOR_AICC)
464 464
         {
465 465
             return api_failure::set_failure('not_aicc_content');
466 466
         }
467
+        }
467 468
 
468 469
         if (!enough_size($realFileSize, $course_sys_dir, $maxFilledSpace)) {
469 470
             return api_failure::set_failure('not_enough_space');
@@ -511,7 +512,9 @@  discard block
 block discarded – undo
511 512
                     if ($file != '.' && $file != '..') {
512 513
                         $filetype = 'file';
513 514
 
514
-                        if (is_dir($course_sys_dir.$new_dir.$file)) $filetype = 'folder';
515
+                        if (is_dir($course_sys_dir.$new_dir.$file)) {
516
+                            $filetype = 'folder';
517
+                        }
515 518
 
516 519
                         // TODO: RENAMING FILES CAN BE VERY DANGEROUS AICC-WISE, avoid that as much as possible!
517 520
                         //$safe_file = api_replace_dangerous_char($file, 'strict');
@@ -910,37 +913,43 @@  discard block
 block discarded – undo
910 913
                     if ($enclosed && $data{$i+1} == $enclosure) {
911 914
                         $fldval .= $chr;
912 915
                         ++$i; // Skip the next character.
913
-                    } else
914
-                        $enclosed = !$enclosed;
916
+                    } else {
917
+                                            $enclosed = !$enclosed;
918
+                    }
915 919
                     break;
916 920
                 case $delim:
917 921
                     if (!$enclosed) {
918 922
                         $ret_array[$linecount][$fldcount++] = $fldval;
919 923
                         $fldval = '';
920
-                    } else
921
-                        $fldval .= $chr;
924
+                    } else {
925
+                                            $fldval .= $chr;
926
+                    }
922 927
                     break;
923 928
                 case "\r":
924
-                    if (!$enclosed&&$data{$i+1} == "\n")
925
-                        continue;
929
+                    if (!$enclosed&&$data{$i+1} == "\n") {
930
+                                            continue;
931
+                    }
926 932
                 case "\n":
927 933
                     if (!$enclosed) {
928 934
                         $ret_array[$linecount++][$fldcount] = $fldval;
929 935
                         $fldcount = 0;
930 936
                         $fldval = '';
931
-                    } else
932
-                        $fldval .= $chr;
937
+                    } else {
938
+                                            $fldval .= $chr;
939
+                    }
933 940
                     break;
934 941
                 case "\\r":
935
-                    if (!$enclosed&&$data{$i+1} == "\\n")
936
-                        continue;
942
+                    if (!$enclosed&&$data{$i+1} == "\\n") {
943
+                                            continue;
944
+                    }
937 945
                 case "\\n":
938 946
                     if (!$enclosed) {
939 947
                         $ret_array[$linecount++][$fldcount] = $fldval;
940 948
                         $fldcount = 0;
941 949
                         $fldval = '';
942
-                    } else
943
-                        $fldval .= $chr;
950
+                    } else {
951
+                                            $fldval .= $chr;
952
+                    }
944 953
                     break;
945 954
                 default:
946 955
                     $fldval .= $chr;
Please login to merge, or discard this patch.
main/dashboard/dashboard_controller.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,9 @@  discard block
 block discarded – undo
48 48
             foreach ($dashboard_blocks as $block) {
49 49
 
50 50
                 // display only user blocks
51
-                if (!in_array($block['id'], $user_blocks_id)) continue;
51
+                if (!in_array($block['id'], $user_blocks_id)) {
52
+                    continue;
53
+                }
52 54
 
53 55
                 $path = $block['path'];
54 56
                 $controller_class = $block['controller'];
@@ -61,7 +63,9 @@  discard block
 block discarded – undo
61 63
                     // check if user is allowed to see the block
62 64
                     if (method_exists($obj, 'is_block_visible_for_user')) {
63 65
                         $is_block_visible_for_user = $obj->is_block_visible_for_user($user_id);
64
-                        if (!$is_block_visible_for_user) continue;
66
+                        if (!$is_block_visible_for_user) {
67
+                            continue;
68
+                        }
65 69
                     }
66 70
 
67 71
                     $data_block[$path] = $obj->get_block();
Please login to merge, or discard this patch.
main/blog/download.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,9 @@
 block discarded – undo
40 40
 //if the rewrite rule asks for a directory, we redirect to the course view
41 41
 if (is_dir($full_file_name)) {
42 42
 	//remove last slash if present
43
-	while ($doc_url{$dul = strlen($doc_url)-1}=='/') $doc_url = substr($doc_url,0,$dul);
43
+	while ($doc_url{$dul = strlen($doc_url)-1}=='/') {
44
+	    $doc_url = substr($doc_url,0,$dul);
45
+	}
44 46
 	//create the path
45 47
 	$document_explorer = api_get_path(WEB_COURSE_PATH).api_get_course_path(); // home course path
46 48
 	//redirect
Please login to merge, or discard this patch.
main/blog/blog.php 1 patch
Braces   +11 added lines, -9 removed lines patch added patch discarded remove patch
@@ -379,9 +379,10 @@  discard block
 block discarded – undo
379 379
 	$result = Database::query($sql);
380 380
 	$row = Database::fetch_array($result);
381 381
 
382
-	if ($row['number'] == 1)
383
-		$user_task = true;
384
-}
382
+	if ($row['number'] == 1) {
383
+			$user_task = true;
384
+	}
385
+	}
385 386
 
386 387
 switch ($action) {
387 388
 	case 'new_post':
@@ -468,16 +469,17 @@  discard block
 block discarded – undo
468 469
 			echo '<br /><br />';
469 470
 			Blog :: display_assigned_task_list($blog_id);
470 471
 			echo '<br /><br />';
472
+		} else {
473
+					api_not_allowed();
471 474
 		}
472
-		else
473
-			api_not_allowed();
474 475
 
475 476
 		break;
476 477
 	case 'execute_task' :
477
-		if (isset ($_GET['post_id']))
478
-			Blog :: display_post($blog_id, intval($_GET['post_id']));
479
-		else
480
-			Blog :: display_select_task_post($blog_id, intval($_GET['task_id']));
478
+		if (isset ($_GET['post_id'])) {
479
+					Blog :: display_post($blog_id, intval($_GET['post_id']));
480
+		} else {
481
+					Blog :: display_select_task_post($blog_id, intval($_GET['task_id']));
482
+		}
481 483
 
482 484
 		break;
483 485
 	case 'view_search_result' :
Please login to merge, or discard this patch.
main/exercice/exercise_report.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -400,8 +400,9 @@
 block discarded – undo
400 400
 $extra .= $form->return_form();
401 401
 $extra .= '</div>';
402 402
 
403
-if ($is_allowedToEdit)
403
+if ($is_allowedToEdit) {
404 404
     echo $extra;
405
+}
405 406
 
406 407
 echo $actions;
407 408
 
Please login to merge, or discard this patch.
main/exercice/overview.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -250,8 +250,7 @@
 block discarded – undo
250 250
         case RESULT_DISABLE_SHOW_SCORE_ONLY:
251 251
             if ($objExercise->feedback_type != EXERCISE_FEEDBACK_TYPE_END) {
252 252
                $header_names = array(get_lang('Attempt'), get_lang('StartDate'), get_lang('IP'), get_lang('Score'));
253
-            }
254
-            else {
253
+            } else {
255 254
                 $header_names = array(get_lang('Attempt'), get_lang('StartDate'), get_lang('IP'), get_lang('Score'), get_lang('Details'));
256 255
             }
257 256
             break;
Please login to merge, or discard this patch.
main/exercice/hotspot_lang_conversion.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,10 +18,11 @@
 block discarded – undo
18 18
 	$lang = urldecode($_GET['lang']);
19 19
 	if (preg_match('/^[a-zA-Z0-9\._-]+$/', $lang)) {
20 20
 		//$lang = str_replace($search,$replace,urldecode($_GET['lang']));
21
-		if(file_exists($hotspot_lang_file . $lang . '/hotspot.inc.php'))
22
-			$hotspot_lang_file .= $lang . '/hotspot.inc.php';
23
-		else
24
-			$hotspot_lang_file .= 'english/hotspot.inc.php';
21
+		if(file_exists($hotspot_lang_file . $lang . '/hotspot.inc.php')) {
22
+					$hotspot_lang_file .= $lang . '/hotspot.inc.php';
23
+		} else {
24
+					$hotspot_lang_file .= 'english/hotspot.inc.php';
25
+		}
25 26
 	} else {
26 27
 		$hotspot_lang_file .= 'english/hotspot.inc.php';
27 28
 	}
Please login to merge, or discard this patch.