1716 Commits

Author SHA1 Message Date
skodak
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
skodak
e072450699 MDL-11578 , MDL-11578 , MDL-11573 :
* renamed Preferences to "My report preferences"
* renamed Site defaults to "Report defaults"
* rename Change site defaults to "Change report defaults"
* reintroduced Inherit option to Grader preferences - Nicolas was right, it is not possible to implement preference overrides without it with our current get_pref inplementation
* new separate option in plugin selector "Course settings"
* moved displaytype, decimals and aggregation position to "Course settings"
* created new table grade_settings + related functions grade_get/set_preference()
* user report now uses grade_seq class instead of grade_item::fetch_all(); added preloading of grade items into grade_grade instances
* other minor bugfixing/cleanup/improvements

Please note that the Grader report preferences and its defaults must be resaved again - sorry.
2007-10-08 23:09:10 +00:00
skodak
d622930b39 MDL-11618 removed the inherit override from decimals and gradetype used on grader report preferences + several bug fixes + settings improvements 2007-10-07 18:15:57 +00:00
stronk7
f1dc7614b5 Adding some traces here and there 2007-10-07 17:28:46 +00:00
moodler
63a11f3c95 Added some hooks to increase debugging in admin/cron.php
$CFG->showcronsql
$CFG->showcrondebugging
2007-10-07 14:52:29 +00:00
skodak
1bc8aab1c5 fixed defaults and hardcoded lang strings in performance settings 2007-10-07 14:01:36 +00:00
stronk7
d9420631b8 ORPHAN_USER_LASTACCESS_PROBLEM . MDL-11604 2007-10-05 22:27:55 +00:00
skodak
7d0c81b3ba MDL-11521 fixed problems when creating contexts and aprents does not exist yet
MDL-11527 fixed warning from $CFG->defaultuserroleid when installing and upgrading
+ removed reusing of previous contexts in has_capability() and get_context_instance()  because it was hiding critical errors when context was false, not specified, etc.
+ tweaked roles defaults - faster and defaults are applied when roles exist
+ SYSCONTEXTID may be specified in config.php to eliminate 1 db query
+ static context cache is now reset after rebuilding of context paths
+ path field in context table is now nullable - pg compatibility requirement
+ other minor fixes
2007-10-05 15:06:38 +00:00
stronk7
44853b8182 Reset possible changes by blocks to time_limit. MDL-11597 2007-10-04 17:55:59 +00:00
stronk7
5e867b23b9 Reset possible changes by modules to time_limit. MDL-11597 2007-10-04 17:42:30 +00:00
stronk7
fce3ef94e8 Moving some uses of deprecated functions to recordsets
in cron. MDL-11571 and MDL-11487.
Fixed wrong call to cleanup_dirty_contexts() and changed
to gc_cache_flags(). Please review. MDL-11347
2007-10-03 18:39:38 +00:00
moodler
1afb11e70b Fixed longtimenosee unenrolments. user_lastaccess and role_assignments were growing with uneccessary entries, to the point where memory limits were reached and in the end NO unenrolments were happening at all.
See  MDL-11571
2007-10-03 12:24:06 +00:00
skodak
c626c2f460 MDL-11566 site summary now optional 2007-10-03 10:35:34 +00:00
toyomoyo
af5c201302 MDL-11553, bulk user actions selection buttons do not work as expected 2007-10-03 08:26:13 +00:00
moodler
997436fa36 Fixed the list of role names (order and filters) MDL-11143 2007-10-03 03:31:31 +00:00
skodak
9d9c5f15b5 only whitespace beautification 2007-10-02 21:45:49 +00:00
skodak
0b7a912035 MDL-11143 unimportant change 2007-10-02 21:45:02 +00:00
skodak
8e5da17a44 MDL-11562 supportname and supportemail are are now initialized after admin user setup
MDL-11566 only site shortname, fullname and desc are required/displayed during installation
MDL-11567 fixed upgradesettings redirects if error in settings
MDL-11143 defaultfrontpageroleid moved to Frontpage settings page (easier to find), speedup
2007-10-02 21:38:53 +00:00
donal72
fcf24328ca New files for config of MNet roaming themes 2007-10-02 16:10:19 +00:00
donal72
d53b8d4bbb Display new tabs for the 'Themes' config page in mnet 2007-10-02 16:09:17 +00:00
donal72
2aa1f9bdd9 Instantiate some new strings for roaming themes 2007-10-02 16:08:46 +00:00
tjhunt
325898c61e MDL-11552 - Oops, I missed one bit when merging from OU Moodle. 2007-10-02 13:32:51 +00:00
tjhunt
aad9f920b1 MDL-11552 - Look for the name of an admin report inside the plugin's own lang dir before falling back to the main admin.php lang file. 2007-10-02 13:30:51 +00:00
skodak
284abb0925 MDL-11495 grade letter setting improvements:
* in_null for decimals defaults checks
* store letter settings only in database - no cfg settings
* separate configuration page for letters only - pluginselector+admin tree
* new capability to manage grade letters - similar to scales and outcomes
* added grade_letters db index
* grade letters related minor bugfixing
2007-09-28 20:12:43 +00:00
toyomoyo
667e08ef42 minor fixes for bulk user actions, adding ?>, using delete_user() function to delete users, etc 2007-09-28 03:07:03 +00:00
toyomoyo
4e1fe7d109 MDL-11143, adding a new setting "defaultfrontpageroleid" where you choose a role for all users on the front page 2007-09-26 07:12:38 +00:00
stronk7
e4a2d75456 group/db isn't a source of xml files anymore. MDL-11431 2007-09-24 22:32:31 +00:00
stronk7
964170c69c One more default and useless comment deleted. MDL-11385 2007-09-24 19:36:24 +00:00
stronk7
4a78d22fc3 Deleting some default comments that the XMLDB editor was
generating here and there. Only the table one remains. MDL-11385
2007-09-24 18:40:49 +00:00
stronk7
d3bf058b69 Deleting the Db migrate to UTF-8 button. It isn't there anymore. 2007-09-22 09:52:35 +00:00
stronk7
29c5c63e42 Adding new setting to control XML headers. MDL-11216 2007-09-21 17:27:14 +00:00
nicolasconnault
2f6c662f41 MDL-11379 and MDL-11380 fixed 2007-09-21 07:52:52 +00:00
mudrd8mz
d456b18f7b Fixes MDL-11327. Error when trying to include a non existing file. 2007-09-19 17:58:03 +00:00
stronk7
c2f8bff82c Now assignment submodules are handled by the XMLDB editor. Pending commit. 2007-09-19 08:04:11 +00:00
martinlanghoff
1d28d87b35 accesslib - Ensure newly-created categories have a context
New categories need a context immediately, and for top-level
categories, they also need to taint the "root" context to trigger
a reload of $USER->access.

This fixes problems with creation of initial courses(MDL-11178),
duplicate misc categories, etc.
2007-09-19 07:50:05 +00:00
martinlanghoff
18b1d84820 accesslib upgrade: admin/upgradesettings may need to load_all_capabilities()
This shouldn't happen, but sometimes admin/upgradesettings needs to
reload_all_capabilities(). So do it.
2007-09-19 07:46:12 +00:00
martinlanghoff
67ab1aecfb admin/index: Populate the context path JIT for the new admin user
With this call to build_context_path() the admin rights of the new
user are loaded just before they are first needed.
2007-09-19 07:29:55 +00:00
martinlanghoff
ad72d0d702 admin/cron: move accesslib stuff to occasional cleanups, add build_context_path()
The accesslib cleanups aren't needed every 5. Also, add
build_context_path() and instructions on how to run it
as build_context_path(true) to force a path rebuild.
2007-09-19 07:29:20 +00:00
martinlanghoff
df75ca2289 cron: call cleanup_dirty_contexts() 2007-09-19 07:11:31 +00:00
martinlanghoff
e6560e39d7 admin/roles: context-specific role changes mark the context as dirty
And will force a reload of $USER->access for logged-in users that need
to read _this_ context. Much lower impact - still not a great idea to
edit assignments/caps on very busy courses, but impact should be low.
2007-09-19 07:10:52 +00:00
martinlanghoff
b3dc845cab admin/roles: sitewide role changes mark site context as dirty
And will force a reload of $USER->access for all logged-in users
on their next request.

We will have to tell admins of large sites to avoid making role changes
at busy times, as it does generate extra load.
2007-09-19 07:10:37 +00:00
martinlanghoff
690c946c15 get_role_users() callers rework to use the new $gethidden 2007-09-19 07:09:50 +00:00
martinlanghoff
17b0efae11 accesslib: Introducing cleanup_contexts() and use it in cron
The newly minted cleanup_contexts() walks the context table
matching contexts with the tables they are referencing and
clearing any leftover contexts.
2007-09-19 06:50:53 +00:00
toyomoyo
40e0bea5cc minor fix for count of users 2007-09-19 03:48:44 +00:00
toyomoyo
60410add64 MDL-11324, only display users with moodle:course/view capability when assinging in module context or lower 2007-09-19 03:31:22 +00:00
moodler
d13d30ef78 The "alias" role names were not being used in the role assign screens. Now they are. MDL-11323 2007-09-18 08:35:12 +00:00
skodak
ce4ff1c9cc MDL-11292 fixed Cannot create child auth plugins - patch by Mark Nielsen; used inlude_once() when searching for functions/methods in files 2007-09-15 09:29:58 +00:00
nicolasconnault
e171963b3e MDL-11278 Implementation is complete, but grade_categories records in DB are not affected by global settings. This way, when global settings are switched back to "Do not Force", the original category settings will be in place. 2007-09-14 17:21:30 +00:00
nicolasconnault
53461661ae MDL-11278 Admin settings page completed, implementation of settings in the gradebook coming up next. 2007-09-14 08:54:46 +00:00
nfreear
c5898fad45 MDL-11160, Cron exhausts memory on "Removing expired enrolments ..." - changing nested foreach to JOINs with while(..rs_fetch_next_record). 2007-09-13 09:13:00 +00:00