Browse Source

[svn r18415] Minor - Logic change - Fixed import HotPotatoes tests due to the new button - see FS#3345

Cristian Fasanando 16 years ago
parent
commit
7955adf4ed
2 changed files with 5 additions and 4 deletions
  1. 3 2
      main/exercice/hotpotatoes.lib.php
  2. 2 2
      main/exercice/hotpotatoes.php

+ 3 - 2
main/exercice/hotpotatoes.lib.php

@@ -22,7 +22,7 @@
 *	Code library for HotPotatoes integration.
 *	@package dokeos.exercise
 * 	@author Istvan Mandak
-* 	@version $Id: hotpotatoes.lib.php 13384 2007-10-04 09:08:37Z elixir_inter $
+* 	@version $Id: hotpotatoes.lib.php 18415 2009-02-10 18:58:55Z cfasanando $
 */
 
 
@@ -152,13 +152,14 @@ function GetFileName($fname)
  */
 function ReadFileCont($full_file_path)
 {
+  if(is_file($full_file_path)) {
 	if (!($fp = fopen(urldecode($full_file_path), "r"))) {
-//	if (!($fp = fopen($full_file_path, "r"))) {
 		return "";
 	}
 	$contents = fread($fp, filesize($full_file_path));
 	fclose($fp);
 	return $contents;
+  }
 }
 
 /**

+ 2 - 2
main/exercice/hotpotatoes.php

@@ -22,7 +22,7 @@
 *	Code for Hotpotatoes integration.
 *	@package dokeos.exercise
 * 	@author Istvan Mandak
-* 	@version $Id: hotpotatoes.php 18210 2009-02-03 21:43:48Z herodoto $
+* 	@version $Id: hotpotatoes.php 18415 2009-02-10 18:58:55Z cfasanando $
 */
 
 
@@ -279,7 +279,7 @@ if(($is_allowedToEdit) && (($finish == 0) || ($finish == 2)))
 			echo '<td width="250">';
 			echo '</td>';
 			echo '<td>';
-				echo '<button type="submit" name="submit">'.get_lang('Send').'</button>';
+				echo '<button type="submit" name="submit" value="'.get_lang('Send').'">'.get_lang('Send').'</button>';
 			echo '</td>';
 		echo '</tr>';
 	echo '</table>';