147 Commits

Author SHA1 Message Date
Petr Skoda
929423768b MDL-20925 fixed input validation and course ajax now fully respects the disable course ajax option 2009-11-21 16:29:33 +00:00
Petr Skoda
5884a8e6b3 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-10 19:45:34 +00:00
Moodle HQ git importer
8926f8449f Fixing drift between CVS and git 2009-11-02 00:32:03 +00:00
Petr Skoda
117bd74897 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 11:31:16 +00:00
Rossiani Wijaya
b1b4c2d75f course/view MDL-10142 AJAX move functionality on section content 2009-10-30 08:02:16 +00:00
rwijaya
ddc660600a course/view MDL-20123 section 0 visibility and highlight 2009-10-21 06:25:21 +00:00
samhemelryk
6644741db6 navigation MDL-20558 Fixed AJAX bug with multiple navigation trees concerning ajax requests + DOM interaction 2009-10-14 09:08:43 +00:00
nicolasconnault
8c3c518f98 MDL-20415 Modified the behaviour of AJAX moving of sections when in "weekly" format, so that dates don't get moved along with the sections. This reflects the final, saved state. Merged from MOODLE_19_STABLE 2009-10-03 01:53:17 +00:00
nicolasconnault
49c4d8caa4 MDL-10221 Simulating the HTTP DELETE method by using a URL param (action), because some web servers don't allow DELETE. AJAX Course and Block deletion now works as expected. Merged from MOODLE_19_STABLE 2009-10-02 07:53:01 +00:00
samhemelryk
11f1e126e3 requires-css MDL-16151 Support for css files that use args 2009-09-25 08:24:50 +00:00
skodak
ba33919185 MDL-20169 reverting my incorrect patch - sorrry 2009-08-31 20:46:11 +00:00
samhemelryk
7d2a049292 navigation MDL-14632 Very significant navigation commit
This patch introduces two new blocks global_navigation_tree and settings_navigation_tree
both of which have been designed to make full use of the new navigation objects available through
the $PAGE object.
Bulk of this code is within lib/navigationlib.php
2009-08-28 08:47:31 +00:00
skodak
d4b5bd4393 MDL-20169 fixed coding style, parameter type required 2009-08-27 19:20:03 +00:00
poltawski
5f56f0a856 ajaxlib: MDL-19756 Use 'confirmation' string which exists in confirm_dialogue 2009-07-30 13:44:26 +00:00
nicolasconnault
f8065dd287 MDL-19756 Migrated the following functions from weblib to outputlib:
1. button_to_popup_window
2. link_to_popup_window
3. print_single_button
4. print_spacer
5. print_file_picture (deprecated)
6. print_user_picture
7. print_png (deprecated)
8. helpbutton
9. doclink
10. print_paging_bar
11. notice_yesno
2009-07-27 10:33:00 +00:00
tjhunt
4262a2f806 lesson: MDL-19890 Fix block-printing code in lesson (I hope)
This got broken by one of the commits for MDL-19077 & MDL-19010
2009-07-23 10:01:19 +00:00
tjhunt
c966c8a27b ajaxlib MDL-19077 required_js_code::now, for those cases when you really want inline JS, and you may be building HTML before print_header
Both quiz and lesson need this.
2009-07-23 05:55:03 +00:00
tjhunt
ac63efae6d ajaxlib: MDL-19915 skip links need to be in a div for XHTML strict.
Refine Sam's solution.
2009-07-23 05:39:41 +00:00
samhemelryk
f0b529e0a9 ajaxlib MDL-19915 Squashed minor XHTML compliance issue, wrapped an 🅰️ in a :div: 2009-07-23 05:09:29 +00:00
nicolasconnault
1a504c8996 MDL-19077 Added requires->yui_lib('event') to required_event_handler constructor 2009-07-22 04:02:54 +00:00
nicolasconnault
647df7e372 MDL-19077 Added the required_event_handler class and event_handler method 2009-07-22 03:54:13 +00:00
tjhunt
9e43d2b395 ajaxlib: fix variable name typo. 2009-07-22 03:44:14 +00:00
tjhunt
d4a03c00ea themes & blocks - MDL-19077 & MDL-19010 blocks are now printed by the theme
The code to print blocks in now in theme layout.php files. (Or in
moodle_core_renderer::handle_legacy_theme)

Code for printing blocks everywhere else has been stripped out.
(Total diffstat 1225 insertions, 2019 deletions)

The way the HTML for a block instance is generated has been cleaned
up a lot. Now, the block_instance generates a block_contents
object which gives a structured representation of the block,
and then $OUTPUT->block builds all the HTML from that.

How theme config.php files specify the layout template and block
regions by page general type has been changed to be even more flexible.

Further refinement for how the theme and block code gets initialised.

Ability for scrits to add 'pretend blocks' to the page. That is,
things that look like blocks, but are not normal block_instances.
(Like the add a new block UI.)

Things that are still broken:
 * some pages in lesson, quiz and resource. I'm working on it.
 * lots of developer debug notices pointing out things that
   need to be updated.
2009-07-09 07:35:03 +00:00
samhemelryk
803dc07443 ajaxlib MDL-19690 Fixed minor bug because of missing global 2009-07-08 01:56:15 +00:00
tjhunt
641e6ecd58 Typo fix. 2009-07-07 03:49:46 +00:00
tjhunt
ddedf979b4 MDL-19690 - more $CFG->pixpath to $OUTPUT->old_icon_url 2009-07-03 06:19:25 +00:00
tjhunt
5ef444007d MDL-19690 - Eliminate all remaining $CFG->modpixpath apart from mod/scorm 2009-07-02 12:25:19 +00:00
samhemelryk
747b85cb00 ajaxlib MDL-19077 Added strings_for_js method 2009-07-02 04:07:53 +00:00
stronk7
d47cf63dec MDL-19579 code coverage - add initial $includecoverage attributes 2009-06-26 17:21:36 +00:00
tjhunt
bfbbfdebb8 Typo fixes. 2009-06-25 06:48:25 +00:00
skodak
ff5fe31160 MDL-19580 cleanup of require css and js filepicker code 2009-06-24 22:34:29 +00:00
samhemelryk
d76b8a2068 ajaxlib MDL-16693 Fixed fringe condition in ajaxlib and added test 2009-06-22 02:59:02 +00:00
tjhunt
32941d74c8 Move extra ajaxlib unit tests to the right place. 2009-06-17 07:35:33 +00:00
tjhunt
8a0cb3a16d Javadoc comment syntax. 2009-06-17 05:34:10 +00:00
dongsheng
424362f3b5 "MDL-16695, fixed yui js files path" 2009-06-15 05:06:34 +00:00
tjhunt
5c5418fe9d Further fixes to PHPdoc comments. 2009-06-15 04:03:59 +00:00
tjhunt
2c144fc308 Further fixes to PHPdoc comments. 2009-06-15 03:54:00 +00:00
tjhunt
9ca1395054 Try to improve formatting of PHPdoc. 2009-06-15 02:48:40 +00:00
tjhunt
cf6155226c 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.)
2009-06-12 12:13:07 +00:00
tjhunt
b2330db606 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.
2009-06-12 03:13:29 +00:00
skodak
fbaa7b88db MDL-19162 updated links for elements no longer beta and experiment 2009-05-14 09:18:11 +00:00
nicolasconnault
9810d8a08c MDL-14909 Preventing the border from being assigned to label list elements. Merged from MOODLE_19_STABLE 2009-04-29 09:31:24 +00:00
nicolasconnault
472a4b92c8 MDL-9306 Converting tabs to spaces. Merged from MOODLE_19_STABLE 2009-04-23 07:22:27 +00:00
tjhunt
3744f3770c ajaxlib: fix unit tests. 2009-03-10 07:48:29 +00:00
skodak
cc4245a3cd MDL-16483 - stopped using MoodleUnitTestCase in tests where $DB not needed 2009-01-10 13:23:37 +00:00
skodak
d4a1fcaf11 MDL-16613 sesskey cleanup 2009-01-02 10:36:25 +00:00
tjhunt
f2eb500238 weblib: MDL-17085 a function to print a collapsible region of the UI, with the collapsed state stored in a user_perference. 2008-11-03 05:04:23 +00:00
tjhunt
bd1884fe6b ajax: MDL-17084 provide a way for JavaScript to update user preferences. 2008-10-31 08:25:19 +00:00
nicolasconnault
ca255392e2 MDL-12198 Fixed ordering of sections, Merging from MOODLE_19_STABLE 2008-10-08 12:22:04 +00:00
nicolasconnault
fcc286a4e9 MDL-10201 Merged from MOODLE_19_STABLE 2008-10-08 09:10:05 +00:00