2578 Commits

Author SHA1 Message Date
nicolasconnault
816086f1b8 MDL-19787 Migrated choose_from_menu to the new $OUTPUT->select_menu() function 2009-07-28 09:36:32 +00:00
tjhunt
ee73b1ffc2 admin: MDL-19787 $PAGE->set_url on admin/index.php 2009-07-28 04:00:33 +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
dongsheng
1bcb7eb540 "MDL-19118, comments api" 2009-07-24 02:44:44 +00:00
peterbulmer
81e2ef2e26 MDL19901 fix typeo
Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
2009-07-22 01:09:55 +00:00
tjhunt
ebff477995 MDL-19882 Add missing require_login-s before require_capability. 2009-07-20 08:57:18 +00:00
tjhunt
929d3d873c admin: broken icons on question type page. 2009-07-17 05:51:52 +00:00
tjhunt
7cf51142ab blocks editing ui: MDL-19398 Make block config_global.html files more strongly deprecated. 2009-07-15 08:52:33 +00:00
tjhunt
95eecbd893 blocks editing ui: MDL-19398 block.multiple column no longer exists, so remove admin for it. 2009-07-15 08:24:12 +00:00
tjhunt
4a3b462021 blocks editing ui: MDL-19398 give users a path back after assigning block roles 2009-07-15 06:33:13 +00:00
tjhunt
1a6c857b6a filters admin: Re-fix heading. 2009-07-15 05:40:15 +00:00
tjhunt
704ac34407 outputlib tables: MDL-19755 fix all cases of deprecated $table->rowclass
Also fix wrong title on Manage filters admin page.
2009-07-15 05:37:31 +00:00
tjhunt
e727b6e5d5 blocks: MDL-19010 Delete weird line of legacy code. 2009-07-14 08:36:40 +00:00
tjhunt
e92c286c20 block contexts: MDL-19098 every block should have a context
even non-course and sticky blocks.

The parent context is block_instances.parentcontextid.

The block context should be used for checking permissions directly
related to the block, like moodle/block:view or moodle/site:manageblocks.

However, if the block is displaying information about the current page,
for example the participants block showing who 'here', then it may be
better to use the context of the page where the bloack is appearing -
in other words $this->page->context - to check permissions about the
user's ability to see participants here.

Or, if the block is displaying something stronly related to courses,
for example, a course meny block, the block should probably use the
context for $this->page->course to check permissions.
2009-07-13 08:37:34 +00:00
tjhunt
45c6de041b Remove unnecessary 'none' passed to footer. 2009-07-10 05:37:36 +00:00
skodak
8b6a09680a fixed whitespace 2009-07-09 19:54:54 +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
dongsheng
abdcded6c7 "MDL-13766, use OUTPUT to print box" 2009-07-09 07:17:18 +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
skodak
d128a46db8 fixed missing OUTPUT global regression 2009-07-04 16:31:33 +00:00
tjhunt
e63f88c9a6 MDL-19690 - lots more $CFG->pixpath to $OUTPUT->old_icon_url
and $CFG->modpixpath to $OUTPUT->mod_icon_url
2009-07-02 12:07:58 +00:00
tjhunt
6b608f8f50 MDL-19690 - lots more $CFG->pixpath to $OUTPUT->old_icon_url 2009-07-02 10:53:31 +00:00
tjhunt
5d3b999468 MDL-19690 - more $CFG->pixpath to $OUTPUT->old_icon_url 2009-07-02 10:26:02 +00:00
tjhunt
73511be761 MDL-19690 - 4 more $CFG->pixpath to $OUTPUT->old_icon_url 2009-07-02 10:12:19 +00:00
tjhunt
4096752d1d MDL-19690 - first 53 $CFG->pixpath to $OUTPUT->old_icon_url 2009-07-02 10:06:39 +00:00
tjhunt
67255ce1d3 XHTML strict 2009-07-02 06:57:21 +00:00
nicolasconnault
54dad8a88f MDL-19677 Removing prematurally added setting 2009-07-02 05:55:24 +00:00
samhemelryk
2a29ba7edb admin reports MDL-16706 Eliminated inline scripts to use PAGE methods 2009-07-02 04:10:56 +00:00
nicolasconnault
6e155d1c00 MDL-19677 Upgrading sites that use $CFG->bloglevel == BLOG_GROUP_LEVEL or BLOG_COURSE_LEVEL to BLOG_SITE_LEVEL, and removed these options from admin/settings/security.php 2009-07-01 08:17:53 +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
dongsheng
93e9aa2792 "MDL-18520, file system, supported choose a subdirectory" 2009-06-30 09:10:42 +00:00
nicolasconnault
2ad4090ed7 MDL-19467 Fixed one of Tim's typos and added a language string for URL 2009-06-30 05:49:58 +00:00
tjhunt
42fafd4b57 debug / lang string: MDL-19467 Debugging option to show where each lang string came from.
New option on Administration -> Server -> Debugging called
'Show origin of languages strings' ($CFG->debugstringids).

If this is set, get_string will add the name of the lang file and the id of the string
to each string it gets, so instead of returning 'No', it will return '{No admin/checkboxno}'.
2009-06-30 01:59:48 +00:00
stronk7
e5d06af22e MDL-19579 code coverage - show link to latest complete report 2009-06-26 17:07:33 +00:00
stronk7
70013fdcf9 XHTML Strict 2009-06-26 15:46:25 +00:00
stronk7
5d902b5da5 Fix unit|db tests OUTPUT 2009-06-26 09:50:06 +00:00
tjhunt
e29380f3c4 themes: MDL-19077 fix install regression 2009-06-26 09:38:14 +00:00
stronk7
e2074b8b43 MDL-19579 code coverage - initial frontend for both unit and db tests 2009-06-26 09:10:01 +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
stronk7
c530a78a1c MDL-19579 code coverage - add file.php-like script to serve static reports
from dataroot/codecoverage/[dbtest|unittest]. Requires login + site:config cap
2009-06-25 23:54:22 +00:00
tjhunt
edc2edddcd Fix deprecated function use. 2009-06-25 12:36:51 +00:00
tjhunt
c207b6bece Remove a few unnecessary references to global $THEME. 2009-06-25 03:26:58 +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
tjhunt
4ab836113a Unit tests: show total time taken to run the tests. 2009-06-23 10:34:21 +00:00
tjhunt
d83b1d0639 unit tests: raise_memeory_limit. I was running out when running all tests. 2009-06-23 10:33:58 +00:00
nicolasconnault
6dbcaceef1 MDL-19418 Replaced ereg* by preg* 2009-06-22 01:22:37 +00:00
nicolasconnault
c20b684517 MDL-16177 Detecting if script is called from URL, in which case it prints header, footer and form. Otherwise, silently create a global $generator object that can be used by unit tests. 2009-06-22 00:52:36 +00:00
skodak
19bae8cdee MDL-19580 preparation for requiring yui before print_header() 2009-06-21 18:45:07 +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
jerome
70f01544e1 administration MDL-19525 remove global $userfields usage from uploadpicture_form class, merged from 1.9 2009-06-16 09:09:33 +00:00