Commit graph

28528 commits

Author SHA1 Message Date
Adrian Greeve
aaf93840d0 Merge branch 'MDL-70821-311-5' of git://github.com/junpataleta/moodle into MOODLE_311_STABLE 2021-04-12 14:44:58 +08:00
Jun Pataleta
9f8a137211 MDL-70821 course: Remove old manual completion toggling
Remove the old ways of toggling manual completion via completion.js
and the ajax part of togglecompletion.php.
2021-04-12 12:29:23 +08:00
Issam Taboubi
f3499b80c6 MDL-71303 core: HTML not escaped in block skip link 2021-04-09 17:27:51 -04:00
Dan Marsden
7e7b6daddf MDL-32226 plagiarism: add span around links.
Make it easier for Mobile app to parse.
2021-04-09 12:03:31 +02:00
Eric Merrill
c88ad5c182 MDL-52724 editor_atto: Scrub atto html for invalid ol, ul, and li tags
Try to correct broken ul/ol/li tags, as they have an outsized impact
on course layout. Uses basic regex and loops to track open and closed
tags.

Also adds a deep clean option to the HTML cleaner, that runs less
frequent, more intensive cleanings. This is because normally _cleanHTML
gets called after each keystroke, which could cause problems with
large content on weak systems.

Behat changes are a fix for setting multiline strings in Atto, and
creating a multiline match step.
2021-04-08 15:26:55 -04:00
Eloy Lafuente (stronk7)
c1e84df96f Merge branch 'MDL-70802-311' of git://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2021-04-08 18:34:10 +02:00
Eloy Lafuente (stronk7)
66dbfadd2d MDL-71264 behat: Change date(time) element update order
This includes 2 change to the order date(time) elements are filled,
each one addressing one type of problem, where current order is
problematic and can lead to unexpected dates.

1) Changing date, when current month only has X days and target
   month has more than X days. Example, being 1 April, change
   the date to 31 May.
     This is solved by changing the order of introduction
     from current D => M => Y to Y => M => D.
2) Changing date, when target month only has X days and current
   month has more that X days. Example, being 31 March, change
   the date to 28 Feb.
     This is solved by always setting the D to 1, before the
     Y => M => D sequence commented @ 1) begins.
2021-04-06 16:25:49 +02:00
Eloy Lafuente (stronk7)
42200cfd95 MDL-71264 behat: New feature covering all day/month/year date changes
Because of the order that dates and datetimes are filled by behat
sometimes there are some intermediate results that are impossible
and then the form (javascript) automatically reacts and fixes the
date, ultimate leading to a different date that the one we wanted
to set with Behat.

This is noticeable when switching between months (with some day
being the last day of the month) and the 2 months have a different
number of days. For example April date => March date (or the opposite).

This test covers all the critical changes (day, month and year),
back and forth. All times are Perth/Australia.
2021-04-06 16:25:49 +02:00
Adrian Greeve
285011017c MDL-70817 lib: Update the install xml file to use the correct length.
The showactivitydates field had the wrong length of 4. This changes
it to 1.
2021-04-06 15:24:00 +08:00
Adrian Greeve
4025e4d726 Merge branch 'MDL-70817-311-8' of git://github.com/junpataleta/moodle into MOODLE_311_STABLE 2021-04-06 12:55:32 +08:00
Paul Holden
c3b4e76768 MDL-70099 enrol: increase accuracy of current enrolments by date.
By rounding the current time it was possible that the most recently
created user enrolments (e.g. self enrolments) were being excluded.

This would manifest itself in a user being enrolled on a course,
but it not appearing under "My courses" navigation or on their own
Dashboard until the rounded time had caught up with the current
time.
2021-04-05 19:32:25 +01:00
Paul Holden
969114e23d MDL-70763 core: export preferences for correct user.
Ensure we are using the ID of the given user rather than falling
back to that of the current user during privacy export.
2021-04-04 23:15:34 +01:00
Paul Holden
7365786853 MDL-66475 task: fix random timing failures in logger cleanup test. 2021-04-04 23:12:49 +01:00
sam marshall
200d01b08e MDL-71215 core_user: User fields - remaining deprecated functions
This change removes references in code and comments to a few
deprecated functions that were accidentally missed in the larger
change.

The code changes only affect service_users.php. I made it support
custom user profile fields in this query, because it was easy
enough, rather than adding another TODO to fix later.
2021-04-04 15:50:47 +02:00
Simey Lameze
94a8b91cd3 MDL-70781 course: setting for displaying completion conditions
Part of MDL-70817
2021-04-02 21:56:22 +08:00
Simey Lameze
8b47f16926 MDL-70782 course: add setting to show activity dates
Part of MDL-70817
2021-04-02 21:56:22 +08:00
Jun Pataleta
cafe2f95ee MDL-70817 core_course: Create an activity information output component
The activity information output component displays information about
an activity module that can contain:
1. Activity dates
2. Completion information
   a. A manual completion button; or
   b. A list of automatic completion conditions and their statuses.

This patch also includes a new JS module called
core_course/manual_completion_toggle for toggling the
completion state of activities that support manual completion.
2021-04-02 21:56:22 +08:00
Jun Pataleta
90e30c02cb MDL-70817 core: Allow the manual completion update WS function for AJAX
Allow the core_completion_update_activity_completion_status_manually
web service function to be called from AJAX as well. This is needed
by the new manual completion toggle button in the
core_course/completion_manual template.
2021-04-02 21:56:22 +08:00
Jess Ansell
77688321a6 MDL-71012 setup: Return 500 error code for setup errors. 2021-04-01 13:50:52 +01:00
Eloy Lafuente (stronk7)
d1c41b4dbb MDL-37655 phpunit: Avoid having multiple testcase classes in 1 file
Note that there wasn't any case of multiple testcase classes in
1 file. All the cases reported in the issue were false positives
caused but other "mock/fixture" files being named _test.

So all this issue does is:

1) rename any _test suffixed class in test files, because we are
   going to start renaming a lot of test classes to _test.

2) ensure that the 2 test case classes modified in this issue,
   are already observing the filename = classname rule that will
   be implemented soon (and verigy it works).
2021-03-30 19:17:59 +02:00
Tomo Tsuyuki
cf176f2a7f MDL-71136 backup: Fix moodle_exception path. 2021-03-30 10:56:30 +11:00
Andrew Nicols
d940eabc2c Merge branch 'MDL-70962-311' of git://github.com/paulholden/moodle into MOODLE_311_STABLE 2021-03-29 11:58:54 +08:00
Eloy Lafuente (stronk7)
b56163cbc1 Merge branch 'MDL-71099-m311' of https://github.com/sammarshallou/moodle into MOODLE_311_STABLE 2021-03-27 10:17:51 +01:00
Víctor Déniz
baa15131af Merge branch 'MDL-70537-m311' of https://github.com/sammarshallou/moodle into MOODLE_311_STABLE 2021-03-26 20:14:49 +00:00
Sara Arjona
a2e48a4645 MDL-70722 oauth2: move Nextcloud methods to service class 2021-03-26 09:21:11 +01:00
Sara Arjona
ab810ed1f6 MDL-70722 oauth2: move Microsoft methods to service class 2021-03-26 09:21:11 +01:00
Sara Arjona
a6c03da192 MDL-70722 oauth2: move Facebook methods to service class 2021-03-26 09:21:11 +01:00
Sara Arjona
faef24307f MDL-70722 core_badges: minor fixes from MDL-70689
In MDL-70689, Eloy and Helen suggested some fixes to improve this patch.
As this is a followup issue to move the pending services, this
very first commit will fix pending things raised in the parent issue.
2021-03-26 09:21:11 +01:00
Paul Holden
35efccacee MDL-70962 forms: catch modal exceptions when getting body content.
They are thrown in the following circumstances:

 * The dynamic form class doesn't exist;
 * It does exist but it's `check_access` method throws exception

Co-Authored-By: Andrew Nicols <andrew@nicols.co.uk>
2021-03-25 17:26:33 +00:00
Víctor Déniz
67943be4af Merge branch 'MDL-71194-311' of git://github.com/NoelDeMartin/moodle into MOODLE_311_STABLE 2021-03-25 15:13:50 +00:00
sam marshall
3dee5cd74c MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:48:04 +00:00
Noel De Martin
c846c46e4e MDL-71194 behat: Fix app tests 2021-03-25 13:52:41 +01:00
Andrew Nicols
7ad0fea3b8 Merge branch 'MDL-70318-311' of https://github.com/ilyatregubov/moodle into MOODLE_311_STABLE 2021-03-25 12:31:44 +08:00
Andrew Nicols
4c9a7df3fb Merge branch 'MDL-65776-311' of git://github.com/sarjona/moodle into MOODLE_311_STABLE 2021-03-25 11:07:24 +08:00
Andrew Nicols
dc6079cd39 Merge branch 'MDL-70871-311' of git://github.com/roland04/moodle into MOODLE_311_STABLE 2021-03-25 08:12:08 +08:00
Víctor Déniz
3c3f39d5b8 Merge branch 'MDL-71149_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2021-03-24 13:36:32 +00:00
Tim Hunt
8b7aefc1a1 MDL-70269 ClamAV: make retry the default option on failure 2021-03-24 09:35:38 +00:00
Andrew Nicols
e36710af52 MDL-70802 javascript: Normalise component consistently in templates 2021-03-24 11:18:33 +08:00
Simey Lameze
41cbdeccab MDL-71182 calendar: Revert "Merge branch 'MDL-67494-311' of git://github.com/lameze/moodle into MOODLE_311_STABLE"
This reverts commit 9f5794834e, reversing
changes made to d30b045210.
2021-03-24 09:18:16 +08:00
Dan Marsden
b5070635c1 MDL-71174 core: Improve phpdoc for plagiarism_update_status 2021-03-24 11:41:47 +13:00
Víctor Déniz
f33dec405a Merge branch 'MDL-70727-311' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_311_STABLE 2021-03-23 18:23:32 +00:00
Mikel Martín
96668b7c35 MDL-70871 table: Add 'Show all X' functionality to dynamic_table 2021-03-23 09:57:52 +01:00
Travis CI
5a3e84a5a2 Merge branch 'MDL-69792-311' of git://github.com/sarjona/moodle into MOODLE_311_STABLE 2021-03-23 13:55:09 +08:00
Travis CI
474a3cecfe Merge branch 'MDL-71104-311-2' of git://github.com/mickhawkins/moodle into MOODLE_311_STABLE 2021-03-23 13:47:02 +08:00
Michael Hawkins
e9b94ceb74 MDL-71104 core_completion: Fix fetching of grade completion status
We should be able to fetch the grade completion status for modules
that do not have custom completion configured. This also improves
unit testing coverage.
2021-03-23 12:49:30 +08:00
Jun Pataleta
2323a27150 MDL-71104 completion: Fix completion_info::get_data() unit tests
* Fixed inverted $sameuser test data.
* Fixed caching expectation check. Caching only relies on whether the
user accessing the completion data is the same user or not.
* Fixed checking for the caching of other modules. Should have been
checking cm ID and not instance ID.
* Additional test case when whole course parameter is passed as
true, but the requesting user is different from the target user.
2021-03-23 12:49:30 +08:00
Thinh Pham
746e349524 MDL-71087 File picker: Focus lost after 'Create folder' 2021-03-23 10:47:33 +07:00
Andrew Nicols
fa58d33b66 Merge branch 'MDL-71039-311' of git://github.com/marinaglancy/moodle into MOODLE_311_STABLE 2021-03-23 11:18:24 +08:00
Andrew Nicols
13fcc7c4a6 Merge branch 'MDL-70313-311' of git://github.com/peterRd/moodle into MOODLE_311_STABLE 2021-03-23 10:00:19 +08:00
Andrew Nicols
f0b3a74482 MDL-69256 tests: Fix random slow test failures in completion cron 2021-03-23 08:08:20 +08:00