From 68396ed91fa4f25bd7cc6ff63994e74ddb337e35 Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Sun, 10 Apr 2005 05:08:31 +0000 Subject: [PATCH] If help file is not found in language directory then look in language subdirectory of module directory. --- help.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/help.php b/help.php index e4b24bd5219b4..6544a1bf2f79b 100644 --- a/help.php +++ b/help.php @@ -5,14 +5,14 @@ * * Prints a very simple page and includes * page content or a string from elsewhere. - * Usually this will appear in a popup + * Usually this will appear in a popup * See {@link helpbutton()} in {@link lib/moodlelib.php} * * @author Martin Dougiamas * @version $Id$ * @package moodlecore */ - + require_once('config.php'); @@ -40,8 +40,11 @@ $filepath = $CFG->dirroot .'/lang/'. $lang .'/help/'. $file; } else { $filepath = $CFG->dirroot .'/lang/'. $lang .'/help/'. $module .'/'. $file; + if (!file_exists($filepath)) { + $filepath = $CFG->dirroot.'/mod/'.$module.'/lang/'. $lang .'/help/'. $module .'/'. $file; + } } - + if (file_exists($filepath)) { $helpfound = true; include($filepath); // The actual helpfile