106799 Commits

Author SHA1 Message Date
Andrew Nicols
bcbdb8764a MDL-76169 question: General behat fixes
Whilst amending these tests I discovered some other minor fixes to be
made.
2022-11-03 21:39:15 +08:00
Andrew Nicols
8ffbaad330 MDL-76169 question: Use action menu steps consistently 2022-11-03 21:39:15 +08:00
Andrew Nicols
3d70f457cb MDL-76169 mod_quiz: Add quiz question bank behat resolver 2022-11-03 21:39:15 +08:00
Andrew Nicols
426ea50861 MDL-76169 behat: Normalise exception message in should (not) steps
These steps have accepted a NodeElement instance as an argument for some
time, but were trying to cast it to string when formulating exception
messages, making it harder to debug and, in the case of the 'should see'
step, not work at all.

This patch introduces a new function to produce a consistent naming for
them.
2022-11-03 21:39:15 +08:00
Andrew Nicols
232ebac338 MDL-76169 behat: Add improved steps for using action menus
This commit adds new steps related to action menus to support:
* Choosing an item in a named action menu
* Choosing an item in a named action menu within a container
* Confirming that an action menu item does or does not exist in a named
  action menu
* Confirming that an action menu item does or does not exist in a named
  action menu within a container

The existing action menu steps were insufficient as they assume that
there is only one action menu within he container, which is not
necessarily the case.

The existing action menu steps are not non-JS friendly and will error if
JS is disabled, without providing any fallback when one is easily
available.

Unfortunately these steps cannot be used to replace the existing steps
without manual intervention.
2022-11-03 21:39:15 +08:00
Jun Pataleta
8b12ca7d1b Merge branch 'MDL-75289-master' of https://github.com/andrewnicols/moodle 2022-11-03 12:44:40 +03:00
Jun Pataleta
486645f487 Merge branch 'MDL-75513-master-3' of https://github.com/mihailges/moodle 2022-11-03 12:44:40 +03:00
Ilya Tregubov
8874e05b82 Merge branch 'MDL-75751-master' of https://github.com/sammarshallou/moodle 2022-11-03 12:44:39 +03:00
Sara Arjona
35d2061018 Merge branch 'MDL-61880-master' of https://github.com/snake/moodle 2022-11-03 12:44:39 +03:00
Jun Pataleta
f91261c9fa MDL-72882 tool_langimport: Set default language when deleting lang pack
* When the language pack being deleted is
  - the same as the site default language, we must set the site default
    language to 'en'.
  - fix the user's current language to the default site language.
2022-11-03 13:27:11 +08:00
Jun Pataleta
03f298a71c MDL-72882 core: Use default site lang when user lang no longer available
* Check that the lang attribute for the output HTML exists. If not,
use the default site language.
* Also fix the current language for the user.
2022-11-03 13:27:11 +08:00
Andrew Nicols
eecbc3ce15 MDL-70071 forum: Convert post threshold warnings to info 2022-11-03 13:10:22 +08:00
Jun Pataleta
a343faaa7d MDL-75759 courseformat: Link classes in PHPDocs with @see tags
- Linking classes/methods mentioned in PHPDoc with @see tags help devs
checking the PHPDoc to quickly navigate to the class/method mentioned
and also helps us ensure that it points to the correct class/method.
- Some typo/grammar fixes as well in existing PHPDoc descriptions.
- Fixed parameter type in execute()'s PHPDoc block.
2022-11-03 11:57:25 +08:00
Simey Lameze
e43fef8fc9 MDL-75759 courseformat: fix documentation of stateupdates tests 2022-11-03 11:37:10 +08:00
Jun Pataleta
dbf67c06bb MDL-75759 courseformat: Fix stateactions test
* Require lib/externallib.php in
\core_courseformat\output\local\state\cm::export_for_template()
* Point @coversDefaultClass to the proper class.
2022-11-03 11:35:42 +08:00
Simey Lameze
ac8dcf13da MDL-76072 tool_lp: only init inlineGrader module if user can grade 2022-11-03 10:51:27 +08:00
Andrew Nicols
8f37e6ecff MDL-75289 mod_data: Make JS more resilient
This change makes the JS in for preset management more resilient.

Previously, if the button was not on the page then an error was thrown.

Instead this code changes the listener to listen to the document and
filters the clicked element based on the same selector. This is a much
safer approach as it will not error if the selector was not found on the
page.

In this case the behat test introduced elsewhere in this issue is
testing a scenario where the Save as preset button is not present
because there are no fields to store as a preset.
2022-11-03 10:02:23 +08:00
Laurent David
1077d473c4 MDL-74545 mod_bigbluebuttonbn: Allow changing the polling value
* The polling time on the BBB room page can be changed via the poll_interval
settings (general settings)
2022-11-02 20:30:07 +01:00
Paul Holden
6813fd4094 MDL-75300 mod_h5pactivity: check whether reviewer join matches rows.
Return original capability join if so, to prevent generating invalid
SQL.
2022-11-02 19:25:53 +00:00
Amaia Anabitarte
565aafccc6 MDL-76177 mod_data: Don't close a div that has not been opened 2022-11-02 18:39:54 +01:00
Eloy Lafuente (stronk7)
73bc677346 MDL-76055 mnet: Switch the keyswap to use the library
This service is different from the rest because it
doesn't run encrypted, but plain xmlrpc. Hence, we
cannot use the normal mnet_xmlrpc_client (that provides
on-the-fly encryption and signing).

So, instead, let's instantiate a custom client here
and use it for this pure xmlrpc request and response.

PS: It's curious that this exact sevice has support
for proxies but the mnet_xmlrpc_client one has not. I'm not
going to modify that here, but have left a comment
in the code about that.

PS: Some small style changes have been applied around
the modified code (spacing, &&, comments...)
2022-11-02 15:56:38 +01:00
Eloy Lafuente (stronk7)
478f423e2d MDL-76055 auth_mnet: Fix update_enrolments request
Basically this fixes MDL-70833 that was reproduced while
testing the update_enrolments requests. Summary:

- Fixes a typo in table name preventing it to be updated ever.
- Fix outer join that was missing records.
- Stop playing and mixing ids (local and remote).
- Better control which enrolments have to be kept (previously
  they were being deleted immediately after creating them).
- Improve the coding style of inserts.
- Modernise the deletions to use sql helper and to work with 0..n ids.
2022-11-02 15:56:38 +01:00
Eloy Lafuente (stronk7)
29873206b9 MDL-76055 mnet: Switch the mnet server to use the library 2022-11-02 15:56:38 +01:00
Eloy Lafuente (stronk7)
8c64ab98ee MDL-76055 mnet: Switch the mnet client to use library
Completely remove all uses if the xmlrpc php extension in
the client and replace them by the phpxmlrpc library.

Very noticeably, remove all the uses of the curl extension
and use phpxmlrpc own curl support.

Working ok for moodle-moodle/mahara sso and mahara portfolio export.
2022-11-02 15:56:38 +01:00
Eloy Lafuente (stronk7)
a0d916bc86 MDL-76055 libraries: Autoload phpxmlrpc and verify it works
Also, we can now safely remove Autoloader.php, because
Moodle PSR-4 autoloader has taken control, so document
and test it too.
2022-11-02 15:56:38 +01:00
Eloy Lafuente (stronk7)
c958bd7305 MDL-76055 libraries: Import phpxmlrpc 4.8.0 release 2022-11-02 15:56:38 +01:00
Sara Arjona
ae63a2d16b MDL-76172 core: Fix error when userinfo is false
This patch should fix a regression introduced in MDL-75171, raised
while running the OBv2.1 certification.
The new method get_raw_userinfo() can return stdClass or false but
the second one was not taken into account from get_userid() (so an
error was thrown: "Argument 1 passed to
core\oauth2\client::map_userinfo_to_fields() must be an instance
of stdClass, bool given").
2022-11-02 12:28:19 +01:00
Mihail Geshoski
458c1c771b MDL-75513 core_grades: New method that returns the grade item string
Introduces a new method get_element_type_string() in grade/lib.php
which returns the appropriate string that describes the type of the
grade item element.
2022-11-02 17:47:02 +08:00
Mihail Geshoski
3d1bb8e863 MDL-75513 behat: Update existing behat tests 2022-11-02 17:45:52 +08:00
Mihail Geshoski
e8caeb85e3 MDL-75513 gradereport_user: Add behat tests 2022-11-02 17:45:52 +08:00
Mihail Geshoski
3414a93268 MDL-75513 gradereport_user: Output the tertiary nav action in index.php
Outputs the relevant tertiary navigation actions based in index.php,
the prev/next user navigation and removes the old trigger buttons for
the group and user selector from the zero state page.
2022-11-02 17:45:52 +08:00
Mihail Geshoski
42c5109652 MDL-75513 gradereport_user: Create tertiary navigation actions 2022-11-02 17:45:52 +08:00
Mihail Geshoski
be366c5b7c MDL-75513 core_grades: Renderer for the custom user header 2022-11-02 17:45:52 +08:00
Mihail Geshoski
ee2d1f806d MDL-75513 message: Enable optional text display in the contact toggle 2022-11-02 17:45:52 +08:00
Mihail Geshoski
df5e5c0f88 MDL-75513 gradereport_user: Trigger element for the view mode selector
Creates a renderer method and a template for the element that would
trigger the view mode selector in the grade user report.
2022-11-02 17:45:52 +08:00
Mihail Geshoski
ba80b78119 MDL-75513 core_grades: Renderer for the prev/next user navigation 2022-11-02 17:45:52 +08:00
Mihail Geshoski
1046e06e83 MDL-75513 gradereport_user: Create trigger element for the user selector
Creates a renderer method and a template for the element that would
trigger the user selector.
2022-11-02 17:45:52 +08:00
Mihail Geshoski
8b2f9b0386 MDL-75513 core_grades: Create trigger element for the group selector
Creates a renderer method and a template for the element that would
trigger the group selector.
2022-11-02 17:45:52 +08:00
Mihail Geshoski
c2851ed141 MDL-75513 gradereport_user: Update the grade user report
Updates the styling of the grade user reports and introduces
functionality which enables expanding and collapsing grade
categories.
2022-11-02 17:45:52 +08:00
Jake Dallimore
1b9ebba57b MDL-76113 enrol_lti: Fix secret on lti user for LTI 2.0 consumers
Fixes the enrol_lti_users.consumersecret field for LTI 2.0 users.
This field erroneously contained the tool secret and not the consumer
secret needed for service requests when used with LTI 2.0 consumers,
which resulted in complete grade sync failure for LTI 2.0 consumers.
This patch:
- adds an upgrade step to address existing incorrect secrets for LTI
2.0 launched users. It sets these to the correct consumer secret.
- fixes the way the secret is first set during a launch, ensuring
this->consumer->secret is used, which properly captures either the
tool secret (for 1.1 launches) or the consumer secret (for 2.0
launches).
2022-11-02 16:48:33 +08:00
Ferran Recio
4b32662da7 MDL-76084 theme_boost: add shadow to the sticky footer 2022-11-02 09:25:28 +01:00
Jun Pataleta
714f944a3e Merge branch 'MDL-75038' of https://github.com/paulholden/moodle 2022-11-02 13:39:27 +08:00
Jun Pataleta
b2368a421b Merge branch 'MDL-75848' of https://github.com/paulholden/moodle 2022-11-02 13:20:12 +08:00
Jake Dallimore
c48e83db0e MDL-61880 tool_oauth2: don't rely on discovery when editing issuers
Adjusts the testing scenarios so that we don't rely on endpoint
discovery being run during an issuer edit, which is no longer the case.
For scenarios that need a userinfo endpoint, set this manually.
2022-11-02 11:11:00 +08:00
Jake Dallimore
b76ac53c9d MDL-61880 core: don't clear issuer fields not present in form data
In cases where we have an id, load the persistent and then set new data
before saving. This ensures we don't delete fields which are missing in
the form data.
2022-11-02 11:11:00 +08:00
Yannick Forget
52d523fa9c MDL-61880 core: Retain OAuth 2.0 user field mappings after issuer update 2022-11-02 11:10:36 +08:00
Shamim Rezaie
d18a89fb0b Merge branch 'MDL-76142' of https://github.com/paulholden/moodle 2022-11-02 14:02:33 +11:00
Shamim Rezaie
8ddc2a5fed Merge branch 'master_MDL-75306-lastused-41' of https://github.com/catalyst/moodle-MDL-72752 2022-11-02 12:57:09 +11:00
Paul Holden
4b007efda5 MDL-75038 blog: link back to user only when one specified. 2022-11-01 21:27:03 +00:00
Paul Holden
429508a7b4 MDL-76142 cohort: cross DB support for description filter.
Specifically avoids Oracle exception ORA-00932.
2022-11-01 14:05:39 +00:00