1599 Commits

Author SHA1 Message Date
Andrew Nicols
d929aa1fda Merge branch 'MDL-72403-master' of git://github.com/rezaies/moodle 2021-08-26 13:01:53 +08:00
Sara Arjona
34f3d43397 Merge branch 'MDL-72106' of https://github.com/paulholden/moodle 2021-08-25 18:37:26 +02:00
Sara Arjona
d29c6f5977 Merge branch 'MDL-71952-master' of git://github.com/rezaies/moodle 2021-08-24 12:19:12 +02:00
Shamim Rezaie
fc26c19c19 MDL-72403 calendar: prereserve courseid after form submit 2021-08-24 17:55:05 +10:00
Shamim Rezaie
7a529cc858 MDL-71952 calendar: Make breadcrumb consistent within calendar pages 2021-08-24 17:19:45 +10:00
Eloy Lafuente (stronk7)
9438f0714b Merge branch 'MDL-72045-master' of git://github.com/lameze/moodle 2021-08-23 18:33:27 +02:00
Ilya Tregubov
192211b51d Merge branch 'MDL-71954-master' of git://github.com/rezaies/moodle 2021-08-19 09:10:16 +02:00
Víctor Déniz
1e9118f4d6 MDL-71500 calendar_threemonth: fix wrong behat step 2021-08-12 11:35:31 +01:00
Eloy Lafuente (stronk7)
962b7f56a8 Merge branch 'MDL-71500-master' of git://github.com/lameze/moodle 2021-08-11 20:10:40 +02:00
Paul Holden
d87d6c226d MDL-72106 calendar: redirect to same page post-subscription process.
Avoid issues when reloading page/re-sending POST data.
2021-08-10 09:40:45 +01:00
Simey Lameze
f3176e8ec5 MDL-72045 calendar: change export doc link by help text 2021-07-28 18:12:14 +08:00
Ilya Tregubov
3d2e6b7932 Merge branch 'MDL-71946-master' of git://github.com/dcai/moodle 2021-07-27 13:41:05 +02:00
Jun Pataleta
68fa468885 MDL-71817 calendar: Use root node to find the target elements
Instead of passing querying for the root element again by its ID
which changed in this issue, use the already existing root element
at the beginning of this Mustache JS code. It also makes maintenance
simpler in the future.
2021-07-22 17:39:01 +08:00
Jun Pataleta
68bd3a1158 Merge branch 'MDL-71817-master' of git://github.com/lameze/moodle 2021-07-22 11:27:08 +08:00
Jun Pataleta
8a2c797cc0 MDL-71817 calendar: Set the calendar view mode properly for month view
* Store the view mode of the calendar in the calendar_information
   object.
 * Let the month exporter handle the production of context data by
   moving 'viewingmonth', 'showviewselector', and 'viewinginblock'
   inside it.
 * Set the proper calendar view mode in the core_calendar/month_detailed
   template.
 * Pass the calendar view mode to the
   core_calendar_get_calendar_monthly_view WS function.
2021-07-22 09:04:44 +08:00
Simey Lameze
d748c71693 MDL-71817 calendar: change the calendar heading to h4 in the block
This commit adds the logic that change the size of the calendar
header depending if the user is viewing in the block or in the
full view.
2021-07-22 09:04:44 +08:00
Simey Lameze
b0133904bf MDL-71817 calendar: behat changes for calendar block
This commit does few things:

1) Remove unnecessary "I hover over today in the calendar"
steps as it's not necessary to hover onto the day to see the events
any more.

2) Replace "I follow This month" steps to "I follow Full calendar"

3) Update i_create_a_calendar_event_with_form_data() to use the new
fullcalendar lang string.
2021-07-22 09:00:30 +08:00
Jun Pataleta
73a14b1075 MDL-71817 calendar: Fix duplicate IDs for multiple calendar blocks
Done by:
* Designating instance IDs for each month_exporter instances and
assigning these instance IDs in templates.
* Adding the instance ID as an optional parameter for the
core_calendar_renderer::course_filter_selector() to generate
course filters with unique element IDs.
2021-07-22 08:46:01 +08:00
Simey Lameze
f0897dce80 MDL-71817 calendar: clicking on day link should redirect to day view
This patch prevents the full day view to be loaded
in the calendar block as this won't be supported.
When clicking in the day link it will redirect the
user to day view in the full calendar.
2021-07-22 08:46:01 +08:00
Simey Lameze
2e11059734 MDL-71817 calendar: make calendar block look like full calendar
This commit does few things:

1) Removes .path-calendar specificity styles from full view can
work on the Dashboard.

2) The new event button colour has been changed to btn-primary.

3) CSS fix to make the calendar controls inline on small block.
2021-07-22 08:46:01 +08:00
Simey Lameze
47ca6c017a MDL-71817 calendar: remove year from prev/next links 2021-07-22 08:46:01 +08:00
Simey Lameze
98612827b0 MDL-71817 calendar: only update url on full view
This patch prevents the URL from being updated on the calendar
block. It only updates the url if viewing the full calendar.
2021-07-22 08:46:01 +08:00
Simey Lameze
d2f612ab24 MDL-71817 block_calendar_month: load month view in the block 2021-07-22 08:46:01 +08:00
Michael Hawkins
dffe445923 MDL-72154 calendar: Add manage subscription to export page breadcrumbs 2021-07-21 16:41:13 +08:00
Michael Hawkins
45fc997e84 MDL-72154 calendar: Remove unnecessary strings/link from import page 2021-07-21 16:41:13 +08:00
Shamim Rezaie
c96d24be88 MDL-71954 calendar: improve form validation
For client-side validation benefits refer to
https://www.w3.org/WAI/tutorials/forms/validation/#client-side-validation-benefits
2021-07-21 02:38:10 +10:00
boygr49p
897300cbbd MDL-71500 calendar_threemonth: add behat step and coverage 2021-07-16 14:46:51 +08:00
boygr49p
15e311a1fd MDL-71500 calendar_threemonth: clicking in a diff day should refresh day view
Clicking in a day in the three month block replaces the div with id starting
with calendar- so we can do so repeatedly and successfully and test that it does (with behat).
2021-07-16 14:46:40 +08:00
Eloy Lafuente (stronk7)
f861b7a9bf Merge branch 'MDL-71788-master-fix' of git://github.com/junpataleta/moodle 2021-07-15 16:13:11 +08:00
Jun Pataleta
6c131ead99 Merge branch 'MDL-71775-master' of git://github.com/lameze/moodle 2021-07-15 16:10:48 +08:00
Jun Pataleta
a067fc1df1 MDL-71788 calendar: Remove ready state listener
Adding a document ready state change listener might be too late by the
time this AMD module gets loaded. So there's really no point listening
for it. It's better to enable the Copy URL button by the time this
the calendar export module gets loaded since at this point, the
copy to clipboard JS module would have been loaded as well.
2021-07-15 14:55:16 +08:00
Simey Lameze
f58750c2a5 MDL-71775 block_calendar_month: add footer options 2021-07-15 10:20:54 +08:00
Eloy Lafuente (stronk7)
43d77b9574 Merge branch 'MDL-71788-master-7' of git://github.com/junpataleta/moodle 2021-07-15 02:58:31 +02:00
Huong Nguyen
48d21af177 MDL-71790 calendar: Revamp the manage subscriptions page 2021-07-13 13:21:20 +07:00
Dongsheng Cai
ff035c0aa7 MDL-71790 calendar: Create a new calendar import page
The commit was originally from MDL-71808
2021-07-13 13:19:57 +07:00
Dongsheng Cai
a4de29ced3 MDL-71978 core_calendar: only allow owner to edit user subscriptions 2021-07-08 23:30:34 +02:00
Jun Pataleta
5c70150450 MDL-71788 calendar: Make it easier to copy the calendar URL
Converted the Calendar URL string to a read-only text input containing
the calendar URL. Pressing the "Copy URL" button will copy the calendar
URL to the clipboard.
Fixed Behat tests as well for the export feature. With the calendar URL
in a text input that clips the whole URL, the `preset_what` URL
parameter cannot be seen by the "I should see" step. Worked around
this by checking that the actual value attribute of the calendar URL
text input contains the preset_what parameter.

Plus: Deprecate the calendarurl string. It will be replaced by a new
lang string that does not contain the actual calendar URL.
2021-07-08 12:33:55 +08:00
Andrew Nicols
1cb50a3a7d Merge branch 'MDL-71771-master' of git://github.com/HuongNV13/moodle 2021-07-01 10:11:14 +08:00
Sara Arjona
fd0321eede Merge branch 'MDL-67208-master' of git://github.com/lameze/moodle 2021-06-30 16:55:31 +02:00
Sara Arjona
6ec8364449 Merge branch 'MDL-71789-master' of git://github.com/lameze/moodle 2021-06-30 16:29:33 +02:00
Dongsheng Cai
2f9e38a6fb MDL-71946 core_calendar: remove icons from calendar events 2021-06-28 18:58:56 +10:00
Simey Lameze
1834f1c9ce MDL-67208 calendar: fix manage subscription redirection
This patch fix the subcription page only adding the course parameter
only when viewing the calendar on course context. It also passes the
url to the form instance, so we have the course parameter on the
form action attribute.
2021-06-24 16:32:59 +08:00
Andrew Nicols
fa0ce04e63 Merge branch 'MDL-71837' of git://github.com/paulholden/moodle 2021-06-24 10:58:12 +08:00
Huong Nguyen
2140d3e55c MDL-71771 core_calendar: Convert the calendar footer buttons to links 2021-06-23 09:41:04 +07:00
Simey Lameze
29979f21ed MDL-71789 calendar: fix subscription url validation 2021-06-23 07:46:46 +08:00
Andrew Nicols
4f422785c6 MDL-71113 javascript: Improve basic JS Documentation 2021-06-18 09:38:05 +08:00
Andrew Nicols
92179b7057 MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
Paul Holden
2f6e07d240 MDL-71837 calendar: turn off export form double submit protection. 2021-06-02 19:50:38 +01:00
Andrew Nicols
acd9d9823b MDL-70990 core_form: Replace FORM_SUBMIT_AJAX event
The legacy M.core.event.FORM_SUBMIT_AJAX ecent has been replaced with a
new core_form/events::formSubmittedByJavascript native DOM event.

The new event can be listened to at any point in the DOM using the
following syntax:

```
import {eventTypes} from 'core_form/events';

document.addEventListener(eventTypes.formSubmittedByJavascript, handler);
```

A backward-compatabibility layer is included to ensure that any
legacy YUI event triggered on a form is still respected and the new
native event is also fired.

A similar handler is also included to ensure that any legacy YUI event
listener is still called with the same arguments.

These legacy bridges will be removed after Moodle 4.3.
2021-05-26 10:46:49 +08:00
Marina Glancy
b46badb130 MDL-70926 core: getuserdate() shoud show debugging if null was passed
passing null to getdate() has different results in PHP7 and PHP8
2021-05-06 19:55:32 +02:00