diff --git a/main/exercice/hotpotatoes.lib.php b/main/exercice/hotpotatoes.lib.php index a833a35096..ce263f4be0 100644 --- a/main/exercice/hotpotatoes.lib.php +++ b/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; + } } /** diff --git a/main/exercice/hotpotatoes.php b/main/exercice/hotpotatoes.php index b6ad73e14e..e2ab71d770 100644 --- a/main/exercice/hotpotatoes.php +++ b/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 '