Commit graph

599 commits

Author SHA1 Message Date
Andrew Nicols
7b7bf31d4c MDL-60587 calendar: Add helper to setup the calendar_information 2017-11-02 21:49:28 +08:00
Andrew Nicols
e3491a093a MDL-60558 calendar: Upcoming block should use the right template 2017-11-02 11:55:49 +08:00
Damyon Wiese
ed6d81c9f7 MDL-59973 calendar: Remove duplication
The function calendar_get_default_courses is responsible for loading all variants of calendar
course lists.

1 the list of courses that the current user will see events for in the site calendar.
2 the list of courses the current user will see when they are looking at a specific course calendar.
3 the list of course calendars the current user can create / edit events in.
2017-10-26 14:39:35 +08:00
Damyon Wiese
01ed53df0f MDL-59973 calendar: Only load required fields
When loading courses for the course filter on the calendar, we only need the id and shortname.
2017-10-26 14:21:29 +08:00
Damyon Wiese
a5327e449d MDL-59973 calendar: Admin calendar course lists
Consolidate the logic for the list of courses an admin will see in the calendar.

They will see all courses if calendar_admincanseeall is enabled.

They will see only courses they are enrolled in of calendar_admincanseeall is not enabled.

They will also see the current course, if they are admin and it is not already in the list.

This applies to the course selector and the create and update event forms.

The calendar link in the navigation block has also been changed to link to the current course calendar instead of the global
one.
2017-10-26 13:28:00 +08:00
Jake Dallimore
19fa690c3f MDL-60429 calendar: fix for updating event course and group
The property courseid and groupid might not be set, so if updating,
use the existing value if a new value wasn't specified.
2017-10-25 12:45:54 +08:00
Jake Dallimore
e3a247849b Merge branch 'MDL-60561-master' of git://github.com/andrewnicols/moodle 2017-10-25 12:45:53 +08:00
Simey Lameze
6428642adb MDL-60429 calendar: update group and course id for repeated events 2017-10-24 13:46:40 +08:00
Andrew Nicols
349d379616 MDL-60561 calendar: Increase event limit for calendar
It's quite common to have more than 50 events in a calendar month, but
we do not want to change the default value when the API is called in
other ways.
2017-10-24 13:31:05 +08:00
David Monllao
50a5feff05 Merge branch 'MDL-60406-master' of git://github.com/lameze/moodle 2017-10-20 04:38:06 +02:00
Simey Lameze
5a11e7f5f3 MDL-60406 core_calendar: proper calendar dates calculation 2017-10-20 10:32:41 +08:00
David Monllao
f2732541e8 Merge branch 'MDL-60444-master' of git://github.com/andrewnicols/moodle 2017-10-19 15:41:56 +02:00
Simey Lameze
05187c589d MDL-60468 calendar: fix event type defaults logic 2017-10-18 15:41:05 +08:00
Andrew Nicols
4e84059e8f MDL-60444 calendar: Correct variable name 2017-10-16 10:19:14 +08:00
Simey Lameze
580a168a15 MDL-59921 calendar: fix wrong array assumptions 2017-10-11 16:26:51 +08:00
Jun Pataleta
1b3f3d5761 Merge branch 'MDL-60090-master' of git://github.com/andrewnicols/moodle 2017-10-11 15:58:46 +08:00
Andrew Nicols
a7ed05e720 MDL-60090 calendar: Add eventtype icon and truncate 2017-10-11 14:03:01 +08:00
Damyon Wiese
3f94d19060 Merge branch 'MDL-60092-master' of git://github.com/lameze/moodle 2017-10-11 14:02:52 +08:00
Simey Lameze
ca14f182fc MDL-60092 calendar: add missing upcoming view logic 2017-10-11 11:42:41 +08:00
Damyon Wiese
32d641c009 Merge branch 'MDL-60092-master' of git://github.com/lameze/moodle 2017-10-10 17:17:56 +08:00
Simey Lameze
4259387ebb MDL-60092 core_calendar: remove unused calendar_get_upcoming method 2017-10-10 13:55:35 +08:00
Simey Lameze
522b84be04 MDL-60092 block_calendar_upcoming: convert to template 2017-10-10 13:55:35 +08:00
Simey Lameze
86244e9102 MDL-59921 calendar: replace selector for groups events 2017-10-09 09:51:14 +08:00
Simey Lameze
4b9c662b2a MDL-59921 calendar: replace selector for course events 2017-10-09 09:51:14 +08:00
Andrew Nicols
3ea4f446bc MDL-60096 calendar: Add JS for day view 2017-10-05 16:54:47 +08:00
Jun Pataleta
96c27b3658 Merge branch 'MDL-59751-master-v2' of git://github.com/lameze/moodle 2017-10-05 14:53:31 +08:00
Simey Lameze
2ca4dc8a2e MDL-59751 core_calendar: make upcoming view use AJAX 2017-10-05 14:23:02 +08:00
Andrew Nicols
86679cb1ae MDL-59890 calendar: Use calculated context instead of guessing 2017-10-05 10:14:35 +08:00
Andrew Nicols
303d649aca MDL-59890 calendar: Correct context checks for edit test 2017-10-04 11:16:06 +08:00
Andrew Nicols
d097bfdda3 MDL-59890 calendar: Select current category when adding event 2017-10-04 11:16:05 +08:00
Andrew Nicols
936235133a MDL-59890 calendar: Support for categories in legacy event fetch 2017-10-03 23:22:19 +08:00
Andrew Nicols
d0e56d847a MDL-59890 calendar: Display category events on calendars 2017-10-03 23:22:18 +08:00
Andrew Nicols
02d0c4355e MDL-59890 calendar: Stop adding time for mini view - not used 2017-10-03 21:28:31 +08:00
Andrew Nicols
0085b0ea3c MDL-59890 calendar: Add support for the category to vault 2017-10-03 21:28:31 +08:00
Andrew Nicols
7d0a866c95 MDL-59890 calendar: Accept categories in calendar_info 2017-10-03 21:28:31 +08:00
Andrew Nicols
05f184bb7f MDL-59890 calendar: Add ability to add category events 2017-09-29 08:57:08 +08:00
Simey Lameze
c602220798 MDL-59750 core_calendar: fix minithree logic on get_view 2017-09-20 13:25:19 +08:00
Simey Lameze
146d371344 MDL-59750 calendar: render day view using templates 2017-09-20 12:50:12 +08:00
Ryan Wyllie
39fe5929c6 MDL-59922 calendar: allow editing of activity events 2017-09-19 06:48:57 +00:00
Andrew Nicols
5ff6114623 MDL-60065 calendar: Deprecate calendar_get_mini and friends
This is no longer used and should be deprecated.
2017-09-19 13:21:58 +08:00
Andrew Nicols
6038d62625 MDL-60065 calendar: Add threemonth view 2017-09-18 12:04:48 +08:00
Andrew Nicols
fee025ecbb MDL-60065 calendar: Control navigation on mini 2017-09-18 12:04:48 +08:00
Jun Pataleta
63b384d02a Merge branch 'MDL-59919-master' of git://github.com/ryanwyllie/moodle 2017-09-12 14:58:06 +08:00
Eloy Lafuente (stronk7)
6e49ef0d94 Merge branch 'MDL-59934-master' of git://github.com/ryanwyllie/moodle 2017-09-11 23:19:48 +02:00
Andrew Nicols
7aaca085fb MDL-59392 calendar: Deprecate old event filters 2017-09-11 12:45:47 +08:00
Andrew Nicols
fc60d3194f MDL-59392 calendar: Apply event filters to main calendar view 2017-09-11 12:45:47 +08:00
Andrew Nicols
c8b6e9ab34 MDL-59392 calendar: Switch to templates in the cal block
This commit adds a set of templates for the calendar month block, and
the events filter. The same data exporters used in the main calendar
view are utilised and the same logic.

Some additional data was added to the exporters, and in the long term
this will be used in the main monthly view so I did not feel it was
prudent to strip it out into a different view of the model.

AMOS BEGIN
 MOV [monthnext,access],[monthnext,calendar]
AMOS END
2017-09-11 12:45:46 +08:00
Andrew Nicols
2281a835c9 MDL-59392 calendar: Move template to parent Node 2017-09-11 09:14:36 +08:00
Ryan Wyllie
02e091b1f3 MDL-59934 calendar: remove more button from event form modal 2017-09-08 02:45:54 +00:00
Ryan Wyllie
ea5f7707e7 MDL-59919 calendar: add file support to event form 2017-09-07 01:38:43 +00:00