Skip to content

Commit

Permalink
If help file is not found in language directory then look in language…
Browse files Browse the repository at this point in the history
… subdirectory of module directory.
  • Loading branch information
gustav_delius committed Apr 10, 2005
1 parent 9613945 commit 68396ed
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions help.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 68396ed

Please sign in to comment.