[moodle] / moodle / lib / pagelib.php Repository:

Log of /moodle/lib/pagelib.php

Parent Directory Parent Directory


Links to HEAD: (view) (download) (annotate)
Sticky Tag:

Revision 1.173 - (view) (download) (annotate) - [select for diffs]
Thu Feb 11 21:27:03 2010 WST (5 weeks, 1 day ago) by skodak
Branch: MAIN
CVS Tags: HEAD
Changes since 1.172: +1 -1 lines
Diff to previous 1.172
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

Revision 1.172 - (view) (download) (annotate) - [select for diffs]
Thu Jan 28 11:19:21 2010 WST (7 weeks, 1 day ago) by samhemelryk
Branch: MAIN
Changes since 1.171: +45 -8 lines
Diff to previous 1.171
NOBUG: Updated the docs for the moodle_page class to cover the magic get functions

Revision 1.171 - (view) (download) (annotate) - [select for diffs]
Sun Jan 17 17:50:56 2010 WST (2 months ago) by skodak
Branch: MAIN
Changes since 1.170: +2 -2 lines
Diff to previous 1.170
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!)

Revision 1.170 - (view) (download) (annotate) - [select for diffs]
Sun Jan 17 17:37:30 2010 WST (2 months ago) by skodak
Branch: MAIN
Changes since 1.169: +1 -1 lines
Diff to previous 1.169
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

Revision 1.169 - (view) (download) (annotate) - [select for diffs]
Sun Jan 17 17:18:11 2010 WST (2 months ago) by skodak
Branch: MAIN
Changes since 1.168: +1 -1 lines
Diff to previous 1.168
MDL-21233 simplifying moodle_url->out() api

Revision 1.168 - (view) (download) (annotate) - [select for diffs]
Sat Jan 16 23:40:13 2010 WST (2 months ago) by skodak
Branch: MAIN
Changes since 1.167: +11 -16 lines
Diff to previous 1.167
MDL-21233 moodle_url improvemewnts, code simplification, more diagnostics; fixed several regressions

Revision 1.167 - (view) (download) (annotate) - [select for diffs]
Fri Jan 8 04:17:38 2010 WST (2 months, 1 week ago) by mudrd8mz
Branch: MAIN
Changes since 1.166: +4 -1 lines
Diff to previous 1.166
Fixed a typo in loginas.php + added a parameter control in moodle_url::set_url() to discover similar issues in the future

Revision 1.166 - (view) (download) (annotate) - [select for diffs]
Tue Dec 29 22:30:15 2009 WST (2 months, 2 weeks ago) by skodak
Branch: MAIN
Changes since 1.165: +17 -5 lines
Diff to previous 1.165
MDL-21210 hopefully fixed $PAGE->set_url()  weirdness and added more diagnostics

Revision 1.165 - (view) (download) (annotate) - [select for diffs]
Sun Dec 27 20:02:05 2009 WST (2 months, 3 weeks ago) by skodak
Branch: MAIN
Changes since 1.164: +5 -3 lines
Diff to previous 1.164
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

Revision 1.164 - (view) (download) (annotate) - [select for diffs]
Thu Dec 24 02:23:21 2009 WST (2 months, 3 weeks ago) by skodak
Branch: MAIN
Changes since 1.163: +3 -9 lines
Diff to previous 1.163
MDL-21125 removing obsolete global $THEME

Revision 1.163 - (view) (download) (annotate) - [select for diffs]
Thu Dec 24 01:27:29 2009 WST (2 months, 3 weeks ago) by skodak
Branch: MAIN
Changes since 1.162: +0 -2 lines
Diff to previous 1.162
MDL-20204 removed some forgotten legacy code

Revision 1.162 - (view) (download) (annotate) - [select for diffs]
Wed Dec 23 10:45:23 2009 WST (2 months, 3 weeks ago) by samhemelryk
Branch: MAIN
Changes since 1.161: +1 -1 lines
Diff to previous 1.161
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

Revision 1.161 - (view) (download) (annotate) - [select for diffs]
Fri Dec 18 06:43:27 2009 WST (3 months ago) by skodak
Branch: MAIN
Changes since 1.160: +3 -2 lines
Diff to previous 1.160
MDL-21148 geenral support for rendering targets, this should give us more flexibility; please propose improvements in the tracker if necessary, thanks

Revision 1.160 - (view) (download) (annotate) - [select for diffs]
Thu Dec 17 22:06:23 2009 WST (3 months ago) by skodak
Branch: MAIN
Changes since 1.159: +12 -12 lines
Diff to previous 1.159
MDL-21147 renamed find_renderer back to get_renderer() - there are no more collisions with those magic getters

Revision 1.159 - (view) (download) (annotate) - [select for diffs]
Thu Dec 17 22:04:15 2009 WST (3 months ago) by skodak
Branch: MAIN
Changes since 1.158: +48 -48 lines
Diff to previous 1.158
MDL-21147 do not use standard "get_x" methods for "magic" $PAGE stuff + fixed incorrect ->get_x uses

Revision 1.158 - (view) (download) (annotate) - [select for diffs]
Thu Dec 17 21:45:55 2009 WST (3 months ago) by skodak
Branch: MAIN
Changes since 1.157: +11 -1 lines
Diff to previous 1.157
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

Revision 1.157 - (view) (download) (annotate) - [select for diffs]
Thu Dec 17 05:33:01 2009 WST (3 months ago) by skodak
Branch: MAIN
Changes since 1.156: +2 -2 lines
Diff to previous 1.156
MDL-21142 minor cleanup in out() default params

Revision 1.156 - (view) (download) (annotate) - [select for diffs]
Thu Dec 17 02:01:11 2009 WST (3 months ago) by skodak
Branch: MAIN
Changes since 1.155: +30 -34 lines
Diff to previous 1.155
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

Revision 1.155 - (view) (download) (annotate) - [select for diffs]
Mon Nov 16 09:12:16 2009 WST (4 months ago) by samhemelryk
Branch: MAIN
Changes since 1.154: +11 -0 lines
Diff to previous 1.154
navigation MDL-20833 Moved has_navbar from OUTPUT to PAGE as it is logic

Revision 1.154 - (view) (download) (annotate) - [select for diffs]
Sun Nov 1 19:31:18 2009 WST (4 months, 2 weeks ago) by skodak
Branch: MAIN
Changes since 1.153: +1 -3 lines
Diff to previous 1.153
MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup

Revision 1.153 - (view) (download) (annotate) - [select for diffs]
Wed Sep 23 14:05:36 2009 WST (5 months, 3 weeks ago) by samhemelryk
Branch: MAIN
Changes since 1.152: +4 -0 lines
Diff to previous 1.152
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

Revision 1.152 - (view) (download) (annotate) - [select for diffs]
Sun Sep 6 01:32:10 2009 WST (6 months, 1 week ago) by mudrd8mz
Branch: MAIN
Changes since 1.151: +1 -1 lines
Diff to previous 1.151
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).

Revision 1.151 - (view) (download) (annotate) - [select for diffs]
Fri Sep 4 11:12:24 2009 WST (6 months, 2 weeks ago) by samhemelryk
Branch: MAIN
Changes since 1.150: +2 -2 lines
Diff to previous 1.150
navigation MDL-20216 Refactored add arguments
Moved $action argument from arg5 to arg2

Revision 1.150 - (view) (download) (annotate) - [select for diffs]
Thu Sep 3 15:47:43 2009 WST (6 months, 2 weeks ago) by moodler
Branch: MAIN
Changes since 1.149: +2 -2 lines
Diff to previous 1.149
lib/pagelib Improved the debugging message about set_url

Revision 1.149 - (view) (download) (annotate) - [select for diffs]
Thu Sep 3 14:59:25 2009 WST (6 months, 2 weeks ago) by samhemelryk
Branch: MAIN
Changes since 1.148: +16 -5 lines
Diff to previous 1.148
admin MDL-19799 Upgraded print_header and build_navigation calls to use PAGE and OUTPUT equivilants

Revision 1.148 - (view) (download) (annotate) - [select for diffs]
Tue Sep 1 11:47:07 2009 WST (6 months, 2 weeks ago) by samhemelryk
Branch: MAIN
Changes since 1.147: +19 -2 lines
Diff to previous 1.147
navigation MDL-14632 Deprecate print_header menu argument and provide PAGE method

Revision 1.147 - (view) (download) (annotate) - [select for diffs]
Fri Aug 28 16:47:31 2009 WST (6 months, 3 weeks ago) by samhemelryk
Branch: MAIN
Changes since 1.146: +40 -0 lines
Diff to previous 1.146
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

Revision 1.146 - (view) (download) (annotate) - [select for diffs]
Thu Jul 30 00:38:40 2009 WST (7 months, 2 weeks ago) by mudrd8mz
Branch: MAIN
Changes since 1.145: +1 -1 lines
Diff to previous 1.145
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.

Revision 1.145 - (view) (download) (annotate) - [select for diffs]
Thu Jul 30 00:05:36 2009 WST (7 months, 2 weeks ago) by mudrd8mz
Branch: MAIN
Changes since 1.144: +14 -5 lines
Diff to previous 1.144
MDL-19956 $PAGE->set_url(...) accepts already prepared instance of moodle_url

Revision 1.144 - (view) (download) (annotate) - [select for diffs]
Tue Jul 28 17:59:21 2009 WST (7 months, 3 weeks ago) by tjhunt
Branch: MAIN
Changes since 1.143: +4 -2 lines
Diff to previous 1.143
blocks: MDL-19946 Block editing form must be displayed from the original URL, with properliy initialised $page

Revision 1.143 - (view) (download) (annotate) - [select for diffs]
Tue Jul 21 21:58:47 2009 WST (7 months, 4 weeks ago) by tjhunt
Branch: MAIN
Changes since 1.142: +7 -2 lines
Diff to previous 1.142
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.

Revision 1.142 - (view) (download) (annotate) - [select for diffs]
Mon Jul 20 14:18:16 2009 WST (7 months, 4 weeks ago) by tjhunt
Branch: MAIN
Changes since 1.141: +12 -0 lines
Diff to previous 1.141
MDL-19010: In developer debug mode, print information about this page in the footer.

Revision 1.141 - (view) (download) (annotate) - [select for diffs]
Mon Jul 20 11:04:08 2009 WST (7 months, 4 weeks ago) by tjhunt
Branch: MAIN
Changes since 1.140: +1 -0 lines
Diff to previous 1.140
block MDL-19398 Initialise all blocks on this page before output is started.

Revision 1.140 - (view) (download) (annotate) - [select for diffs]
Wed Jul 15 14:11:55 2009 WST (8 months ago) by jerome
Branch: MAIN
Changes since 1.139: +1 -1 lines
Diff to previous 1.139
moodle_page: MDL-12212  misspelling

Revision 1.139 - (view) (download) (annotate) - [select for diffs]
Tue Jul 14 18:41:59 2009 WST (8 months ago) by tjhunt
Branch: MAIN
Changes since 1.138: +20 -1 lines
Diff to previous 1.138
blocks editing ui: MDL-19398 fix adding a block to a page that forgets to call $PAGE->set_url.

Revision 1.138 - (view) (download) (annotate) - [select for diffs]
Tue Jul 14 17:28:10 2009 WST (8 months ago) by tjhunt
Branch: MAIN
Changes since 1.137: +2 -1 lines
Diff to previous 1.137
blocks editing ui: MDL-19398 fix some bugs with adding a block.

Revision 1.137 - (view) (download) (annotate) - [select for diffs]
Tue Jul 14 15:18:57 2009 WST (8 months ago) by tjhunt
Branch: MAIN
Changes since 1.136: +7 -4 lines
Diff to previous 1.136
blocks editing ui: MDL-19398 you can now add new blocks!

Revision 1.136 - (view) (download) (annotate) - [select for diffs]
Tue Jul 14 13:14:45 2009 WST (8 months ago) by tjhunt
Branch: MAIN
Changes since 1.135: +17 -1 lines
Diff to previous 1.135
themes: MDL-19077 Don't need both output_starting_hook and starting_output method on page.

Revision 1.135 - (view) (download) (annotate) - [select for diffs]
Thu Jul 9 15:35:06 2009 WST (8 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.134: +7 -4 lines
Diff to previous 1.134
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.

Revision 1.134 - (view) (download) (annotate) - [select for diffs]
Fri Jul 3 17:03:50 2009 WST (8 months, 2 weeks ago) by tjhunt
Branch: MAIN
Changes since 1.133: +8 -21 lines
Diff to previous 1.133
MDL-19696 make sure install works.

Revision 1.133 - (view) (download) (annotate) - [select for diffs]
Fri Jul 3 15:55:30 2009 WST (8 months, 2 weeks ago) by tjhunt
Branch: MAIN
Changes since 1.132: +2 -2 lines
Diff to previous 1.132
MDL-19690 - the last lot of $CFG->pixpath to $OUTPUT->old_icon_url
Including MDL-19693

RIP $CFG->pixpath

Revision 1.132 - (view) (download) (annotate) - [select for diffs]
Fri Jul 3 04:29:21 2009 WST (8 months, 2 weeks ago) by skodak
Branch: MAIN
Changes since 1.131: +0 -6 lines
Diff to previous 1.131
MDL-19696 undoing my previous veryveryuglyhack, I did not solve much, sorry

Revision 1.131 - (view) (download) (annotate) - [select for diffs]
Thu Jul 2 21:39:55 2009 WST (8 months, 2 weeks ago) by skodak
Branch: MAIN
Changes since 1.130: +6 -0 lines
Diff to previous 1.130
MDL-19696 veryveryuglyhack which partially ubreaks installation after latest pagelib changes

Revision 1.130 - (view) (download) (annotate) - [select for diffs]
Thu Jul 2 15:29:08 2009 WST (8 months, 2 weeks ago) by samhemelryk
Branch: MAIN
Changes since 1.129: +1 -1 lines
Diff to previous 1.129
pagelib MDL-19077 Fixed minor error in pagelib

Revision 1.129 - (view) (download) (annotate) - [select for diffs]
Thu Jul 2 15:06:25 2009 WST (8 months, 2 weeks ago) by tjhunt
Branch: MAIN
Changes since 1.128: +19 -7 lines
Diff to previous 1.128
MDL-19077 I just found a way to reduce the coupling between the classes.

Revision 1.128 - (view) (download) (annotate) - [select for diffs]
Wed Jul 1 13:54:27 2009 WST (8 months, 2 weeks ago) by tjhunt
Branch: MAIN
Changes since 1.127: +200 -11 lines
Diff to previous 1.127
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.

Revision 1.127 - (view) (download) (annotate) - [select for diffs]
Wed Jul 1 11:47:52 2009 WST (8 months, 2 weeks ago) by samhemelryk
Branch: MAIN
Changes since 1.126: +6 -1 lines
Diff to previous 1.126
outputlib pagelib MDL-19236 Cleaned up PHPdocs on a couple of functions

Revision 1.126 - (view) (download) (annotate) - [select for diffs]
Tue Jun 30 15:57:41 2009 WST (8 months, 2 weeks ago) by samhemelryk
Branch: MAIN
Changes since 1.125: +35 -0 lines
Diff to previous 1.125
output MDL-19077 Implemented periodic refresh to meta refresh by delay
Also created layout-popup.php for standardwhite theme to provide a simpler template

Revision 1.125 - (view) (download) (annotate) - [select for diffs]
Mon Jun 29 13:00:45 2009 WST (8 months, 2 weeks ago) by tjhunt
Branch: MAIN
Changes since 1.124: +4 -3 lines
Diff to previous 1.124
MDL-19077 - change how $OUTPUT is initialised.
Please read the comment at the top of bootstrap_renderer in setuplib.php

Revision 1.124 - (view) (download) (annotate) - [select for diffs]
Fri Jun 26 17:06:17 2009 WST (8 months, 3 weeks ago) by tjhunt
Branch: MAIN
Changes since 1.123: +159 -28 lines
Diff to previous 1.123
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.

Revision 1.123 - (view) (download) (annotate) - [select for diffs]
Wed Jun 24 17:17:56 2009 WST (8 months, 3 weeks ago) by tjhunt
Branch: MAIN
Changes since 1.122: +1 -1 lines
Diff to previous 1.122
install: MDL-19610 encapsulate empty($CFG->rolesactive) checks in a during_initial_install() function.

Revision 1.122 - (view) (download) (annotate) - [select for diffs]
Thu Jun 18 18:43:13 2009 WST (9 months ago) by tjhunt
Branch: MAIN
Changes since 1.121: +17 -2 lines
Diff to previous 1.121
themes: MDL-19077 implement the renderer_factory instrastructure.

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

The concept is that all the print_... functions in weblib get replaced  by methods
on a moodle_core_renderer class. Then, the theme can choose whether to
use the standard moodle_core_renderer class, or another implemenatation of
its own choosing, to generate different HTML.

Also, becuase Moodle is modular, we may need a moodle_mod_forum_renderer
and so on.

In order for the theme to be able to choose which renderers get created, we
introduce the concept  of a renderer factory, as in the factory design pattern.
The theme will choose which factory should be used, and that then creates
the renderer objects based on the module name.

This commit includes 4 types of factory:
* standard_renderer_factory
* custom_corners_renderer_factory
* theme_overridden_renderer_factory
* template_renderer_factory

All this with unit tests and PHP doc comments.

Note, this new code is not actually used yet. Still todo:
1. actually define the moodle_core_renderer class, and deprecate a lot of weblib functions.
2. make theme_setup initialise everything, so it is used.

Revision 1.121 - (view) (download) (annotate) - [select for diffs]
Mon Jun 15 12:03:59 2009 WST (9 months ago) by tjhunt
Branch: MAIN
Changes since 1.120: +5 -5 lines
Diff to previous 1.120
Further fixes to PHPdoc comments.

Revision 1.120 - (view) (download) (annotate) - [select for diffs]
Mon Jun 15 11:54:00 2009 WST (9 months ago) by tjhunt
Branch: MAIN
Changes since 1.119: +3 -0 lines
Diff to previous 1.119
Further fixes to PHPdoc comments.

Revision 1.119 - (view) (download) (annotate) - [select for diffs]
Fri Jun 12 20:13:08 2009 WST (9 months ago) by tjhunt
Branch: MAIN
Changes since 1.118: +1 -1 lines
Diff to previous 1.118
ajaxlib/require_js: MDL-16693 $PAGE->requires->... deprecates require_js etc.

There is a new implementation of require_js in lib/deprecatedlib.php,
based on $PAGE->requires.

There were a few other recently introduced functions in lib/weblib.php,
namely print_js_call, print_delayed_js_call, print_js_config and
standard_js_config. These have been removed, since they were never in
a stable branch, and all the places that used them have been changed
to use the newer $PAGE->requires->... methods.

get_require_js_code is also gone, and the evil places that were calling
it, even though it is an internal function, have been fixed.

Also, I made some minor improvements to the code I committed yesterday
for MDL-16695.

All that remains is to update all the places in core code that are
still using require_js.

(This commit also fixes the problem where the admin tree would not
start with the right categories expanded.)

Revision 1.118 - (view) (download) (annotate) - [select for diffs]
Fri Jun 12 11:13:29 2009 WST (9 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.117: +15 -0 lines
Diff to previous 1.117
ajaxlib: MDL-16695 New page_requirements_manager class. Soon to replace require_js.

This new class does the work that require_js used to do, and more.
It can track a number of different things that may be required to
be output somewhere on the page, including:

    * Links to JS files
    * Links to CSS files
    * Links to YUI libraries (this class knows about the dependancies between the different libs).
    * Skip links that go from the top of <body> to various places in the content.
    * Calls to JavaScript functions (for example to initialise things)
    * Bits of data from PHP that need to be available to JavaScript
    * As a special case of that, an easy way to pass language strings to JS.

The new API looks like

$PAGE->requires->css('mod/mymod/styles.css');
$PAGE->requires->js('mod/mymod/script.js');
$PAGE->requires->js('mod/mymod/small_but_urgent.js')->in_head();
$PAGE->requires->js_function_call('init_mymod', array($data))->on_dom_ready();

$PAGE->requires is the canonical instances of this new class.

The commit also includes unit tests, and hopefully the PHP doc comments are
clear enough that it is easy to understand.

Revision 1.117 - (view) (download) (annotate) - [select for diffs]
Tue May 26 11:23:32 2009 WST (9 months, 3 weeks ago) by samhemelryk
Branch: MAIN
Changes since 1.116: +38 -28 lines
Diff to previous 1.116
lib MDL-19236 Added boilerplates and copyrights

Revision 1.116 - (view) (download) (annotate) - [select for diffs]
Thu May 7 16:55:11 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.115: +3 -2 lines
Diff to previous 1.115
blocks: MDL-19010 Fix further blocks-related breakage, including removing all references to blocks_insance_old outside blocklib.php

Revision 1.115 - (view) (download) (annotate) - [select for diffs]
Thu May 7 15:05:22 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.114: +16 -51 lines
Diff to previous 1.114
blocklib: MDL-19010 fix new install.
* Fix the blocks bit of build_context_path
* Replace blocks_repopulate_page
* Make starting_output work during setup

Revision 1.114 - (view) (download) (annotate) - [select for diffs]
Thu May 7 10:57:39 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.113: +1 -2 lines
Diff to previous 1.113
blocklib: MDL-19010 move the check for whether the right database tables exist - and we no longer need this global.

Revision 1.113 - (view) (download) (annotate) - [select for diffs]
Thu May 7 10:56:48 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.112: +2 -5 lines
Diff to previous 1.112
blocklib: MDL-19010 move the check for whether the right database tables exist to a place where it is better encapsulated.

Revision 1.112 - (view) (download) (annotate) - [select for diffs]
Wed May 6 18:49:49 2009 WST (10 months, 1 week ago) by nicolasconnault
Branch: MAIN
Changes since 1.111: +5 -2 lines
Diff to previous 1.111
MDL-19010 Only output blocks after upgrade

Revision 1.111 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:29:06 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.110: +27 -15 lines
Diff to previous 1.110
moodle_page: MDL-12212 improve comments and add some work-in-progress warnings

Revision 1.110 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:28:06 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.109: +7 -1 lines
Diff to previous 1.109
moodle_page: MDL-12212 add a couple more useful classes to body

Revision 1.109 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:27:16 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.108: +7 -1 lines
Diff to previous 1.108
moodle_page: MDL-12212 add a couple more useful classes to body

Revision 1.108 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:26:46 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.107: +4 -1 lines
Diff to previous 1.107
pagelib: MDL-12212 eliminate data_page

Revision 1.107 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:25:54 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.106: +2 -1 lines
Diff to previous 1.106
pagelib: MDL-12212 eliminate chat_page

Revision 1.106 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:19:47 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.105: +1 -41 lines
Diff to previous 1.105
moodle_page: MDL-12212 remove deprecated calls from course/view.php and page_course::print_header

Revision 1.105 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:15:05 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.104: +8 -1 lines
Diff to previous 1.104
blocklib: MDL-19010 refactor blocklib to use block_manager to get the blocks for rendering

Revision 1.104 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:14:42 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.103: +23 -9 lines
Diff to previous 1.103
blocklib: MDL-19010 add block and get_blocks methods

Revision 1.103 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:14:01 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.102: +14 -19 lines
Diff to previous 1.102
blocklib: MDL-19010 start of block_manager - get and set regions

Revision 1.102 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:11:07 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.101: +19 -4 lines
Diff to previous 1.101
moodle_page: MDL-12212 completely remove the old tag and admin page classes

Revision 1.101 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:03:49 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.100: +20 -1 lines
Diff to previous 1.100
moodle_page: MDL-12212 ->subpage field

Revision 1.100 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:03:33 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.99: +122 -81 lines
Diff to previous 1.99
moodle_page: MDL-12212 ->cm and ->activityrecord fields

Revision 1.99 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:03:03 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.98: +68 -24 lines
Diff to previous 1.98
moodle_page: MDL-12212 deprecate more of the legacy page machinery, and avoid overwriting $PAGE ever

Revision 1.98 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:02:49 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.97: +9 -60 lines
Diff to previous 1.97
moodle_page: MDL-12212 kill legacy page_allows_editing implementations

Revision 1.97 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:01:42 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.96: +36 -2 lines
Diff to previous 1.96
moodle_page: MDL-12212 new implementation of user_allowed_editing

Revision 1.96 - (view) (download) (annotate) - [select for diffs]
Wed May 6 17:00:58 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.95: +3 -2 lines
Diff to previous 1.95
moodle_page: MDL-12212 Unbreak home page when editing is on

Revision 1.95 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:59:31 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.94: +20 -29 lines
Diff to previous 1.94
moodle_page: MDL-12212 reimplement user_is_editing, deprecate isediting

Revision 1.94 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:56:44 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.93: +1 -8 lines
Diff to previous 1.93
moodle_page: MDL-12212 eliminate page::edit_always

Revision 1.93 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:55:55 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.92: +69 -101 lines
Diff to previous 1.92
moodle_page: MDL-12212 Kill legacy url_... and blocks_... methods
Start calling $PAGE->set_url in all the places it will be necessary
Start of a stub implementation of $PAGE->blocks to stop other things breaking
Remove some of the special case methods in admin_page

Revision 1.92 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:53:14 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.91: +34 -60 lines
Diff to previous 1.91
moodle_page: MDL-12212 Eliminate legacy blocks_ methods

moving blocks will now be broken until the new bockslib is done

Revision 1.91 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:50:32 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.90: +33 -1 lines
Diff to previous 1.90
moodle_page: MDL-12212 ->url and cleanup init of $FULLME, etc.

Revision 1.90 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:48:14 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.89: +25 -1 lines
Diff to previous 1.89
moodle_page: MDL-12212 ->docspath

Revision 1.89 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:46:48 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.88: +40 -6 lines
Diff to previous 1.88
moodle_page: MDL-14306 (part of MDL-12212) class name on body with ->category

If ->allowcategorythemes is set, includes all parent categories too

Revision 1.88 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:46:06 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.87: +102 -2 lines
Diff to previous 1.87
moodle_page: MDL-12212 ->category and ->categories

Revision 1.87 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:44:58 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.86: +37 -9 lines
Diff to previous 1.86
moodle_page: MDL-14305 (and MDL-12212) class on body based on ->wwwroot

Revision 1.86 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:43:53 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.85: +3 -3 lines
Diff to previous 1.85
moodle_page: MDL-12212 more ->pagepaths to kill

Revision 1.85 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:42:13 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.84: +69 -13 lines
Diff to previous 1.84
moodle_page: MDL-12212 ->bodyclasses and initialise_standard_body_classes

Revision 1.84 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:41:03 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.83: +2 -2 lines
Diff to previous 1.83
moodle_page: MDL-12212 eliminate the two different interpretations of
pagetype

Revision 1.83 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:38:56 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.82: +77 -54 lines
Diff to previous 1.82
moodle_page: MDL-12212 kill $CFG->pagepath (use $PAGE->set_pagetype)
deprecate $PAGE->get_format_name (use $PAGE->pagetype)
deprecate page_id_and_class (use $PAGE->pagetype)

Revision 1.82 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:36:18 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.81: +1 -11 lines
Diff to previous 1.81
moodle_page: MDL-12212 eliminate two old methods that were never used

Revision 1.81 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:35:39 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.80: +19 -30 lines
Diff to previous 1.80
moodle_page: MDL-12212 remove code in legacy page types that stores a course record

Revision 1.80 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:34:33 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.79: +36 -22 lines
Diff to previous 1.79
moodle_page: MDL-12212 implement ->pagetype

Revision 1.79 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:30:25 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.78: +27 -1 lines
Diff to previous 1.78
moodle_page: MDL-12212 implement ->context

Revision 1.78 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:29:23 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.77: +116 -3 lines
Diff to previous 1.77
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!

Revision 1.77 - (view) (download) (annotate) - [select for diffs]
Wed May 6 16:27:12 2009 WST (10 months, 1 week ago) by tjhunt
Branch: MAIN
Changes since 1.76: +22 -46 lines
Diff to previous 1.76
moodle_page: MDL-12212 deprecate page_import_types and clean up file

Revision 1.76 - (view) (download) (annotate) - [select for diffs]
Wed Apr 15 11:24:25 2009 WST (11 months ago) by tjhunt
Branch: MAIN
Changes since 1.75: +25 -4 lines
Diff to previous 1.75
pagelib: Fixing start-of-file comments in CVS to avoid merge problems when I switch to git.

Revision 1.75 - (view) (download) (annotate) - [select for diffs]
Sat Aug 16 20:16:04 2008 WST (19 months ago) by skodak
Branch: MAIN
Changes since 1.74: +6 -6 lines
Diff to previous 1.74
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

Revision 1.74 - (view) (download) (annotate) - [select for diffs]
Sun Jun 1 01:44:57 2008 WST (21 months, 2 weeks ago) by skodak
Branch: MAIN
Changes since 1.73: +3 -3 lines
Diff to previous 1.73
MDL-14679 towards notes conversion and regression

Revision 1.73 - (view) (download) (annotate) - [select for diffs]
Sat May 31 04:02:55 2008 WST (21 months, 2 weeks ago) by skodak
Branch: MAIN
Changes since 1.72: +9 -6 lines
Diff to previous 1.72
MDL-14679 finished pagelib conversion

Revision 1.72 - (view) (download) (annotate) - [select for diffs]
Tue May 20 10:53:46 2008 WST (21 months, 4 weeks ago) by dongsheng
Branch: MAIN
Changes since 1.71: +9 -9 lines
Diff to previous 1.71
"MDL-14129, fix print_error"

Revision 1.71 - (view) (download) (annotate) - [select for diffs]
Fri Apr 4 10:54:32 2008 WST (23 months, 2 weeks ago) by dongsheng
Branch: MAIN
Changes since 1.70: +9 -9 lines
Diff to previous 1.70
MDL-14129, remove all the other error() call

Revision 1.70 - (view) (download) (annotate) - [select for diffs]
Fri Jan 25 17:39:14 2008 WST (2 years, 1 month ago) by scyrma
Branch: MAIN
Changes since 1.69: +2 -6 lines
Diff to previous 1.69
Start on MDL-12730 .. fixes some E_STRICT messages for 2.0.

Revision 1.62.2.8 - (view) (download) (annotate) - [select for diffs]
Fri Jan 25 17:34:37 2008 WST (2 years, 1 month ago) by scyrma
Branch: MOODLE_19_STABLE
CVS Tags: MOODLE_19, MOODLE_191, MOODLE_192, MOODLE_193, MOODLE_194, MOODLE_195, MOODLE_196, MOODLE_197, MOODLE_19_MERGED, MOODLE_19_WEEKLY
Changes since 1.62.2.7: +4 -8 lines
Diff to previous 1.62.2.7 , to branch point 1.62 , to next main 1.173
Start on MDL-12730 .. fixes some E_STRICT messages for 1.9 (removing __construct in
this branch only, to stay compatible with PHP4)

Revision 1.69 - (view) (download) (annotate) - [select for diffs]
Sat Jan 12 00:44:11 2008 WST (2 years, 2 months ago) by poltawski
Branch: MAIN
Changes since 1.68: +3 -3 lines
Diff to previous 1.68
MDL-11074 - incorrect test in page_generic_activity, thanks to Gordon Bateson
merged from MOODLE_19_STABLE

Revision 1.62.2.7 - (view) (download) (annotate) - [select for diffs]
Sat Jan 12 00:42:05 2008 WST (2 years, 2 months ago) by poltawski
Branch: MOODLE_19_STABLE
Changes since 1.62.2.6: +3 -3 lines
Diff to previous 1.62.2.6 , to branch point 1.62
MDL-11074 - incorrect test in page_generic_activity, thanks to Gordon Bateson

Revision 1.68 - (view) (download) (annotate) - [select for diffs]
Sat Dec 29 01:13:09 2007 WST (2 years, 2 months ago) by mchurch
Branch: MAIN
Changes since 1.67: +8 -3 lines
Diff to previous 1.67
MDL-12744 - Add ability to pass an extra button for use in print header for modules that use the course page to display themselves with blocks.

Revision 1.62.2.6 - (view) (download) (annotate) - [select for diffs]
Fri Dec 28 06:32:04 2007 WST (2 years, 2 months ago) by mchurch
Branch: MOODLE_19_STABLE
Changes since 1.62.2.5: +8 -3 lines
Diff to previous 1.62.2.5 , to branch point 1.62
MDL-12744 - Add ability to pass an extra button for use in print header for modules that use the course page to display themselves with blocks.

Revision 1.52.2.3 - (view) (download) (annotate) - [select for diffs]
Fri Dec 28 06:25:19 2007 WST (2 years, 2 months ago) by mchurch
Branch: MOODLE_18_STABLE
CVS Tags: MOODLE_1810, MOODLE_1811, MOODLE_184, MOODLE_185, MOODLE_186, MOODLE_187, MOODLE_188, MOODLE_189, MOODLE_18_MERGED, MOODLE_18_WEEKLY
Changes since 1.52.2.2: +8 -3 lines
Diff to previous 1.52.2.2 , to branch point 1.52 , to next main 1.173
MDL-12744 - Add ability to pass an extra button for use in print header for modules that use the course page to display themselves with blocks.

Revision 1.67 - (view) (download) (annotate) - [select for diffs]
Thu Dec 6 20:38:53 2007 WST (2 years, 3 months ago) by tjhunt
Branch: MAIN
Changes since 1.66: +3 -5 lines
Diff to previous 1.66
MDL-12448 - Fix page_generic_activity->init_full() to use get_coursemodule_from_instance(). Merged from MOODLE_19_STABLE.

Revision 1.62.2.5 - (view) (download) (annotate) - [select for diffs]
Thu Dec 6 20:38:34 2007 WST (2 years, 3 months ago) by tjhunt
Branch: MOODLE_19_STABLE
Changes since 1.62.2.4: +3 -5 lines
Diff to previous 1.62.2.4 , to branch point 1.62
MDL-12448 - Fix page_generic_activity->init_full() to use get_coursemodule_from_instance().

Revision 1.62.2.4 - (view) (download) (annotate) - [select for diffs]
Mon Oct 22 17:25:53 2007 WST (2 years, 4 months ago) by nfreear
Branch: MOODLE_19_STABLE
Changes since 1.62.2.3: +2 -4 lines
Diff to previous 1.62.2.3 , to branch point 1.62
Fix for reopened bug MDL-7878, "Link identification and skipping" - includes site and course index.php. Merged.

Revision 1.66 - (view) (download) (annotate) - [select for diffs]
Mon Oct 22 17:21:12 2007 WST (2 years, 4 months ago) by nfreear
Branch: MAIN
Changes since 1.65: +2 -4 lines
Diff to previous 1.65
Fix for reopened bug MDL-7878, "Link identification and skipping" - includes site and course index.php.

Revision 1.62.2.3 - (view) (download) (annotate) - [select for diffs]
Mon Oct 22 14:51:10 2007 WST (2 years, 4 months ago) by nfreear
Branch: MOODLE_19_STABLE
Changes since 1.62.2.2: +3 -3 lines
Diff to previous 1.62.2.2 , to branch point 1.62
Partial fix for reopened bug MDL-7878, "Link identification and skipping" - affects all course formats + other files. Merged.

Revision 1.65 - (view) (download) (annotate) - [select for diffs]
Mon Oct 22 14:43:04 2007 WST (2 years, 4 months ago) by nfreear
Branch: MAIN
Changes since 1.64: +3 -3 lines
Diff to previous 1.64
Partial fix for reopened bug MDL-7878, "Link identification and skipping" - affects all course formats + other files.

Revision 1.64 - (view) (download) (annotate) - [select for diffs]
Wed Oct 17 04:44:55 2007 WST (2 years, 5 months ago) by tjhunt
Branch: MAIN
Changes since 1.63: +4 -4 lines
Diff to previous 1.63
MDL-11794 - Blocks editing on button is not XHTML Strict when produced by page_generic_activity. Merged from MOODLE_19_STABLE.

Revision 1.62.2.2 - (view) (download) (annotate) - [select for diffs]
Wed Oct 17 04:43:28 2007 WST (2 years, 5 months ago) by tjhunt
Branch: MOODLE_19_STABLE
Changes since 1.62.2.1: +4 -4 lines
Diff to previous 1.62.2.1 , to branch point 1.62
MDL-11794 - Blocks editing on button is not XHTML Strict when produced by page_generic_activity.

Revision 1.62.2.1 - (view) (download) (annotate) - [select for diffs]
Sat Oct 13 00:09:45 2007 WST (2 years, 5 months ago) by tjhunt
Branch: MOODLE_19_STABLE
Changes since 1.62: +6 -12 lines
Diff to previous 1.62
MDL-11741 - Convert core modules to take advantage of recent improvements to build_navigation.

This check-in removes about 400 lines of code. I hope I have not screwed anything up. I would be grateful if people could review this change, and keep an eye on the navigation bar in modules.

Any navigation bar bugs you find in the near future, feel free to file them in the tracker and assign them to me. Thanks.

If not to many problems are found, I think I would like to backport this to 1.9 stable, but I am not sure that is a good idea. Opinions to the General Developer Forum please. I am about to start a thread there.

Backported from head. Will update merged tags in a few hours. I am late for orchestra. Sorry.

Revision 1.63 - (view) (download) (annotate) - [select for diffs]
Fri Oct 12 23:55:52 2007 WST (2 years, 5 months ago) by tjhunt
Branch: MAIN
Changes since 1.62: +6 -12 lines
Diff to previous 1.62
MDL-11741 - Convert core modules to take advantage of recent improvements to build_navigation.

This check-in removes about 400 lines of code. I hope I have not screwed anything up. I would be grateful if people could review this change, and keep an eye on the navigation bar in modules.

Any navigation bar bugs you find in the near future, feel free to file them in the tracker and assign them to me. Thanks.

If not to many problems are found, I think I would like to backport this to 1.9 stable, but I am not sure that is a good idea. Opinions to the General Developer Forum please. I am about to start a thread there.

Revision 1.62 - (view) (download) (annotate) - [select for diffs]
Wed Sep 19 14:53:09 2007 WST (2 years, 6 months ago) by martinlanghoff
Branch: MAIN
CVS Tags: MOODLE_19_BETA
Branch point for: MOODLE_19_STABLE
Changes since 1.61: +44 -6 lines
Diff to previous 1.61
pagelib: Course page - preload child contexts and smarter user_allowed_editing()

With this patch we preload the child contexts for the course
and hold on to them. This means that in one DB query we have all the contexts
we are going to need.

The checks for user_allowed_editing() move from weblib:update_icon() to
user_allowed_editing(), where we cache the result, and in the process save
50% of the cap checks by testing separately blocks from modules (doh!).

Still, the cap checks here are very inefficient...

With the last 3 patches, a course page with default blocks and 9 modinstances
goes from 157 to 86 db queries when logged in as a non-editing user (guest,
student). As admin it drops from 88 to 81.

Conflicts:

	lib/pagelib.php

Revision 1.52.2.2 - (view) (download) (annotate) - [select for diffs]
Wed Sep 12 18:46:07 2007 WST (2 years, 6 months ago) by skodak
Branch: MOODLE_18_STABLE
CVS Tags: MOODLE_183
Changes since 1.52.2.1: +3 -3 lines
Diff to previous 1.52.2.1 , to branch point 1.52
MDL-10635 adding caching workaround for performance problems with update_course_icon() function - 1.9 will have a different solution

Revision 1.61 - (view) (download) (annotate) - [select for diffs]
Sun Aug 26 16:24:53 2007 WST (2 years, 6 months ago) by skodak
Branch: MAIN
Changes since 1.60: +9 -3 lines
Diff to previous 1.60
MDL-10995 eliminated some get course record calls - reused $COURSE instead

Revision 1.60 - (view) (download) (annotate) - [select for diffs]
Sat Aug 25 19:28:38 2007 WST (2 years, 6 months ago) by skodak
Branch: MAIN
Changes since 1.59: +6 -24 lines
Diff to previous 1.59
MDL-10635 improved performance of update_course_icon() and friends; fixed parameter of iseditting() - removed $userid which was not used and did not make much sense there anyway

Revision 1.59 - (view) (download) (annotate) - [select for diffs]
Thu Jul 5 12:55:25 2007 WST (2 years, 8 months ago) by mattc-catalyst
Branch: MAIN
Branch point for: MOODLE_19_CLI
Changes since 1.58: +3 -3 lines
Diff to previous 1.58
MDL-9473: Initialise navlinks array before use


Author: Matt Clarkson <mattc@catalyst.net.nz>

Revision 1.58 - (view) (download) (annotate) - [select for diffs]
Thu Jul 5 12:40:57 2007 WST (2 years, 8 months ago) by mattc-catalyst
Branch: MAIN
Changes since 1.57: +16 -16 lines
Diff to previous 1.57
MDL-9615: Correct incorrect use of term breadcrumbs

- $crumbs -> $navlinks


Author: Matt Clarkson <mattc@catalyst.net.nz>

Revision 1.57 - (view) (download) (annotate) - [select for diffs]
Tue Apr 24 05:11:11 2007 WST (2 years, 10 months ago) by mattc-catalyst
Branch: MAIN
Branch point for: MOODLE_19_QUESTIONS
Changes since 1.56: +4 -4 lines
Diff to previous 1.56
MDL-9474: Updated build_navigation() to use global $COURSE

- Removed $course parameter from build_navigation()
- Updated all calls to build_navigation()


Author: Matt Clarkson <mattc@catalyst.net.nz>
Committer: Matt Clarkson <mattc@catalyst.net.nz>

Revision 1.56 - (view) (download) (annotate) - [select for diffs]
Tue Apr 17 04:48:48 2007 WST (2 years, 11 months ago) by mattc-catalyst
Branch: MAIN
Changes since 1.55: +46 -23 lines
Diff to previous 1.55
Breadcrumbs: pagelib changes

- Modified page class to use build_navigation for creating breadcrumbs.
- Added print_header method to page_generic_activity to make derived
  classes print the page headers the correct way.


Author: Matt Clarkson <mattc@catalyst.net.nz>
Committer: Matt Clarkson <mattc@catalyst.net.nz>

Revision 1.55 - (view) (download) (annotate) - [select for diffs]
Mon Mar 26 10:55:03 2007 WST (2 years, 11 months ago) by toyomoyo
Branch: MAIN
Changes since 1.54: +6 -4 lines
Diff to previous 1.54
patching up module level manageactivies capability so that you only need it assigned at mod level to update an activity

Revision 1.40.6.1 - (view) (download) (annotate) - [select for diffs]
Sun Mar 25 22:49:17 2007 WST (2 years, 11 months ago) by moodler
Branch: MOODLE_16_STABLE
CVS Tags: MOODLE_165, MOODLE_166, MOODLE_167, MOODLE_168, MOODLE_169, MOODLE_16_WEEKLY
Changes since 1.40: +5 -4 lines
Diff to previous 1.40 , to next main 1.173
Restoring changes all the changes in MOODLE_16_STABLE since MOODLE_16_BETA.

This had to be done because the MOODLE_16_STABLE branch tags were moved.

Hopefully after this MOODLE_16_STABLE will be back to how it was (and a
proper branch) but some of the history may look a bit odd.

See MDL-9032 for more discussion and details.

Revision 1.54 - (view) (download) (annotate) - [select for diffs]
Sun Feb 25 08:38:42 2007 WST (3 years ago) by defacer
Branch: MAIN
Changes since 1.53: +4 -3 lines
Diff to previous 1.53
Merged from MOODLE_16_STABLE:
Fix for MDL-4940: Social Activities block disappears when editing course settings.

Revision 1.52.2.1 - (view) (download) (annotate) - [select for diffs]
Sun Feb 25 08:31:22 2007 WST (3 years ago) by defacer
Branch: MOODLE_18_STABLE
CVS Tags: MOODLE_18, MOODLE_181, MOODLE_182
Changes since 1.52: +4 -3 lines
Diff to previous 1.52
Merged from MOODLE_16_STABLE:
Fix for MDL-4940: Social Activities block disappears when editing course settings.

Revision 1.49.2.2 - (view) (download) (annotate) - [select for diffs]
Sun Feb 25 08:24:43 2007 WST (3 years ago) by defacer
Branch: MOODLE_17_STABLE
CVS Tags: MOODLE_172, MOODLE_173, MOODLE_174, MOODLE_175, MOODLE_176, MOODLE_177, MOODLE_17_MERGED, MOODLE_17_WEEKLY
Changes since 1.49.2.1: +4 -3 lines
Diff to previous 1.49.2.1 , to branch point 1.49 , to next main 1.173
Merged from MOODLE_16_STABLE:
Fix for MDL-4940: Social Activities block disappears when editing course settings.

Revision 1.40.2.2 - (view) (download) (annotate) - [select for diffs]
Sun Feb 25 08:07:32 2007 WST (3 years ago) by defacer
CVS Tags: MOODLE_16_MERGED
Changes since 1.40.2.1: +4 -3 lines
Diff to previous 1.40.2.1 , to branch point 1.40 , to next main 1.173
Fix for MDL-4940: Social Activities block disappears when editing course settings.

Revision 1.53 - (view) (download) (annotate) - [select for diffs]
Fri Feb 16 16:57:24 2007 WST (3 years, 1 month ago) by toyomoyo
Branch: MAIN
Changes since 1.52: +23 -3 lines
Diff to previous 1.52
made some changes so that if a user has any roles assigned in context_module or context_block with moodle/site:manageblocks or moodle/course:manageactivities, he will see the "turn editting on" button without needing to have a role assigned at context_course with moodle/course:manageactivies capability. Of course this user would not be able to edit any blocks or modules he/she is not supposed to edit. Ajax for these users with partial editing privilages are locked. Please report bugs asap as we are looking at backporting this change to 1.8. Cheers.

Revision 1.52 - (view) (download) (annotate) - [select for diffs]
Tue Jan 30 06:29:28 2007 WST (3 years, 1 month ago) by skodak
Branch: MAIN
CVS Tags: MOODLE_18_BETA
Branch point for: MOODLE_18_STABLE
Changes since 1.51: +5 -5 lines
Diff to previous 1.51
MDL-8343 reorganize frontpage settings in admintree - admin tree now allows to specify context together with required capability for each entry
MDL-8352 Fully separate CONTEXT_COURSE, SITEID from COURSE_SYSTEM - first part of cleanup related to frontpage

Revision 1.51 - (view) (download) (annotate) - [select for diffs]
Thu Jan 4 00:37:08 2007 WST (3 years, 2 months ago) by moodler
Branch: MAIN
Changes since 1.50: +4 -2 lines
Diff to previous 1.50
Added skip links to all course formats to main content   MDL-7878

Revision 1.50 - (view) (download) (annotate) - [select for diffs]
Tue Oct 24 17:42:06 2006 WST (3 years, 4 months ago) by vyshane
Branch: MAIN
CVS Tags: MOODLE_18_GROUPS_PRE, MOODLE_18_GROUPS_PRE_MERGE
Branch point for: MOODLE_18_GROUPS
Changes since 1.49: +4 -4 lines
Diff to previous 1.49
Merged from 1.7.

Revision 1.49.2.1 - (view) (download) (annotate) - [select for diffs]
Tue Oct 24 17:40:48 2006 WST (3 years, 4 months ago) by vyshane
Branch: MOODLE_17_STABLE
CVS Tags: MOODLE_17, MOODLE_171, MOODLE_17_BETA2
Changes since 1.49: +4 -4 lines
Diff to previous 1.49
Modified course page print_header function to accept more arguments. Needed for the AJAX course formats.

Revision 1.49 - (view) (download) (annotate) - [select for diffs]
Thu Sep 21 17:16:41 2006 WST (3 years, 5 months ago) by moodler
Branch: MAIN
CVS Tags: MOODLE_17_BETA
Branch point for: MOODLE_17_STABLE
Changes since 1.48: +3 -3 lines
Diff to previous 1.48
New "Switch Role" functionality to replace the old "Student view".

It's not well-tested yet and probably doesn't quite work.  I will keep debugging this tonight from home.

Revision 1.48 - (view) (download) (annotate) - [select for diffs]
Mon Sep 18 01:32:45 2006 WST (3 years, 6 months ago) by skodak
Branch: MAIN
Changes since 1.47: +8 -7 lines
Diff to previous 1.47
fixed non-working edit button on course page for teachers, added explanation comments

Revision 1.47 - (view) (download) (annotate) - [select for diffs]
Wed Sep 13 17:45:07 2006 WST (3 years, 6 months ago) by moodler
Branch: MAIN
Changes since 1.46: +5 -11 lines
Diff to previous 1.46
CHanged a lot of CFG->debug stuff to use the new debuggin() function

Revision 1.46 - (view) (download) (annotate) - [select for diffs]
Wed Sep 13 17:08:15 2006 WST (3 years, 6 months ago) by toyomoyo
Branch: MAIN
Changes since 1.45: +4 -4 lines
Diff to previous 1.45
adding capabilitiies

Revision 1.45 - (view) (download) (annotate) - [select for diffs]
Tue Sep 12 04:05:31 2006 WST (3 years, 6 months ago) by skodak
Branch: MAIN
Changes since 1.44: +3 -3 lines
Diff to previous 1.44
old admin block not added into frontpage during installation anymore, it is not removed  during upgrade.

Revision 1.44 - (view) (download) (annotate) - [select for diffs]
Fri Sep 8 16:46:27 2006 WST (3 years, 6 months ago) by toyomoyo
Branch: MAIN
Changes since 1.43: +5 -5 lines
Diff to previous 1.43
adding capabilities

Revision 1.43 - (view) (download) (annotate) - [select for diffs]
Mon Sep 4 02:37:41 2006 WST (3 years, 6 months ago) by skodak
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42
add admin_tree to front page during install and upgrade

Revision 1.42 - (view) (download) (annotate) - [select for diffs]
Sun Sep 3 16:47:07 2006 WST (3 years, 6 months ago) by moodler
Branch: MAIN
Changes since 1.41: +3 -3 lines
Diff to previous 1.41
Removed student view

Revision 1.41 - (view) (download) (annotate) - [select for diffs]
Wed Jul 19 16:13:25 2006 WST (3 years, 8 months ago) by skodak
Branch: MAIN
CVS Tags: MOODLE_17_NEWGROUPS_PRE
Branch point for: MOODLE_17_NEWGROUPS
Changes since 1.40: +3 -3 lines
Diff to previous 1.40
Bug #6136 - Hard coded admin paths; merged from MOODLE_16_STABLE

Revision 1.40.2.1 - (view) (download) (annotate) - [select for diffs]
Wed Jul 19 15:59:16 2006 WST (3 years, 8 months ago) by skodak
CVS Tags: MOODLE_161, MOODLE_162, MOODLE_163, MOODLE_164
Changes since 1.40: +3 -3 lines
Diff to previous 1.40
Bug #6136 - Hard coded admin paths

Revision 1.40 - (view) (download) (annotate) - [select for diffs]
Mon Apr 10 23:38:34 2006 WST (3 years, 11 months ago) by moodler
Branch: MAIN
CVS Tags: MOODLE_16, MOODLE_16_BETA
Branch point for: MOODLE_16_STABLE, MOODLE_17_ROLES
Changes since 1.39: +3 -3 lines
Diff to previous 1.39
Take the course listing out of the default site page
because the default setting on site.php is to have it
in the middle of the page.

Revision 1.39 - (view) (download) (annotate) - [select for diffs]
Fri Mar 17 11:17:44 2006 WST (4 years ago) by mjollnir_
Branch: MAIN
Changes since 1.38: +5 -2 lines
Diff to previous 1.38
Stickyblocks: fool pagelib into thinking it is course-view when it needs to be, rather than admin-stickyblocks

Revision 1.36.6.1 - (view) (download) (annotate) - [select for diffs]
Wed Dec 14 12:15:07 2005 WST (4 years, 3 months ago) by patrickslee
Branch: MOODLE_16_MULTIENROL
Changes since 1.36: +25 -6 lines
Diff to previous 1.36 , to next main 1.173
Merged with MOODLE_16_MULTIENROL_MP1

Revision 1.33.2.2 - (view) (download) (annotate) - [select for diffs]
Mon Nov 21 21:18:03 2005 WST (4 years, 3 months ago) by stronk7
Branch: MOODLE_15_STABLE
CVS Tags: MOODLE_154, MOODLE_15_MERGED
Changes since 1.33.2.1: +7 -3 lines
Diff to previous 1.33.2.1 , to branch point 1.33 , to next main 1.173
Prevent a warning when params is empty. Bug 4328.
(http://moodle.org/bugs/bug.php?op=show&bugid=4328)

Merged from MOODLE_HEAD

Revision 1.38 - (view) (download) (annotate) - [select for diffs]
Mon Nov 21 21:13:23 2005 WST (4 years, 3 months ago) by stronk7
Branch: MAIN
CVS Tags: MOODLE_16_MULTIENROL_MP1
Changes since 1.37: +7 -3 lines
Diff to previous 1.37
Prevent a warning when params is empty. Bug 4328.
(http://moodle.org/bugs/bug.php?op=show&bugid=4328)

Revision 1.37 - (view) (download) (annotate) - [select for diffs]
Mon Oct 17 06:34:25 2005 WST (4 years, 5 months ago) by mjollnir_
Branch: MAIN
CVS Tags: MOODLE_16_UTF8_PRE
Branch point for: MOODLE_16_UTF8
Changes since 1.36: +20 -5 lines
Diff to previous 1.36
My moodle sticky block config now generic, can be used for any pagetype.
Currently implemented: course-view (and my moodle, of course)

Revision 1.36 - (view) (download) (annotate) - [select for diffs]
Tue Aug 23 12:48:34 2005 WST (4 years, 6 months ago) by mjollnir_
Branch: MAIN
CVS Tags: MOODLE_16_AUTHREFACTOR_PRE, MOODLE_16_MULTIENROL_PRE
Branch point for: MOODLE_16_AUTHREFACTOR, MOODLE_16_MULTIENROL
Changes since 1.35: +8 -2 lines
Diff to previous 1.35
Fixing warnings in my moodle/ blocks /pagelib, plus moved page->edit_always to base class

Revision 1.35 - (view) (download) (annotate) - [select for diffs]
Mon Aug 15 20:53:57 2005 WST (4 years, 7 months ago) by thepurpleblob
Branch: MAIN
Changes since 1.34: +5 -4 lines
Diff to previous 1.34
Added 'studentview' button functionality.

Revision 1.34 - (view) (download) (annotate) - [select for diffs]
Thu Jul 21 01:23:07 2005 WST (4 years, 7 months ago) by defacer
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33
Merging from STABLE:

Fix for bug 3637:

Certain obscure cases of using PHP accelerators (probably has to do with
OS and PHP version as well, but it's not certain) caused an error to be
displayed when importing data from "local pagelib" files with "debug" turned
on. The error was bogus, but error() stopped the page from being displayed.

Thanks to James P. Dugal the from University of Louisiana at Lafayette for
identifying and helping to solve the problem!

Revision 1.33.2.1 - (view) (download) (annotate) - [select for diffs]
Thu Jul 21 01:22:13 2005 WST (4 years, 7 months ago) by defacer
Branch: MOODLE_15_STABLE
CVS Tags: MOODLE_153
Changes since 1.33: +3 -3 lines
Diff to previous 1.33
Fix for bug 3637:

Certain obscure cases of using PHP accelerators (probably has to do with
OS and PHP version as well, but it's not certain) caused an error to be
displayed when importing data from "local pagelib" files with "debug" turned
on. The error was bogus, but error() stopped the page from being displayed.

Thanks to James P. Dugal the from University of Louisiana at Lafayette for
identifying and helping to solve the problem!

Revision 1.33 - (view) (download) (annotate) - [select for diffs]
Tue Apr 19 20:40:15 2005 WST (4 years, 11 months ago) by defacer
Branch: MAIN
CVS Tags: MOODLE_15, MOODLE_151, MOODLE_152, MOODLE_15_BETA
Branch point for: MOODLE_15_STABLE
Changes since 1.32: +2 -9 lines
Diff to previous 1.32
Removing the "dirty compatibility hack", it surely has done what it was
meant to do all this time (keep Moodle working for people who had already
upgraded to early versions of 1.5).

This fixes bug 2965, thanks Penny for reminding!

Revision 1.32 - (view) (download) (annotate) - [select for diffs]
Wed Mar 2 11:43:41 2005 WST (5 years ago) by defacer
Branch: MAIN
Changes since 1.31: +6 -2 lines
Diff to previous 1.31
page_import_types($path) doesn't care if $path has a trailing slash or not

Revision 1.31 - (view) (download) (annotate) - [select for diffs]
Mon Feb 28 12:16:41 2005 WST (5 years ago) by defacer
Branch: MAIN
Changes since 1.30: +12 -3 lines
Diff to previous 1.30
Adding caching to page_import_types. Actually the caching is REQUIRED for the
function to work, because otherwise it would barf on duplicate class declaration
the second time it was called with the same arguments.

Revision 1.30 - (view) (download) (annotate) - [select for diffs]
Mon Feb 28 12:01:30 2005 WST (5 years ago) by defacer
Branch: MAIN
Changes since 1.29: +17 -2 lines
Diff to previous 1.29
Library function which returns the page types used for a specific directory
in the Moodle distro structure. As generic as it gets.

Revision 1.29 - (view) (download) (annotate) - [select for diffs]
Fri Feb 25 14:22:45 2005 WST (5 years ago) by moodler
Branch: MAIN
Changes since 1.28: +3 -4 lines
Diff to previous 1.28
removed explicit style-adding for user login string

Revision 1.28 - (view) (download) (annotate) - [select for diffs]
Thu Feb 10 09:59:11 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.27: +3 -78 lines
Diff to previous 1.27
Bringing Quiz in line with Martin's "make Chat into a showcase for pages" idea.

Revision 1.27 - (view) (download) (annotate) - [select for diffs]
Thu Feb 10 00:47:41 2005 WST (5 years, 1 month ago) by moodler
Branch: MAIN
Changes since 1.26: +3 -4 lines
Diff to previous 1.26
Removed CHAT further

Revision 1.26 - (view) (download) (annotate) - [select for diffs]
Thu Feb 10 00:44:27 2005 WST (5 years, 1 month ago) by moodler
Branch: MAIN
Changes since 1.25: +2 -70 lines
Diff to previous 1.25
Moved chat PAGE stuff out of core as an example

Revision 1.25 - (view) (download) (annotate) - [select for diffs]
Wed Feb 9 23:39:07 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.24: +73 -3 lines
Diff to previous 1.24
New class that models the behavior of a chat activity!

Isn't it so small and cute? ;-)

Revision 1.24 - (view) (download) (annotate) - [select for diffs]
Wed Feb 9 23:22:16 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.23: +54 -40 lines
Diff to previous 1.23
Putting all things that are common among activities into a new class
page_generic_activity. Then we can inherit almost all of the desired
behavior and just override a couple of functions to get going with page
support in a new activity.

Revision 1.23 - (view) (download) (annotate) - [select for diffs]
Wed Feb 9 23:05:14 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.22: +18 -62 lines
Diff to previous 1.22
Streamlining class page_quiz, fixing things, removing needless comments.

Revision 1.22 - (view) (download) (annotate) - [select for diffs]
Tue Feb 8 10:59:44 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.21: +8 -12 lines
Diff to previous 1.21
Changing the way that applicable formats for each block are defined:

The format for each page is now the same as the id attribute of the
BODY tag, which in turn is a simple function of the script's relative path:

The format for e.g. a quiz view page is "mod-quiz-view". The format for the
site index is "site-index". Exception: the format for courses is not just
"course-view", but "course-view-weeks" etc.

Obviously the applicable_formats() override for each block should now take
this into account. The matching rules now are:

* You can specify the full format, e.g. "mod-quiz-view" => true
  will allow the block to be added in quizzes
* Prefixes match the full page format, e.g. "mod" matches ALL activities
* You can use "*" as a wildcard, e.g. "mod-*-view" matches just the view.php
  page of all activities
* These rules interoperate, thus "mod-*" is the same as "mod"
* "all" remains as a catch-all situation

Revision 1.21 - (view) (download) (annotate) - [select for diffs]
Sat Feb 5 04:27:54 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.20: +4 -2 lines
Diff to previous 1.20
Fix for bug 2492: Notices thrown by pagelib.php.

It was an oversight on my part. Thanks Gustav!

Revision 1.20 - (view) (download) (annotate) - [select for diffs]
Wed Feb 2 10:32:40 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.19: +23 -29 lines
Diff to previous 1.19

Utilizing page_id_and_class(), make a factory function page_create_instance()
that does not need the page type as an argument (autodetects from the URL).

Revision 1.19 - (view) (download) (annotate) - [select for diffs]
Tue Feb 1 15:39:21 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.18: +2 -10 lines
Diff to previous 1.18
I need those constants a bit more easily accessible.

Revision 1.18 - (view) (download) (annotate) - [select for diffs]
Tue Feb 1 15:34:17 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.17: +14 -10 lines
Diff to previous 1.17
Fixing all the details in the block instance configuration screen.
That wasn't so hard!

Revision 1.17 - (view) (download) (annotate) - [select for diffs]
Tue Feb 1 15:12:39 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.16: +174 -3 lines
Diff to previous 1.16
Added a new class page_quiz, modelling the behavior of a quiz view page.
Not everything is quite right now, a few details (e.g. correct breadcrumbs)
have been ignored but most of the functionality is there.

Blocks in quizzes, here we come!

Revision 1.16 - (view) (download) (annotate) - [select for diffs]
Mon Jan 31 10:18:15 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.15: +14 -7 lines
Diff to previous 1.15
Dropping the use of MOODLE_PAGE_COURSE <gasp>!

The new constant is PAGE_COURSE_VIEW, and it's more streamlined with the
new CSS-related ids for 1.5. There are great possibilities for the future
here, so we 're getting ready.

On the other hand, this has to be the ugliest hack I 've ever inflicted
on any program (look at pagelib.php). Thankfully it will only stay for just
a little while.

Revision 1.15 - (view) (download) (annotate) - [select for diffs]
Sat Jan 29 01:03:57 2005 WST (5 years, 1 month ago) by moodler
Branch: MAIN
Changes since 1.14: +22 -11 lines
Diff to previous 1.14
Only show page errors when debugging is on (in case we can recover)

Revision 1.14 - (view) (download) (annotate) - [select for diffs]
Fri Jan 28 13:42:19 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.13: +2 -12 lines
Diff to previous 1.13
Removing the extra debug info now that bug 2431 was fixed.

I can't believe that this insignificant workaround actually solved the
problem. This is most probably a bug with PHP and static initialization
of array variables.

Revision 1.13 - (view) (download) (annotate) - [select for diffs]
Fri Jan 28 11:52:56 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.12: +11 -5 lines
Diff to previous 1.12
A small change for the static initialization in page_map_class,
and more debug added just before init is done.

Revision 1.12 - (view) (download) (annotate) - [select for diffs]
Fri Jan 28 07:56:46 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.11: +9 -3 lines
Diff to previous 1.11
Bugfix: when configuring a block in the site index, the site name was
being displayed twice in the breadcrumbs.

Revision 1.11 - (view) (download) (annotate) - [select for diffs]
Wed Jan 26 23:33:50 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.10: +56 -2 lines
Diff to previous 1.10
Adding that nifty BODY id and class detection code to pages... I have the
feeling that this is the way to go, as more Moodle things will be converted
to use $PAGE in the future.

Revision 1.10 - (view) (download) (annotate) - [select for diffs]
Wed Jan 26 03:13:09 2005 WST (5 years, 1 month ago) by defacer
Branch: MAIN
Changes since 1.9: +10 -2 lines
Diff to previous 1.9
Adding some extra debug output when a specific error() occurs to help track
down a problem which has been reported in the forums (it is NOT a bug though).

THIS SHOULD BE REMOVED BEFORE 1.5 IS RELEASED!

Revision 1.9 - (view) (download) (annotate) - [select for diffs]
Wed Jan 5 03:43:09 2005 WST (5 years, 2 months ago) by defacer
Branch: MAIN
Changes since 1.8: +7 -3 lines
Diff to previous 1.8
Fix for bug 2336:

I accidentally removed the editing button from courses when fixing bug 2328.
Fortunately, Gustav was on the lookout.

Revision 1.8 - (view) (download) (annotate) - [select for diffs]
Sun Jan 2 23:20:15 2005 WST (5 years, 2 months ago) by defacer
Branch: MAIN
Changes since 1.7: +25 -7 lines
Diff to previous 1.7
Fix for bug 2328:

* When configuring a block instance, "Turn editing off" button is not
  shown anymore.

* When configuring a block instance, the breadcrumbs are now better,
  providing a link to the course page. This could be done in a much
  better way if we had a comprehensive template system but it will
  suffice for now.

Revision 1.7 - (view) (download) (annotate) - [select for diffs]
Mon Nov 29 12:38:07 2004 WST (5 years, 3 months ago) by dhawes
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6
fixed a comment whose details had been left behind in the recent api change

Revision 1.6 - (view) (download) (annotate) - [select for diffs]
Mon Nov 29 12:19:05 2004 WST (5 years, 3 months ago) by defacer
Branch: MAIN
Changes since 1.5: +52 -50 lines
Diff to previous 1.5
Fix for bug 2241:

I hope this time I got everything changed to the new Page interface! I 'm
really sorry for messing up and breaking new installations... :(

Also moved the only two functions of the API outside the page_base class.

Revision 1.5 - (view) (download) (annotate) - [select for diffs]
Fri Nov 26 01:23:57 2004 WST (5 years, 3 months ago) by defacer
Branch: MAIN
Changes since 1.4: +11 -11 lines
Diff to previous 1.4
Somehow I forgot to commit these and the whole page setup wasn't working
after renaming MoodlePage => page_base.

Revision 1.4 - (view) (download) (annotate) - [select for diffs]
Sun Nov 21 03:44:28 2004 WST (5 years, 3 months ago) by defacer
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3
Removed a useless space :)

Revision 1.3 - (view) (download) (annotate) - [select for diffs]
Sat Nov 13 02:39:25 2004 WST (5 years, 4 months ago) by defacer
Branch: MAIN
Changes since 1.2: +107 -21 lines
Diff to previous 1.2
Pages/blocks code updates:

NEW: The code now supports dynamically plugging your own Pages and block position
identifiers into Moodle without messing with the main libraries at all.

UPDATE: Many functions in blocklib now use pass-by-reference for speed.

UPDATE: Class MoodlePage has been made more presentable and robust.

Revision 1.2 - (view) (download) (annotate) - [select for diffs]
Thu Nov 11 00:40:12 2004 WST (5 years, 4 months ago) by dhawes
Branch: MAIN
Changes since 1.1: +44 -17 lines
Diff to previous 1.1
added comments and some spacing cleanup

Revision 1.1 - (view) (download) (annotate) - [select for diffs]
Tue Nov 9 03:36:07 2004 WST (5 years, 4 months ago) by defacer
Branch: MAIN
MAJOR CHANGES:
--------------

Brand-new pagelib.php at your disposal! It slices, it dices, it makes your coffee.
It still doesn't understand women... Read the comments in pagelib.php for a first
impression. Feedback highly encouraged!

Blocks code has undergone significant changes to work with Pages. Flexibility is its
middle name, since I think (without having tried it) that adding e.g. a third
placeholder for "center" blocks in courses, with full support for moving around etc,
will now take about 15 lines of new or edited code. If you are not impressed yet, I
suggest watching a documentary on solar physics. :P

MINOR CHANGES:
--------------

Added instance_allow_config() in the blocks class hierarchy to supplement per-instance
configuration options. You can override it to return true and thus get configuration
amenities without allowing multiple instances.

Minor polishing to comments and documentation (whatever caught my eye was game).

Tightened up some code here and there by utilizing all the new features.

BUGFIXES:
---------

A bug in restore_execute.html caused hidden blocks to not be restored at all.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Moodle CVS Admin
ViewVC Help
Powered by ViewVC 1.0.10