Commit Graph

45 Commits

Author SHA1 Message Date
9801a97a36 MDL-13550 deprecated primary role concept; merged from MOODLE_19_STABLE 2008-02-21 09:30:13 +00:00
aa68a7b0a2 MDL-13020 : deprecates make_table 2008-01-16 08:17:25 +00:00
b1469317a1 lib/deprecatedlib: use sort_by_roleassignment_authority() to sort RAs
After calling get_users_by_capability(), use
sort_by_roleassignment_authority() to mimic what older versions of
Moodle did.

Affects: get_teacher(), get_course_teachers()

    MDL-12452
2008-01-06 23:25:51 +00:00
1113f8002a lib/deprecatedlib: enrol/manual: Fix calls to get_users_by_capability() to avoid ra
get_users_by_capability() can no longer refer to properties of role
assignments or roles, as the capability aggregate is indirect.

Fixes:
 get_teacher() - though the results will be poor, as we cannot provide
                 role.sortorder reliably
		 (used mainly by mod/workshop)
 get_course_teachers() - which seems broken for a lot of situations as
                 its default parameters still refer to old tables.

MDL-12452
2008-01-06 23:25:26 +00:00
b7064779f5 Updated copyright notice in header 2007-10-10 05:25:14 +00:00
128f098418 MDL-11640
* improved handling of dirty contexts in general - caching, switching in cron, marking, loading, etc.
* role_assing() and role_unassign() now marks dirty contexts because we use has_capability() in this function - we can not do it later outside to speedup bulk operations
* fixed some inline docs
* fixed notice from rs closing
* removed cached $CONTEXT from has_capability() - $context is now required parameter; this was hiding serious bugs when context did not exist or ppl passed false as parameter
* removed some ===, we can not use these on function parameters - we must support ints, strings, '', nulls, etc. - this could be a source of really dangerous bugs in future
* some other improvements and fixes - documented inline
2007-10-09 12:49:54 +00:00
59bef7283d Moving 3 functions from datalib to deprecatedlib. Only used
by admin/cron.php. First step of MDL-11571 and MDL-11487
2007-10-03 16:31:20 +00:00
2d0de2d88b deprecatedlib: Legacy interactive enrol/unenrol codepaths mark the context dirty
My heart is not so cold. These old buddies also need love and care...
2007-09-19 07:11:56 +00:00
47b18c1c12 group/assign: fixed performance of assigning users to groups
- page would not display on a course with 600 users
2007-09-19 07:09:36 +00:00
54c0f82b1d MDL-10970 Reverted changes 2007-08-24 12:45:16 +00:00
364fffda3b MDL-10723 Removed all uses of print_navigation() throughout moodle, the function call is now entirely deprecated. 2007-08-24 04:22:30 +00:00
13534ef716 cvsimport fixups 2007-08-29 13:10:11 +12:00
778918fd71 MDL-10383 - some more refactoring/cleanup, enablegroupings experimental admin setting, tabs in groups UI 2007-08-16 21:14:03 +00:00
5bf243d131 MDL-10383 - groups/groupings refactoring nearly finished ;-) 2007-08-16 11:06:48 +00:00
2c386f82e5 MDL-10383 - deprecated get_groups(), user_group() and ismember() 2007-08-15 20:21:01 +00:00
1d68419596 MDL-10383 - deprecated groups_members_from_sql and friends - we do not need them anymore because we reverted to 1.7 style groups in 1.9 2007-08-15 19:28:11 +00:00
b069fbd9b3 MDL-10161 - Since get_course_... (users, students, teachers) is still being used by a number of functions (such as groups), trying to make them work with the SITE course the way they did pre-1.7, with $CFG->allusersarestudents set to TRUE. This will also have a configuration option that can be used to disable returning large amounts of users for the site course, if a site happens to be using this functionality and they have a large number of users. 2007-06-19 20:38:27 +00:00
26f329ba61 Merged argument fix from stable 2007-03-11 06:59:53 +00:00
7c393e9c4f Fixed unenrol_student MDL-8591 2007-03-01 08:06:05 +00:00
9152fc9938 MDL-8323 finished full conversion to proper $COURSE global - no more $CFG->coursetheme, $CFG->courselang - improved course_setup(), current_language() and current_theme(); and Chameleon theme fixes needed for global $COURSE
MDL-7962 chat seems to be completely broken in head (fixed wrong JS)
* reworked chat themes support
MDL-8338 Cron does not need cookies
MDL-8339 forum cron capabilities problems
* minor deprecated function current_encoding() cleanup
2007-01-28 21:18:08 +00:00
8f36e33ec3 Fixed up styles for simple boxes see MDL-8101 2007-01-23 05:37:26 +00:00
ed5dd29fc8 moved obsoleted functions from weblib.php to deprecatedlib.php 2007-01-20 13:32:15 +00:00
2123b644a6 print_simple_box_* functions deprecated and replaced with clean new functions print_box_*
MDL-8101 MDL-4943
2007-01-08 03:06:32 +00:00
f3f7610c90 cvsimport fixups -- cvshead had strayed from upstream 2007-01-04 13:15:04 +13:00
5d776ecbfc nvl() function moved to deprecated - my +1 for removing it together with friends xxx_variable() from HEAD ;-) 2006-12-30 21:05:17 +00:00
acf2052b05 merged fix for MDL-7592, get_course_students() bug 2006-12-08 02:22:25 +00:00
f94ced1010 Fix sort on get_teacher to get the most senior teacher 2006-09-25 06:15:31 +00:00
1d546bb125 Fix for get_users_by_capability() so the caller can choose whether
they want users with doanything included or not
2006-09-25 03:00:50 +00:00
dc5586907d replacing deprecated calls and references to capability calls 2006-09-20 09:00:04 +00:00
d76a5a7fed replacing references to user_* tables 2006-09-19 01:44:33 +00:00
38079c83eb removing get_creators(), no more reference to the function 2006-09-18 12:04:16 +00:00
492e507f7b no more refernece to remove_creator() function 2006-09-18 11:55:04 +00:00
102d890c14 remove_admin() no longer referenced 2006-09-18 10:47:09 +00:00
6eccd8f099 add_creator no longer in use 2006-09-18 10:18:26 +00:00
4e5f3064bf role assignment and unassignment now propagates to metacourses 2006-09-17 08:42:42 +00:00
888fb649a8 Converted deprecated get_teacher() to use new tables 2006-09-16 13:55:30 +00:00
8f8ead90c7 fixed unenrol_student() - now uses roles instead of user_students table 2006-09-16 12:05:31 +00:00
7b6a42f5b8 coverted deprecated get_group_students() to use legacy capability instead of user_students table 2006-09-16 06:22:32 +00:00
36075e092d MDL-6041 - Proper fix that eliminates the magic number 99999 when getting lists of studnets. Now, there is no arbitrary upper limit in the datalib functions, and sensible upper limits on pages that display lists of users. However, if you try to get all the site students, then get_students prints a warning in debug mode, telling you that you need to rethink your code.
Also a few more ISNULL()s eliminated.

And a typo role_assignment -> role_assignments.
2006-09-15 14:32:35 +00:00
71dea306b4 changing lib functions to work with roles, some functions might not work as expected now 2006-09-15 09:08:48 +00:00
613bbd7c2b Moving deprecated functions out of datalib.php
Many of these still need updating to remove all dependence on user_xxx tables
2006-09-10 07:07:52 +00:00
c2da075758 Further reductions in logic to deprectaed functions 2006-09-04 08:31:07 +00:00
6d574c33b4 fixed missing global $USER 2006-09-04 08:01:57 +00:00
2acc290c17 legacy functions to use 4th parameter to by pass doanything capability 2006-09-04 04:50:12 +00:00
c4d0753b25 Moving deprecated functions to deprecatedlib.php from moodlelib.php and
some cleanups around the place.

Many of the functions in deprecatedlib.php have been rewritten to work with
the new roles and capabilities so that they can still work as well as possible.
2006-09-03 08:10:10 +00:00