MDL-18375 calendar: huge refactor of the initial patch

1) Moved the calendar types location to a sub-folder in the calendar directory.
2) Removed/moved language strings.
3) Removed calendar types that should be downloaded as plugins.
4) Removed a Non-English language pack for the Gregorian calendar type that
should be downloaded separately.
5) Removed custom files responsible for checking for updates and uninstalling
calendar types, which should be done by core.
6) Removed JS from the calendar_month block as there is no non-JS alternative
provided and the JS written does not make use of the YUI library to ensure
multiple browser support.
7) Removed code from the base class responsible for creating timestamps that
are saved in the DB.
8) Added PHPDocs.

Note: In the original patch we are editing core functions responsible for saving
time in the database in the calendar base class. This is very dangerous, we do
not want to touch these functions as it could cause a complete fubar of the
database. There are places we are forcing the use of the gregorian calendar as
we are passing dates generated by the PHP date function, where as sometimes
we pass dates from usergetdate (which was being overwritten to return the
date specific to the calendar). We can not expect third party modules to
change the calendar type depending on the format they pass to these functions.
This commit is contained in:
Mark Nelson 2013-06-10 17:35:55 +08:00
parent 6dd59aabfa
commit 2f00e1b245
45 changed files with 606 additions and 1931 deletions

View file

@ -93,6 +93,7 @@ $string['export'] = 'Export';
$string['exportbutton'] = 'Export';
$string['exportcalendar'] = 'Export calendar';
$string['for'] = 'for';
$string['forcecalendartype'] = 'Force calendar';
$string['fri'] = 'Fri';
$string['friday'] = 'Friday';
$string['generateurlbutton'] = 'Get calendar URL';
@ -138,6 +139,7 @@ $string['pollinterval'] = 'Update interval';
$string['pollinterval_help'] = 'How often you would like the calendar to update with new events.';
$string['preferences'] = 'Preferences';
$string['preferences_available'] = 'Your personal preferences';
$string['preferredcalendar'] = 'Preferred calendar';
$string['pref_lookahead'] = 'Upcoming events look-ahead';
$string['pref_lookahead_help'] = 'This sets the (maximum) number of days in the future that an event has to start in in order to be displayed as an upcoming event. Events that start beyond this will never be displayed as upcoming. Please note that <strong>there is no guarantee</strong> that all events starting in this time frame will be displayed; if there are too many (more than the "Maximum upcoming events" preference) then the most distant events will not be shown.';
$string['pref_maxevents'] = 'Maximum upcoming events';