374 Commits

Author SHA1 Message Date
Petr Skoda
1a3993c1ec fixed place where we define MOODLE_INTERNAL - we need to do that asap 2010-07-25 12:56:08 +00:00
Petr Skoda
c7b0e5e187 enable circular reference collector when available 2010-07-21 20:32:09 +00:00
Petr Skoda
df997f841f MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
    MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
    MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
    MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
    MOV [enrolenddate,core],[enrolenddate,enrol_self]
    CPY [welcometocourse,core],[welcometocourse,enrol_self]
    CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
    MOV [notenrollable,core],[notenrollable,core_enrol]
    MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
    MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
    MOV [coursemanager,core_admin],[coursecontact,core_admin]
    MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
    MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
    MOV [enrolme,core],[enrolme,core_enrol]
    MOV [unenrol,core],[unenrol,core_enrol]
    MOV [unenrolme,core],[unenrolme,core_enrol]
    MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
    MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
    MOV [enrolments,core],[enrolments,core_enrol]
    MOV [enrolperiod,core],[enrolperiod,core_enrol]
    MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
Petr Skoda
177b5480e7 MDL-22546 improved fatal error messages when something is wrong with dataroot or wwwroot 2010-06-11 13:59:13 +00:00
Martin Dougiamas
62c5e65433 MDL-22625 Avoid timezone notices from PHP when PHP doesn't have a default timezone set 2010-05-31 09:15:26 +00:00
Petr Skoda
4cee2155b2 MDL-22546 improving dir creation handling and improving dataroot support in config only scripts; using 02777 as default in lib/setup.php to match the default in config-dist.php 2010-05-22 19:59:59 +00:00
Petr Skoda
3b5ff37f24 MDL-22546 removing dirroot from the config.php - this should finally solve the symbolic links issues because we know 100% what should be in $CFG->dirroot once we get into lib/setup.php, it is being initialised there automatically instead + more robust handling of dataroot + simplified config-dist.php and installer; the $CFG->admin is now visible only if admin directory can not be found; please note the old config.php's are still going to work, if admins remove the dirroot they have to add the __FILE__ into require_once lib/setup.php at the end of old config 2010-05-21 17:32:15 +00:00
Petr Skoda
c595847d11 MDL-22538 final switch to YUI 3.1.1 and 2.8.1 2010-05-21 12:33:46 +00:00
Petr Skoda
12bb0c3ef5 MDL-22515 plugin settings can be forced now too + minor CFG init refactoring + get_config() cleanup 2010-05-19 13:30:13 +00:00
Petr Skoda
ecd7978c05 MDL-22015 fixed more string_manager encapsulation issues 2010-04-14 14:38:33 +00:00
Petr Skoda
8c25522551 MDL-21998 switching to YUI3.1.0 lib - there do not seem to be any mojor regressions, if you need old version just edit your lib/setup.php 2010-04-11 08:50:08 +00:00
Petr Skoda
4000129f7d MDL-15252 string manager improvements - fixed regression - lang from POST was accepted too, sorry 2010-04-10 20:41:26 +00:00
Petr Skoda
38c253f9aa MDL-15252 string manager improvements - it is possible to specify custom lang locations in config.php 2010-04-10 20:35:52 +00:00
Petr Skoda
b4cf79c861 MDL-21146 removing incorrect license defaults, setup.php is not the right place for this, sorry 2010-04-10 19:52:57 +00:00
Petr Skoda
3a915b0667 MDL-21693 Dropping _utf8 suffix from language codes and folder names; enabling new string managers - please note the transition is not yet fully complete because we need to wait for git to recognize the renames in cvs 2010-04-10 07:24:56 +00:00
Dongsheng Cai
1dce6261b7 "MDL-21146, adding file license support to repository api, first commit" 2010-03-29 03:39:08 +00:00
Petr Skoda
1adaa40466 MDL-21938 support for json renderer and error handler 2010-03-28 09:05:47 +00:00
Eloy Lafuente
3d732d8487 NOBUG: Now editorlib is using PEAR (forms) stuff. Move the include
path definition before including all the Moodle stuff.
2010-03-23 11:14:26 +00:00
Petr Skoda
00dadbe164 MDL-21742 fixed serious regressions - require_login(); could not be called after setting up themes (we need this in several places, this will be improved later) + it is too late to set up default local in require_login() because some scripts may not even call this - such as CLI 2010-03-02 11:51:36 +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
Petr Skoda
d5fac1cfd4 more eclipse autocompletion fixes 2010-01-13 11:25:15 +00:00
Petr Skoda
0037dcc99b MDL-21251 set up correct debugging in ABORT_AFTER_CONFIG scripts 2010-01-05 20:31:42 +00:00
Petr Skoda
39edbd022f MDL-20204 Eclipse autocompletion works again 2010-01-01 12:44:08 +00:00
Petr Skoda
60f2c8666a MDL-21189 custom yui image loading needed for combo yui loader 2009-12-25 19:51:40 +00:00
Petr Skoda
cbcc9852e0 MDL-21125 removing obsolete global $THEME 2009-12-23 18:23:21 +00:00
Petr Skoda
998999e725 MDL-21155 improve themechangeonurl - sesskey not required, it may be a slight CSRF problem, but on the other hand theme designers rely on this very often, fixed problems with theme in _POST 2009-12-20 16:25:41 +00:00
Petr Skoda
bee934afa3 MDL-20796 importing yui 3.0.0 2009-12-16 19:45:12 +00:00
Petr Skoda
bf62f18738 MDL-20795 integrating new YUI2 2.8.0r4 2009-12-16 19:32:36 +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
Petr Skoda
7c7d3afab5 MDL-20766 message_send() used intead of events, it will enable us to improve performance and solve db transactions issues independedntly from events, hopefully this will give us more options in future too because the events are designed specifically for communication "moodle-->external systems" 2009-11-07 10:27:57 +00:00
Petr Skoda
4c1c9175c5 MDL-20698 fixed comment typos 2009-11-01 09:44:11 +00:00
Petr Skoda
e6942a949a MDL-20698 cleaning up old ugprade hacks in setup.php 2009-11-01 09:38:38 +00:00
Petr Skoda
7b51fb61d2 MDL-20697 get_site() now throws exception in case of any problems (except during installation) - the problem is we can not recover from this automatically 2009-11-01 09:05:59 +00:00
Petr Skoda
6e03bed71b MDL-20696 noting zend libs are incomplete and are not guaranteed to be there in future 2009-10-31 22:37:16 +00:00
Petr Skoda
4dffc77519 MDL-20696 fixed coding style: lib/setup.php is the first file people start reading when hacking moodle, it has to use the best coding style possible ;-) 2009-10-31 22:35:06 +00:00
Petr Skoda
47c2811b95 MDL-20695 no need to log prefetch attempts, we can not prevent them 2009-10-31 22:22:08 +00:00
Petr Skoda
ccda6d6866 MDL-20695 can not use trigger_error() for informing users about problems in config.php, no need to log these 2009-10-31 22:11:16 +00:00
Petr Skoda
2e9b772fb8 MDL-20693 new NO_DEBUG_DISPLAY define 2009-10-31 22:02:05 +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
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