Commit graph

5838 commits

Author SHA1 Message Date
stronk7
0597562dd4 Grrr (missed to delete some lines) MDL-11751 2007-10-14 09:54:57 +00:00
stronk7
9b62ebb87f Drop one index that shouldn't be there. MDL-11751 2007-10-14 09:52:16 +00:00
tjhunt
8bc9ebc401 Correct misleading error message in upgrade_activity_modules. Spotted while diagnosing MDL-11732. Merged from MOODLE_19_STABLE. 2007-10-13 22:00:55 +00:00
nicolasconnault
ddaadc7c78 MDL-8605 More changes to upgrade and restore, and some unit tests with db and rs mock objects 2007-10-12 19:13:18 +00:00
tjhunt
38e179a4ed MDL-11741 - Convert core modules to take advantage of recent improvements to build_navigation.
This check-in removes about 400 lines of code. I hope I have not screwed anything up. I would be grateful if people could review this change, and keep an eye on the navigation bar in modules.

Any navigation bar bugs you find in the near future, feel free to file them in the tracker and assign them to me. Thanks.

If not to many problems are found, I think I would like to backport this to 1.9 stable, but I am not sure that is a good idea. Opinions to the General Developer Forum please. I am about to start a thread there.
2007-10-12 15:55:49 +00:00
tjhunt
3f544a2481 MDL-11699 - Making one more common case a bit nicer for callers. Merged from MOODLE_19_STABLE. 2007-10-12 15:11:57 +00:00
tjhunt
c04f93b092 MDL-11699 - Further, backwards-compatible, improvement to the build navigation API to simplify a common case. Also, further improvements to the doc comment, so it is easy to use. Merged from MOODLE_19_STABLE. 2007-10-12 10:36:11 +00:00
stronk7
56768525ac Merged from MOODLE_19_STABLE. Adding $Id tag 2007-10-12 09:45:33 +00:00
moodler
ccbde9e80c Fixing version number 2007-10-12 08:35:52 +00:00
toyomoyo
13c7c8183e adding missing context 2007-10-12 07:41:30 +00:00
tjhunt
dd9a2dcc75 MDL-11699 - Addendum - fix typo in fixup code. Sorry. 2007-10-11 16:45:43 +00:00
nfreear
12b9aee7d7 Fixes MDL-11695, Skip block links inaccessible for many keyboard-only users 2007-10-11 16:35:20 +00:00
tjhunt
7243c7c822 Small tidy-up in print_header_simple. Merged from MOODLE_19_STABLE. 2007-10-11 15:25:27 +00:00
nicolasconnault
fc278e842e MDL-8605 Preventing new user folder from being created when original folder is empty 2007-10-11 14:19:05 +00:00
tjhunt
67e56c0a3c MDL-11699 - Addendum - rewrite the other half of the function too, so I can understand what it is doing, and fix a couple of minor logic errors along the way. Merged from MOODLE_19_STABLE. 2007-10-11 11:52:34 +00:00
nicolasconnault
761447651e Minor changes related to unit testing 2007-10-11 09:15:57 +00:00
nicolasconnault
56a1a88228 MDL-8605 New user directories implemented 2007-10-11 09:01:29 +00:00
jmg324
38a1e55d8a MDL-10296 adding in the global for https 2007-10-10 16:02:45 +00:00
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