8206 Commits

Author SHA1 Message Date
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
samhemelryk
e6f7f2b278 lib MDL-19739 Moved call to include dropdown.js out of outputlib and into the same body of code in weblib
that uses it.
This ensures that it is only loaded if it is used, which is only is the browser is opera, or IE
2009-07-08 03:27:27 +00:00
samhemelryk
803dc07443 ajaxlib MDL-19690 Fixed minor bug because of missing global 2009-07-08 01:56:15 +00:00
samhemelryk
405efa5f95 filelib MDL-19707 Modified file_extension_icon to use extisting function mimeinfo and reverted
two uses of file_extension_icon in course-lib that were incorrect
2009-07-08 01:52:16 +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
samhemelryk
e4e7044acd lib-form MDL-16706 Changed inline JS to use PAGE methods 2009-07-07 08:49:00 +00:00
moodler
f77fcb5a8f Fixing a notice for Tim 2009-07-07 07:43:36 +00:00
dongsheng
d34bdb4ba1 "MDL-16706, fixed javascript object used to assoicate editorid with file picker clientid" 2009-07-07 07:16:22 +00:00
moodler
024f3f9749 accesslib MDL-19730 fixing regression from MDL-19077 where has_capability fails when $USER->id=0 (so they couldn't see blocks etc) 2009-07-07 07:06:19 +00:00
tjhunt
fdeb7fa192 themes: MDL-19077 - more work on the theme_config class.
* Writing lots more PHPdoc comments for all the settings.
* Strip the comments from the standard theme config.php (see below)
* Move finding the layout template from moodle_core_renderer to the theme_config class
* Move loading meta.php files from moodle_core_renderer to the theme_config class
* MDL-19719 Remove support for $THEME->langsheets, and lang/.../styles.php
* MDL-19719 Put the Vietnamese-specific code into the standard theme
* Support for styles.php in all plugin types (at the theme's discretion). (c/f MDL-16438)
* More PHP doc comments for moodle_core_renderer methods.

About stripping comments from config.php: I'm not sure if this
is a good idea, and I may revert this bit. I am hoping that once
http://phpdocs.moodle.org/HEAD/moodlecore/theme_config.html has
been updated, that will be better than copying and pasting these
comments into every theme. I intend to post in the themes forum
to canvas opinions.
2009-07-07 05:05:06 +00:00
tjhunt
87b6851cf9 Catch another potential type of infinite recursion output initialisation. 2009-07-07 04:37:12 +00:00
samhemelryk
2dcb7d0be0 lib-filelib MDL-19707 Modified file_extension_icon() to accept full filename 2009-07-07 04:03:33 +00:00
samhemelryk
9dffa7af76 lib-filelib MDL-19707 Added file_extension_icon() and file_mimetype_icon()
After talking with Tim we decided that this would be a better solution than adding more methods to $OUTPUT
2009-07-07 03:56:15 +00:00
tjhunt
641e6ecd58 Typo fix. 2009-07-07 03:49:46 +00:00
skodak
aef0bc4830 MDL-19725 latest dragmath 0.7.8.1 imported 2009-07-06 21:18:49 +00:00
tjhunt
a64e25f65d themes: MDL-19077 move deprecated function page_id_and_class to deprecatedlib.php 2009-07-06 05:32:29 +00:00
samhemelryk
1420162a3a form-filemanager MDL-16706 Removed inline JS and added PAGE methods 2009-07-06 03:16:17 +00:00