When deleting modules that failed to delete using normal method, it deleted
the course-modules table first and then the availability/completion,
which depend on the entries in course-modules table. This commit switches
the order.
Credit: original version done by Kirill Astashov of NetSpot (netspot.com.au),
finished and tweaked by sam.
This change adds conditional availability support for sections analagous to
that already available for activities. (Backend, UI, backup/restore.)
In order that this feature does not reduce performance, section cacheing has
also been added using a new course 'sectioncache' field analagous to modinfo.
The new feature integrates with activity availability so that activities
inside sections which are not available are automatically not available
themselves (meaning it works to restrict access).
There was a static cache inside course/lib.php. I need to access this
information in other places, so to avoid making two queries, I am
moving the cache into the groups_get_all_groupings function instead.
The idea is to not use inequalities in SQL queries for loading of courses in navigation because ti seems some SQL query optimiser have problems with that.
Also modified the list of languages appearance, textarea is more suitable for entry of long texts. It is now also possible to specify empty list of languages and fonts which removes the button from the editor toolbar. Includes release name fix.
This change makes the resource module use the new API when it embeds media
files (audio/video/Flash), and removes the resourcelib library functions
which were previously used for this.
The old API is still used for embedding non-media files such as PDFs and
HTML.
The URL and Lesson module both used copy/paste duplicates of a section of
resource module code which called the removed functions. I have changed
these too. As a bonus this significantly reduces the duplication involved.
The JavaScript file picker API shows a preview of the media file you have chosen.
This preview facility now uses an iframe, in order not to duplicate the embed code
in JavaScript. The iframe uses the standard embed API.