939 Commits

Author SHA1 Message Date
Mark Nelson
ed0f8d3ca3 MDL-58101 block_myoverview: don't display link if inactionable
Part of MDL-55611 epic.
2017-04-03 11:36:33 +08:00
Mark Nelson
c91b4c0278 MDL-57730 core_calendar: fixed failing unit tests
Part of MDL-55611 epic.
2017-04-03 11:36:33 +08:00
Mark Nelson
bb19f80414 MDL-57730 core_calendar: handle '0' as a courseid
User overrides set the course id as 0 in the events table
(Moodle can be stupid). We need to deal with this.

Part of MDL-55611 epic.
2017-04-03 11:36:33 +08:00
Mark Nelson
5e6e3babf4 MDL-57730 core_calendar: fixed incompatibility with PHP 5.x
Also removed unused function and fixed PHPDocs.

Part of MDL-55611 epic.
2017-04-03 11:36:33 +08:00
Cameron Ball
aa457b7dee MDL-57730 core_calendar: Action interface aware of actionability
We need a way to decide whether an action can currently be completed
(e.g., an assignment where submissions are not yet open can not
be actioned, even though it may be displayed on the upcomming events
list).

To do this, the action interface now contains an is_actionable method.

Part of MDL-55611 epic.
2017-04-03 11:36:33 +08:00
Cameron Ball
42ec9f0d63 MDL-57730 core_calendar: Map action events to legacy events
Part of MDL-55611 epic.
2017-04-03 11:36:32 +08:00
Cameron Ball
2a5cce61ba MDL-57730 core_calendar: Allow modules to control event visibility
By implementing the mod_{modname}_core_calendar_is_event_visible callback
a module can decide whether or not a user should see an event.

Part of MDL-55611 epic.
2017-04-03 11:36:32 +08:00
Ryan Wyllie
4139f1311f MDL-57502 core_calendar: get calendar action events tests
Part of MDL-55611 epic.
2017-04-03 11:36:08 +08:00
Mark Nelson
c0f877fa62 MDL-57502 core_calendar: add get calendar action events web service
Part of MDL-55611 epic.
2017-04-03 11:36:07 +08:00
Ryan Wyllie
984355ce57 MDL-57502 core_calendar: add calendar event exporters
Part of MDL-55611 epic.
2017-04-03 11:36:07 +08:00
Ryan Wyllie
392d6a49f8 MDL-57502 calendar: add local api class for internal use
Part of MDL-55611 epic.
2017-04-03 11:36:07 +08:00
Ryan Wyllie
1575194a5c MDL-57750 calendar: tests for api get_action_events_by_timesort
Part of MDL-55611 epic.
2017-04-03 11:36:07 +08:00
Ryan Wyllie
ca21b08de8 MDL-57750 calendar: add api function to get action events by timesort
Part of MDL-55611 epic.
2017-04-03 11:36:07 +08:00
Ryan Wyllie
18a96325a7 MDL-57750 calendar: calendar event vault tests
Part of MDL-55611 epic.
2017-04-03 11:36:07 +08:00
Ryan Wyllie
84d865d69b MDL-57750 calendar: add event vault
Part of MDL-55611 epic.
2017-04-03 11:36:07 +08: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
Cameron Ball
0efe462b12 MDL-57442 core_calendar: Fix incorrect copyright notice
Part of MDL-55611 epic.
2017-04-03 11:36:07 +08:00
Cameron Ball
c5478a5b6c MDL-57442 core_calendar: Update proxies to accept a 'base' class
The base class can contain information we would prefer not to
have to hit the database for.

Part of MDL-55611 epic.
2017-04-03 11:36:07 +08:00
Cameron Ball
33be1706e1 MDL-57442 core_calendar: Add missing return to event factory interface docs
Part of MDL-55611 epic.
2017-04-03 11:36:07 +08:00
Cameron Ball
4c19dc323a MDL-57442 core_calendar: Add missing method to times interface
Also adds a missing member to event_times implementation.

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
Cameron Ball
e46efe3a72 MDL-57599 core_calendar: Add action event class
This patch adds a "regular" calendar event class, and a simple extension
of it which we are calling an action event.

Part of MDL-55611 epic.
2017-04-03 11:35:38 +08:00
Simey Lameze
f7ce6eab7e MDL-57545 core_calendar: add missing record snapshots
This commit adds missing add_record_snapshot() calls everywhere calendar_event_updated is triggered.

Part of MDL-55611 epic.
2017-04-03 11:35:38 +08:00
Simey Lameze
a22fa7cb68 MDL-57545 core_calendar: remove visibility fields from calendar events
Part of MDL-55611 epic.
2017-04-03 11:35:38 +08:00
Mark Nelson
c45266d115 MDL-57545 core_calendar: trigger update event when toggling visibility
Part of MDL-55611 epic.
2017-04-03 11:35:38 +08:00
Mark Nelson
5019e69588 MDL-57578 core_calendar: removed the function calendar_event_hook()
Part of MDL-55611 epic.
2017-04-03 11:33:55 +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
Jun Pataleta
02edbe1e30 MDL-57658 calendar: Remove BYDAY filtering dependence on NumberFormatter 2017-03-15 14:18:27 +08:00
Jun Pataleta
620ffacea1 MDL-57658 calendar: Set sort order for fetched DB records 2017-03-15 11:18:21 +08:00
Dan Poltawski
bcd510e36d Merge branch 'MDL-57658-master-3' of git://github.com/junpataleta/moodle 2017-03-14 16:06:19 +00:00
Andrew Nicols
815c6b203f MDL-51853 calendar: Whitespace fix 2017-03-13 09:18:07 +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
8ddc656739 MDL-57658 calendar: Fix rrulemanager and unit tests
Issues fixed:
* Additional rule validations.
* Rewrote recurrence logic.
* Additional unit tests, especially from the examples in the RFC.
* The date format "YmdThis" results into an incorrect date for the
  "UNTIL" parameter. The literal "T" should be escaped, and a literal
  "Z" is also needed at the end of the format string to indicate UTC.
* Implemented handling of negative modifier values for BYxxx rules.
* Implemented handling of BYWEEKNO, BYYEARDAY, BYSETPOS, BYHOUR,
  BYMINUTE, BYSECOND rules.
2017-03-09 16:10:08 +08: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
ddc1306c97 MDL-57557 calendar: remove YUI module 2017-02-17 14:05:30 +00:00
Dan Poltawski
6e24853aa1 MDL-57557 calendar: convert from yui module to bootstrap popovers 2017-02-17 14:05:29 +00:00
Eloy Lafuente (stronk7)
777361983c Merge branch 'wip-mdl-56519-m' of https://github.com/rajeshtaneja/moodle 2017-01-11 02:42:29 +01:00
Rajesh Taneja
57bee542ab
MDL-56519 behat: Fixed lint errors 2017-01-03 09:12:54 +08:00
Dan Poltawski
5fd78ba412 MDL-57532 calendar: tidy up button grouping 2017-01-02 10:44:35 +00:00
Stephen Bourget
d1ee1e5f55 MDL-57532 calendar: Add missing bootstrap classes 2016-12-26 11:33:35 -05: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