Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed trailing whitespace in last commit :-(; merged from MOODLE_16_S…
…TABLE
  • Loading branch information
skodak committed Aug 22, 2006
1 parent 860b554 commit 868ca14
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions help.php
Expand Up @@ -30,34 +30,34 @@

if (!empty($file)) {
// The help to display is from a help file.

// Get the list of parent languages.
if (empty($forcelang)) {
$langs = array(current_language(), get_string('parentlanguage'), 'en_utf8'); // Fallback
} else {
$langs = array($forcelang);
}
}

// Work through the possible languages, starting with the most specific.
foreach ($langs as $lang) {
if (empty($lang)) {
continue;
}

// Work out which directory the help files live in.
if ($lang == 'en_utf8') {
$helpdir = $CFG->dirroot;
} else {
$helpdir = $CFG->dataroot;
}
$helpdir .= "/lang/$lang/help";

// Then which file in there we should be serving.
if ($module == 'moodle') {
$filepath = "$helpdir/$file";
} else {
$filepath = "$helpdir/$module/$file";

// If that does not exist, try a fallback into the module code folder.
if (!file_exists($filepath)) {
$filepath = "$CFG->dirroot/mod/$module/lang/$lang/help/$module/$file";
Expand All @@ -69,7 +69,7 @@
$helpfound = true;
@include($filepath); // The actual helpfile

// Now, we process some special cases.
// Now, we process some special cases.
if ($module == 'moodle' and ($file == 'index.html' or $file == 'mods.html')) {
include_help_for_each_module($file, $langs, $helpdir);
}
Expand Down Expand Up @@ -178,7 +178,7 @@ function include_help_for_each_assignment_type() {

require_once($CFG->dirroot .'/mod/assignment/lib.php');
$typelist = assignment_types();

foreach ($typelist as $type => $name) {
echo '<p><b>'.$name.'</b></p>';
echo get_string('help'.$type, 'assignment');
Expand Down

0 comments on commit 868ca14

Please sign in to comment.