From 7955adf4ed8338737b9a86a019729c169d129bb8 Mon Sep 17 00:00:00 2001 From: Cristian Fasanando Date: Tue, 10 Feb 2009 19:58:55 +0100 Subject: [PATCH] [svn r18415] Minor - Logic change - Fixed import HotPotatoes tests due to the new button - see FS#3345 --- main/exercice/hotpotatoes.lib.php | 5 +++-- main/exercice/hotpotatoes.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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 ''; echo ''; echo ''; - echo ''; + echo ''; echo ''; echo ''; echo '';