Commit graph

430 commits

Author SHA1 Message Date
Andrew Nicols
6628153eb3 Merge branch 'MDL-58736-master' of git://github.com/cameron1729/moodle 2017-05-04 14:33:27 +08:00
Cameron Ball
eeb27f03bd
MDL-58736 core_calendar: Revert calendar_get_events to 3.2 implementation
We modified calendar_get_events in a non backwards compatible way
so instead of fixing that, an easier approch is to simply revert
it to the 3.2 implementation. This should be fine since the way
to get events is going to change in an upcomming release, and we
had to swap all occurences of calendar_get_events in core with
calendar_get_legacy_events to make sure the calendar and overview match.
2017-05-04 12:19:35 +08:00
Jun Pataleta
c9d775fc92 MDL-58803 calendar: Use fully qualified name for call to rrule_manager 2017-05-04 08:58:11 +08:00
Cameron Ball
a776415d55
MDL-58578 core_calendar: Properly respect priorities on overview
Prior to this patch, if a user was in two groups, and an override
existed for both groups in an assignment the override
visually lower on the override list would be displayed on the
overview, whereas the one visually higher would be displayed
in the assignment grading table.
2017-04-27 15:15:12 +08:00
Jun Pataleta
22753c8c5c MDL-58566 calendar: Move \core_calendar\local\api::get_legacy_events()
* Move and rename \core_calendar\local\api::get_legacy_events() to
  calendar_get_legacy_events() in calendar/lib.php.
* Fix the parameter-normalising callback function in
  calendar_get_legacy_events() so that it correctly handles false values
  by returning an empty array instead of it returning a non-empty array
  that contains an empty element.
2017-04-18 10:32:09 +08:00
Mark Nelson
2229368a3c MDL-58424 core_calendar: moved api::get_events
This function was moved to local_api::get_legacy_events.

Also removed the calendar/classes/api.php file since it no longer contained any
functionality and added unit tests for local_api::get_legacy_events (a copy of
the unit tests for calendar_get_events).

Part of MDL-55611 epic.
2017-04-04 11:01:53 +01:00
Mark Nelson
23a29de7ee MDL-58424 core_calendar: moved logic from api.php to lib.php
Also moved related PHPUnit tests.

Part of MDL-55611 epic.
2017-04-04 11:01:52 +01:00
Mark Nelson
10515e152d MDL-58424 core: undeprecated calendar_* functions
Part of MDL-55611 epic.
2017-04-04 11:01:52 +01:00
Mark Nelson
2a8e41b990 MDL-58432 core_calendar: allow event properties to be null
Part of MDL-55611 epic.
2017-04-04 11:01:49 +01:00
Mark Nelson
e1cd93ce20 MDL-58423 core_calendar: moved \core_calendar\event class
Part of MDL-55611 epic.
2017-04-04 11:01:49 +01:00
Cameron Ball
5ca71c2dc3 MDL-57442 core_calendar: Allow course modules to create actions for events
Course modules can now implement the function mod_{module}_core_calendar_provide_event_action
which allows them to return an action to attach to an event.

Part of MDL-55611 epic.
2017-04-03 11:36:07 +08:00
Mark Nelson
12cbce0aa3 MDL-57888 core_calendar: moved functions from calendar/lib.php
Part of MDL-55611 epic.
2017-04-03 11:35:38 +08:00
Mark Nelson
e057f279e4 MDL-57497 core_calendar: added new calendar event class
Moved calendar_event class to new location using replaceclasses.php

Part of MDL-55611 epic.
2017-04-03 11:33:55 +08:00
Damyon Wiese
3e6adcd69c MDL-40759 icons: Rename activity_icon
image_icon is a better name because there are some valid uses for these other than for activity icons.

E.g. Old JS code that is not worth re-writing.
2017-03-17 15:52:18 +08:00
Damyon Wiese
663640f5b3 MDL-40759 icons: convert uses of pix_url to pix_icon
Also change filepicker to use scaled svgs instead of sets of custom pngs. The svgs are taken from font-awesome.
2017-03-17 15:52:17 +08:00
Andrew Nicols
4c6edf9dd8 Merge branch 'MDL-51853_m33v3' of https://github.com/sbourget/moodle 2017-03-13 08:40:45 +08:00
Marina Glancy
6e65554ea1 MDL-58010 user: allow to update only whitelisted user preferences 2017-03-10 18:04:47 +00:00
Andrew Nicols
5286837617 Merge branch 'MDL-55956-master-5' of git://github.com/junpataleta/moodle 2017-03-10 18:04:46 +00:00
Eloy Lafuente (stronk7)
d8a70ba35f Merge branch 'MDL-57557-master' of git://github.com/danpoltawski/moodle 2017-03-10 18:03:53 +00:00
Jun Pataleta
f113169573 MDL-55956 calendar: Include courses parameter in subquery conditions 2017-03-08 15:30:04 +08:00
Jun Pataleta
f52459bbbe MDL-55956 calendar: Show only one of duplicate events relevant to user
If there are multiple, non-repeating events with the same module name,
instance and event type. The most specific event or the event with the
highest priority will be shown.
The ordering of event priorities:
  User override events > Group override events > Course events.
If there are no user override events and there are multiple group
overrides for an event, then the one with the highest priority will be
shown.
2017-03-07 11:33:17 +08:00
Jun Pataleta
ca75ec4fe0 MDL-55956 db: Add priority column for event table
* New priority column in order to enable the rendering of a single,
relevant calendar event for a module that has user/group overrides.
* Insert refresh_mod_calendar_events_task record to task_adhoc
table to upgrade existing calendar events for mod plugins via cron
after upgrade process.
2017-03-06 16:15:26 +08:00
Stephen Bourget
c3feaf269e MDL-51853 calendar: allow entries imported from a file to be updated. 2017-02-28 10:14:25 -05:00
Dan Poltawski
6e24853aa1 MDL-57557 calendar: convert from yui module to bootstrap popovers 2017-02-17 14:05:29 +00:00
Dan Poltawski
988a031a61 Merge branch 'MDL-54996_m33v1' of https://github.com/sbourget/moodle 2016-12-20 09:19:23 +00:00
Stephen Bourget
ef36d240c1 MDL-54996 Calendar: Fix dates for future multi-day events
Thanks to Martin Cunliffe for providing the fix
2016-12-17 09:48:41 -05:00
Stephen Bourget
455835809d MDL-55715 calendar: Only update events from the current subscription
The iCal import should only update calendar events from the current
subscription not any subscription that contains the same event.
2016-12-13 21:36:08 -05:00
Adrian Greeve
7a33494d71 MDL-56120 calendar: Fix disabled modules showing events.
calendar_get_events now checks for disabled activities
and only shows events for active modules.
2016-11-07 16:47:14 +08:00
Frederic Massart
ed7844b5f4 MDL-55224 theme_noname: RTL adjustments for auto-flipping era
Part of MDL-55071
2016-09-23 10:49:49 +01:00
Stephen Bourget
9629790b1b MDL-52798 calendar: Move calendar preferences to a user preferences page
This is based on the work of Shamim Rezaie and will also resolve
MDL-52375 and MDL-50378
2016-09-06 21:29:34 -04:00
Stephen Bourget
756e3c55c0 MDL-44369 Calendar: add events for subscriptions 2016-07-29 08:56:20 -04:00
Juan Leyva
833be5e410 MDL-54629 webservice: Change required parameters in external_format_text
component, filearea and itemid are now optional parameters.
In some contexts those parameteres are not necessary because is not
required to do a file rewrite via file_rewrite_pluginfile_urls
2016-06-21 12:16:25 +01:00
Juan Leyva
871988b0b4 MDL-54049 core_message: Add missing external format text 2016-05-04 12:52:45 +02:00
David Balch
02c8a8366b MDL-53027 calendar: Fix false empty result from calendar_get_events(). 2016-02-24 18:38:25 +08:00
Adrian Greeve
03af7e696e MDL-52697 calendar: Fixed notice for $name not being defined. 2016-01-08 11:42:20 +08:00
Juan Segarra Montesinos
6349d1e062 MDL-52258 calendar: show event duration on block
Add class .duration_finish to days when an event with duration
finishes. Removes the .muted class from weekend days. Adds
$daytime for the popup title. Tests duyrationbyday too in order
to report no events for a day. Adds endtime suffix to the finish
date of an event with duration.
2016-01-04 09:40:13 +01:00
Ryan Wyllie
4f2ff25ed1 MDL-52258 calendar: show event duration on block
Highlight the days on the calendar for the entire duration
of the event, not just the start day. The days are highlighted
with the same colour as the starting day and will also show
the event popup on hover.
2015-12-10 11:17:25 +01:00
Ankit Agarwal
2149326b8c MDL-50049 deprecation: Remove usage of deprecated api and cleanup 2015-06-29 17:15:50 +05:30
Dan Poltawski
234e929e2b MDL-49684 calendar: fix timezone reseting. 2015-04-08 12:24:44 +01:00
Petr Skoda
d6e7a63d9a MDL-49684 timezones: rewrite timezone support
This patch replaces all homegrown timezone
stuff with standard PHP date/time code.

The main change is the introduction of core_date
class that returns normalised user and server
timezones. From now on nobody should be using
$CFG->timezone or $user->timezone directly!

Other new features and fixes:
* admins are prompted for timezone during install
* editing of other users is finally fixed
* timezones are displayed in user profile
* new $this->setTimezone() in phpunit
* time locale is now automatically reset in phpunit
* timezone is now automatically reset in phpunit
* phpunit has Australia/Perth as default timezone
2015-04-06 13:53:51 +12:00
Dan Poltawski
bd65120bff Merge branch 'wip_MDL-49631_29_utfregex' of https://github.com/skodak/moodle 2015-03-24 11:10:19 +00:00
Petr Skoda
e737c2ff89 MDL-49631 fix incorrect whitespace remplacements 2015-03-23 17:40:15 +13:00
Marina Glancy
c96534600d MDL-27074 calendar: display group name for group events 2015-03-23 10:16:55 +08:00
Eloy Lafuente (stronk7)
3fb98d64e2 Merge branch 'MDL-48943-master' of git://github.com/andrewnicols/moodle 2015-03-11 12:02:49 +01:00
Andrew Nicols
17488fd31a MDL-48943 calendar: Rewrite calendar popup JS
Single instance model to support popup of calendar overlay information in a
more memory-efficient, and less DOM-heavy fashion. This also allows for
future expansion - e.g. easier loading of new calendar content.
2015-03-04 10:43:33 +08:00
Ankit Agarwal
575e27f31e MDL-38485 calendar: Carry over line breaks on imports
Thanks to Matthias Schwabe for the patch suggestion
2015-02-19 14:15:22 +05:30
Dan Poltawski
6cc38fb64d MDL-48960 output: use nofollow attribute to stop crawling invalid links
Both the calendar set url and switch theme links are displayed to
non-logged in users which mean they get crawled by search bots. This
prevents the search bots following these links.
2015-02-05 08:13:19 +00:00
Dan Poltawski
ffd95d4420 Revert "Merge branch 'patch-1' of https://github.com/jrchamp/moodle"
This reverts commit d61ecfffe5, reversing
changes made to e04cf8d83f.
2014-12-23 10:42:47 +00:00
Dan Poltawski
d61ecfffe5 Merge branch 'patch-1' of https://github.com/jrchamp/moodle 2014-12-22 13:37:52 +00:00
jrchamp
efa2b9b35c MDL-48591 calendar: Mini Cal Display DST Events 2014-12-18 09:32:46 -05:00