8222 Commits

Author SHA1 Message Date
tjhunt
c45cb4bbd7 Improve comment. Thanks David Mudrak. 2009-07-18 11:59:17 +00:00
tjhunt
1c5648f169 todochecker: don't match variables called $todo or fields called ->todo. 2009-07-17 07:40:54 +00:00
tjhunt
6180cdc97a todochecker: Match todo case-insensitively :-( that finds a lot more. 2009-07-17 07:26:12 +00:00
tjhunt
05280d5f97 todochecker: bug summary in tool tip. 2009-07-17 07:19:43 +00:00
tjhunt
61f879d293 themes: MDL-19077 better handling of top of body code for legacy themes. 2009-07-17 06:51:25 +00:00
tjhunt
a89d8e0709 todochecker script: skip third party code. 2009-07-17 05:56:49 +00:00
tjhunt
73e2e5c03d blocks editing ui: MDL-19398 Can now edit the position of any block.
I think this is probaby insecure at the moment. I am still working on it.
2009-07-16 11:05:26 +00:00
tjhunt
1d13c75c15 blocks editing ui: MDL-19398 Can how precisely control block positioning using the edit icon
This mostly works now, but ...
* The UI needs further work. In particular we need a non-advanced mode.
* This only works for blocks that use a new edit_form.php to replace config_instance.html.
* .. and so far I have only implemented edit_form.php for the HTML block so far.
* Needs to be enabled (with no block-specific config) for blocks without instance config, so you can control their positioning.
2009-07-16 10:50:19 +00:00
tjhunt
afd63fe509 formslib: use abstract, rather than a print_error, now we have PHP5. 2009-07-16 10:38:15 +00:00
nicolasconnault
5daf5d3589 MDL-19840 Fixed a bug in regex delimiter quoting 2009-07-16 03:21:19 +00:00
tjhunt
ae42ff6fee blocks editing ui: MDL-19398 showing and hiding blocks now works. 2009-07-15 07:41:25 +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
4bea5e8582 moodlellib: MDL-19828 PARAM_LOCALURL should accept URLs like course/view.php?id=2 2009-07-15 06:17:39 +00:00
jerome
a475c67308 moodle_page: MDL-12212 misspelling 2009-07-15 06:11:55 +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
366c74994c weblib: Let redirect() take a moodle_url object. 2009-07-15 04:05:05 +00:00
sam_marshall
905b1de634 MDL-19692: Completion tracking help icon enhancements 2009-07-14 14:00:34 +00:00
tjhunt
02b126af8a blocks editing ui: MDL-19398 permissions checks when deleting a block. 2009-07-14 11:16:21 +00:00
tjhunt
1936f20b8b blocks editing ui: MDL-19398 move generating the block edit icons to blocklib.php
Since that is where the resulting actions are processed.
2009-07-14 10:57:06 +00:00
tjhunt
727ae4362e blocks editing ui: MDL-19398 fix adding a block to a page that forgets to call $PAGE->set_url. 2009-07-14 10:41:59 +00:00
tjhunt
2a3b076368 blocks editing ui: MDL-19398 fix some bugs with adding a block. 2009-07-14 09:28:10 +00:00
tjhunt
a2789e3426 blocks editing ui: MDL-19398 add block now secure. Delete block works insecurely.
Will add security checks in a moment.
2009-07-14 08:37:28 +00:00
tjhunt
c72465aa15 setuplib: early errors were not showing debuginfo. 2009-07-14 08:31:30 +00:00
skodak
7f0fedc0b5 MDL-14589 fixed incorrect condition testing if files allowed when postprocessing editor element data, thanks Nicolas for reporting this 2009-07-14 08:25:51 +00:00
tjhunt
21d33bdf62 blocks editing ui: MDL-19398 you can now add new blocks! 2009-07-14 07:18:57 +00:00
tjhunt
144390b4d9 themes: MDL-19077 Don't need both output_starting_hook and starting_output method on page. 2009-07-14 05:14:45 +00:00
tjhunt
485e46611a Fix block manager unit tests. 2009-07-14 04:18:58 +00:00
skodak
75904dfa13 MDL-19755 fixed regression - no class test must be done before adding allign classes ;-) 2009-07-13 20:33:56 +00:00
mudrd8mz
480b0720ae MDL-19755 print_table replaced with $OUTPUT->table
rowclass property has been deprecated, rowclasses should be used.
Direct assigning of the class has been deprecated,
moodle_html_elements::set_classes() should be used instead. In both
cases, debugging message is displayed.
2009-07-13 11:10:30 +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
dc203659af themes: MDL-19077 Don't us $OUTPUT in debugging. 2009-07-13 06:16:48 +00:00
tjhunt
60a5b18833 themes: MDL-19077 fix bugs in cli_renderer. Use correct doctype with legacy header.html. 2009-07-13 06:10:03 +00:00
tjhunt
43b152f69a cron: MDL-19774 temporary hack so cron does not crash. 2009-07-13 06:08:48 +00:00
tjhunt
aa2e96e9ce developer tools MDL-19772: Script to list all todos in code
And make sure they link to an open tracker issue as per
http://docs.moodle.org/en/Development:Coding_style#TODO_comments_must_link_to_a_tracker_issue
2009-07-13 04:27:05 +00:00
tjhunt
5e39d7aa09 upgrade: MDL-19763 Improve the redirect that forces a DB upgrade when there are major changes
Also fix redirect, so 303 redirects don't need to fully initialise $OUTPUT.
2009-07-10 08:44:01 +00:00
samhemelryk
8dff48bf45 weblib MDL-19750 Fixed regression caused by implementing new PAGE methods 2009-07-10 08:08:17 +00:00
jerome
728f96c756 output MDL-19077 typo bug on $debugdisableredirect 2009-07-10 07:08:12 +00:00
tjhunt
13a0d3d3c9 blocks MDL-19536: rename block_instances.contextid to parentcontextid to avoid gross confusion 2009-07-10 05:58:59 +00:00
tjhunt
b9928286e7 Fix comment. 2009-07-10 03:39:09 +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
skodak
edcb15b5c6 fixed whitespace and added TODO for release 2009-07-09 19:58:29 +00:00
skodak
8b6a09680a fixed whitespace 2009-07-09 19:54:54 +00:00
skodak
8c143dfe8a MDL-16706 fix of previous fix - multiple editors in one form shoudl work again 2009-07-09 16:33:58 +00:00
tjhunt
fc2593fef9 blocks - MDL-19010 fix bug where blocks did not show up with editing off. 2009-07-09 08:17:23 +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
mudrd8mz
897b5c820b MDL-19731 get_renderer() accepts optional subtype
The initial patch has been reviewed at the issue page. This commit also
fixes template_renderer_factory::get_renderer() and sets up folders for
subtypes there.
2009-07-08 09:37:06 +00:00
samhemelryk
428acddb72 outputlib MDL-19740 Fixed up outputlib focus handling to deal with the three different ways of requesting focus. 2009-07-08 09:01:20 +00:00
samhemelryk
4d49202ffc javascript-UFO MDL-19738 Stopped ufo.js being included in outputlib and included it in each place it was actually being used.
It will no only be loaded when it is being used. If something new comes along they will need to remember to require it.
At the same time cleaned up a few deprecated calls
2009-07-08 04:12:11 +00:00