Details
Description
I am not quite sure which is the best component so I included all that I thought might apply for the help.php file. The line in question is:
$filepath = $locationprefix.$lang.'/help/'.$locationsuffix;
I was working on CONTRIB-1258 trying to help the person figure out why the help files were not being found. I printed out the searchable locations and found that the help.php was searching for:
/lang/en_us_utf8_local/help/enrol_amazon/access_key.html
/lang/en_us_utf8_local/help/enrol_amazon/access_key.html
/enrol/amazon/lang/en_us_utf8_local/help/amazon/access_key.html
/lang/en_us_utf8/help/enrol_amazon/access_key.html
/lang/en_us_utf8/help/enrol_amazon/access_key.html
/enrol/amazon/lang/en_us_utf8/help/amazon/access_key.html
/lang/[[parentlanguage]]_local/help/enrol_amazon/access_key.html
/lang/[[parentlanguage]]_local/help/enrol_amazon/access_key.html
/enrol/amazon/lang/[[parentlanguage]]_local/help/amazon/access_key.html
/lang/[[parentlanguage]]/help/enrol_amazon/access_key.html
/lang/[[parentlanguage]]/help/enrol_amazon/access_key.html
/enrol/amazon/lang/[[parentlanguage]]/help/amazon/access_key.html
/lang/en_utf8_local/help/enrol_amazon/access_key.html
/lang/en_utf8_local/help/enrol_amazon/access_key.html
/enrol/amazon/lang/en_utf8_local/help/amazon/access_key.html
/lang/en_utf8/help/enrol_amazon/access_key.html
/lang/en_utf8/help/enrol_amazon/access_key.html
/enrol/amazon/lang/en_utf8/help/amazon/access_key.html
It seems to me that we would be better to have some consistency in where things are being searched. When searching under /lang/ we look for /help/$modulename/$filename but when searching in /enrol/amazon/lang/ we use:
$filepath = $locationprefix.$lang.'/help/'.$locationsuffix;
I think it would be better if we used:
$filepath = $locationprefix.$lang.'/help/'.$locationprefix.'_'.$locationsuffix;
then looking at the last to two searchable paths we would get:
/lang/en_utf8/help/enrol_amazon/access_key.html
/enrol/amazon/lang/en_utf8/help/enrol_amazon/access_key.html
I think that after the /help/ directory we should search in the same path. The reason I think this is important is that some system administrators when installing a plugin will leave the language files in the plugin's lang folder and some will move them to Moodle's lang folder. I would like help.php to be able to find the help files regardless.
Peace - Anthony
Issue Links
| This issue has been marked as being related by: | ||||
| CONTRIB-1258 | Amazon FPS Enrol Module |
|
|
|
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions