Completed
Push — 1.10.x ( 501d19...0db498 )
by Yannick
89:35 queued 49:03
created
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.
main/exercice/hotspot_savescore.inc.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,12 +15,13 @@
 block discarded – undo
15 15
 $exerciseId   = $objExcercise->selectId();
16 16
 // Save clicking order
17 17
 $answerOrderId = count($_SESSION['exerciseResult'][$questionId]['ids'])+1;
18
-if ($_GET['answerId'] == "0") // click is NOT on a hotspot
18
+if ($_GET['answerId'] == "0") {
19
+    // click is NOT on a hotspot
19 20
 {
20 21
 	$hit = 0;
21
-	$answerId = NULL;
22 22
 }
23
-else // user clicked ON a hotspot
23
+	$answerId = NULL;
24
+} else // user clicked ON a hotspot
24 25
 {
25 26
 	$hit = 1;
26 27
 	$answerId = api_substr($_GET['answerId'],22,2);
Please login to merge, or discard this patch.
main/exercice/exercise_admin.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -171,10 +171,11 @@
 block discarded – undo
171 171
     }
172 172
     echo '</div>';
173 173
 
174
-    if ($objExercise->feedback_type == 1)
175
-        Display::display_normal_message(
174
+    if ($objExercise->feedback_type == 1) {
175
+            Display::display_normal_message(
176 176
             get_lang('DirectFeedbackCantModifyTypeQuestion')
177 177
         );
178
+    }
178 179
 
179 180
     if (api_get_setting('search_enabled')=='true' && !extension_loaded('xapian')) {
180 181
         Display::display_error_message(get_lang('SearchXapianModuleNotInstalled'));
Please login to merge, or discard this patch.
main/exercice/export/qti2/qti2_classes.php 1 patch
Braces   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,11 @@
 block discarded – undo
104 104
     {
105 105
 		$this->answerList = $this->getAnswersList(true);
106 106
 		$type = $this->getQuestionType();
107
-        if ($type == MCMA)  $cardinality = 'multiple'; else $cardinality = 'single';
107
+        if ($type == MCMA) {
108
+            $cardinality = 'multiple';
109
+        } else {
110
+            $cardinality = 'single';
111
+        }
108 112
 
109 113
         $out = '  <responseDeclaration identifier="' . $questionIdent . '" cardinality="' . $cardinality . '" baseType="identifier">' . "\n";
110 114
 
Please login to merge, or discard this patch.