moodler
1596edff55
Added general robustness to require_course_login
2005-04-13 06:59:13 +00:00
moodler
e84a246a55
FIxed a problem I wasn't seeing because I was in debug mode.
...
get_record_sql now has a second parameter that specifies when
we are expecting to take one record from many (to help with debugging)
2005-04-11 12:07:49 +00:00
moodler
00b60650f2
Added a span around performanceinfo script name
2005-04-11 07:36:52 +00:00
martinlanghoff
6e6053bd18
Merged from MOODLE_14_STABLE. Added option to cache langlist in dataroot/cache/languages. If enabled saves around 10MB of memory and 40 includes (some really large). In HEAD we also get a nice option select in admin->variables.
2005-04-11 06:41:08 +00:00
moodler
8edffd15f6
LIMIT timezones returned to the latest one
2005-04-10 18:27:15 +00:00
moodler
5404e914fb
Going back to the slower but always-accurate timezone list method
2005-04-10 17:51:48 +00:00
moodler
1bb1333b0b
Centralised timezone list to a function
2005-04-10 17:35:17 +00:00
defacer
dddb014acf
1. make_timestamp: It's easy to be a fool, but to do it like me requires innate talent.
...
2. usertime: I think that the way Moodle is written, if this compensates for DST lots
of things are going to break. I found a few myself and decided to revert the behavior
until such time as a proper code review can be made.
2005-04-10 09:41:46 +00:00
defacer
c9e55a2583
LIMIT 1 was already being introduced by get_record_sql, and GMT offsets weren't working due to the bad query.
2005-04-10 09:31:21 +00:00
defacer
989585e933
Major step forward once more: calculate_user_dst_table() now always sees the
...
user's effective timezone correctly using get_user_timezone(). It also remembers
which timezone was in effect when it cached its calculations, so if the user's
effective timezone changes for any reason the table is automatically re-computed.
******
NOTICE
******
From this point onward, DST support should be working again, and there are no more
visible hurdles in the way. This means it should STAY working correctly until 1.5.
2005-04-09 10:12:30 +00:00
defacer
6dc8dddc62
Removed another unnecessary get_user_timezone_offset() call.
2005-04-09 09:50:08 +00:00
defacer
13e5588de8
Removed unneeded get_user_timezone_offset() call; usertime() does it anyway.
2005-04-09 09:47:01 +00:00
moodler
7b9e355e43
Fixed an error in the timezones
2005-04-09 08:44:49 +00:00
defacer
e8904995f0
Introduce the "new" get_user_timezone, and implement get_user_timezone_offset in terms of it.
2005-04-08 20:32:40 +00:00
moodler
494b9296e9
Renamed get_user_timezone to get_user_timezone_offset, because Jon has
...
plans for that function name
2005-04-08 07:42:50 +00:00
defacer
2665e47afc
usertime() now compensates for DST.
2005-04-08 05:39:53 +00:00
defacer
43b59916f6
get_user_timezone() should now be working for users with new-style timezone settings.
...
get_timezone_record() function added to cache some db queries.
I haven't been able to test this yet, will do later.
2005-04-08 05:28:39 +00:00
defacer
b86e6ba918
is_executable() doesn't exist in PHP/Win < 5.0.0
2005-04-08 05:01:09 +00:00
martinlanghoff
853df85e56
Performance/footprint profiling patch complete -- is enabled by CFG->default>7 or by a few defines in your config.php.
2005-04-07 00:11:28 +00:00
martinlanghoff
c2fd9e955a
Improved performance info reporting and logging. Needs some work on the configuration front still.
2005-04-06 07:34:05 +00:00
moodler
ddd7a47ac1
Removed a notice from isteacheredit
2005-04-06 06:26:38 +00:00
moodler
dcc17b63b1
More improvements to isteacher() logic (and isadmin now uses $USER->admin too)
2005-04-06 06:20:59 +00:00
moodler
5e04ee0c4f
More efficient logic for isteacher()
2005-04-06 05:53:24 +00:00
moodler
b8cea9b2de
Added some performance monitoring functions into the core
2005-04-01 10:00:18 +00:00
moodler
fcaff7ffcd
Updated formatting in getremoteaddr, and made add_to_log use it
2005-04-01 07:40:07 +00:00
defacer
830a2bbd82
Yay! Major DST support progress!
...
1. calculate_user_dst_table() works correctly and offers many features:
Can create or extend on-the-fly a table of pre-computed timestamps on which
DST changes happen, keeps track of these changes and the current computed year
range in $USER->dstoffsets and $USER->dstrange. Initially the computation is
done in a current year +/- 3 years range, to keep the amount of serialized
data small and to make traversals of $USER->dstoffsets faster.
2. dst_offset_on() works correctly, and can dynamically instruct the above
function to extend the pre-calculated region on demand (i.e., when it's called
for a timestamp which falls outside said region).
3. Some other improvements.
I have made a few preliminary tests on my dev machine and It Works(tm!) :D
2005-03-26 18:43:58 +00:00
defacer
3bba1e6ef1
Fixing a regression.
2005-03-23 14:43:32 +00:00
defacer
5c5dfee259
Duh. More spurious output squashed.
2005-03-23 04:03:50 +00:00
defacer
9532c34e00
I had left some uncommented debug output in there. Comments back on.
2005-03-23 04:02:21 +00:00
defacer
e789650d41
Piles of timezone-related changes.
2005-03-23 03:03:43 +00:00
defacer
0c478e1085
Killing dst_offset_for_year().
2005-03-23 02:13:00 +00:00
defacer
0ed442f85c
DST presets -> timezones
2005-03-23 01:54:45 +00:00
defacer
0bd7322e30
Going forward to timezones ever so slightly.
2005-03-23 01:26:34 +00:00
defacer
28902d99c8
find_day_in_month now working with the latest convention of $startday, $weekday
2005-03-18 04:38:30 +00:00
gustav_delius
cd8d4471c8
Print course in footer
2005-03-17 15:12:07 +00:00
gustav_delius
f52d48db38
Added clone function to get around the differences in object handling between php4 and php5.
2005-03-16 22:15:36 +00:00
moodler
322344bb6b
get_string will now also check inside block directories, which means
...
Blocks can be self-contained (thanks Eloy for the idea!)
2005-03-14 13:08:16 +00:00
moodler
7ff9860db0
This change will break themes for sideblock, but now all the main TH cells that use
...
the standard kind of look (eg gradient) have a consistent class "th.header"
2005-03-13 13:50:23 +00:00
moodler
1ac7ee24d7
CFG->nofixday can override the ficing of day format in userdate
2005-03-10 14:10:21 +00:00
moodler
211ea3e9d3
COnsistent use of readdir
2005-03-10 06:04:29 +00:00
moodler
7d56fe1077
Use real tabs in the error_log call because \t doesn't seem to work
2005-03-10 05:05:12 +00:00
martinlanghoff
de6fa62a56
Fixes from Dan Marsden to getremoteaddr() and address_in_subnet() -- getenv() isn't supported under ISAPI (IIS) so we use _SERVER instead. address_in_subnet() had a loop control error.
2005-03-10 02:36:51 +00:00
moodler
f1e0649c1c
Removed files/mimetype.php and put it into lib/filelib.php instead
...
where it always should have been.
2005-03-07 11:32:03 +00:00
defacer
59556d4833
Switching < to <= which is the correct operator
2005-03-05 23:57:19 +00:00
defacer
c9e72798d4
Changing the way that the DST offset is retrieved, given a timestamp.
...
This is a nightmare issue, as far as I can think of this is "the" solution.
2005-03-05 22:23:08 +00:00
stronk7
433c8b2e72
Added support to priority in email_to_user(). Bug 2647
...
(http://moodle.org/bugs/bug.php?op=show&bugid=2647 )
2005-03-02 17:56:46 +00:00
moodler
0afedf684d
Fixed the link for the confirmation email ... the & was breaking in some
...
mail ... see also bug 2502 for something similar
2005-03-01 07:06:42 +00:00
defacer
251af423cd
Err... course block instances weren't being deleted along with the course?
2005-02-28 04:35:32 +00:00
defacer
8dc3f6cf5e
Changing find_day_in_month() to conform with the new definitions of DST presets.
...
Adding function dayofweek (centralization, this might also be helpful in fixing a bug).
2005-02-26 06:26:04 +00:00
moodler
2ae281532b
New PARAM type called PARAM_CLEANHTML which knows how to clean up HTML properly
2005-02-25 13:10:24 +00:00