290 Commits

Author SHA1 Message Date
gustav_delius
b63c0ee521 Fixes a bug with user events created by an activity module.
The old code assumed that the courseid would always be set but that is only the case for course events, not for user or group events. (See http://moodle.org/mod/forum/discuss.php?d=4466#20827 for a discussion about the meaning of the courseid field in the event table)
I also made the $courseid argument to get_coursemodule_from_instance() optional. It is not needed and in some cases it will not be know, as for example for non-course events created by activity modules.
2004-12-26 13:58:07 +00:00
defacer
bb4a2e85c0 New features implemented:
* Configurable defaults for the calendar upcoming events lookahead and
   maximum upcoming events displayed (bug #1623)

 * Configurable setting for which days of the week are treated as weekend
   (bug #1919)

 * Configurable setting for which day starts the week (the admin can now set
   this as the default for new users and guests without messing with language
   packs) (no butracker issue)
2004-12-16 18:49:57 +00:00
defacer
86f092d25e New "Calendar" section in Admin -> Configuration.
Includes preliminary support for DST!
Includes "admin sees all events or only own?" setting (bug 1972)

WARNING: Modified moodlelib.php to explicitly specify NOT-DST when
calling mktime() and gmmktime(). This is essential since we don't want
PHP to second-guess us for the DST matters, but... it may affect existing
code?
2004-12-15 07:14:41 +00:00
defacer
9c6bf80e71 Removed last instance of the evil SECS_IN_DAY constant that is the ticket
to wrong code when DST comes into play

Fixed calendar_get_upcoming to perform DST corrections according to the
server's TZ (now the users as calendar doesn't support that, but it's a start)

Removed some dead code
2004-12-01 21:54:49 +00:00
defacer
cb48251dec Fixed some warnings I introduced a while back by incorrect use of optional_parameter() 2004-12-01 21:52:09 +00:00
defacer
77e9d3cf4c Minor code style changes 2004-12-01 21:49:23 +00:00
mjollnir_
e6d1d120b1 Merged from MOODLE_14_STABLE: Changes to calls to get_courses to not get all fields 2004-11-22 05:41:14 +00:00
mjollnir_
da862d410f Merged from MOODLE_14_STABLE: Fix for calendar set filters to not query the database for groups of a course if it doesn't use groups 2004-11-22 03:17:49 +00:00
defacer
3c7e1b65be Fixes for slightly incorrect behavior on days where the DST setting changes.
Not quite correct in some places though (those require more attention).
2004-11-20 20:10:03 +00:00
defacer
482dbe0cd4 Correct construction of SQL clauses (fix for SC#20).
Improved conformance with the new _param() functions a bit.
2004-11-19 02:47:00 +00:00
moodler
2038a163d8 Merged sesskey fix from stable 2004-11-05 06:29:48 +00:00
defacer
a94329a8ed Fix for bug #2004 (Bug of the Year! :D):
Events in each day are now displayed ordered by starting time, and not by
eventid as before. Thanks to Gustav for pointing this out!
2004-10-29 17:21:19 +00:00
moodler
647213f731 Some changes for XHTML compatibility 2004-10-07 05:52:39 +00:00
stronk7
1066e0dc62 Changed some conditions against the $USER variable
to work fine under PHP5.

Bug 2053
(http://moodle.org/bugs/bug.php?op=show&bugid=2053)

Merged from MOODLE_14_STABLE
2004-10-06 16:52:24 +00:00
defacer
02ce384808 Merging fix for bug 1957 from MOODLE_14_STABLE. 2004-09-19 22:25:21 +00:00
defacer
4c7d113714 Nit-picking corrections... behavior doesn't change at all. 2004-09-18 16:14:54 +00:00
gustav_delius
839f2456bb XHTML compliance
- fixed (hopefully) all <img> tags
- global replace on <br> to <br />
- &amp; in URLs
- got the forum module XHTML compliant
Julian Sedding
2004-09-16 17:13:57 +00:00
defacer
c3d3b6d48b Fixing the logic errors my previous commit introduced. Notice how easily writing
"cute" code (courseid > 1, both checking for non-zero and non-courseid value)
can lead to mistakes later. And it's my own code, even...

Also removed one obsolete function.
2004-09-16 10:30:40 +00:00
defacer
9064751bc3 Fixed all hard-coded SITEID references. Thanks to Eloy for pointing it out!
(In the end there were more than we thought; I just searched for all "1"s)
2004-09-16 10:14:44 +00:00
gustav_delius
7ef0797dea some fixes for XHTML compliance 2004-09-12 01:34:24 +00:00
defacer
3395a558c9 Importing fix for bug 1921 from stable. 2004-09-09 11:55:00 +00:00
defacer
deaa884234 Full XHTML 1.0 compliance. I hope I didn't miss anything. 2004-09-09 10:41:23 +00:00
defacer
8f87188ce8 Fix for bug 1882:
Added empty index.html file to prevent directory contents disclosure.
2004-09-03 10:58:55 +00:00
defacer
e749554efa Merged from MOODLE_14_STABLE 2004-08-30 11:46:08 +00:00
defacer
09d36284d1 Importing fixes from MOODLE_14_STABLE 2004-08-26 10:52:00 +00:00
defacer
98051917e8 There's a "parse error" report (http://moodle.org/mod/forum/discuss.php?d=11423)
which I cannot reproduce in a flash, but maybe this should fix it? I just added
some semicolons after the echoes and before the PHP closing tag.
2004-08-23 12:16:29 +00:00
defacer
8f89658261 Fix for bug 1494:
Calendar events in day view now show their start and end times. The only thing
I 'm not satisfied with is that they also show the full start and end dates,
even if it's not really needed (e.g. for a 15:00 -> 17:00 event). Still, it's
loads better than only showing the start time.
2004-08-22 17:19:24 +00:00
moodler
77ec198a93 Fixed typo when printing footer 2004-08-12 07:48:00 +00:00
moodler
fd5594a00b Fixed some PHP 5 notices 2004-08-12 07:42:52 +00:00
moodler
91a0974597 Default calendar to 21 days 2004-08-05 09:28:44 +00:00
defacer
9c81fc35a9 Fix a couple of notices that I just... noticed :-) 2004-08-03 07:34:03 +00:00
moodler
2eb68e6f6b Various cleanups of the installation process 2004-07-29 18:01:32 +00:00
defacer
ef618501bb Fix for bug 1624:
Events that span more than one month now have their duration shown correctly in
each day of all subsequent months. For some reason I didn't quite figure out,
this happened till now only on events that spanned at least THREE months. Whatever...

Also, removed a small unused part of a global statement in view.php.
2004-07-09 13:39:34 +00:00
defacer
b1bd2cf0c1 Fix for bug 1527:
The New Event button is back in day view. Silly mistake, $USER wasn't taken
from the globals and thus it always thought you weren't logged in.
2004-06-23 09:53:23 +00:00
defacer
1cbcc2c3d0 Fix for bug 1528:
Now the edit icon in day view for course activity events takes you to the
activity update form, and not the view. You can still go to the activity view
by clicking the activity name in the event title.
2004-06-23 09:43:00 +00:00
defacer
76416b4bac Small fix: removed one notice 2004-06-17 08:21:09 +00:00
moodler
fc6a0c9fff Re-fixed bug 1488 hack 2004-06-04 07:21:15 +00:00
moodler
7613890851 BRANCH MERGE
These are the changes from MOODLE_13_STABLE, merged into trunk

The tag MOODLE_13_MERGED on the MOODLE_13_STABLE branch now refers to this point

The biggest changes here are the fixes for HTML editor in all standard modules
2004-06-04 06:17:30 +00:00
defacer
7b38bfa6fd More changes to time calculations. Now they are done as indeed the prophet Martin
foresaw that they could be, that is simple and elegant. The previous solution did the
job I guess, but it was based on a naive approach...
2004-06-02 11:21:14 +00:00
defacer
9d567178e2 Fixed a bug: up till now, day boundaries were calculated modulo 86400, which
is correct only for GMT+0 timezones. Fixed it in upcoming events displays to
separate days as they are in the user's timezone, will continue to pursue this.
2004-06-02 09:15:07 +00:00
defacer
08cebf196e Fix all requires() to use absolute paths (Sun boxes have problems with relative
paths, it seems). Also, login is required to view the calendar of any course
other than the site.
2004-06-02 08:13:26 +00:00
defacer
f52f741334 Fix for bug 1503:
Things are now easier for visitors and guests. We should do some regression
testing though: if you are a visitor or a guest and then you login (either
after browsing the site or immediately by typing a Moodle URL in the location
bar, without having a Moodle session at all), do user events always get shown
correctly? Does anything abnormal happen to the courses filter?
2004-06-01 14:12:26 +00:00
defacer
61ddaf3bce Removed useless stuff 2004-06-01 12:02:13 +00:00
defacer
9cb8879b6b Minor changes, Martin's fix for bugs 1502, 1184 (duplicated) confirmed. 2004-06-01 10:40:20 +00:00
moodler
c9b05b32fa Some fixes to HTML quoting in calendar popups.
Fixes bug 1502.
2004-05-31 05:11:22 +00:00
gustav_delius
c589ed7fd8 A hack to fix bug 1488. html editor needs $course object defined. Should perhaps be solved differently in the long run. 2004-05-29 16:24:38 +00:00
defacer
89adb17442 Merging the changes from 1.4 dev branch (site index blocks + various bugfixes) 2004-05-28 10:53:54 +00:00
moodler
520491b633 FIxed line feeds 2004-05-27 05:45:30 +00:00
defacer
7bd1677c72 Fix for bug 1462:
Warnings removed.
2004-05-26 11:03:27 +00:00
moodler
707fbef498 Fixed defaulting $SESSION->cal_show_user 2004-05-25 06:36:09 +00:00