176 Commits

Author SHA1 Message Date
Petr Skoda
e372f4c7c1 MDL-22050 removing moodle/langconfig duplicates
AMOS BEGIN
  MOV [thisdirection,core],[thisdirection,core_langconfig]
AMOS END
2010-04-10 18:26:20 +00:00
Petr Skoda
4f0c2d0009 MDL-21655 big scary enrolment and roles improvements - see tacker for list of changes, includes other minor fixes too 2010-03-31 07:41:31 +00:00
Sam Hemelryk
90723839ca themes MDL-21862 Implements base theme and standard theme.
Very big theme changes, standardold theme has been split into two themes base and standard. Base theme contains only CSS that is absolutly required (e.g. layout, white space rules, specific widths) and standard (which now looks like standardwhite) contains all the frills.
The following noteable changes have also been made:
  * Plugin CSS has been pushed back into the plugin directories as styles.css files.
  * Install_print_header has been corrected.
  * Redundant or deprecated rules have been removed.
  * Several minor class changes throughout Moodle.
  * CSS is now single line rules not multiline indented.
  * Installs with theme=standardold automatically switch to standard.
  * body classes / id now have prefixes to make it clearer what they are and avoid conflicts.
Also worth noting:
  * There is still alot of tweaking that is required to get everything looking as it is supposed to, please be patient or better yet help out.
  * I am currently working on the documentation for the themes system... it will be here soon.
2010-03-25 06:38:21 +00:00
Petr Skoda
4aea3cc7cd MDL-20204 the ultimate fix for our frames (theyare not accessbile, but anyway); instead of adding the target to each element when creating html we use yui to set the target from page footer via JS - this fixes the links and forms in all elements in pages with frametop layout 2010-02-11 13:27:02 +00:00
Sam Hemelryk
4ac8345ff5 NOBUG: Updated the docs for the moodle_page class to cover the magic get functions 2010-01-28 03:19:21 +00:00
Petr Skoda
b9bc201962 MDL-21233 escaped parameter is far more importatnt than the overrideparams in out() method - especially all JS urls should be converted to out(false); also it is possible to create new url with overrided parameters in constructor which might be actually work around the double encoding problems in the url (we should never use the out() in moodle_url constructor itself!) 2010-01-17 09:50:55 +00:00
Petr Skoda
eb7880654f MDL-21233 finally removed the omitquerystring parameters from the out method because: 1/ the least used parameter should nto be first, 2/ it is colliding with the other two paramters, now we have separate funtion for that instead 2010-01-17 09:37:30 +00:00
Petr Skoda
340d461269 MDL-21233 simplifying moodle_url->out() api 2010-01-17 09:18:11 +00:00
Petr Skoda
a685593466 MDL-21233 moodle_url improvemewnts, code simplification, more diagnostics; fixed several regressions 2010-01-16 15:39:56 +00:00
David Mudrak
c909711ac5 Fixed a typo in loginas.php + added a parameter control in moodle_url::set_url() to discover similar issues in the future 2010-01-07 20:17:38 +00:00
Petr Skoda
42174e18fb MDL-21210 hopefully fixed $PAGE->set_url() weirdness and added more diagnostics 2009-12-29 14:30:15 +00:00
Petr Skoda
191b267bcd MDL-20790 more page layouts -see base theme for full list; also added new css body class for describing current layout; base layout is now default for beter BC; require_login() now sets 'incourse' layout automatically 2009-12-27 12:02:04 +00:00
Petr Skoda
cbcc9852e0 MDL-21125 removing obsolete global $THEME 2009-12-23 18:23:21 +00:00
Petr Skoda
054652d623 MDL-20204 removed some forgotten legacy code 2009-12-23 17:27:29 +00:00
Sam Hemelryk
d8ae33a95c question MDL-21169 removed update_module_button calls from question these are now added by the module extending the navigation if there is a module specified for question pages.
Also fixed bug in moodle_url object coding_error to coding_exception
2009-12-23 02:45:22 +00:00
Petr Skoda
c927e35c48 MDL-21148 geenral support for rendering targets, this should give us more flexibility; please propose improvements in the tracker if necessary, thanks 2009-12-17 22:43:27 +00:00
Petr Skoda
649cf95d0b MDL-21147 renamed find_renderer back to get_renderer() - there are no more collisions with those magic getters 2009-12-17 14:06:22 +00:00
Petr Skoda
5515b53605 MDL-21147 do not use standard "get_x" methods for "magic" $PAGE stuff + fixed incorrect ->get_x uses 2009-12-17 14:04:15 +00:00
Petr Skoda
56cbc53b76 MDL-21143 theme renderers related refactoring, it should detect more problems now, there is also a list of core renderer subtypes, hopefully the api changes are improvements 2009-12-17 13:45:54 +00:00
Petr Skoda
47ce714bc0 MDL-21142 minor cleanup in out() default params 2009-12-16 21:33:01 +00:00
Petr Skoda
78946b9bdb MDL-20204 first batch of major theme changes, some regressions are still there, expect more changes and improvements soon; see tracker for details and list of subtasks 2009-12-16 18:00:58 +00:00
Sam Hemelryk
7231e2de74 navigation MDL-20833 Moved has_navbar from OUTPUT to PAGE as it is logic 2009-11-16 01:12:16 +00:00
Petr Skoda
117bd74897 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 11:31:16 +00:00
samhemelryk
bf6c37c786 navigation MDL-20332 MDL-20324 Modifications to fix the following issues:
* If no active node is found when the navigation is called upon then we attempt to find a best match active node
 * Links are now produced with frame breakout actions
 * Links ending with / are presumed index.php for matching purposes
2009-09-23 06:05:36 +00:00
mudrd8mz
3a0481a4d8 NOBUG: Fixed bug in $PAGE->set_url() when moodle_url passed
When moodle_url was passed as a param to set_url(), the str_replace() kept
the leading '/' in the $shorturl. This then led to the <body> classes
like '-mod-workshop' instead of correct 'mod-workshop' (the slash
replaced with minus sign).
2009-09-05 17:32:10 +00:00
samhemelryk
91152a3518 navigation MDL-20216 Refactored add arguments
Moved $action argument from arg5 to arg2
2009-09-04 03:12:01 +00:00
moodler
c1df9d7c51 lib/pagelib Improved the debugging message about set_url 2009-09-03 07:47:43 +00:00
samhemelryk
de6d81e667 admin MDL-19799 Upgraded print_header and build_navigation calls to use PAGE and OUTPUT equivilants 2009-09-03 06:59:25 +00:00
samhemelryk
e120c61d24 navigation MDL-14632 Deprecate print_header menu argument and provide PAGE method 2009-09-01 03:47:07 +00:00
samhemelryk
7d2a049292 navigation MDL-14632 Very significant navigation commit
This patch introduces two new blocks global_navigation_tree and settings_navigation_tree
both of which have been designed to make full use of the new navigation objects available through
the $PAGE object.
Bulk of this code is within lib/navigationlib.php
2009-08-28 08:47:31 +00:00
mudrd8mz
de8a1d1056 MDL-19956 $PAGE->set_url(...) passes the same arguments to the legacy page object
Credit goes to Tim Hunt, thanks for explaining this to me.
2009-07-29 16:38:40 +00:00
mudrd8mz
7dc928b5ff MDL-19956 $PAGE->set_url(...) accepts already prepared instance of moodle_url 2009-07-29 16:05:36 +00:00
tjhunt
a19f419db2 blocks: MDL-19946 Block editing form must be displayed from the original URL, with properliy initialised $page 2009-07-28 09:59:21 +00:00
tjhunt
a8c310c253 Fix new install with developer debug on. Can't print context name in the page footer before DB tables exist! Also, show page generaltype in the footer. 2009-07-21 13:58:47 +00:00
tjhunt
2c0901cb5a MDL-19010: In developer debug mode, print information about this page in the footer. 2009-07-20 06:18:16 +00:00
tjhunt
4578a5eb7a block MDL-19398 Initialise all blocks on this page before output is started. 2009-07-20 03:04:08 +00:00
jerome
a475c67308 moodle_page: MDL-12212 misspelling 2009-07-15 06:11:55 +00:00
tjhunt
727ae4362e blocks editing ui: MDL-19398 fix adding a block to a page that forgets to call $PAGE->set_url. 2009-07-14 10:41:59 +00:00
tjhunt
2a3b076368 blocks editing ui: MDL-19398 fix some bugs with adding a block. 2009-07-14 09:28:10 +00:00
tjhunt
21d33bdf62 blocks editing ui: MDL-19398 you can now add new blocks! 2009-07-14 07:18:57 +00:00
tjhunt
144390b4d9 themes: MDL-19077 Don't need both output_starting_hook and starting_output method on page. 2009-07-14 05:14:45 +00:00
tjhunt
d4a03c00ea 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.
2009-07-09 07:35:03 +00:00
tjhunt
94398fb3e8 MDL-19696 make sure install works. 2009-07-03 09:03:50 +00:00
tjhunt
d436d197d1 MDL-19690 - the last lot of $CFG->pixpath to $OUTPUT->old_icon_url
Including MDL-19693

RIP $CFG->pixpath
2009-07-03 07:55:30 +00:00
skodak
b8e99844ef MDL-19696 undoing my previous veryveryuglyhack, I did not solve much, sorry 2009-07-02 20:29:21 +00:00
skodak
f071ad0269 MDL-19696 veryveryuglyhack which partially ubreaks installation after latest pagelib changes 2009-07-02 13:39:55 +00:00
samhemelryk
f14c0f1d84 pagelib MDL-19077 Fixed minor error in pagelib 2009-07-02 07:29:08 +00:00
tjhunt
db8d89d822 MDL-19077 I just found a way to reduce the coupling between the classes. 2009-07-02 07:06:25 +00:00
tjhunt
b70094743a themes: MDL-19077 change how the theme is initialised and CSS is served.
This is part of http://docs.moodle.org/en/Development:Theme_engines_for_Moodle%3F

$THEME is now initialised at the same time as $OUTPUT. Old functions like
theme_setup are deprecated in favour of methods on $PAGE. There is a new
theme_config class in outputlib.php that deals with loading the theme config.php file.

CSS used to be served by themes styles.php files calling a function in weblib.php.
Now it works by each theme's styles.php file doing
$themename = basename(dirname(__FILE__));
require_once(dirname(__FILE__) . '/../../theme/styles.php');
which is less code to be copied into each theme. (Old-style styles.php files still
work thanks to some code in deprecatedlib.php.)

Admin UI for choosing a theme cleaned up.

A couple of theme-specific hard-coded hacks like $THEME->cssconstants and
$THEME->CSSEdit have been replaced by a more generic $THEME->customcssoutputfunction
hook. See examples at the end of outputlib.php

Also:
* Fix setting the theme in the URL, which seems to have been broken since 1.9.
* Fix up errors on a few pages caused by the new initialisation order.
* MDL-19097 moodle_page::set_course should not set $COURSE unless it is $PAGE.
* httpsrequired() from moodlelib.php moved to $PAGE->https_required().
* Move has_started() method to the renderer base class.
* Further fixes to display of early errors.
* Remove print_header/footer_old from weblib. I did not mean to commit them before.
2009-07-01 05:54:26 +00:00
samhemelryk
afa2dcad43 outputlib pagelib MDL-19236 Cleaned up PHPdocs on a couple of functions 2009-07-01 03:47:52 +00:00