Commit graph

691 commits

Author SHA1 Message Date
fmarier
9bb19e5827 course/lib: Cache get_categories() using a static variable (MDL-11938)
Some recursive functions call get_categories() repeatedly to get all of the
child categories of the current one.

This commit create a lazily-initialized cache of all of the categories so
that the database is only queried once to retrieve all of the categories.

It speeds up the both the homepage and the course edit page (where the
categories are displayed in combo boxes).
2007-12-17 04:49:27 +00:00
skodak
7f9c4fb97d MDL-12601 prevent fatal errors when module code missing + merging other stuff; merged from MOODLE_19_STABLE 2007-12-16 13:41:16 +00:00
toyomoyo
b682cee93c MDL-11194, course role names not reflected in course description 2007-11-27 01:56:21 +00:00
nfreear
8fee6c60c8 Fixes bug MDL-12225, Mark up lists correctly in course/lib (accessibility). 2007-11-16 16:47:54 +00:00
urs_hunkler
7cd266e9b1 merged from 1.9 :: MDL-12045 :: the extra "clearer" div broke the custom_corners theme on IE7. I removed the "clearer" div and added the class "clerafix" to the surrounding coursebox. 2007-11-16 07:29:14 +00:00
nicolasconnault
05a334392c MDL-11525 When courseid is not present in the log entry, showing "Site" instead of $log->info 2007-10-05 04:24:42 +00:00
nicolasconnault
ece966f06e MDL-11482 Resolved the sum icon issue (added a new x-bar icon) and resolved a dependency problem in moodlelib 2007-10-03 12:22:25 +00:00
skodak
1f41940f20 MDL-11523 fixed - moving categories and courses around breaks paths and depths in context table + some notice fixes 2007-10-02 22:34:12 +00:00
nfreear
806ebc150c Fixes MDL-11161, Activity type text ... beginning of activity links in Screen Reader...moved to end (also MDL- 7436) 2007-10-02 09:36:47 +00:00
nfreear
6285f8a882 Fix MDL-7436 Accessibility "Indicate type of resource in the name of the resource" 2007-09-25 15:15:07 +00:00
mattc-catalyst
acf000b077 MDL-11419 - groups: interface enhancements + new features:
* Display the grouping a course module belongs to on the course page - for course managers only.
    * When adding users to groups, display the groups a user already belongs to.
    * Added an overview report that shows groupings, groups and members for a course.
    * Added a dialogue to automatically create groups and assign members based on either the number of desired groups or the number of desired users per group.
2007-09-24 21:55:15 +00:00
nfreear
e0b033d5f8 Partial fix of reopened MDL-7436 Accessibility: "Indicate type of resource in the name of the resource" 2007-09-24 17:26:40 +00:00
skodak
024ef5288a MDL-11414 fixed handling of log urls (problem reported by Andreas Nolden) 2007-09-23 13:13:13 +00:00
martinlanghoff
6b4d8c4d58 course/lib: print_course() fix bug when $course->managers was not set
Fix a thinko in a variable assignment that prevented us from grabbing
the correct roles as managers. Addresses Yu's report at
MDL-11182 admin shows up as teacher.
2007-09-19 07:52:27 +00:00
martinlanghoff
5b9e50caf0 course/lib: print_my_moodle() - ask get_my_courses() for the summary
get_my_courses() now defaults to a much leaner dataset, but accepts an
array of "additional" fields we want. So ask nicely for the summary,
so that we can print_course() later with it.
2007-09-19 07:51:50 +00:00
martinlanghoff
6c54240a61 course/lib: print_courses() drop $hidesitecourse parameter
The $hidesitecourse and related code seem to be dead code. An audit of
the callers did not turn up any interesting/valid use of it.
2007-09-19 07:50:41 +00:00
martinlanghoff
49cd4d7934 Revert "course/lib: print_courses() - no need to worry about sitecourse"
This reverts commit d7816749a4ceda352a2fac6e82d7f02f435473ed.
2007-09-19 07:50:28 +00:00
martinlanghoff
55c47e48a9 course/lib: print_courses() - no need to worry about sitecourse
get_courses_wmanagers() excludes the sitecourse, so we no longer
check for it. And check explicitly for an empty course array.
2007-09-19 07:49:23 +00:00
martinlanghoff
4dde1463ee course/lib: print_courses() and print_course() rework
print_course() can now recognise a $course object that already has a
$course->context obj and a $course->managers array, which means that
there will be no DB access triggered by print_course().

(Backwards compat is retained so it still works the old way for
callers that get a single course printed anyway (during enrolment
for example.)

And print_courses() now uses get_courses_wmanagers(), and passes the
returned $course objects to print_course().

With this patch, a homepage listing 9 courses (with varying numbers of
teachers) sheds 63 DB queries (88 to 25). A course listing page with
3 courses sheds 9 (33 to 24).

On a single server overall time spent serving the homepage is reduced just
a little bit (262ms to 238ms) -- on a clustered environment, less DB queries
mean much lower latency and DB costs.
2007-09-19 07:26:54 +00:00
martinlanghoff
431cad0d62 course/lib: print_course() bugfix when $rusers is empty 2007-09-19 07:26:27 +00:00
martinlanghoff
19f601d178 course/lib: move_courses() calls content_moved(), intro move_category()
move_courses() now calls content_moved() which will take care of any
accesslib-required changes. And introducing move_category() which
also calls content_moved() when needed.
2007-09-19 07:14:23 +00:00
martinlanghoff
a372aab507 course: Changing a course cat from course/edit calls context_moved()
Changes to course cat from the main course settings form now calls
context_moved(), and accesslib data is properly maintained.
2007-09-19 07:13:57 +00:00
martinlanghoff
3bf13d05f5 course/lib:print_course() smarter calling of get_role_users()
And saves a few dbqueries too...
2007-09-19 07:09:24 +00:00
skodak
ffc536af8e MDL-7380 converted various places to use new groups API 2007-09-08 20:53:05 +00:00
mattc-catalyst
263017bbdd MDL-10888: groupings - mod/workshop - add grouping support 2007-09-06 01:35:37 +00:00
toyomoyo
a683deeca6 merged fix for MDL-10818, do not display graph if user has no permission 2007-08-28 07:04:41 +00:00
skodak
97928ddf00 MDL-11003 adding of first activity on frontpage does not work - incorrect section 2007-08-26 15:30:51 +00:00
moodler
6cf890e36b Remove timelimits from rebuild_course_cache() MDL-10954 (merged from 1.8) 2007-08-23 05:46:07 +00:00
Martin Langhoff
13534ef716 cvsimport fixups 2007-08-29 13:10:11 +12:00
skodak
24f41672ba MDL-10383 - adding UI for new grouping settings into course and mod edit forms + fixed section handling on mod edit page + other minor cleanup 2007-08-17 08:05:04 +00:00
skodak
5bf243d131 MDL-10383 - groups/groupings refactoring nearly finished ;-) 2007-08-16 11:06:48 +00:00
skodak
62d6383803 MDL-10383 - groups/groupings refactoring and improvements - basic UI for groupings implemented 2007-08-16 09:28:18 +00:00
moodler
8047ab1d9d Using right_to_left() function MDL-10768 2007-08-09 08:41:08 +00:00
moodler
932be04628 Patch for left-right buttons in course view MDL-10768 2007-08-09 07:50:21 +00:00
stronk7
bd5d0ce540 MDL-8119 : Improvements to logging where Mnet hosts are involved
Merged from MOODLE_18_STABLE
2007-08-06 18:19:15 +00:00
skodak
f615fbaba0 MDL-10711 adding deleting of grade data when deleting module or course 2007-08-03 19:25:22 +00:00
toyomoyo
c345bb584a MDL-10679, improvement to context_rel table and load_user_capability 2007-08-02 08:28:29 +00:00
mchurch
0ea0369669 Bug #MDL-10632, fixing the use of 'delete_event'. 2007-07-27 18:39:54 +00:00
thepurpleblob
e8513d2ca0 MDL-10395:
Course managers are now displayed in the order that the user
selects in the Define Roles page.
2007-07-17 14:07:56 +00:00
toyomoyo
e42f4d922e merged fix for MDL-10122, accessiblity fix for course search box 2007-06-19 03:22:58 +00:00
tjhunt
1e95d7b7a3 OU Bug 3246 - No logs shown when a group is selected. Merged from OU Moodle. Merged from MOODLE_18_STABLE. 2007-06-07 16:04:23 +00:00
tjhunt
0be7010474 Fix logging of course settings updates. 2007-06-07 15:40:08 +00:00
tjhunt
edf3ef00a7 Make code slightly more robust, merged from MOODLE_18_STABLE. 2007-06-07 15:33:56 +00:00
poltawski
a044c05ddb MDL-9742 - changed tabs to spaces in a few places where there are one
or two
2007-05-08 15:07:25 +00:00
nicolasconnault
933e257ab2 MDL-9322 Fixed non-compliant xhtml code for mnet pages, logs and enrol pages 2007-04-13 07:03:04 +00:00
toyomoyo
177d4abf11 adding idnumber field for course modules and modedit form 2007-04-11 09:19:24 +00:00
dwoolhead
07996c8e4d MDL-9122 Unnecessary li opening tag (without closing tag) no longer printed when moving course section activity 2007-03-30 10:23:12 +00:00
toyomoyo
7b44777ef7 fixing a warning 2007-03-26 03:06:39 +00:00
moodler
bfefa87eab Moved create_course and update_course into course/lib.php and cleaned them up to be more useful in general MDL-9015 2007-03-23 02:29:05 +00:00
toyomoyo
0150c561c5 fix for MDL-8966, customizable role names 2007-03-22 08:11:30 +00:00