|
[
Permalink
| « Hide
]
Helen Foster added a comment - 29/Sep/07 02:21 PM
Moodle 1.8 is also affected.
Issue is in a change in the resource_get_type output.
This affects the This function should extract the "type" value from the $typrec->type string that is now resource&type=<typename> Following code fixes the issue, recodeing the way this function gets files : Note that although I signal wherethe major fix is, it affects entire code of the function. Note again that I prepared the code for eventual reintegration of all module docs and language files within the module directory so that a module should be entirely self-contained. function include_help_for_each_resource($file, $langs, $helpdir) { require_once($CFG->dirroot .'/mod/resource/lib.php'); foreach ($typeset as $type) { $filepath = "$helpdir/resource/type/{$type}.html"; // If that does not exist, try a fallback into the module code folder. if (file_exists_and_readable($filepath)) {
echo '<hr size="1" />';
@include($filepath); // The actual helpfile
break; // Out of loop over languages.
} Assigning this to Jérôme... ciao
Patch attached. Thank you Valery
Uhm...
perhaps... I would modify the resource_get_types() function to return one more attribute, say, $type->name or $type->code or something like that. And them, I'd use that new attribute directly in help.php Ciao new patch attached (I fixed XHTML issue too)
Looks perfect for me. If it also works... +1 :-D
Thanks, ciao commited and tested in 1.8 Stable, 1.9 Stable and HEAD
Ralf, thanks for reporting this issue, Valery and Eloy, thanks for your contributions, and Jerome, thanks for fixing it
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||