Commit Graph

365 Commits

Author SHA1 Message Date
vyshane 2327b9df74 Merged from 1.7. 2007-02-08 08:06:08 +00:00
stronk7 b5eb752394 First real test of the new rs_fetchXXX() functions. Applying it
to get_my_courses(). MDL-8134

Merged from MOODLE_17_STABLE
2007-01-29 00:17:25 +00:00
skodak e8e0bb2d7b MDL-8096 - advanced edit now mostly works, though still some parts missing; RIP changeme user :-) 2007-01-25 11:03:33 +00:00
moodler 1cbf4fccc4 Whoops, forgot to set the cache :-) MDL-8149 2007-01-22 03:28:06 +00:00
moodler 8e82745aed A little bit of caching for get_my_courses, related to MDL-8149
Resetting it in load_all_capabilities() means it gets flushed everytime
role_assign() or role_unassign() is called on the current user, which should
be enough.

The cache is not reset when others assign/unassign roles, but Moodle has
always had this problem.
2007-01-22 03:24:27 +00:00
martinlanghoff 86dd62a724 mnet: introducing print_remote_course() and use it in print_my_moodle()
mbwa-ha-ha-ha! All your remote courses belong to us.
2007-01-19 09:23:47 +00:00
martinlanghoff db4b12eb70 mnet: introducing get_my_remotecourses() and get_my_remotehosts() -- use them too 2007-01-19 08:57:13 +00:00
stronk7 485056620e Introducing CFG->dbfamily and deleting check_db_compat(). MDL-7061 2007-01-12 19:42:42 +00:00
sam_marshall f8e1c7af38 MDL-8149 Added code to narrow down possibilities for get_my_courses, which reduces number of db queries required for profile page when site has many courses. 2007-01-12 17:05:32 +00:00
martinlanghoff 03d820c788 mnet: changes to core moode libs
- get_user_listing() is now aware of remote users
 - require_login() is now aware of remote users
 - new auth plugins infrastructure in place
 - is_internal_auth() is now a deprecated legacy call
 - create_user_record()/update_user_record()/authenticate_user_login() handle multi-auth
 - is_mnet_remote_user() checks for remoteness
 - clean_param() handles PARAM_PEM and PARAM_BASE64

Also
 - user_login_string() knows to offer a link to remote users to login @ their host
 - XMLTDBTable field creation returns the field obj so that
   the caller has a chance to set additional properties such as comment
2007-01-04 02:52:44 +00:00
Martin Langhoff f3f7610c90 cvsimport fixups -- cvshead had strayed from upstream 2007-01-04 13:15:04 +13:00
toyomoyo 03bb25e1df merged fix for MDL-7766, calendar not displaying course events 2006-12-08 07:56:07 +00:00
sam_marshall 1aa1044fdc MDL-7656 Changed print_object to escape html 2006-11-22 14:27:42 +00:00
skodak 69cd298a27 code improvement in count_courses_notin_metacourse() MDL-7424 - thanks Eloy! 2006-11-09 23:35:06 +00:00
skodak 493cde249e Child courses import list empty MDL-7424; added new count_courses_notin_metacourse() function, the old one was kept for BC 2006-11-09 21:12:31 +00:00
toyomoyo 82749af726 merged fix for MDL-7112 select distinct on text field 2006-11-02 02:02:41 +00:00
stronk7 6bb0f67f53 Prevent +/- operators (REGEXP) on course searches for MSSQL and Oracle. MDL-7312
Merged from MOODLE_17_STABLE
2006-10-31 19:54:46 +00:00
stronk7 8b497bbce3 Prevent Oracle to fail when inserting records with log->info empty
(will be solved once we got all those NOT NULL fields fixed)

Merged from MOODLE_17_STABLE
2006-10-30 19:53:40 +00:00
stronk7 62d4e774a3 New xmldb_debug($message, $object) added. It's the official hook
provided by XMLDB's debug() function. MDL-7261
2006-10-28 15:20:14 +00:00
skodak 00e12c7332 fixed When unassigning a role, forum_role_unassign unsubscribes the user even if you have other roles there MDL-7120; merged from MOODLE_17_STABLE 2006-10-24 20:22:30 +00:00
moodler cf36da6429 FIxed problem which was unenrolling some assigns at the site level! MDL-7189 2006-10-24 07:07:54 +00:00
stronk7 422770d8cb Moving deprecated uses of sql_paging_limit() to the new $limitfrom,
$limitnum parameters in all the get_recordXXX() functions. MDL-7167

Merged from MOODLE_17_STABLE
2006-10-23 23:00:18 +00:00
moodler 81cc8046c4 Merged My Courses fixes from stable 2006-10-21 16:36:31 +00:00
skodak 78d4711ebb fixed data/index.php when no databases available, initialized array in get_all_instances_in_course() from datalib.php; merged from MOODLE_16_STABLE 2006-10-08 19:45:29 +00:00
gustav_delius 6bff0453f5 Incomplete user record (the one where the username is still 'changeme') should not be included in user listing. See bug 4570 2006-10-05 22:21:09 +00:00
moodler 0351730630 FIxed a debugging message 2006-10-01 06:39:20 +00:00
dwoolhead 12490fc2b3 Prevent 'Warning: Invalid argument supplied for foreach() in ...' for get_courses_page function when there are no courses in the required category. 2006-09-22 11:15:10 +00:00
moodler cc7c0592e4 Fixes for get_users_longtimenosee 2006-09-22 09:49:26 +00:00
moodler 33f857405b Slight extensions to get_my_courses() API to make it more useful in general 2006-09-19 14:23:43 +00:00
moodler 0dde27bb52 More efficient get_my_courses() 2006-09-19 14:14:32 +00:00
vyshane 285f94f506 Few small fixes 2006-09-19 08:16:26 +00:00
toyomoyo d76a5a7fed replacing references to user_* tables 2006-09-19 01:44:33 +00:00
skodak 09575480bb fixed several warnings in get_course() 2006-09-17 18:07:35 +00:00
moodler 41f6ed56ce Don't rely on the legacy capabilities to identify admins, use doanything 2006-09-17 16:00:16 +00:00
tjhunt 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
moodler 5081e7868d Some SQL fixes 2006-09-15 13:51:42 +00:00
toyomoyo 71dea306b4 changing lib functions to work with roles, some functions might not work as expected now 2006-09-15 09:08:48 +00:00
moodler 3cc8b355c2 Fixed a notice when course->modinfo is empty 2006-09-15 06:16:35 +00:00
vyshane e521770c84 Small SQL fix. Removed unneeded WHERE clause 2006-09-15 03:18:59 +00:00
toyomoyo ea8158c118 changing sql calls from user_students table to role_assignments table 2006-09-14 09:08:07 +00:00
toyomoyo 61b03dc7a6 replacing legacy calls 2006-09-14 03:18:55 +00:00
moodler ea82d6b638 CHanged a lot of CFG->debug stuff to use the new debuggin() function 2006-09-13 09:45:07 +00:00
moodler cb80265b21 Tidying add_to_log slghtly 2006-09-13 05:31:12 +00:00
toyomoyo ae9e4c064e replacing iscreator() calls with capabilty 2006-09-12 08:56:10 +00:00
toyomoyo 1c45e42e3c adding capabilities 2006-09-11 08:56:23 +00:00
moodler 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
toyomoyo 51792df056 adding capabilities 2006-09-08 08:46:26 +00:00
stronk7 93a89227fd One less use of old LIMIT clause. Now logs are working properly. 2006-09-05 21:40:17 +00:00
stronk7 405bc45cf6 No need to specify DISTINCT because u.* guaranties distinct by id. 2006-09-05 19:01:41 +00:00
stronk7 94ef00f3bb MSSQL and Oracle don't want DISTINCT clauses over TEXT/BINARY fields.
In this case, we simply delete it because SELECT g.* guarantees unique
records to be retrieved by the first field.
2006-09-04 22:05:58 +00:00