Tim Hunt
Posts made by Tim Hunt
There is a function helpbutton in weblib.php, which is the thing to sue, and also print_heading_with_help, which is useful shortcut sometimes.
For forms built with lib/formslib (as all forms should be these days) see http://docs.moodle.org/en/Development:lib/formslib.php_Form_Definition#setHelpButton.
Suppose you print a help button with the call
helpbutton('mypage', get_string('tooltip', 'mymod'), 'mymod');
Then this will make a help button with a tooltip "Help with ..." where the ... is replaced with the lang string 'tooltip' from the 'mymod' language file, and clicking on the button will open the 'mypage.html' help file. More exactly, Suppose your Moodle is set to use the French language pack, and the parent of the French Language pack, then Moodle will show the first of these files that exist:
/moodledata/lang/fr_utf8/help/mymod/mypage.html
/moodle/lang/fr_utf8/help/mymod/mypage.html
/mod/mymod/lang/fr_utf8/help/mymod/mypage.html
/moodledata/lang/en_utf8/help/mymod/mypage.html
/moodle/lang/en_utf8/help/mymod/mypage.html
/mod/mymod/lang/en_utf8/help/mymod/mypage.html
If you are working on another sort of plugin, instead of a module, then it is slightly different. For example
helpbutton('mypage', get_string('tooltip', 'block_myblock'), 'block_myblock');
searches
/moodledata/lang/fr_utf8/help/block_myblock/mypage.html
/moodle/lang/fr_utf8/help/block_myblock/mypage.html
/block/myblock/lang/fr_utf8/help/myblock/mypage.html
/moodledata/lang/en_utf8/help/block_myblock/mypage.html
/moodle/lang/en_utf8/help/block_myblock/mypage.html
/block/myblock/lang/en_utf8/help/myblock/mypage.html
I hope I got that right. If you really want to understand this, you just need to read the code of places_to_search_for_lang_strings() and get_string() from lib/moodlelib.php, and the top-level help.php.
It would probably be worth someone writing a really good developer-focussed page about all this on docs.moodle.org. There is some useful information there under http://docs.moodle.org/en/Category:Language, but no one of those pages will tell a developer everything they need to know, an no more.
For forms built with lib/formslib (as all forms should be these days) see http://docs.moodle.org/en/Development:lib/formslib.php_Form_Definition#setHelpButton.
Suppose you print a help button with the call
helpbutton('mypage', get_string('tooltip', 'mymod'), 'mymod');
Then this will make a help button with a tooltip "Help with ..." where the ... is replaced with the lang string 'tooltip' from the 'mymod' language file, and clicking on the button will open the 'mypage.html' help file. More exactly, Suppose your Moodle is set to use the French language pack, and the parent of the French Language pack, then Moodle will show the first of these files that exist:
/moodledata/lang/fr_utf8/help/mymod/mypage.html
/moodle/lang/fr_utf8/help/mymod/mypage.html
/mod/mymod/lang/fr_utf8/help/mymod/mypage.html
/moodledata/lang/en_utf8/help/mymod/mypage.html
/moodle/lang/en_utf8/help/mymod/mypage.html
/mod/mymod/lang/en_utf8/help/mymod/mypage.html
If you are working on another sort of plugin, instead of a module, then it is slightly different. For example
helpbutton('mypage', get_string('tooltip', 'block_myblock'), 'block_myblock');
searches
/moodledata/lang/fr_utf8/help/block_myblock/mypage.html
/moodle/lang/fr_utf8/help/block_myblock/mypage.html
/block/myblock/lang/fr_utf8/help/myblock/mypage.html
/moodledata/lang/en_utf8/help/block_myblock/mypage.html
/moodle/lang/en_utf8/help/block_myblock/mypage.html
/block/myblock/lang/en_utf8/help/myblock/mypage.html
I hope I got that right. If you really want to understand this, you just need to read the code of places_to_search_for_lang_strings() and get_string() from lib/moodlelib.php, and the top-level help.php.
It would probably be worth someone writing a really good developer-focussed page about all this on docs.moodle.org. There is some useful information there under http://docs.moodle.org/en/Category:Language, but no one of those pages will tell a developer everything they need to know, an no more.
Well, what happens when you copy files around is a feature of your operating system, not Moodle (but the upgrade instructions should, perhaps, be more explicit about what you need to do).
There was a change to how the breadcrumbs are produced in Moodle 1.9, but they should still work! It certainly works in my development set-ups. So I fear you will have to do some debugging there.
Can I just clarify, did you upgrade to 1.9 beta, or 1.9 beta+. There has been a lot of work done since the beta release, so beta+ is better.
There was a change to how the breadcrumbs are produced in Moodle 1.9, but they should still work! It certainly works in my development set-ups. So I fear you will have to do some debugging there.
Can I just clarify, did you upgrade to 1.9 beta, or 1.9 beta+. There has been a lot of work done since the beta release, so beta+ is better.