91 Commits

Author SHA1 Message Date
Petr Skoda
a38c7a1081 MDL-20601 fixed undefined variable in major upgrade redirection 2009-11-08 22:10:45 +00:00
Petr Skoda
d5a8d9aa71 MDL-20625 new delegated transaction support in DML 2009-11-07 08:52:56 +00:00
Petr Skoda
e7f59efc0f MDL-20601 bumping up redirect version after major changes 2009-11-04 08:49:22 +00:00
Petr Skoda
1387fcdd58 MDL-20699 fixed typos 2009-11-01 10:05:07 +00:00
Petr Skoda
a56c457e52 MDL-20699 more abstraction in default exception handler 2009-11-01 10:00:30 +00:00
Petr Skoda
695c5ec4cd MDL-20699 more abstraction in default exception handler 2009-11-01 09:58:04 +00:00
Petr Skoda
2e9b772fb8 MDL-20693 new NO_DEBUG_DISPLAY define 2009-10-31 22:02:05 +00:00
Petr Skoda
3c1ea58b46 MDL-20691 "Fatal error: Exception thrown without a stack frame in Unknown on line 0" workaround in $OUTPUT->print_error() 2009-10-31 15:01:25 +00:00
Petr Skoda
30fa50d0b7 MDL-20676 whitespeace and other minor cleanup+fixes 2009-10-31 14:17:44 +00:00
Petr Skoda
c19bc39c00 MDL-20676 refactoring and cleanup in default exception handler 2009-10-31 13:52:39 +00:00
Petr Skoda
cbf05caaac MDL-20677 print_error() now throws exception + adding support for debug info parameter 2009-10-31 13:23:29 +00:00
Petr Skoda
50764d3790 MDL-20676 improved output buffer workaround when printing fatal errors 2009-10-30 13:44:07 +00:00
Petr Skoda
89bef76c12 MDL-20676 removed duplicated debug info in uncaught exceptions 2009-10-30 13:31:15 +00:00
stronk7
a0394be409 NOBUG. Typo 2009-10-15 22:34:34 +00:00
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