28047 Commits

Author SHA1 Message Date
martinlanghoff
cf1348caae PERF logging - move handling to moodle_request_shutdown()
By moving the performance profile logging to the very
end of PHP processing, we cover more pages, notably those
that don't end up with a footer or a redirect, like file
serving.

This should improve quality of our performance logs, and
help catch some piggies...
2007-09-12 02:57:26 +00:00
martinlanghoff
3446daa3da redirect() - log performance profiling info
Many heavy pages end in a redirect. Log their profiling data!

Thanks to Matt Clarkson for spotting the problem.
2007-09-12 02:57:08 +00:00
martinlanghoff
6b6eea5575 admin/modules: Avoid calling rebuild_course_cache()
rebuild_course_cache() over all courses is extremely expensive,
not suitable for interactive calling. Better to clear modinfo
and let course/view.php repopulate it as needed.

With this patch we clear out modinfo _only_ for courses affected
by the module we show/hide/delete.
2007-09-12 02:56:50 +00:00
martinlanghoff
d863419245 course/index: move orphan fixups to an optimised fix_coursecategory_orphans()
Move the fixups for orphan courses to the newly minted
fix_coursecategory_orphans() -- and optimise it to take only 1 dbquery for
the common case.

If we do find lots of orphans, we issue 2 updates per orphan.

This cuts down dbqueries drastically - we used to have 2x the number of
courses in the site.
2007-09-12 02:56:36 +00:00
martinlanghoff
f8ea60777c fix_course_sortorder(): fix breakage with large categories, saner error
Two improvements for fix_course_sortorder()

 - If the category has more courses than the shift range
   use a larger shift range to avoid overlapping with itself

 - If things do go wrong during the per-course sortorder updates,
   rollback and try and call ourselves with a 'safe' flag.

Still - far from perfect. Probably the global sortorder approach
is broken. The sanest way is to rework things to always join against
course_categories and order by the combined sortorders.
2007-09-12 02:56:16 +00:00
stronk7
dc6cc11a72 Annihilate one wrong use of getNameForObject() now
that we are able to detect REAL check constraints names
2007-09-11 19:39:28 +00:00
stronk7
da40b0beab And now, the unused getStandardNameForObject() is out. Back to the
exclusive getNameForObject() function, ONLY USED TO CREATE NEW
OBJECTS, NEVER TO GUESS THE NAME OF EXISTING ONES. MDL-9356
2007-09-11 19:37:13 +00:00
stronk7
3d74e77aae Now we aren't guessing check constraint names
but getting the real ones under Oracle. MDL-9356
2007-09-11 19:08:11 +00:00
stronk7
92529a70fa Now we aren't guessing check constraint names
but getting the real ones under MSSQL. MDL-9356
2007-09-11 19:07:17 +00:00
stronk7
f0dfc20124 Now we aren't guessing check constraint names
but getting the real ones under PostgreSQL. MDL-9356
2007-09-11 19:06:38 +00:00
stronk7
3e38ceb837 Added some new test to check double creation
and deletion of enums (check constrainsts). MDL-9356
2007-09-11 18:35:23 +00:00
stronk7
f090314f46 General cleanup of debugging messages.
Now change_field_enum() introspects DB and detects
if the enum existed or no, as needed. MDL-9356
2007-09-11 18:33:23 +00:00
thepurpleblob
bad6ba65ae Missing a stripslashes() so TeX functions didn't work
Merged from STABLE_18
2007-09-11 14:55:34 +00:00
thepurpleblob
07caf142d7 MDL-10092:
Decode HTML entities before processing.

Merged from STABLE_18
2007-09-11 13:55:33 +00:00
jamiesensei
15822170d4 removing require that is not needed 2007-09-11 09:01:21 +00:00
jamiesensei
479cca8a1e fix to make breadcrumbs module independent 2007-09-11 08:23:00 +00:00
diml
515887c4d8 db scheme note for search engine 2007-09-11 08:09:02 +00:00
diml
0a4c172ce7 ensuring php5.0 php4.3 compatibility in cron runs 2007-09-11 08:03:40 +00:00
jgutierr25
c39e721374 Pb with autologinguest 2007-09-11 07:54:55 +00:00
nicolasconnault
6619eba40b MDL-10383 Reverting Petr's boolean cast on the array of allowed groups. It makes it impossible to get the "Group event" option in the calendar. 2007-09-11 07:29:48 +00:00
stronk7
af1192b159 Now both check_constraint_exists() and find_check_constraint_name()
are working under mysql, postgresql and mssql. 1st step of MDL-9356
2007-09-10 22:42:04 +00:00
stronk7
faa1a939f0 Now Oracle is also able to detect its check constraints per field. 2007-09-10 22:30:26 +00:00
stronk7
7abc6e09c0 Adding two new functions to search for check constraints from ddl stuff.
Unused and unfinished for now. I need them in CVS.
2007-09-10 22:22:23 +00:00
stronk7
a347e5e439 Preparing getCheckConstraintsFromDB() to retrieve the check constraint
defined for one field. Not used yet but I need it in CVS now.
2007-09-10 22:00:24 +00:00
diml
5c8f580358 Fixes wildcard exception occurence on deleting resources. 2007-09-10 19:48:31 +00:00
diml
1b4bb51edb add new itemid field for indexing subitems. 2007-09-10 17:26:10 +00:00
diml
7d0b446a6c let lethal exceptions from Lucene passthrough and the cron script finish normally 2007-09-10 17:25:35 +00:00
stronk7
15999a9351 Allow the upgrade_plugins() function to autodetect if the header
has been printed, so it runs in "embedded" mode. Useful to run
submodule installation/upgrade in the same page than the parent. MDL-11183
2007-09-10 17:13:12 +00:00
moodler
8c0aa4fd62 Removed unnecessary WHERE statement in SQL MDL-11146 2007-09-10 14:55:32 +00:00
jamiesensei
15b83581ce test for has_capability before displaying choosecoursefile control as if user does not have permission then control is useless. 2007-09-10 13:28:18 +00:00
tjhunt
5b875ebf82 Take out duplicate $Id$ CVS tags. 2007-09-10 11:07:39 +00:00
moodler
1c0ccfd6bd Fixed notice when using textlib 2007-09-10 07:02:52 +00:00
nicolasconnault
2de7b82759 MDL-10723 Another file that escaped the update 2007-09-10 04:58:09 +00:00
stronk7
4215e41ecb Extending getCheckConstraintsFromDB() to support a new parameter
used to filter what field in the table we want to know
its check constraints
2007-09-09 16:28:16 +00:00
stronk7
4cc68ea184 Now mysql returns getCheckConstraintsFromDB() in a compatible
way (array of name & description objects) with the check
constraints found in the table
2007-09-09 16:09:00 +00:00
stronk7
3ab03633c3 Fix excess of slashing in course names when restoring. MDL-11151
Merged from MOODLE_18_MERGED
2007-09-08 22:58:50 +00:00
stronk7
205847badf Fix link in email to new admin report. MDL-7850
Merged from MOODLE_18_STABLE
2007-09-08 22:49:13 +00:00
stronk7
9cd54788d6 Adding some strings for the new backups report. MDL-7850
Merged from MOODLE_18_STABLE
2007-09-08 22:45:45 +00:00
stronk7
73d753c79d Redirecting old backup log to the new one. MDL-7850
Merged from MOODLE_18_STABLE
2007-09-08 22:41:27 +00:00
stronk7
834479c28c Adding new report to display scheduled backup logs. MDL-7850
Merged from MOODLE_18_STABLE
2007-09-08 22:36:29 +00:00
skodak
ffc536af8e MDL-7380 converted various places to use new groups API 2007-09-08 20:53:05 +00:00
moodler
4084eb45e2 Automatic installer.php lang files by installer_builder (20070908) 2007-09-08 03:57:39 +00:00
diml
b7a2cc89dd add postgress model for search 2007-09-07 18:56:17 +00:00
diml
12262b41ec fixes docdate bad default value format. Was '0', should have been 0. 2007-09-07 18:54:47 +00:00
diml
07c0c46fac enhance cron response when disabled. 2007-09-07 18:52:00 +00:00
diml
1bf5043ce9 fixes bad path in checkDB() 2007-09-07 18:51:16 +00:00
jmg324
f359b6121c MDL-11159 adding a name to block config form for javascript support 2007-09-07 14:49:30 +00:00
thepurpleblob
d93a90dcfd MDL-11147:
Debug screen now supports LaTeX/Ghostscript renderer.

Merged from STABLE_18
2007-09-07 14:24:18 +00:00
nfreear
c2136cde22 MDL-11158, "& needs fix to & in ... for 'en' and other language packs" 2007-09-07 13:53:28 +00:00
skodak
d9bf198292 MDL-10939 converting news_item block too 2007-09-07 09:43:14 +00:00