5570 Commits

Author SHA1 Message Date
tjhunt
1ba3ad7df5 MDL-11699 - Make build_navigation more helpful by having it optionally build the activity and activityinstance links too, if you pass a $cm object. Note that this only does extra DB queries if you do pass a $cm object, and it does not have all the required fields, but in this case it will winge at you in developer debug mode. If you get your $cm using get_coursemodule_from_instance or get_coursemodule_from_id, which is best practice these days, then you won't have a problem. 2007-10-10 14:00:41 +00:00
skodak
8ddcdd86cb MDL-8248 savepoints in main upgrade.php 2007-10-10 13:14:56 +00:00
skodak
03cedd6283 MDL-11432 eliminated majority of RecordCount uses, added several missing rs_close() - this should help improve perf on some platforms - Eloy says ;-) 2007-10-10 12:19:27 +00:00
skodak
a7709f02b6 MDL-11432 rs->EOF wrapper function 2007-10-10 09:21:13 +00:00
skodak
3f7d592598 add proper rs_close() into cleanup_contexts() - we have to close even when now records returned 2007-10-10 08:43:25 +00:00
skodak
8a4d32d8a3 MDL-11688 makes sure all course and user contexts exist during upgrade (all contexts when going from in 1.6) - this is needed for grade_letter upgrade; other minor tweaks - the USER->access is now loaded automatically, feedback parameters added 2007-10-10 08:33:06 +00:00
skodak
eeccaea183 MDL-11686 dropped obsoleted grade tables, removed context_rel related upgrade code 2007-10-10 07:53:35 +00:00
nicolasconnault
b7064779f5 Updated copyright notice in header 2007-10-10 05:25:14 +00:00
iarenaza
0baafc173a Fix MDL-11632: Multiple files with emtpy lines outside PHP open/close tags
There are multiple issues with Moodle files containing empty or blank lines
(lines consisting of white spaces or tabs only) and/or white space before or
after the PHP open and close tags, notably with config.php and theme files.
2007-10-09 21:43:28 +00:00
sam_marshall
ca3b6e52d1 MDL-11681 Changed it so current tab no longer is a link to # 2007-10-09 16:56:00 +00:00
skodak
8600cadaea MDL-11660 user_lastaccess cleanup 2007-10-09 16:27:49 +00:00
skodak
b51ece5b3b MDL-11660
* user_lastaccess deleted when deleting course
* rewritten deleting of contexts - does not use get_context_instance() anymore because it is much more strict now
* added deleting of grade_letters and settings when deleting course
2007-10-09 16:07:15 +00:00
tjhunt
6f3b54c8aa MDL-9076 - Move the 'Add 3 more overall feedbacks' button inside that group of elements on the quiz settings form.
To make this possible, I added an extra argument to the repeat_elements method, which other people may find helpful on other forms.
2007-10-09 15:44:06 +00:00
skodak
4400acd2fb fixed yet more undefined $sqls 2007-10-09 15:11:29 +00:00
skodak
6ceb40ad9d fixed missing $sql warning 2007-10-09 13:04:33 +00:00
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
stronk7
4b3f69957e Modify notify_login_failures() for better scale. MDL-11661 2007-10-09 00:11:07 +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
stronk7
115a43113a ANSI join ON clauses should contain only the join condition. Also,
added prefix to the ORDER BY to prevent duplicate names.
2007-10-08 17:42:46 +00:00
skodak
aa87d82cec MDL-11653 undefined rcache in /lib/dmllib.php during upgrades 2007-10-08 17:27:42 +00:00
stronk7
cef1ea8e8e Adding one new index to cache_text table. User to make cron deletion
of expired records faster. MDL-11605
2007-10-08 16:33:29 +00:00
toyomoyo
a506e40c9f dropping context_rel table 2007-10-08 08:51:59 +00:00
ikawhero
323ccc26b6 Include custom profile fields when setting up a user object 2007-10-08 07:23:18 +00:00
moodler
69d0f96a53 Fixed typo from MDL-11642, thanks Gary 2007-10-08 05:11:15 +00:00
toyomoyo
a21fed9df5 using correct capability for displaying activity report link in print_user() 2007-10-08 00:42:41 +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
skodak
1d19804aa3 MDL-11568 prevent warning from $USER->mnehostid when not logged in 2007-10-07 13:46:46 +00:00
skodak
8108909a60 MDL-9636 grade import fixes - allow null grades, no importcode collisions and stealing, more validation and other bugfixes 2007-10-07 13:04:49 +00:00
skodak
5c8e6cb179 MDL-11621 removed recursion from create_contexts() 2007-10-05 20:47:08 +00:00
skodak
9a81a6060a MDL-11621 new create_contexts() function that makes sure all contexts exist, optionally initialises the paths and depths too 2007-10-05 20:16:51 +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
moodler
5b1dbd5cd7 Some SQL fixes to avoid putting 'quotes' around integers (performance) 2007-10-05 13:34:28 +00:00
skodak
0dba6cb2c5 MDL-11576 grader report - if user can not see hidden grades they are treated as NULLs and column totals 2007-10-05 09:47:31 +00:00
moodler
b649ef92e3 Small efficiency improvement for print_user_picture() when it does access the db 2007-10-05 06:32:53 +00:00
toyomoyo
d292d1d2b0 MDL-11549, print_user() should also check user context when printing activity report link 2007-10-05 06:31:11 +00:00
skodak
1223d24a73 MDL-11580 support for hidden state modification in gradebook from activities (quiz now only) - part 1
the hiding/unhiding should be IMO locked in gradebook UI when activity overrides it
2007-10-04 22:57:14 +00:00
moodler
0371f8e52f Added some default roles that should have moodle/grade:viewhidden
related to MDL-11580
2007-10-04 15:45:37 +00:00
nicolasconnault
5961dbfb10 MDL-11576 Added the groupsql clause to has_hidden_grades 2007-10-04 08:16:13 +00:00
nicolasconnault
6df5b04ec7 MDL-11576 New grade_item method has_hidden_grades(), which returns a simple count of hidden grades for the item. 2007-10-04 08:02:00 +00:00
toyomoyo
7f0648510a MDL-11544, tags migrate script postgres db problem 2007-10-04 07:06:54 +00:00
skodak
d75731c6ac prevent returning of invalid array from get_course_managers() 2007-10-03 22:26:05 +00:00
stronk7
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
skodak
3d811bc167 MDL-11143 fixed defaultfrongpageroleid typo and fixed notices during install and upgrade cause by undefined $CFG->defaultfrontpageroleid 2007-10-03 14:38:55 +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
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
moodler
c8bb8644c4 Don't use the 100 limit for debugging in anything lower than DEBUG_DEVELOPER mode 2007-10-03 12:04:02 +00:00
skodak
c626c2f460 MDL-11566 site summary now optional 2007-10-03 10:35:34 +00:00
moodler
e873679b8a Fixed some notices but this needs review from Petr MDL-10383 2007-10-03 09:12:01 +00:00
moodler
2125f23e19 Make sure that the role names gets filtered in get_assignable_roles() 2007-10-03 03:33:57 +00:00
skodak
178bcb7523 MDL-11568 warnings - can not use $USER->property when not logged in - quick fix, please review last commits 2007-10-02 23:08:00 +00:00