Commit graph

1361 commits

Author SHA1 Message Date
Simey Lameze
5809488bb6 MDL-63999 calendar: double escape event name on templates 2018-11-16 13:59:29 +08:00
Mihail Geshoski
df0a4ec014 MDL-63684 core_calendar: Fix test_get_contexts_for_userid() test
This issue is part of the MDL-62560 Epic.
2018-10-31 14:12:08 +08:00
Mihail Geshoski
8782043946 MDL-63684 core_calendar: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-31 14:12:08 +08:00
Shamim Rezaie
8baf412ef7 MDL-62960 calendar: Visuall indicator for valid course event drop zones 2018-10-16 13:09:33 +11:00
Shamim Rezaie
86eff20271 MDL-62960 calendar: Rename get_module_timestamp_min/max_limit methods
The methods get_module_timestamp_min_limit() and get_module_timestamp_max_limit()
are doing generic stuff and can be used for other calendar event types as well.
I have renamed them to get_timestamp_min_limit() and get_timestamp_max_limit() respectively.
2018-10-16 13:09:26 +11:00
Shamim Rezaie
4dee91aabf MDL-62960 calendar: Added range check callback for course events
Added core_calendar_get_valid_event_timestart_range callback for course events
2018-10-16 13:04:05 +11:00
Luca Bösch
b0147a4737 MDL-63241 calendar: Add missing table alias in SQL query. 2018-10-07 21:45:22 +02:00
Tim Schroeder
f7035a839d MDL-63119 calendar: now showing event end in modal
When clicking on an event in the month view, a modal opens with
    information about it. That modal did previously only show the start time
    of the event. It now also shows the end (if the event has one).
2018-09-18 13:41:43 +08:00
Neill Magill
6a87753e12 MDL-62944 calendar: Clarify the intended use of $checkcapability 2018-09-04 12:19:12 +02:00
Simey Lameze
d6cbf8b8fb MDL-62944 calendar: Fix actionevent logic on template
During the calendar work, we have added the feature of
drag and drop activity event or "action events".

The problem at that time was, action events could not be
editable through the calendar UI, but should be allowed
to drag and drop. So, we couldn't use the return of
calendar_edit_event_allowed() because it can return true
(in case of teachers, that have permission to change the
activity) and the attribute isactionevent was created to
control on the UI if the user is viewing an action event.

So what my patch does is just add the check if we are
viewing an action event, and in this case, it won't display
the cog to edit that event.
2018-08-31 10:17:53 +01:00
Shamim Rezaie
fe1ae23939 MDL-58768 calendar: Add $requestinguser to the container class
The requesting user is not always the same as the current user. The container class now allows a different user
to be set as the requesting user. All capability checks are done against the requesting user.

Also, the $requestinguser is passed to core_calendar_provide_event_action and core_calendar_is_event_visible
callback functions. These callback functions need to be updated in all activity modules to accept a $user parameter.
2018-07-31 16:15:38 +10:00
Shamim Rezaie
526e3e8c97 MDL-58768 Calendar: Update get_raw_events_legacy_implementation
Update get_raw_events_legacy_implementation to work with the passed $users parameter instead of the logged in user.
Also, fixed a bug where get_raw_events_legacy_implementation was failing when $users was set to true, and a list of
$groups was given.
2018-07-31 16:15:37 +10:00
Shamim Rezaie
8668391630 MDL-58768 Calendar: Added user param to calendar_set_filters
Decoupled calendar_set_filters from $USER.
Also removed the backward compatibility bit from the function because it was a left over.
2018-07-31 16:15:06 +10:00
Shamim Rezaie
f35e7a0eeb MDL-58768 Calendar: Added userid param to calendar_get_default_courses 2018-07-31 16:07:15 +10:00
Andrew Nicols
a1c3aedf5b Merge branch 'MDL-60826-35-fix' of https://github.com/lameze/moodle into MOODLE_35_STABLE 2018-07-25 13:42:58 +08:00
Simey Lameze
a2c9e82c42 MDL-60826 calendar: fix group event type logic 2018-07-25 12:54:50 +08:00
Andrew Nicols
6aedf45bee Merge branch 'MDL-60826-35' of git://github.com/lameze/moodle into MOODLE_35_STABLE 2018-07-25 09:19:43 +08:00
Simey Lameze
fa9fffdc9a MDL-60826 calendar: further performance improvements
This commit does few tweaks and other performance improvements to
calendar_get_allowed_event_types to be more efficient. Also some minor
queries optimizations on the event form to fetch the list of courses
without groups.
2018-07-25 08:59:04 +08:00
Simey Lameze
7ad1d28554 MDL-60826 calendar: restrict course fields to be retrieved 2018-07-25 08:59:04 +08:00
Simey Lameze
3f3385c46a MDL-60826 calendar: update manage subscription page to use new function 2018-07-25 08:59:04 +08:00
Simey Lameze
11ebc149ed MDL-60826 calendar: lazy load groups on event form 2018-07-25 08:59:04 +08:00
Simey Lameze
c985ad6263 MDL-60826 calendar: tests for calendar_get_allowed_event_types 2018-07-25 08:59:04 +08:00
Simey Lameze
6a6d683283 MDL-60826 calendar: introduce calendar_get_allowed_event_types function 2018-07-25 08:59:04 +08:00
Andrew Nicols
bb05597274 MDL-62949 calendar: Fix behat nav to calendar 2018-07-20 11:48:44 +08:00
Simey Lameze
cdc9e56198 MDL-62813 calendar: add behat test for form validation 2018-06-28 14:12:18 +08:00
Simey Lameze
0e0fd72d98 MDL-62813 calendar: fix dmlreadexception on event form 2018-06-28 14:12:18 +08:00
David Monllao
85218c28e9 Merge branch 'MDL-62228_master' of git://github.com/markn86/moodle 2018-05-15 13:31:07 +02:00
Mark Nelson
df1714f25a MDL-62228 core: remove unnecessary context check in privacy providers 2018-05-14 18:33:29 +08:00
Marina Glancy
3960ad53a7 MDL-62430 privacy: validate context when deleting all user data 2018-05-14 18:13:27 +08:00
Eloy Lafuente (stronk7)
57ea6753d3 MDL-62361 versions: bump all versions and requires near release
version = 2018051400 release version
requires= 2018050800 current beta+ (week4roll1) version
2018-05-09 02:46:30 +02:00
Eloy Lafuente (stronk7)
fc5c5306c9 MDL-61693 core_calendar: make results deterministic for better testing 2018-05-06 18:19:21 +02:00
Zig Tan
bdf271df80 MDL-61693 core_calendar: Simplified get calendar event details SQL 2018-05-04 13:01:37 +08:00
David Monllao
3128529784 Merge branch 'MDL-61693-master' of git://github.com/zig-moodle/moodle 2018-05-03 10:24:02 +02:00
Luca Bösch
0188d5b5b4 MDL-61956 calendar: allow to see hidden course with switch role 2018-05-02 09:37:32 +02:00
Zig Tan
49d6fb0379 MDL-61693 core_calendar: Implemented privacy providers 2018-04-26 21:10:49 +08:00
Helen Foster
970c1a4bf1 MDL-62181 lang: Merge English strings from the en_fix language pack
Significant string changes:

* sitepolicies, core_admin - 'Site policies' changed to 'Site security
  settings'
* processexpirationstask, enrol_paypal - more explanatory name
* sitepolicy_help and sitepolicyguest_help, core_admin - setting will
  only have an effect if the site policy handler is set to default
* sitepolicyhandler_desc,core_admin - improved wording
* pathtodot_help, core_admin - Windows and Mac paths
* debugstringids_desc, core_admin - improved explanation
2018-04-24 22:05:30 +02:00
Bas Brands
3ec69c2ece MDL-56511 theme_boost: Update to Bootstrap 4 stable
Behat fixes by David Monllao <davidm@moodle.com>
    - Blocks
    - Modals
    - Messaging styling
    - Breadcrumb
    - Pagination
    - Course & categories management
2018-04-18 09:31:53 +08:00
Eloy Lafuente (stronk7)
716e9deab7 Merge branch 'MDL-61673-fix-wrong-string-on-calendar-mustache_MASTER' of https://github.com/guillalva06/moodle 2018-04-05 00:35:49 +02:00
Eloy Lafuente (stronk7)
f287b7efbb Merge branch 'MDL-61665-master' of https://github.com/iamandrew/moodle 2018-04-04 00:39:10 +02:00
Guillermo Alvarez
8669d43a96 MDL-61673 calendar: Replace wrong string on mustache template 2018-04-02 10:32:07 -05:00
Andrew Davidson
e503ec17c0 MDL-61665 calendar: Added missing complete layout call for calendar page 2018-03-20 09:29:11 +00:00
Andrew Nicols
3f6ede91aa Merge branch 'MDL-61519-master' of https://github.com/MartinGauk/moodle 2018-03-20 13:53:36 +08:00
Martin Gauk
c4172077df MDL-61519 calendar: do not iterate through all categories
Replace calls to \coursecat::get_all() or cache the results.
2018-03-16 14:30:55 +00:00
Andrew Nicols
48c091e510 MDL-61597 calendartype: Implement the privacy API 2018-03-09 13:27:34 +08:00
Ryan Wyllie
4e0ac12efa MDL-60958 calendar: fix test helper action factory 2018-02-12 05:47:49 +00:00
Ryan Wyllie
28852998f6 MDL-60958 calendar: stop db query in repeat collection constructor
Stop loading the parent record in the constructor because it is an
unnecessary DB query for each event instantiation.

Return null on get_repeats() for events that don't have repeats.
2018-02-12 05:29:11 +00:00
David Monllao
5cce9a8fff Merge branch 'MDL-60836-master' of git://github.com/jleyva/moodle 2018-02-01 10:33:18 +08:00
Juan Leyva
e3c04bd98a MDL-60836 core_calendar: Return categoryid in get_calendar_events 2018-01-30 13:47:19 +01:00
Jun Pataleta
3894262a2f MDL-61152 calendar: Remove usage of undefined variable 2018-01-23 10:49:18 +08:00
David Monllao
09896c35f2 Merge branch 'MDL-60963-master' of git://github.com/ryanwyllie/moodle 2018-01-17 10:49:58 +01:00