77 Commits

Author SHA1 Message Date
ashleyholman
89781f3c0e MDL-20374 default exception handler: log backtrace to webserver log if DEBUG_MINIMAL or greater. 2009-09-29 06:29:11 +00:00
skodak
a3f7cbf64e MDL-20293 strict param validation support 2009-09-15 20:08:47 +00:00
skodak
9a0df45a01 MDL-12886 new design of external service functions, groups api improved and known problems fixed - still work in progress with lots of todos - sorry 2009-09-14 23:52:08 +00:00
skodak
b08b356960 MDL-20232 making "object" class extend stdClass - this greatly helps with type checking 2009-09-08 07:09:01 +00:00
jerome
a0a268d5c4 MDL-19763 PHP Fatal Error fix on undefined plain_page() 2009-08-31 07:13:41 +00:00
poltawski
7e13a2654a lib/setuplib MDL-20166 - Don't abort install on nginx webserver
Thanks to Jordan for the patch. Jordan has done testing and found nginx
seems to work and is planning to do more extensive testing to alert us of
other problems along the way.
2009-08-27 07:52:11 +00:00
nicolasconnault
7e0d66753e MDL-19799 Converted all print_footer() calls 2009-08-06 14:21:34 +00:00
tjhunt
c05e49c71a themes: MDL-19077 make sure that errors displayed by blocks are displayed properly.
Note: blocks should not be calling print_error anyway, but some did!
2009-07-22 02:34:24 +00:00
tjhunt
c72465aa15 setuplib: early errors were not showing debuginfo. 2009-07-14 08:31:30 +00:00
tjhunt
5e39d7aa09 upgrade: MDL-19763 Improve the redirect that forces a DB upgrade when there are major changes
Also fix redirect, so 303 redirects don't need to fully initialise $OUTPUT.
2009-07-10 08:44:01 +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
87b6851cf9 Catch another potential type of infinite recursion output initialisation. 2009-07-07 04:37:12 +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
7544d13c28 MDL-19077 - re-fix the problem of exceptions being thrown in $OUTPUT->header
Also, fix lines theme.
2009-06-30 05:34:50 +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
fd1a792e13 themes: MDL-19640 / MDL-19077 remove other references to _print_normal_error 2009-06-29 00:34:49 +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
tjhunt
31a9987770 install: MDL-19610 encapsulate empty($CFG->rolesactive) checks in a during_initial_install() function. 2009-06-24 09:17:56 +00:00
skodak
1fbdf76ddb MDL-19470 detection of unfinished transactions and transactions interrupted by exceptions 2009-06-12 10:59:28 +00:00
samhemelryk
b37eac91cc lib MDL-19236 Added boilerplates and copyrights 2009-05-26 03:57:03 +00:00
skodak
80e30f2594 MDL-12212 fixed missing globals 2009-05-17 17:07:54 +00:00
skodak
f630a546a6 fixed whitespace 2009-05-11 17:13:45 +00:00
skodak
8dc0ae8fe5 fixed typo 2009-05-11 17:11:29 +00:00
skodak
edaf04d489 MDL-16957 explain why our htaccess is intentionally broken; merged from MOODLE_19_STABLE 2009-05-08 21:30:56 +00:00
tjhunt
cce1b0b9ca exceptions: MDL-16175 new invalid_state_exception
This is for those situations where something basically impossible happens,
like $context->contextlevel not having one of the valid value, and you
want to throw an exception (for example in the default: case of a switch)
rather than just ignoring the possibility.
2009-05-08 07:47:02 +00:00
tjhunt
0ae8f5fcb2 exceptions: MDL-16175 more careful decision whether to use _print_normal/early_error.
It is a mistake to use _print_normal_error if the exception was thrown in print_header - we don't want to try to call print_header again!
2009-05-07 05:38:35 +00:00
tjhunt
75781f879c moodle_page: MDL-12212 ->url and cleanup init of $FULLME, etc. 2009-05-06 08:50:32 +00:00
dongsheng
7022dd3930 "MEMORY/MDL-18540,remove hard-coded php memory limit, added system setting for it, create a function reduce_memory_limit to reduce memroy limit and respect php.ini setting in the meanwhile, merged from 1.9" 2009-03-26 02:09:28 +00:00
stronk7
b10a14a392 MDL-18200 - fix make_upload_directory() was always failing on initial creation of dataroot 2009-02-11 15:26:29 +00:00
skodak
3b09331066 MDL-17458 rewritten installer 2009-02-07 10:20:33 +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
795a08adb7 MDL-17458 upgrade logging implemented + a lot more refactoring + exceptions implemented in install/upgrade code + lang pack cleanup + some more improvements 2009-01-31 20:07:32 +00:00
skodak
4d6d912a77 MDL-17853 fixed typo, thanks Nicolas Martignoni 2009-01-11 09:44:42 +00:00
skodak
84b88cfde7 MDL-11061 removed wwwroot tests from admin/index.php, now in setuplib.php 2009-01-07 15:31:54 +00:00
skodak
37ccf1fec9 MDL-17802 fixed wwwroot without any subdirectory issue 2009-01-07 09:54:09 +00:00
skodak
991ec2ee51 MDL-17777 fixed request string encoding in ISS 2009-01-06 12:33:32 +00:00
skodak
f1e715ff88 MDL-9276 reverse proxy and normal access can not be mixed - it would valiate the one address per moodle rule, sorry 2009-01-06 10:10:19 +00:00
skodak
21517960b3 MDL-17777 improved IIS rewrite rule 2009-01-05 22:32:15 +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
ce1526061c MDL-17317 DML: more exceptions - now in connect too 2008-11-22 01:16:52 +00:00
skodak
9214025e3e MDL-17129 basic dml exceptions 2008-11-04 21:50:13 +00:00
skodak
1fe1d10454 MDL-16930 dml: exceptions instead of print_error 2008-10-28 15:21:01 +00:00
skodak
655bbf511d MDL-16669 dml: improved sql_substring(), added unit tests 2008-10-28 15:11:10 +00:00
skodak
5ca18631bc MDL-16029 removing recently added support for $extralocation from print_error(), thanks TIm for pointing out this is not the recommended way anymore 2008-09-02 06:03:37 +00:00
skodak
c018fde2df MDL-16029 Added $extralocations in the function print_error; merged from MOODLE_19_STABLE 2008-09-01 15:31:09 +00:00
skodak
04264aeda4 MDL-15343 mod upgrade savepoints implemented (the xmldb generator is not updated yet) 2008-06-22 23:35:52 +00:00
skodak
eee5d9bb85 MDL-14956 DDL exceptions 2008-06-22 16:51:55 +00:00
skodak
ab130a0b5f MDL-15273 basic read/write perf counter in moodle_database 2008-06-16 21:01:54 +00:00
skodak
251387d087 MDL-14956 basic exception support in Moodle + other minor related refactoring 2008-06-13 17:51:34 +00:00
skodak
f33e1ed4ae MDL-14679 ok, here is the big patch with new dmllib and ddlib API, some code is already converted, XML db editor works; see tracker for details of regressions and TODOs 2008-05-15 21:40:00 +00:00