Пример #1
0
                $helpfound = true;
                @(include $filepath);
                // The actual helpfile
                // Now, we process some special cases.
                $helpdir = $locationprefix . $lang . '/help';
                if ($module == 'moodle' and ($file == 'index.html' or $file == 'mods.html')) {
                    include_help_for_each_module($file, $langs, $helpdir);
                }
                // The remaining horrible hardcoded special cases should be delegated to modules somehow.
                if ($module == 'moodle' and $file == 'resource/types.html') {
                    // RESOURCES
                    include_help_for_each_resource($file, $langs, $helpdir);
                }
                if ($module == 'moodle' and $file == 'assignment/types.html') {
                    // ASSIGNMENTS
                    include_help_for_each_assignment_type();
                }
            }
        }
        reset($locations);
    }
} else {
    // The help to display was given as an argument to this function.
    echo '<p>' . s($text) . '</p>';
    // This param was already cleaned
    $helpfound = true;
}
print_simple_box_end();
// Display an error if necessary.
if (!$helpfound) {
    notify('Help file "' . $file . '" could not be found!');
Пример #2
0
        // The actual helpfile
        // Now, we process some special cases.
        if ($module == 'moodle' and ($file == 'index.html' or $file == 'mods.html')) {
            include_help_for_each_module($file, $forcelang, $skiplocal);
        }
        if ($module == 'question' && $file == 'types.html') {
            include_help_for_each_qtype();
        }
        // The remaining horrible hardcoded special cases should be delegated to modules somehow.
        if ($module == 'moodle' && $file == 'resource/types.html') {
            // RESOURCES
            include_help_for_each_resource($forcelang, $skiplocal);
        }
        if ($module == 'moodle' && $file == 'assignment/types.html') {
            // ASSIGNMENTS
            include_help_for_each_assignment_type($forcelang, $skiplocal);
        }
    }
} else {
    // The help to display was given as an argument to this function.
    echo '<p>' . s($text) . '</p>';
    // This param was already cleaned
    $helpfound = true;
}
// Finish buffer
$output = ob_get_contents();
ob_end_clean();
// Determine title
$title = get_string('help');
// Default is just 'Help'
$matches = array();