286 Commits

Author SHA1 Message Date
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
skodak
360dde50ba MDL-19943 new debug optiosn for validators link and page info in footer 2009-07-27 20:36:28 +00:00
tjhunt
f6b2709ff4 setup: Need memory before setup_DB.
!This is the correct version of the previous commit!

I was getting an interesting failure with $CFG->prefix commented
out in config.php (by mistake!). Abbreviated stack trace
lib/setup.php -> setup_DB -> dml_exception('prefixcannotbeempty') ->
  get_string -> string_manager->__construct -> get_plugin_types

That loads lib.php from every module, which runs out of memeory.
2009-07-10 03:31:30 +00:00
tjhunt
6c77145468 setup: Need memory before setup_DB.
I was getting an interesting failure with $CFG->prefix commented
out in config.php (by mistake!). Abbreviated stack trace
lib/setup.php -> setup_DB -> dml_exception('prefixcannotbeempty') ->
  get_string -> string_manager->__construct -> get_plugin_types

That loads lib.php from every module, which runs out of memeory.
2009-07-10 03:30:43 +00:00
skodak
092bfaf10f removed php closing tag 2009-07-09 20:07:51 +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
samhemelryk
e11a8328b3 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.
2009-07-07 09:09:16 +00:00
tjhunt
ebebf55cad output: MDL-19690 icon_finder classes and $OUTPUT->mod/old_icon_url
This is ready to replace $CFG->pixpath and $CFG->modpixpath soon.
2009-07-02 08:49: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
tjhunt
c84a2dbea2 MDL-19077 - change how $OUTPUT is initialised.
Please read the comment at the top of bootstrap_renderer in setuplib.php
2009-06-29 05:00:45 +00:00
tjhunt
34a2777ccb themes: MDL-19077 new $OUTPUT->header/footer to replace print_header/footer.
Also, part of the change from weblib.php functions to $OUTPUT-> methods.

This is part of http://docs.moodle.org/en/Development:Theme_engines_for_Moodle%3F

This is a big change, and the result is not perfect yet. Expect some debugging output
on some pages.

The main part of these changes are that $OUTPUT->header now looks for a file
in the theme called layout.php, rather than header.html and footer.html. Also
you can have special templates for certain pages like layout-home.php. There is
fallback code for Moodle 1.9 themes, so they still work.

A few of the old arguments to print_header are no longer supported. (You get an
exception if you try to use them.) Sam H will be cleaning those up.

All the weblib functions that have been replaced with $OUTPUT-> have version in
deprecatedlib, so existing code will go on working for the foreseeable future.
2009-06-26 09:06:16 +00:00
skodak
17da2e6f28 MDL-16438 centralise information about plugins to avoid duplication, includes local customisation conversion to standard plugin structure + fixes for some recent regressions; see tracker for more details and links to docs and forums discussions 2009-06-19 14:25:56 +00:00
skodak
1aa01caf90 MDL-16231 reimplemented deleting of files + cron cleanup 2009-06-03 08:10:21 +00:00
samhemelryk
b37eac91cc lib MDL-19236 Added boilerplates and copyrights 2009-05-26 03:57:03 +00:00
skodak
5ca3c8386f MDL-19184, MDL-19212 - refactoring, cleanup and improvements in text editors support; localization support is not finished, inline docs incomplete, expect more commits soon 2009-05-16 20:53:21 +00:00
skodak
7b9be84bf8 MDL-19150 moving the $PAGE setup after debug level configuration 2009-05-11 17:10:28 +00:00
skodak
bf8a4ccffa MDL-17458 removing magic_quotes test from setup.php when MOODLE_SANE_INPUT defined, scripts must find better way to inform admins, sorry 2009-05-11 16:58:52 +00:00
tjhunt
86b5ea0f85 blocklib: MDL-19010 start of block_manager - get and set regions 2009-05-06 09:14:01 +00:00
tjhunt
93d4a373f9 blocklib: MDL-19010 always include blocklib in setup.php, stip includes elsewhere 2009-05-06 09:13:16 +00:00
tjhunt
c13a5e71cc moodle_page: MDL-12212 start of new moodle_page class
* has course and status fields
* $PAGE->status updated by print_header and footer
* $PAGE->set_course now replace course_setup function
* global $PAGE created in setup.php
* unit tests for functionality so far
* Moodle still seems to work after this commit!
2009-05-06 08:29:22 +00:00
tjhunt
e1d1b7968f Improve documentation of our global variables 2009-04-16 08:59:46 +00:00
tjhunt
0c34c7eb50 translation: MDL-18766 reverting. I guess it was not yet ready for prime-time.
I'll commit the patch to contrib in case anyone wishes to experiment further.
2009-04-02 02:42:11 +00:00
tjhunt
b4cf937102 translation: MDL-18766 Prototype automatic translation system for Moodle.
If Google can do something like http://translate.google.com/, surely we
can do something just as good in Moodle. Here is a first attempt. It is
a bit rough around the edges, and only a couple of target lananguages
have been implemented so far. (More and better attempts welcome!)

In order to ensure that this gets adequate testing, I have made sure that
it gets turn on by default. However, if you really don't like it, you can
turn it off under Administration > Development -> Experimental settings.
2009-04-01 00:39:17 +00:00
skodak
133b5929a1 MDL-18253 hopefully fixed weird float precision that breaks upgrade and gradebook 2009-02-15 19:02:50 +00:00
skodak
fbf2c91e43 MDL-10275 added fatal PHP config setting test on each page, replaces some tests done in installer 2009-02-01 13:37:42 +00:00
skodak
b62dff9939 MDL-17789 fixed typo 2009-01-06 12:46:55 +00:00
skodak
f98cfb53d1 MDL-17789 prevent potential XSS problems through PHP_SELF 2009-01-06 12:31:20 +00:00
skodak
11e7b506ce MDL-17754, MDL-11061, MDL-9276, MDL-17777, MDL-17787 - various url handling improvemetns; rewritten $FULLME and added $ME, $SCRIPT and $FULLSCRIPT; improved slashargument handling especially for IIS; removed legacy slasharguments functions obsoleted since 1.6; some other refactoring; reverse procy support, ssl appliance support 2009-01-05 21:37:20 +00:00
skodak
a91b910e4f MDL-17776 added new define CLI_SCRIPT that identifies all CLI scripts + cron (cli scripts do not have session and do not like HTML in output and are executed from command line, cron is an exception) 2009-01-03 14:28:02 +00:00
skodak
9bda43e6be MDL-16613 refactore session IP tracking; MDL-14213 improved message when IP changes; MDL-17754 SID is regenerated when terminating session and old session is deleted 2009-01-02 23:49:29 +00:00
skodak
1b813f5c2a MDL-17772 fixed guest access; MDL-17754 $USER object initialisation cleanup 2009-01-02 21:05:16 +00:00
skodak
b7b64ff2e0 MDL-17754 next round of session related refactoring 2009-01-02 20:32:05 +00:00
skodak
6132768ecb MDL-17767 loginas refactoring and simplification; full SESSION switching implemented 2009-01-02 15:15:26 +00:00
skodak
542797b4e8 MDL-17767 loginas internals refactoring - code moved to sessionlib.php 2009-01-02 14:53:02 +00:00
skodak
0ad6b20cb2 MDL-17754 session code refactoring; removing test cookie which will be replaced by wwwroot checks 2009-01-02 13:42:43 +00:00
skodak
0ecff22d84 MDL-17267 fixed regression caused by my last commit 2008-11-19 14:43:38 +00:00
skodak
c23b0ea11b MDL-17129 dml: implemented exceptions in new drivers, yay! 2008-11-04 23:07:14 +00:00
nicolasconnault
647a1a8289 MDL-17091 Added zend framework to include_path 2008-10-31 15:34:23 +00:00
skodak
a78bee285d MDL-16433 themes and javascript files are not blocked by running upgrade anymore 2008-09-14 08:40:23 +00:00
skodak
8aff848213 MDL-14589 minor database driver loading refactoring 2008-09-02 20:32:03 +00:00
skodak
20e9d26f83 MDL-16066 fixed apache log typo - thanks Neil Streeter 2008-08-17 22:23:19 +00:00
skodak
775f811a66 MDL-16002 rewritten upgrade locking and better upgrade progress tracking; MDL-16070 Do not use $a[0] syntax in lang packs + various other upgrade improvements and fixes 2008-08-16 12:16:01 +00:00
dongsheng
d255c6e9ad "MDL-15244, fix bugs of ip blocker" 2008-07-25 08:27:50 +00:00
dongsheng
5035228fc0 MDL-15244
1. move ip blocker to security menu
2. blocked list and allowed list can work together, a new option could set the order of them
2008-07-22 04:07:58 +00:00
dongsheng
4e63912156 MDL-15244, add ability to block ip addresses. 2008-07-16 02:16:42 +00:00
dongsheng
ab99c8f014 MDL-15244, add ability to block ip addresses for HEAD. 2008-07-14 08:14:31 +00:00
skodak
b373260475 MDL-15413 warn admins if display_errors enabled 2008-07-07 14:34:40 +00:00
Francois Marier
6800d78e06 Drift between CVS and git
- large deletions
- lucene updates
- error() => print_error()
- NO_MOODLE_COOKIES define
- various other things
2008-06-25 17:31:23 +00:00
skodak
3dce78e125 MDL-15247 lib/dmllib.php is now obsolete 2008-06-15 11:35:25 +00:00
skodak
251387d087 MDL-14956 basic exception support in Moodle + other minor related refactoring 2008-06-13 17:51:34 +00:00