Browse Source

Minor - removing comments using api_preg_match

Julio Montoya 12 years ago
parent
commit
8e69892d1f
2 changed files with 1 additions and 2 deletions
  1. 1 1
      main/exercice/exercise.class.php
  2. 0 1
      main/exercice/exercise.lib.php

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

@@ -2234,7 +2234,7 @@ class Exercise {
 							$resfill = Database::query($queryfill);
 							$str = Database::result($resfill,0,'answer');
 
-							preg_match_all('#\[([^[]*)\]#', $str, $arr);
+							api_preg_match_all('#\[([^[]*)\]#', $str, $arr);
 							$str = str_replace('\r\n', '', $str);
 							$choice = $arr[1];
 

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

@@ -422,7 +422,6 @@ function showQuestion($questionId, $only_questions = false, $origin = false, $cu
                             $correct_item = preg_quote($correct_item);
                             $correct_item = api_preg_replace('|/|', '\/', $correct_item);   // to prevent error if there is a / in the text to find
 				            $answer = api_preg_replace('/'.$correct_item.'/', Display::input('text', "choice[$questionId][]", $value), $answer);                            
-                            //$answer = api_preg_replace('/\['.$correct_item.'+\]/', Display::input('text', "choice[$questionId][]", $value), $answer);	
 				        }		        				        
 				        $i++;				        
 				    }