Commit Graph

390 Commits

Author SHA1 Message Date
stronk7 42fa499221 Prevent one warning
Merged from MOODLE_18_STABLE
2007-08-04 18:48:35 +00:00
stronk7 5930cded47 Added space to perform correct N' queries under MSSQL. MDL-10423
(plus general whitespace clean)

Merged from MOODLE_18_STABLE
2007-08-02 23:39:28 +00:00
toyomoyo bdf3bbd198 if limit is specified on first call, ignore it, retrieve all, so that we can cache all entries, but only return the required number of entries at the end 2007-07-23 08:56:26 +00:00
toyomoyo 182c21f139 making get_my_courses() respect $limit 2007-07-23 08:38:07 +00:00
stronk7 ae7dc0d1e0 New cross-db version of the big union query used by get_my_courses() function.
I've tested both the "IN" subquery and the "FROM" subquery and, under sites
with more courses, the "FROM" one seems to perform slightly better. MDL-9381

Merged from MOODLE_18_STABLE
2007-07-22 00:56:42 +00:00
toyomoyo 61f774e8f6 merged fix for MDL-10469, users with doanything has no courses showing 2007-07-18 07:02:54 +00:00
mjollnir_ 808fae8f05 fixing a small syntax oddity that breaks get_my_courses in postgres. quoting " means escape table, not string 2007-07-14 19:36:59 +00:00
toyomoyo 0674ff6ca8 sql_concact() can handle more than 2 params, thanks Eloy 2007-07-04 02:03:47 +00:00
toyomoyo 0cdd512c17 taking out some redundant sql 2007-06-29 08:31:01 +00:00
toyomoyo 12e27a048d MDL-9283, fixing a broken SQL, thanks Arno 2007-06-29 08:23:31 +00:00
toyomoyo 6a61f741e6 testing patch for MDL-9238 Arnaud's patch 2007-06-27 09:07:47 +00:00
martinlanghoff 6c146b7d7f get_my_courses() if the parameters passed are identical to the defaults... MDL-7416
We are using the defaults then ;-)

Credits for spotting it go to Yu!
Blames for the thinko to MartinL
2007-05-16 23:19:15 +00:00
martinlanghoff 0f7caaf84f get_my_courses() - ensure we have groupmode, groupmodeforce in $d_fields - calendar/lib.php counts on it 2007-05-06 05:37:28 +00:00
martinlanghoff 4dbca99edf get_my_courses() - added optimisation for guest login
- was causing very slow page generation
2007-05-06 05:28:39 +00:00
martinlanghoff e4271d740c get_my_courses() - tighten default fields - faster, risky
This makes get_my_courses() faster/lighter in 2 ways

 - We fetch a ton less data from the DB
 - We store a tone less data in the Session

In a test environment, with a student enrolled in  3 _empty_ courses
(just created, empty modinfo, etc), this shaves 50% off the session
size on-disk.

The problem is callers that may be expecting a given field to appear by
default. Next step: walk all callers...
2007-05-06 05:27:31 +00:00
martinlanghoff 601edb900e get_my_courses() - skip checks if we know the user has moodle/site:doanything and we are observing $doanything
Author: Martin Langhoff <martin@catalyst.net.nz>
2007-05-06 05:26:59 +00:00
martinlanghoff 5970ccfbaf get_my_courses(): tighten cache scheme - part 2
the tighter cache was fragile as we always edit $field
2007-05-06 05:26:04 +00:00
martinlanghoff c6325ef155 get_my_courses(): tighten cache scheme
This tightens the rather lax caching mechanism that
cached regardless of parameters.

Thanks to Matt Clarkson for the heads-up...
2007-05-06 05:22:03 +00:00
toyomoyo daaf61f40c merged fix for MDL-9617, performance issues in calendar 2007-05-04 05:25:49 +00:00
toyomoyo 115a622d8c merged MDL-9273 related fixes 2007-04-13 05:40:11 +00:00
toyomoyo d5cf76e3ff merged fix for MDL-9238 2007-04-10 08:57:48 +00:00
toyomoyo 49860445a6 fix for MDL-8739, restore in course category 2007-04-03 09:19:09 +00:00
tjhunt 1aa7b31dd9 Make sure print_object output is always left-aligned. Also, make it look more like other debugging output. 2007-04-02 15:28:43 +00:00
toyomoyo 47bb1aed07 merged fix for MDL-9160, get_my_courses caching issues 2007-04-02 03:53:10 +00:00
skodak 7c3dab9f86 MDL-8759 reverted previous incorrect patch with unset($USER), fixed logging function instead; solves the broken language in forum cron too; merged from MOODLE_18_STABLE 2007-03-08 01:09:00 +00:00
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