Completed
Push — 1.11.x ( d78ca9...0f5bcf )
by José
71:55 queued 46:29
created
main/mySpace/myStudents.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1143,10 +1143,11 @@
 block discarded – undo
1143 1143
                 $result_last_attempt = Database::query($sql);
1144 1144
                 if (Database :: num_rows($result_last_attempt) > 0) {
1145 1145
                     $id_last_attempt = Database :: result($result_last_attempt, 0, 0);
1146
-                    if ($count_attempts > 0)
1147
-                        echo '<a href="../exercise/exercise_show.php?id=' . $id_last_attempt . '&cidReq='.$course_code.'&session_id='.$sessionId.'&student='.$student_id.'&origin='.(empty($origin)?'tracking':$origin).'">
1146
+                    if ($count_attempts > 0) {
1147
+                                            echo '<a href="../exercise/exercise_show.php?id=' . $id_last_attempt . '&cidReq='.$course_code.'&session_id='.$sessionId.'&student='.$student_id.'&origin='.(empty($origin)?'tracking':$origin).'">
1148 1148
                         '.Display::return_icon('quiz.gif').'
1149 1149
                      </a>';
1150
+                    }
1150 1151
                 }
1151 1152
                 echo '</td>';
1152 1153
 
Please login to merge, or discard this patch.
main/exercise/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/exercise/admin.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -362,9 +362,10 @@
 block discarded – undo
362 362
 
363 363
 if ($inATest) {
364 364
     echo '<div class="actions">';
365
-    if (isset($_GET['hotspotadmin']) || isset($_GET['newQuestion']) || isset($_GET['myid']))
366
-        echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/admin.php?exerciseId='.$exerciseId.'&'.api_get_cidreq().'">'.
365
+    if (isset($_GET['hotspotadmin']) || isset($_GET['newQuestion']) || isset($_GET['myid'])) {
366
+            echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/admin.php?exerciseId='.$exerciseId.'&'.api_get_cidreq().'">'.
367 367
             Display::return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).'</a>';
368
+    }
368 369
 
369 370
     if (!isset($_GET['hotspotadmin']) && !isset($_GET['newQuestion']) && !isset($_GET['myid']) &&  !isset($_GET['editQuestion'])) {
370 371
         echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/exercise.php?'.api_get_cidreq().'">'.
Please login to merge, or discard this patch.
main/exercise/question.class.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -607,10 +607,11 @@
 block discarded – undo
607 607
             $current_width = $current_image_size['width'];
608 608
             $current_height = $current_image_size['height'];
609 609
 
610
-            if ($current_width < $Max && $current_height < $Max)
611
-                return true;
612
-            elseif ($current_height == "")
613
-                return false;
610
+            if ($current_width < $Max && $current_height < $Max) {
611
+                            return true;
612
+            } elseif ($current_height == "") {
613
+                            return false;
614
+            }
614 615
 
615 616
             // Resize according to height.
616 617
             if ($Dimension == "height") {
Please login to merge, or discard this patch.
main/exercise/unique_answer_no_option.class.php 1 patch
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -146,15 +146,17 @@  discard block
 block discarded – undo
146 146
                     $list_dest = $item_list[2];
147 147
                     $url = $item_list[3];
148 148
 
149
-                    if ($try == 0)
150
-                        $try_result = 0;
151
-                    else
152
-                        $try_result = 1;
149
+                    if ($try == 0) {
150
+                                            $try_result = 0;
151
+                    } else {
152
+                                            $try_result = 1;
153
+                    }
153 154
 
154
-                    if ($url == 0)
155
-                        $url_result = '';
156
-                    else
157
-                        $url_result = $url;
155
+                    if ($url == 0) {
156
+                                            $url_result = '';
157
+                    } else {
158
+                                            $url_result = $url;
159
+                    }
158 160
 
159 161
                     $temp_scenario['url' . $i] = $url_result;
160 162
                     $temp_scenario['try' . $i] = $try_result;
@@ -343,8 +345,9 @@  discard block
 block discarded – undo
343 345
                 }
344 346
         	}
345 347
 
346
- 			if (empty($try))
347
- 				$try=0;
348
+ 			if (empty($try)) {
349
+ 			 				$try=0;
350
+ 			}
348 351
 
349 352
  			if (empty($lp)) {
350 353
  				$lp=0;
Please login to merge, or discard this patch.
main/exercise/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/exercise/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/exercise/export/aiken/aiken_classes.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,9 @@
 block discarded – undo
7 7
  * @package chamilo.exercise
8 8
  */
9 9
 
10
-if ( count( get_included_files() ) == 1 ) die( '---' );
10
+if ( count( get_included_files() ) == 1 ) {
11
+    die( '---' );
12
+}
11 13
 
12 14
 if (!function_exists('mime_content_type')) {
13 15
 	function mime_content_type($filename) {
Please login to merge, or discard this patch.
main/exercise/export/aiken/aiken_import.inc.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,8 +10,9 @@  discard block
 block discarded – undo
10 10
 /**
11 11
  * Security check
12 12
  */
13
-if (count(get_included_files()) == 1)
13
+if (count(get_included_files()) == 1) {
14 14
     die('---');
15
+}
15 16
 
16 17
 /**
17 18
  * Creates a temporary directory
@@ -21,8 +22,9 @@  discard block
 block discarded – undo
21 22
  * @return string
22 23
  */
23 24
 function tempdir($dir, $prefix = 'tmp', $mode = 0777) {
24
-    if (substr($dir, -1) != '/')
25
-        $dir .= '/';
25
+    if (substr($dir, -1) != '/') {
26
+            $dir .= '/';
27
+    }
26 28
 
27 29
     do {
28 30
         $path = $dir . $prefix . mt_rand(0, 9999999);
Please login to merge, or discard this patch.