Made isteacher() require that the first parameter (course id) be
specified and non-empty. If it is empty, [i.e., 0, which was used to
simulate what has now become isteacherinanycourse()], then the return
value IS correct but a warning is printed on screen. This should allow
us to track down any such calls in legacy modules without breaking Moodle.
The correct way to check for teacher status in ANY course is now to
call isteacherinanycourse().
html2text conversion.
While there I tidied up the source and fixed up a problem where the links
were being printed BEFORE the text they refer to (now they are directly after)
Make it more difficult for instances with invalid blockid to be added to
mdl_block_instance. This could result in warnings, although nothing more
serious than that.
Credits to Eloy and especially Dan Marsden for reporting and providing info.
There were several issues in fix_coursesortorder() that were fixed. Mainly:
- the recursive calls dropped the $safe parameter
- we did not even try to maintain uniqueness in the sortorder field across categories
http://moodle.org/bugs/bug.php?op=show&bugid=2334
change at all), and one more optional parameter.
Changed usergetdate() to work with gmdate() instead of gmstrftime().
Small update of the PHPdoc info for get_current_group().
take priority over all other locations).
Later we can add support to download language packs from within Moodle,
and edit/manage new packs more easily.
* When configuring a block instance, "Turn editing off" button is not
shown anymore.
* When configuring a block instance, the breadcrumbs are now better,
providing a link to the course page. This could be done in a much
better way if we had a comprehensive template system but it will
suffice for now.
The old code assumed that the courseid would always be set but that is only the case for course events, not for user or group events. (See http://moodle.org/mod/forum/discuss.php?d=4466#20827 for a discussion about the meaning of the courseid field in the event table)
I also made the $courseid argument to get_coursemodule_from_instance() optional. It is not needed and in some cases it will not be know, as for example for non-course events created by activity modules.