Commit Graph

163 Commits

Author SHA1 Message Date
samhemelryk 0a122046bc course MDL-19794 Upgraded print_header and build_navigation calls to use PAGE and OUTPUT equivilants 2009-09-03 08:47:24 +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
nicolasconnault 61867c8382 MDL-19794 Upgraded calls to link_to_popup_window() 2009-08-20 13:14:52 +00:00
nicolasconnault b453120768 MDL-19794 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno 2009-08-20 08:40:19 +00:00
nicolasconnault 7b1f2c829f MDL-19756 Renamed moodle_select to html_select for better API consistency 2009-08-10 08:38:45 +00:00
nicolasconnault 98b369f800 MDL-19794 Converted print_box* to $OUTPUT->box* 2009-08-10 04:53:59 +00:00
nicolasconnault 82fcab32c1 MDL-19794 Converted calls to popup_form() 2009-08-10 03:35:14 +00:00
nicolasconnault 64e12bb710 MDL-19794 Converting calls to popup_form() 2009-08-08 09:31:01 +00:00
nicolasconnault 176e842015 MDL-19794 Converted calls to print_paging_bar 2009-08-07 00:27:42 +00:00
nicolasconnault d60c112435 MDL-19794 Converted all print_footer() calls 2009-08-06 14:10:33 +00:00
nicolasconnault 7c5286cd85 MDL-19794 Migrated calls to print_heading 2009-08-06 08:15:43 +00:00
moodler 17f950eb0d category blocks MDL-19398 Set the proper context on the course category pages so blocks work properly 2009-08-04 09:33:43 +00:00
nicolasconnault 49c8c8d27e MDL-19976 Refactored select_menu() into select(), now supporting menu, radio and checkbox rendering. Added radio() and checkbox() functions. 2009-08-04 02:05:32 +00:00
nicolasconnault 6c843bbcde MDL-19794 Migrated choose_from_menu to the new $OUTPUT->select_menu() function 2009-07-28 09:36:10 +00:00
tjhunt 680a65a0cc course MDL-19794: Fix more initialisation order problems 2009-07-28 04:16:59 +00:00
tjhunt a102baea51 course MDL-19794: Fix initialisation order problems on course/category.php. 2009-07-28 03:12:04 +00:00
tjhunt ebff477995 MDL-19882 Add missing require_login-s before require_capability. 2009-07-20 08:57:18 +00:00
tjhunt 1fb3d044fd Re-order the code, so we process the actions before we do any output. That is the right order anyway, and avoids the problem where require_capability after output is started leads to an exception being thrown. 2009-07-04 14:23:49 +00:00
tjhunt 024d4aafbf XHTML strict. 2009-07-04 13:36:19 +00:00
tjhunt 6b608f8f50 MDL-19690 - lots more $CFG->pixpath to $OUTPUT->old_icon_url 2009-07-02 10:53:31 +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
tjhunt 830dd6e9cd moodle_page: MDL-12212 reimplement user_is_editing, deprecate isediting 2009-05-06 08:59:29 +00:00
tjhunt 948203a5e8 moodle_page: MDL-12212 ->category and ->categories 2009-05-06 08:46:05 +00:00
Jonathan Newman 4d933beb8a cvsimport fixups 2009-01-20 23:53:34 +00:00
skodak d4a1fcaf11 MDL-16613 sesskey cleanup 2009-01-02 10:36:25 +00:00
tjhunt 92f008465c admin tree: MDL-10047 and MDL-13104 weird things happen when you turn editing on and off.
That was becuase not enough information was being passed in for the blocks editing controls to construct the right URL to reload the page.

It is also now possible for admin external pages to add some UI next to the turn blocks editing on/off button. For example, when you are editing the list of course catgories, the turn editing off button is now in the right place.
2008-12-11 09:21:41 +00:00
tjhunt 77eddcd527 course request: MDL-9854 major cleanup to the course request code.
* Rewrite all the forms to use formslib and improve usability.
* Put the place where admins need to go to process approvals in the admin menu.
* Show the request course/pending requests button on the page for the category that requested courses get added to.
2008-12-05 08:56:54 +00:00
tjhunt 8ed5dd63ee course categories: Fix many bugs with category editing and permissions. Clean up code.
Bugs: MDL-17479, MDL-16426, MDL-16063, MDL-16013, MDL-15658, MDL-15556, MDL-15161, MDL-14925, MDL-13742, MDL-11557.

* Simplify category editing permissions to just moodle/category:manage and moodle/category:seehiddencategories.
* Enforce those correctly. (Note MDL 17502 is still outstanding.)
* Don't screw up category sort order when you just edit name or description.
* Niceties like where redirects go when you cancel or submit forms.
* Make sure a global course creator can see the site admin block.
* Don't allow a category to be made the child of one of its children!
* General code cleanup to bring key files more in line with best pracitice.

Apologies for the fact it is one big patch, rather than a series of smaller patches. However, categoryedit.php, category.php and index.php where in pretty bad shape and needed significant cleaning up. categoryedit.php, in particular, was almost completely rewritten.

Merged from MOODLE_19_STABLE.
2008-12-04 08:53:10 +00:00
tjhunt 9101efd312 cleanup: MDL-17083 Remove the old teacher, teachers, student and students columns from the course table.
For something that has been deprecated for over two years, they were still used in a lot of places!
2008-11-13 08:40:57 +00:00
skodak d7531392f7 MDL-15431 User icon and Guest icon mixed up on compressed Course list; merged from MOODLE_19_STABLE 2008-10-06 22:29:36 +00:00
skodak 2942a5cd34 MDL-9983, MDL-13998 core events related cleanup; merged from MOODLE_19_STABLE 2008-07-06 17:57:06 +00:00
skodak 0cbe81112a MDL-14580 rewritten course sorting algorithms 2008-06-16 14:25:53 +00:00
skodak 294ce9870f MDL-15189 magic quotes finally removed 2008-06-09 16:53:30 +00:00
skodak c7da43571b MDL-14679 converted some count_records 2008-06-02 21:47:31 +00:00
skodak 6bb0816313 MDL-14679 towards course conversion 2008-06-02 08:13:24 +00:00
skodak 579d45b434 MDL-14679 converted some get courses 2008-06-01 18:12:24 +00:00
dongsheng ba6018a902 "MDL-14129, fix print_error call under course/, see tracker" 2008-05-07 06:02:51 +00:00
dongsheng 8e48039682 MDL-14460, fix get_context_instance, merged from MOODLE_19_STABLE 2008-04-24 08:39:47 +00:00
dongsheng 5a2a53316f MDL-14129, remove all the other error() call 2008-04-04 02:54:20 +00:00
moodler 10ed581c9a Merged MDL-13541 from 1.9 2008-02-20 06:07:50 +00:00
poltawski e0bd367d01 MDL-12888 - remove require to form no longer used
merged from MOODLE_19_STABLE
2008-01-09 11:04:39 +00:00
poltawski f4eb549fbd MDL-12697 - Category Themes do not appear when editing off
merged from MOODLE_19_STABLE
2007-12-25 01:00:31 +00:00
skodak f26cfa228d MDL-11800 improving previous commit; merged from MOODLE-19_STABLE 2007-12-15 12:05:54 +00:00
toyomoyo 7aabbf3b58 MDL-11800, multilang support for category description 2007-11-28 02:56:51 +00:00
nicolasconnault 150f64e661 MDL-11608 Removed stripslashes_safe($rename) and changed PARAM_RAW to PARAM_TEXT for rename param 2007-10-10 04:59:35 +00:00
moodler 09deab0661 Miscellaneous fixes for MDL-11543
- added button to edit current category
 - removed old mini-forms to do the same
 - tidied up various things and CSS as well
2007-10-10 04:05:46 +00:00
nicolasconnault 62ecaed9df MDL-11608 The $rename param was obtained with PARAM_NOTAG, I changed that to PARAM_RAW. I also changed the rename field's value to htmlspecialchars($category->name) 2007-10-09 14:08:05 +00:00
nicolasconnault 86830be66e MDL-11543 Temporary solution originally proposed by Martin 2007-10-09 12:53:24 +00:00
martinlanghoff 679b617967 categories: Categories page and get_courses_page() - smarter about context
This patch saves 1600 context lookups on a 1600 course category. rcache
does help a bit with small categories, but on large setups, this is
not sustainable.

And it's not needed either. We have the data right at our fingertips.
Just get it when it's cheap...
2007-09-19 07:08:24 +00:00
moodler 7b0d5cd551 Merged fixes for MDL-7425 from 1.8 stable 2007-08-30 06:01:57 +00:00