100562 Commits

Author SHA1 Message Date
Jun Pataleta
ebf078458d Merge branch 'MDL-71036' of https://github.com/stronk7/moodle 2021-03-17 20:05:25 +08:00
Brendan Heywood
7a825b659c MDL-71068 login: Fix edge cases with $CFG->protectusernames 2021-03-17 17:37:29 +11:00
Peter Dias
d589352f4f MDL-70198 core_navigation: Secondary nav unit tests 2021-03-17 13:32:54 +08:00
Peter Dias
683e7b2aaf MDL-70198 core_navigation: Implement secondary nav and curate nodes
Implement the new secondary nav and curate the nodes from flatnav and settingsnav
2021-03-17 13:32:53 +08:00
Peter Dias
23bb8a21c1 MDL-70198 core_navigation: Create new base view class 2021-03-17 12:44:13 +08:00
sangnguyen
edd37a6c07 MDL-70992 Folder: Unnecessary tab stops to the left of files 2021-03-17 09:30:04 +07:00
Eloy Lafuente (stronk7)
c9912e2c0e Merge branch 'MDL-70565' of git://github.com/paulholden/moodle 2021-03-16 22:48:57 +01:00
Eloy Lafuente (stronk7)
44c302a607 Merge branch 'master-MDL-71044_v3' of https://github.com/golenkovm/moodle 2021-03-16 22:38:48 +01:00
Paul Holden
50d3268a6c MDL-71128 mod_quiz: escape question idnumber on display. 2021-03-16 20:27:14 +00:00
Eloy Lafuente (stronk7)
f0733b2f41 Merge branch 'MDL-67748-master-managewebservices' of git://github.com/mudrd8mz/moodle 2021-03-16 19:02:10 +01:00
David Mudrák
4a9f864969 MDL-67748 admin: Add Behat tests for tokens filtering features
Credit goes to Andrew for Behat data generators for webservices.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2021-03-16 10:51:39 +01:00
Sara Arjona
fe6d780d0d Merge branch 'MDL-44613-integration-master' of git://github.com/mihailges/moodle 2021-03-16 08:26:48 +01:00
Adrian Greeve
ab8b390b78 Merge branch 'MDL-69474' of https://github.com/stronk7/moodle 2021-03-16 12:54:21 +08:00
Adrian Greeve
c862a09c61 Merge branch 'MDL-70780-master' of git://github.com/andrewnicols/moodle 2021-03-16 10:54:46 +08:00
Mihail Geshoski
fcbd1605cb MDL-44613 mod_assign: Fix behat failure in classic
The link to the calendar page is missing in the navigation block in
classic which causes a behat failure in the 'Set availibility dates
for an assignment' feature. The fix includes adding the calendar block
to the Course page which can be used to navigate to the calendar page.
2021-03-16 10:26:09 +08:00
Eloy Lafuente (stronk7)
f35e3f09c2 MDL-69474 accessibility: page->url can be not set, protect against that
Both in unit tests, but also in other areas (say blocks, for example)
it's possible that page->url has not been set yet.

So, let's change current code to always check if we have something
(page->url) to compare.

Note the use of has_set_url() is needed, because page->url is magic
method and it doesn't work as expected. Hate magics!
2021-03-16 00:52:28 +01:00
Paul Holden
a2b0686773 MDL-71064 media_videojs: enable hotkeys support in player.
Hotkeys were enabled by default, except fullscreen (hotkey "f").
2021-03-15 22:32:35 +00:00
David Mudrák
b0fd376db3 MDL-67748 admin: Do not show missing capabilities for mobile app service
We used to display capabilities like "Manage any calendar entries",
"Delete evidence", "Manage competency frameworks", "View hidden courses"
and others as "Missing capabilities" for the mobile app service tokens.

This gave dangerous impression that the app will not work for students
without these capabilities granted. There are known cases of admins who
started to grant all these caps to the Authenticated user role because
they were afraid the app would not work for them.

The problem here is that the official mobile app service includes some
functions that have these capabilities declared as required. But they
are not really required to use the app. Either the app makes its own
clever checks of capabilities before calling the functions, or sometimes
the capabilities are not even correctly declared.

It is safer for everybody to display this information for custom
services only where the risk of the falsely missing caps is lower and
the information is more accurate.

Also, the help text has been improved so it does not suggest that these
capabilities must be always added. We do not know why the service has
them declared. In some cases, a service has capabilities declared just
because it makes use of them in the if-then fashion.

Additionally, the patch also displays the service short name because it
is actually needed to know.
2021-03-15 21:24:06 +01:00
David Mudrák
6ea3588d82 MDL-67748 admin: Show user identity fields on the manage tokens page
On sites with many users, the fullname itself may not be unique
identifier of users. Display the user identity fields below the token
owner's name.
2021-03-15 21:24:06 +01:00
David Mudrák
c4ad1bf2f6 MDL-67748 admin: Add filter to the WS tokens management page
The patch adds ability to filter the list of token by the token value,
the user and the service. Also the button to create a new token is made
more prominent and easier to spot.
2021-03-15 21:24:06 +01:00
David Mudrák
bcd8692fef MDL-67748 admin: Improve the display of tokens the user cannot see 2021-03-15 21:24:06 +01:00
David Mudrák
2c177ae4c1 MDL-67748 admin: Refactor tokens management as an external page
No need to have a dedicated admin_setting_managewebservicetokens admin
setting subclass, and yet do not use almost any of its features. So the
patch merges the list and the forms handling into a single external
page.

Similarly, it feels like overkill to have a renderer method for a
simple confirmation widget - especially given that the URLs were
hard-coded in it. So that one was dropped.
2021-03-15 21:24:06 +01:00
David Mudrák
596b0bb23e MDL-67748 admin: Improve the display of missing capabilities
The patch improves the display of the missing capabilities on the Manage
tokens page and the Select authorised users page. The list of
capabilities is rendered in a collapsible area and does not occupy too
much space by default.

Additionally on the later page, the patch improves the display of the
list of existing authorised users so that it respects the configured
identity fields.
2021-03-15 21:24:06 +01:00
David Mudrák
c07f15d791 MDL-67748 admin: Improve get_missing_capabilities_by_users()
The previous implementation falsely reported all implicit capabilities
inherited from the authenticated user archetype. That caused a lot of
capabilities reported as missing, even if they were correctly granted.

This new implementation uses a different logic. Instead of seeking for
explicitly assigned capabilities, it searches for capabilities that are
not assigned to any of the user's role across the system.

Please refer to the inline documentation. This should be still used for
informative reports only, not for actual permissions evaluation. The
context has been ignored here, as well as all the overrides etc. This
patch just makes it a lesser evil.
2021-03-15 21:24:06 +01:00
David Mudrák
0bcaab32ad MDL-67748 admin: Simplify the webservice token form
We can now use the autocomplete element to select the user. No need to
for the legacy behaviour.
2021-03-15 21:24:05 +01:00
David Mudrák
a7f6934297 MDL-67748 admin: Respect the viewfullnames cap at manage tokens table 2021-03-15 21:24:05 +01:00
David Mudrák
b389393dc5 MDL-67748 user: Add new core_user/form_user_selector JS module
The module provides AJAX support for the autocomplete form element.
2021-03-15 21:24:05 +01:00
David Mudrák
f51d3a81d6 MDL-67748 user: Add a new core_user_search_identity external function
The purpose of this external function is to provide data for
asynchronous user selectors and similar widgets. It allows to search
users matching the given query in their name or other available identity
fields.
2021-03-15 21:24:05 +01:00
David Mudrák
614036d797 MDL-67748 user: Fix @link docs tag usage
Not related to this issue, just spotted while working on it.
2021-03-15 21:21:43 +01:00
David Mudrák
db723ad066 MDL-67748 admin: Move the web service token form to its own file 2021-03-15 21:21:43 +01:00
David Mudrák
2bf6db2d5a MDL-67748 admin: Move the web services under the server administration
I suppose the original reasoning was that the web services protocols are
pluggable and that plugins can provide external function. But those are
not good reasons to put the whole Web services section under plugins.
Web services are not a plugin type and they always felt very
counter-intuitive there.

From the server administrtaion perspective, web services are similar to
scheduled tasks and therefore, they should live in the same section.
2021-03-15 21:21:43 +01:00
Paul Holden
58501c742f MDL-65616 message: always notify user after sending contact request. 2021-03-15 18:56:36 +00:00
Eloy Lafuente (stronk7)
695f75373b Merge branch 'MDL-69474-master' of https://github.com/NashTechOpenUniversity/moodle 2021-03-15 16:27:02 +01:00
Sara Arjona
69de0629fa Merge branch 'MDL-44613-master-1' of git://github.com/mihailges/moodle 2021-03-15 15:53:34 +01:00
Eloy Lafuente (stronk7)
49c99fbc54 Merge branch 'MDL-65974-master-iteration03' of git://github.com/ferranrecio/moodle 2021-03-15 14:07:17 +01:00
Paul Holden
763a3c3383 MDL-70977 mod_forum: fix empty equality check updating post content.
Using the external method for updating posts, the check for empty
subject/message content wasn't correct (disallowed the string '0'),
in addition to being impossible to set a posts message format
property to FORMAT_MOODLE (integer 0).
2021-03-15 12:48:51 +00:00
Paul Holden
584f874e50 MDL-70924 course: ensure required fields present when getting courses. 2021-03-15 12:46:27 +00:00
Ferran Recio
875e7314b8 MDL-65974 course: fix return section in modchooser 2021-03-15 13:11:53 +01:00
Jun Pataleta
839abe254c Merge branch 'MDL-66667-cache-course-image-master' of https://github.com/dmitriim/moodle 2021-03-15 17:19:06 +08:00
Adrian Greeve
00cb88c352 Merge branch 'MDL-65974-master-iteration03' of git://github.com/ferranrecio/moodle 2021-03-15 15:16:44 +08:00
Adrian Greeve
1998b411ad Merge branch 'MDL-70306-master' of git://github.com/peterRd/moodle 2021-03-15 11:17:31 +08:00
Peter Dias
809d700ad0 MDL-70306 auth: Update the thirdpartylib.xml 2021-03-15 11:09:30 +08:00
Peter Dias
ce863f7ded MDL-70313 core: Update the thirdpartylib.xml 2021-03-15 10:25:28 +08:00
Peter Dias
7e308ac133 MDL-70313 core: Rebuilt module files 2021-03-15 10:25:28 +08:00
Peter Dias
fdabce2329 MDL-70313 core: Update codemirror to 5.59.4 2021-03-15 10:25:28 +08:00
Dmitrii Metelkin
2affc87d2b MDL-66667 course: add course image cache 2021-03-15 12:50:35 +11:00
Mihail Geshoski
23f7830bcd MDL-44613 mod_assign: Automate testing of the assignment availability 2021-03-15 08:22:12 +08:00
Mihail Geshoski
c14242c807 MDL-44613 tool_behat: Update datetime format usages to strftime
Updates all existing datetime format usages to strftime in the
'time to timestamp' transformation in tool_behat behat tests.
2021-03-15 08:22:12 +08:00
Mihail Geshoski
5c91e63f54 MDL-44613 core_message: Update datetime format usages to strftime
Updates all existing datetime format usages to strftime in the
'time to timestamp' transformation in core_message behat tests.
2021-03-15 08:22:12 +08:00
Mihail Geshoski
9fadf911e3 MDL-44613 behat: strftime format in time to timestamp transformation
Modifies the 'string time to timestamp' behat trasformation to use
userdate() instead of date(). The userdate() method is generally used
throught Moodle for constructing formatted date strings and this change
will provide more consistency and prevent any potential behat failures.
Therefore, if the date format is defined in the given trasformation, it
has to be strftime compatible. Example:
'I should see "##tomorrow noon##%A, %d %B %Y, %I:%M %p##"'
2021-03-15 08:22:12 +08:00