themes & blocks - MDL-19077 & MDL-19010 blocks are now printed by the theme
The code to print blocks in now in theme layout.php files. (Or in
moodle_core_renderer::handle_legacy_theme)
Code for printing blocks everywhere else has been stripped out.
(Total diffstat 1225 insertions, 2019 deletions)
The way the HTML for a block instance is generated has been cleaned
up a lot. Now, the block_instance generates a block_contents
object which gives a structured representation of the block,
and then $OUTPUT->block builds all the HTML from that.
How theme config.php files specify the layout template and block
regions by page general type has been changed to be even more flexible.
Further refinement for how the theme and block code gets initialised.
Ability for scrits to add 'pretend blocks' to the page. That is,
things that look like blocks, but are not normal block_instances.
(Like the add a new block UI.)
Things that are still broken:
* some pages in lesson, quiz and resource. I'm working on it.
* lots of developer debug notices pointing out things that
need to be updated.
The initial patch has been reviewed at the issue page. This commit also
fixes template_renderer_factory::get_renderer() and sets up folders for
subtypes there.
javascript-UFO MDL-19738 Stopped ufo.js being included in outputlib and included it in each place it was actually being used.
It will no only be loaded when it is being used. If something new comes along they will need to remember to require it.
At the same time cleaned up a few deprecated calls
lib MDL-19739 Moved call to include dropdown.js out of outputlib and into the same body of code in weblib
that uses it.
This ensures that it is only loaded if it is used, which is only is the browser is opera, or IE
filelib MDL-19707 Modified file_extension_icon to use extisting function mimeinfo and reverted
two uses of file_extension_icon in course-lib that were incorrect
javascript MDL-16673 Removed all removeable uses of CFG->javascript
In doing this I was able to eliminate the need for javascript.php files, now removed.
I will also be filing several subtasks to clean up the linked to JS files in OUTPUT as well
as all instance of the old style of focusing.
themes: MDL-19077 - more work on the theme_config class.
* Writing lots more PHPdoc comments for all the settings.
* Strip the comments from the standard theme config.php (see below)
* Move finding the layout template from moodle_core_renderer to the theme_config class
* Move loading meta.php files from moodle_core_renderer to the theme_config class
* MDL-19719 Remove support for $THEME->langsheets, and lang/.../styles.php
* MDL-19719 Put the Vietnamese-specific code into the standard theme
* Support for styles.php in all plugin types (at the theme's discretion). (c/f MDL-16438)
* More PHP doc comments for moodle_core_renderer methods.
About stripping comments from config.php: I'm not sure if this
is a good idea, and I may revert this bit. I am hoping that once
http://phpdocs.moodle.org/HEAD/moodlecore/theme_config.html has
been updated, that will be better than copying and pasting these
comments into every theme. I intend to post in the themes forum
to canvas opinions.
lib-filelib MDL-19707 Added file_extension_icon() and file_mimetype_icon()
After talking with Tim we decided that this would be a better solution than adding more methods to $OUTPUT
MDL-19429 Validating 0 values for grademin, grademax and gradepass for the edit category form. Also checking for grademax < grademin case. Merged from MOODLE_19_STABLE
MDL-19716 moodle_url: new parameter to get URL with unescaped ampersands
moodle_url::get_query_string() and moodle_url::out() now accept new
optional parameter. Backwards compatible. This is needed so we can use returned URL
during redirect() which expects unescaped ampersands.
Re-order the code, so we process the actions before we do any output.\r\rThat is the right order anyway, and avoids the problem where require_capability\rafter output is started leads to an exception being thrown.
MDL-16089 entry in modules table created before calling install.php because it might be used there already, also if something fails in install.php the db will be in a more consistent state
MDL-18228 Added a bit of JS to resize the left header of the fixed student column. This should help to keep the rows below aligned. Merged from MOODLE_19_STABLE
MDL-19695 field dependencies - defined new exception ddl_dependency_exception that
will be thrown when one DDL operation (drop only for now) is attempted over one
field being part of indexes.
MDL-19695 field dependencies - before committing the dependency checker, fix all places in upgrade
that will break once running with dependencies enabled