Browse Source

Minor - php warnings

Julio Montoya 12 years ago
parent
commit
d1addaf9fb

+ 2 - 1
main/exercice/exercise.class.php

@@ -2276,7 +2276,7 @@ class Exercise {
 							$str = str_replace('\r\n', '', $str);
 							$choice = $arr[1];
 
-							$tmp = api_strrpos($choice[$j],' / ');
+                            $tmp = api_strrpos($choice[$j],' / ');
 							$choice[$j] = api_substr($choice[$j],0,$tmp);
 							$choice[$j] = trim($choice[$j]);
 
@@ -3439,6 +3439,7 @@ class Exercise {
 	 public function is_visible($lp_id = 0, $lp_item_id = 0 , $lp_item_view_id = 0, $filter_by_admin = true) {
 		//1. By default the exercise is visible
 		$is_visible = true;
+        $message = null;
 
 		//1.1 Admins and teachers can access to the exercise
         if ($filter_by_admin) {

+ 2 - 0
main/exercice/exercise.lib.php

@@ -203,6 +203,8 @@ function showQuestion($questionId, $only_questions = false, $origin = false, $cu
 			$numAnswer       = $objAnswerTmp->selectAutoId($answerId);
             $comment         = $objAnswerTmp->selectComment($answerId);
 
+            $attributes = array();
+
 			// Unique answer
 			if ($answerType == UNIQUE_ANSWER || $answerType == UNIQUE_ANSWER_NO_OPTION) {
 				$input_id = 'choice-'.$questionId.'-'.$answerId;

+ 1 - 1
main/exercice/question.class.php

@@ -1460,7 +1460,7 @@ abstract class Question
 
         // display question category, if any
         $header = Testcategory::returnCategoryAndTitle($this->id);
-
+        $show_media = null;
         if ($show_media) {
             $header .= $this->show_media_content();
         }

+ 2 - 2
main/inc/global.inc.php

@@ -307,8 +307,8 @@ if (!$x = strpos($_SERVER['PHP_SELF'], 'whoisonline.php')) {
 // ===== end "who is logged in?" module section =====
 
 if (api_get_setting('server_type') == 'test') {
-    //error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
-    error_reporting(-1);
+    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
+    //error_reporting(-1);
 } else {
     /*
     Server type is not test