Compare commits

...

438 Commits

Author SHA1 Message Date
Jun Pataleta ccd4ef8ddd Moodle release 3.9.2 2020-09-11 10:41:59 +08:00
Sara Arjona b9371d7bf6 weekly release 3.9.1+ 2020-09-10 08:52:10 +02:00
Sara Arjona 1ec406cbd7 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-09-10 08:52:07 +02:00
Sara Arjona b1c1119743 Merge branch 'MDL-69466-3.9' of https://github.com/JBThong/moodle into MOODLE_39_STABLE 2020-09-09 11:39:30 +02:00
Sara Arjona 3d45f2c083 Merge branch 'MDL-69645-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-09-09 11:01:00 +02:00
Thong Bui 1f5da975e2 MDL-69466 Autocomplete widget: Improve keyboard accessibility 2020-09-09 13:50:04 +07:00
Eloy Lafuente (stronk7) ee0106f70b Merge branch 'MDL-69116-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2020-09-08 23:16:43 +02:00
Sara Arjona ab43412ae9 Merge branch 'MDL-69525-39-1' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-09-08 14:22:04 +02:00
Michael Hawkins 3d01fc77de MDL-69340 tag: Correct the filter input HTML in the tag manager 2020-09-08 08:47:20 +02:00
Mihail Geshoski 08d7552f4d MDL-69048 book: Sanitize previous chapter value in add new chapter page 2020-09-08 08:47:20 +02:00
Andrew Nicols 8983d50bd1 MDL-68974 calendar: Use page context for block check 2020-09-08 08:47:20 +02:00
Andrew Nicols 9fb8221fb3 MDL-68974 blocks: Check permission before generating content 2020-09-08 08:47:20 +02:00
Mihail Geshoski 4b60cede1e MDL-65115 repository: Prevent unzipping if it will exceed allowed quota 2020-09-08 08:47:20 +02:00
Mihail Geshoski 4514918c33 MDL-65115 core_files: Add get_total_content_size() in stored_file class
New function get_total_content_size() is introduced in the stored_file
class. The puprose of this function is to calculate and return the
total size (in bytes) of the content of an archive file.
2020-09-08 08:47:20 +02:00
Andrew Nicols 86d6bdf079 MDL-68974 admin: Unit tests for context parent/child test 2020-09-08 08:47:20 +02:00
Andrew Nicols f5d75c8e24 MDL-68974 admin: Unit tests for loginas 2020-09-08 08:47:20 +02:00
Andrew Nicols bfeb6f3bac MDL-68974 admin: Prevent login as outside of the desired context 2020-09-08 08:47:20 +02:00
Sara Arjona ec52cca8b1 Merge branch 'MDL-68344-3.9' of https://github.com/JBThong/moodle into MOODLE_39_STABLE 2020-09-08 08:45:19 +02:00
Jun Pataleta 6bbb402129 Merge branch 'MDL-69492-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-09-08 12:56:19 +08:00
AMOS bot 7375466f51 Automatically generated installer lang files 2020-09-08 00:07:50 +00:00
Eloy Lafuente (stronk7) 8635e2cefa Merge branch 'MDL-69262-39-2' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-09-07 23:43:04 +02:00
Eloy Lafuente (stronk7) 52bad33356 Merge branch 'MDL-69448-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-09-07 23:26:21 +02:00
Luca Bösch 5c155ba8f7 MDL-69645 quizaccess: Set allowPreferencesWindow to false in manual conf
Signed-off-by: Luca Bösch <luca.boesch@bfh.ch>
2020-09-07 21:26:11 +02:00
Mathew May ffa17ad17d MDL-69240 tool_moodlenet: Clean MoodleNet profile field
Amended by: Eloy Lafuente (stronk7) <stronk7@moodle.org>
- adjust versions for every branch.
- modify verify_webfinger->profileurl external to PARAM_NOTAGS.
2020-09-07 17:25:13 +02:00
Sara Arjona 5d6fcc67cf Merge branch 'MDL-67468-MOODLE_39_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_39_STABLE 2020-09-07 13:20:06 +02:00
Paul Holden a37dc94598 MDL-69492 auth_cas: normalise member distinguished name config. 2020-09-04 08:36:13 +01:00
Paul Holden 1e08e046e2 MDL-69492 auth_ldap: normalise member distinguished name config. 2020-09-04 08:36:13 +01:00
Paul Holden 4ff5d5ef17 MDL-69448 backup: fix capability checks when unable to copy user data.
When a given user doesn't have the capability to "Include user data"
during course copying, freeze the form element rather than not adding
it at all.

This caused problems as the element was required before preceding with
the course copy.
2020-09-04 08:20:13 +01:00
Nathan Nguyen 84ef6eb8d9 MDL-67468 filter_activitynames: use MUC 2020-09-04 15:41:46 +10:00
Thong Bui 3b45e0db41 MDL-68344 filepicker: File Picker focus lost on upload 2020-09-04 10:09:22 +07:00
Sara Arjona 535523f21f weekly release 3.9.1+ 2020-09-03 17:09:26 +02:00
Sara Arjona 9c50ccbf7e NOBUG: Fixed SVG browser compatibility 2020-09-03 17:09:24 +02:00
Andrew Nicols b676817a64 Merge branch 'MDL-69391-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-09-03 11:48:49 +08:00
Andrew Nicols 8eca15c5f1 Merge branch 'MDL-69360-39' of git://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2020-09-03 10:52:15 +08:00
Andrew Nicols 1bb4c59adc Merge branch 'MDL-69246_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-09-03 10:40:12 +08:00
Andrew Nicols 2332ac5f87 Merge branch 'MDL-55340-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-09-03 10:14:13 +08:00
Andrew Nicols 0700b8510f Merge branch 'MDL-69069-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-09-03 09:34:08 +08:00
Eloy Lafuente (stronk7) 7bc82ad672 Merge branch 'MDL-69608-39' of https://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2020-09-02 23:50:09 +02:00
Sara Arjona 92b9900d6e Merge branch 'MDL-68680-MOODLE_39_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_39_STABLE 2020-09-02 17:16:09 +02:00
Marina Glancy 312ca07bb7 MDL-69608 core_form: frozen forms do not have form tag 2020-09-02 11:40:22 +02:00
Noel De Martin bea621d6c6 MDL-69360 behat: Fix js ready checks for non-moodle sites 2020-09-02 10:20:52 +02:00
Andrew Nicols 28a8eb3856 Merge branch 'MDL-68892-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-09-02 09:49:21 +08:00
Eloy Lafuente (stronk7) fb39317a64 Merge branch 'wip_MDL-69491_m39' of git://github.com/gjb2048/moodle into MOODLE_39_STABLE 2020-09-02 00:27:43 +02:00
Sara Arjona 6e7f80363b Merge branch 'MDL-64525-m39' of https://github.com/NeillM/moodle into MOODLE_39_STABLE 2020-09-01 14:18:20 +02:00
Sara Arjona 82bd2ff5a9 Merge branch 'MDL-51709-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-09-01 09:04:24 +02:00
Mihail Geshoski e657192d31 MDL-69525 core: Publish a single event when toggling slave checkboxes 2020-09-01 14:54:07 +08:00
Sara Arjona 85782cffd7 Merge branch 'MDL-69394-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-09-01 06:45:26 +02:00
Tim Hunt fac004cfe9 MDL-69507 duration form field: should return an int number of seconds 2020-09-01 11:31:36 +08:00
Tim Hunt 221c293ac7 MDL-69507 duration form field: modernise coding style 2020-09-01 11:31:10 +08:00
Andrew Nicols 5ad20a0633 Merge branch 'MDL-69387-39-2' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-09-01 10:59:51 +08:00
Andrew Nicols d63bdf9bb9 Merge branch 'MDL-69505-39' of https://github.com/snake/moodle into MOODLE_39_STABLE 2020-09-01 07:29:23 +08:00
Andrew Nicols bc29f1c98a Merge branch 'MDL-56595-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-09-01 07:29:23 +08:00
Luca Bösch 4830f55122 MDL-51709 gradebook: Name display in single view. 2020-08-31 18:18:26 +02:00
Shamim Rezaie 48508e4ecc MDL-69116 qtype_multichoice: accessibility improvement
- Screen-readers should not see 'clear my choice' when it is not visible
- 'clear my choice' option should only become visible when a choice is
selected
2020-08-31 23:55:49 +10:00
Shamim Rezaie fbb2d6592d MDL-69116 qtype_mutichoice: Use label for the "clear my choice" link 2020-08-31 23:55:49 +10:00
Bas Brands 581a497189 MDL-69069 theme_boost: color contrast for custom alerts 2020-08-31 08:46:39 +02:00
Jake Dallimore 3d3314d433 MDL-69505 core_form: fix js min/max date restriction in dateselector
This was using the yui2-calendar attribute, not the yui 3 attribute.
2020-08-31 08:05:37 +08:00
Gareth Barnard a1f21bad0d MDL-69491 themes: No 'fontsize' setting in Boost causes unit conflict. 2020-08-28 14:10:54 +01:00
Marina Glancy 189810269a MDL-55340 mod_feedback: export question labels
This was present in export in 3.0 but got lost during export
refactoring in 3.1
2020-08-28 12:25:17 +02:00
Andrew Nicols e592c6dd9d Merge branch 'MDL-69112-39' of git://github.com/merrill-oakland/moodle into MOODLE_39_STABLE 2020-08-28 13:26:05 +08:00
Nathan Nguyen 563cfa0e1e MDL-68680 core_grades: check grade item before trigger delete event 2020-08-28 11:40:24 +10:00
Paul Holden 863fb96ffa MDL-56595 tool_usertours: set page params when configuring tours/steps. 2020-08-27 23:08:07 +01:00
Tim Hunt 10f03d2a99 MDL-69246 questions: allow for float issues when validating manual marks
As well as fixing the bug, I also rewrote the test to use
data providers, which should lead to more useful failure messages.

And, I moved the magic number we used as the float tolerence to
be a named constant.
2020-08-27 17:41:02 +01:00
Sara Arjona b3b04e083b weekly release 3.9.1+ 2020-08-27 17:36:31 +02:00
Sara Arjona 9262b490ee Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-08-27 17:36:29 +02:00
Jun Pataleta f37d0629ea MDL-69262 core: Use core/action_menu_link in core/action_menu_trigger
* Introduce the "actionmenulinkclasses" block in the action_menu_link
template so other templates importing it can have the option to override
its classes.
* Have the action menu trigger template use the action menu link
template to reduce code duplication.
2020-08-27 13:30:46 +08:00
Jun Pataleta 6d9518cf56 MDL-69262 core: Make instance count variable as a static class variable
With the static function variable $instance, calls to
\action_menu_link::export_for_template() from its subclasses are stored
in different variables. This causes duplicate IDs when different
implementations of action menu links are rendered on the action menu
trigger/link template. (e.g. action_menu_link and
action_menu_link_secondary both rendered on the same page).
To make the incrementing uniform for the action_menu_link class and its
implementations, the $instance variable is moved out of the
export_to_template() method and is now made to a static class variable.
2020-08-27 13:30:46 +08:00
Andrew Nicols 0d8bf37407 Merge branch 'MDL-69458-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-08-27 12:43:10 +08:00
Andrew Nicols 159115b7c7 Merge branch 'MDL-69501-39-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-08-27 11:31:17 +08:00
eWallah 930dba73c3 MDL-67413 competencies: do nothing upon activity completion 2020-08-27 11:09:57 +08:00
Andrew Nicols 22217ac42f Merge branch 'MOODLE_39_MDL-69358' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2020-08-27 10:57:57 +08:00
Justin Hunt d46ee17722 MDL-66810 mod_lti: Reinstate deprecated default permissions on iframe
microphone, webcam, camera, midi, encrypted-media, geolocation
2020-08-27 10:26:38 +08:00
Adrian Greeve 5f1d9df828 Merge branch 'MDL-69419-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-08-27 08:07:18 +08:00
AMOS bot 95cc0d562b Automatically generated installer lang files 2020-08-27 00:07:08 +00:00
Sara Arjona 3584cd786a Merge branch 'MDL-69389-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-08-26 18:03:06 +02:00
Sara Arjona fa92e6a809 Merge branch 'MDL-69114-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-08-26 16:28:49 +02:00
Jun Pataleta 1257e39d92 MDL-69389 theme_classic: Make default body font colour darker
Links and normal text should have at least a colour contrast ratio
of 3:1. To achieve this, $body-color will be using the darker
shade of gray $gray-900 (#212529).
2020-08-26 11:08:28 +08:00
Jun Pataleta 65c7339199 MDL-69389 theme_boost: Make default body font colour darker
Links and normal text should have at least a colour contrast ratio
of 3:1. To achieve this, $body-color will be using the darker
shade of gray $gray-900 (#212529).
2020-08-26 11:08:28 +08:00
Jun Pataleta 2cb720a3d2 MDL-69387 pix: Create PNG versions of the darkened completion icons
Thanks to Barbara Ramiro <barbara@moodle.com> for the help in
generating these PNG versions of the darkened completion icons!
2020-08-26 11:03:18 +08:00
Jun Pataleta 138ed9c1fa MDL-69387 pix: Darken completion icons
Darkened the fills of completion icons in order to meet the required
minimum contrast ratio of 3:1.
* Changed gray fills (#999) to #949494.
* Changed blue fills (#76A1F0) to #6393ee
* Changed green fills (#9C3) to #79a128

Thanks to Barbara Ramiro <barbara@moodle.com> for the help in
updating the SVG icons!
2020-08-26 11:03:18 +08:00
Jun Pataleta 3c7a4833e5 MDL-69394 calendar: Fix event colour indicator contrast
* Darkened the link and clickable icon colours inside coloured events.
* Added borders around event colour indicators inside the month-view of
  the calendar for better contrast against the white background.
2020-08-26 11:00:34 +08:00
Andrew Nicols 0400b5ef3f MDL-69419 core: Task reset tests cannot use random test times
If a scheduled task which uses a 'R' field is picked, then the reset of
updated task times will not necessarily be correctly determined as the
randomisation is picked during reset.

This can lead to some random test failures.

Actively specifying a test which does not make use of the 'R' random
field time addresses this issue.
2020-08-26 09:58:35 +08:00
AMOS bot 122ed3beaf Automatically generated installer lang files 2020-08-26 00:07:28 +00:00
Jun Pataleta b58a45df37 MDL-69391 theme: Darken course selector text colour
Use $gray-600 for a darker text colour in the course select box.
This also makes the colour consistent with the view selector which
also uses $gray-600.
2020-08-25 14:40:34 +08:00
Jun Pataleta 2d450e9a3b MDL-69391 theme: Darken navbar-light colour
Increase the opacity for the sass variable $navbar-light-color a
little bit in order to achieve an acceptable colour contrast against
the white background.
2020-08-25 14:40:34 +08:00
Adrian Greeve 3513964883 Merge branch 'MDL-68921-39' of git://github.com/vmdef/moodle into MOODLE_39_STABLE 2020-08-25 10:37:58 +08:00
Victor Deniz Falcon fde9d44286 MDL-68921 core_h5p: Add H5P libraries metadata settings
An upgrade step updates installed H5P libraries
2020-08-25 00:35:59 +01:00
Neill Magill ba8185cb2a MDL-64525 comments: Should not be able to delete frozen comments
Before this change in a frozen context a user would be able to delete
their own comments.

After this change a user will only be able to delete their own comments
if they still have the capability to post new comments or the capability
to delete comments from any user.
2020-08-24 08:00:36 +01:00
Neill Magill 362c598d1b MDL-64525 comments: Tests for deleting frozen comments 2020-08-24 08:00:35 +01:00
Mihail Geshoski 185fc93ed5 MDL-69458 report_insights: Respect perpage value in pagination bar 2020-08-24 09:30:46 +08:00
Eloy Lafuente (stronk7) 8b254440d6 Merge branch 'MDL-69493-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-22 17:09:43 +02:00
AMOS bot 5989a94787 Automatically generated installer lang files 2020-08-22 00:07:52 +00:00
Eloy Lafuente (stronk7) e290345cd6 weekly release 3.9.1+ 2020-08-21 20:43:20 +02:00
Helen Foster 4c48bccbad MDL-69501 lang: Import fixed English strings (en_fix)
Significant string change: error:nobadges,core_badges - Additional info
explaining that site badges can only have other site badges as criteria
2020-08-21 14:06:31 +02:00
Jun Pataleta ef1bb2b193 Merge branch 'MDL-66818-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-08-21 11:32:35 +08:00
Andrew Nicols 9e103451e2 MDL-66818 mod_forum: Use cap manager to check exportability 2020-08-21 08:17:16 +08:00
Andrew Nicols 832f5f7019 MDL-42434 chat: Disable stylelint important check 2020-08-21 07:38:06 +08:00
Sara Arjona 40f92ac55d MDL-42434 mod_chat: styles for chat themes to view help-icon properly
The styles for the bubble and the compact themes have been reviewed
because there weren't enough contrast for the help icon.
2020-08-20 23:42:56 +01:00
Sara Arjona 887efbd939 MDL-42434 mod_chat: display the whole help text
When testing this issue was raised that the help text was cut-off.
This patch should fix this issue changing the placement from
right/left to top.
2020-08-20 23:42:56 +01:00
Ferran Recio 6305c7b83c MDL-68892 mod_h5pactivity: add required to package 2020-08-20 17:20:13 +02:00
Adrian Greeve 6bbb4e4df2 Merge branch 'MDL-69055-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-08-20 12:02:49 +08:00
Andrew Nicols 79e98f6ac4 Merge branch 'MDL-69375_39' of https://github.com/Cvmcosta/moodle into MOODLE_39_STABLE 2020-08-20 11:51:08 +08:00
Adrian Greeve 1c1a96981d Merge branch 'MDL-68964-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-08-20 11:42:30 +08:00
Adrian Greeve 6e9d203e52 Merge branch 'MDL-42434-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-08-20 11:24:43 +08:00
Adrian Greeve c02fc98d06 Merge branch 'MDL-68683-39-fix' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-08-20 10:24:42 +08:00
Andrew Nicols 895e5748e1 Merge branch 'MDL-69449-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-20 09:25:19 +08:00
Andrew Nicols 96805ec18e Merge branch 'MDL-68889-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-08-20 09:19:22 +08:00
Simey Lameze 010f1eff60 MDL-68683 competencies: fix query to delete stale files 2020-08-20 09:13:15 +08:00
Simey Lameze a713a68af8 MDL-68683 competencies: step to delete orphaned evidence files 2020-08-20 09:09:37 +08:00
Simey Lameze 1547225e52 MDL-68683 core: fix DML exception on upgrade step 2020-08-20 09:02:50 +08:00
Andrew Nicols cc52ff7703 Merge branch 'MDL-67415_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2020-08-20 08:30:11 +08:00
Andrew Nicols 3f51798192 Merge branch 'MDL-66818-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-08-20 08:17:01 +08:00
Simey Lameze 8578e19aff MDL-66818 mod_forum: remove unnecessary behat steps 2020-08-20 08:05:00 +08:00
gthomas2 e4ffa5f3f6 MDL-66818 mod_forum: hide portfolio export button based on caps 2020-08-20 08:05:00 +08:00
Andrew Nicols 8cc9ebea1e Merge branch 'MDL-66900-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-20 07:54:30 +08:00
Andrew Nicols 2cb5248ac3 Merge branch 'MDL-69473-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-08-20 07:44:12 +08:00
Andrew Nicols 43a9717a33 Merge branch 'MDL-69271_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2020-08-20 07:35:40 +08:00
Andrew Nicols 4fd5a7bfcb Merge branch 'MDL-69054-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-08-20 07:32:03 +08:00
Andrew Nicols 3c2c15d4dc Merge branch 'MDL-61215-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-08-20 07:17:13 +08:00
Andrew Nicols 7969cfb39f Merge branch 'MDL-69401-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-08-20 07:03:36 +08:00
Victor Deniz Falcon f2fe8b1664 Merge branch 'MDL-69297-39' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2020-08-19 23:45:32 +01:00
Eloy Lafuente (stronk7) 23dc056578 MDL-63375 workshop: apply specific IE10/11 fix
Credit goes to Matt Davidson (Syxton)
2020-08-19 17:54:45 +02:00
Peter Dias 6e37e120fc MDL-69297 assign: Check whether there is content for a submission
Confirm there is some content to be submitted for an assignment when processing it.
2020-08-19 15:48:42 +08:00
Adrian Greeve 091a6ca62e Merge branch 'MDL-66665-39-POC2' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2020-08-19 14:29:06 +08:00
Peter Dias a8cdc38272 MDL-66665 assign: Check whether a modified user could actually grade 2020-08-19 13:41:12 +08:00
Adrian Greeve 2296b4b16e Merge branch 'MDL-68683-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-08-19 12:57:04 +08:00
Adrian Greeve 4e873c2ab6 Merge branch 'MDL-69475_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2020-08-19 10:44:23 +08:00
Andrew Nicols 130d29bb5f Merge branch 'MDL-26401-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-08-19 08:52:02 +08:00
Andrew Nicols 3ae4d6e824 Merge branch 'MDL-69089-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2020-08-19 08:20:00 +08:00
Eloy Lafuente (stronk7) be1847d075 Merge branch 'MDL-65847-auth_db_error_handling-39' of git://github.com/leonstr/moodle into MOODLE_39_STABLE 2020-08-19 00:35:37 +02:00
Eloy Lafuente (stronk7) 68810e04c6 Merge branch 'MDL-69095-39' of git://github.com/jleyva/moodle into MOODLE_39_STABLE 2020-08-19 00:19:51 +02:00
Eloy Lafuente (stronk7) b8b894dd36 Merge branch 'MDL-63375-39' of https://github.com/syxton/moodle into MOODLE_39_STABLE 2020-08-19 00:13:13 +02:00
Eloy Lafuente (stronk7) a12b0aff07 Merge branch 'MDL-68444-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2020-08-18 19:15:13 +02:00
Eloy Lafuente (stronk7) 3523edfd90 MDL-69475 backup: Proper handling of backup::RELEASE versions
1) Remove any floatval() casting. They are breaking / killing
   .10 versions (converting them to .1). Since Moodle 2.0 all the
   backup::RELEASE have been 100% numerical values.
2) Use version_compare() always to compare backup::RELEASE values.
   They are always versions and the function is aware of versions
   > .9, able to clean/ignore alpha chars... and everything else.

Note that I've also changed a couple of cases in formats (topics and
weeks) that were correct, but just added the same comment and used
the same version_compare() comparison parameters style, so all uses
in core are consistent (and safe to be copied out there).
2020-08-18 16:24:57 +02:00
Eloy Lafuente (stronk7) fbaab99733 Merge branch 'MDL-69273-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-08-18 10:59:37 +02:00
Simey Lameze 6408db6427 MDL-68683 competencies: step to delete orphaned evidence files 2020-08-18 16:05:59 +08:00
Simey Lameze 2cd36e8ea0 MDL-68683 core: fix DML exception on upgrade step 2020-08-18 16:04:32 +08:00
Andrew Nicols 6a930e2c88 MDL-69273 travis: Use exttests for https too 2020-08-18 07:50:48 +08:00
Andrew Nicols 78079c3f2b MDL-69273 travis: Move exttests check to after_script
The result of the final command `script` phase determines the build
result.

The cleanup belongs in the `after_script` phase.
2020-08-18 07:40:14 +08:00
Paul Holden a88c706d98 MDL-69493 cohort: remove escaping of return URL params. 2020-08-17 21:30:14 +01:00
Amaia Anabitarte b9d20f8481 MDL-69089 core_contentbank: Tests for empty content names 2020-08-17 15:56:35 +02:00
Amaia Anabitarte 545b24fa52 MDL-69089 core_contentbank: Empty content names are not allowed 2020-08-17 15:56:35 +02:00
Andrew Nicols 2f6437ec5c Merge branch 'MDL-69414_M39' of https://github.com/nadavkav/moodle into MOODLE_39_STABLE 2020-08-17 14:52:46 +08:00
Mihail Geshoski 806042d58a MDL-69401 book: Limit character length in chapter title 2020-08-17 09:04:02 +08:00
carlos 58e66823a2 MDL-69375 mod_lti: Fix Names and Roles Link header format
- Changed line 469 of memberships.php to build Link header according to the Web Linking specification RFC8288.
2020-08-14 17:15:47 -03:00
Sara Arjona 119010b16d MDL-42434 mod_chat: add again the usingchat help icon
In Moodle 2.4 the help icon displayed in the chat window was
removed. It has been added to gui_ajax and gui_basic in order to help users.
2020-08-14 17:13:06 +02:00
Sara Arjona c6895d7dd4 MDL-69055 core_badges: display password/oauth fields properly 2020-08-14 17:10:33 +02:00
Sara Arjona 1f7f5e368d MDL-69054 core_badges: allow editing OBv1.0 backpacks 2020-08-14 17:09:45 +02:00
Sara Arjona b80006b600 MDL-61215 core_user: use the new optimised_image filetype group
For the user profile picture (instead of the web_image which includes
SVG files).
2020-08-14 17:06:57 +02:00
Sara Arjona 9e42721660 MDL-61215 core_badges: use the new optimised_image filetype group
For the badge picture (instead of the web_image which includes
SVG files).
2020-08-14 17:06:57 +02:00
Sara Arjona 0f13aee6fb MDL-61215 core_files: add new optimised_image group
Currently, PHP getimagesize method doesn't support SVG images.
As some features, such as badges, processs and optimise the images
before using them, a new filetype group has been created to exclude
SVG from there: optimised_image.
SVG can't be removed from web_image because then users won't be
able to add SVG images to their courses using labels, pages...
2020-08-14 17:06:57 +02:00
Eloy Lafuente (stronk7) 8cc4708c2a MDL-69271 auth_ldap: Don't assume any ordering, just verify matches
Both ldap or the DB can return information in a non-consistent
ordering leading to events to be generated in different order.

And current tests are, right now, assuming a given order.

Note this is a rare random, but it's happening, so better
fix it, see the issue for some more details.

So we just do the tests ordering immune, verifying that all the
expected events have been triggered and done. Irrespectively of their order.
2020-08-14 13:40:09 +02:00
Sara Arjona 507d51eebf MDL-69473 contentbank: change incorrect ref to size in type column 2020-08-14 08:54:20 +02:00
Andrew Nicols 89d8f73703 weekly release 3.9.1+ 2020-08-14 14:42:37 +08:00
Andrew Nicols f0f37cb2e7 NOBUG: Fixed SVG browser compatibility 2020-08-14 14:42:35 +08:00
Andrew Nicols 62cd827dc5 Merge branch 'MDL-68666-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-08-13 15:21:28 +08:00
Bas Brands 1b682b3b6a MDL-68666 core_pix: add missing fallback icons 2020-08-13 08:49:27 +02:00
Andrew Nicols 5e372ecd61 Merge branch 'MDL-69253_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-08-13 11:52:32 +08:00
Andrew Nicols 4401c891e8 Merge branch 'MDL-60492-tagcloud_html-39' of https://github.com/leonstr/moodle into MOODLE_39_STABLE 2020-08-13 11:45:10 +08:00
Andrew Nicols 61a17c94be Merge branch 'MDL-69381-39' of https://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2020-08-13 11:29:09 +08:00
Adrian Greeve 75911e67bd Merge branch 'MDL-68423-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-08-13 11:05:37 +08:00
Andrew Nicols 3a2eb35800 Merge branch 'MDL-68932-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2020-08-13 10:52:26 +08:00
Andrew Nicols 5ae88aba9d Merge branch 'MDL-69421-39' of git://github.com/noeldemartin/moodle into MOODLE_39_STABLE 2020-08-13 09:35:59 +08:00
Andrew Nicols dbd0a1dbf7 Merge branch 'MDL-67991-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2020-08-13 09:04:15 +08:00
Andrew Nicols d1e4c0fecc Merge branch 'MDL-69241-39' of git://github.com/mickhawkins/moodle into MOODLE_39_STABLE 2020-08-13 08:47:03 +08:00
Andrew Nicols 522dd18e62 Merge branch 'MDL-60260-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-13 07:55:21 +08:00
Andrew Nicols 563bfb4582 Merge branch 'MDL-69143-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-08-13 07:45:44 +08:00
Eloy Lafuente (stronk7) f03d9e1aab MDL-67415 environment: change requirements
- mysql requirement up to 5.7
- postgres requirement up to 9.6
2020-08-13 01:30:01 +02:00
Eloy Lafuente (stronk7) 454a93cbbf MDL-67415 environment: 3.10 base information
This is a direct copy of the 3.9 branch to have
changes under control easier for next commits.
2020-08-13 01:30:00 +02:00
Eloy Lafuente (stronk7) a64f376595 Merge branch 'MDL-68860-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-13 01:08:32 +02:00
Eloy Lafuente (stronk7) f620bbf2f5 Merge branch 'MDL-68558-39-plugindepscheckdeadend' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-08-13 00:40:17 +02:00
Eloy Lafuente (stronk7) 4ddbc1ee38 Merge branch 'MDL-67394-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-13 00:29:15 +02:00
Eloy Lafuente (stronk7) f9bd169b6e Merge branch 'MDL-67002_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-08-13 00:26:09 +02:00
Ferran Recio 332fdda507 MDL-68964 mod_chat: fix theme param 2020-08-12 17:30:02 +02:00
Ferran Recio 77f46da53a MDL-69143 contentbank: catching Exception on file upload 2020-08-12 16:58:26 +02:00
Bas Brands ebacd8353f MDL-68889 block_recentlyaccessedcourses: small viewport issues
- on small devices the recentlyaccessedcourses does not show any courses
2020-08-12 13:05:13 +02:00
Paul Holden a97c45a15d MDL-66900 course: don't clean category description when editing. 2020-08-12 11:48:29 +01:00
Simey Lameze f307dc23d7 MDL-26401 group: change import to use csv_import_reader class 2020-08-12 16:35:56 +08:00
Simey Lameze b21f182106 MDL-26401 group: add delimiter and encoding fields to import 2020-08-12 16:35:56 +08:00
Paul Holden 0991b0a091 MDL-69449 block_timeline: use dayslimit context data in template.
Ensures the correct value is used when initially rendering the
course timeline.
2020-08-12 09:19:29 +01:00
Andrew Nicols 54eb1f8f23 Merge branch 'MDL-68618-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-12 13:41:00 +08:00
Andrew Nicols 97df1db020 Merge branch 'MDL-69353-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-12 11:22:40 +08:00
Andrew Nicols 8c1eb6cfd3 Merge branch 'MDL-68334-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-08-12 11:14:05 +08:00
Andrew Nicols 4eeb1bbd8f Merge branch 'MDL-69296-m39' of https://github.com/NeillM/moodle into MOODLE_39_STABLE 2020-08-12 10:29:58 +08:00
Mikhail Golenkov 5778aa1fa1 MDL-69358 backup: Do not clean up records for incomplete adhoc tasks.
Co-authored-by: Heena Agheda <heenaagheda@catalyst-au.net>
2020-08-12 12:07:28 +10:00
Andrew Nicols a0c582342c Merge branch 'MDL-68731_39' of https://github.com/jonof/moodle into MOODLE_39_STABLE 2020-08-12 09:11:25 +08:00
Andrew Nicols cf13f285e4 Merge branch 'MDL-69143-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-08-11 14:34:10 +08:00
Andrew Nicols 08d7dd1db4 Merge branch 'MDL-69168_recently-accessed-items-block-uses-stock-lti-icon__MOODLE_39_STABLE' of https://github.com/stopfstedt/moodle into MOODLE_39_STABLE 2020-08-11 13:00:36 +08:00
Adrian Greeve a6908c3ee8 Merge branch 'MDL-69204-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-11 08:45:14 +08:00
Paul Holden cc91fe0988 MDL-68618 mod_forum: stop reverting idnumber when updating instance. 2020-08-10 09:11:12 +01:00
Paul Holden f66e6749ae MDL-68860 mod_lti: Oracle support for retrieving shared secrets.
Thanks to Mark van Hoek!
2020-08-10 09:06:07 +01:00
Adrian Greeve f3fd372584 Merge branch 'MDL-60493-grader_span_tag-39' of https://github.com/leonstr/moodle into MOODLE_39_STABLE 2020-08-10 09:22:18 +08:00
Nadav Kavalerchik e29a887814 MDL-69414 qtype/ddimageortext: Fix dropzones display in RTL mode 2020-08-09 11:45:21 +03:00
Luca Bösch f1743d9179 MDL-68334 user: Display name in footer as elsewhere. 2020-08-08 10:38:40 +02:00
Stefan Topfstedt 73827e8eda MDL-69168 block_recentlyaccesseditems: apply custom icon
Overwrite the default mod icon with the configured icon url if
applicable.
2020-08-07 09:15:05 -07:00
Matt Davidson abb81c79d7 MDL-63375 workshop: fix rubric grid view 2020-08-07 08:48:41 -04:00
Amaia Anabitarte 8b55712485 MDL-67991 availability: Fix access restrictions labels 2020-08-07 10:02:25 +02:00
Michael Hawkins f967acc533 MDL-69241 lib: Reset dynamic tables to page 1 when filtering or sorting
This ensures consistency and that the page will always exist, which may
not be true for later pages if applying filters returns fewer results.
2020-08-07 12:53:26 +08:00
Eloy Lafuente (stronk7) 61d4bf3f88 weekly release 3.9.1+ 2020-08-06 20:51:32 +02:00
Noel De Martin 94dc00614c MDL-69421 behat: Revert app behat navigation to call session visit 2020-08-06 12:15:51 +02:00
Jun Pataleta 976ec609bc Merge branch 'MDL-60501-h4_close_tag-39' of https://github.com/leonstr/moodle into MOODLE_39_STABLE 2020-08-06 12:11:18 +08:00
Jun Pataleta 7cc4f8883a Merge branch 'MDL-69111-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-08-06 11:36:48 +08:00
Adrian Greeve 9b48e7420e Merge branch 'MDL-40227-39-1' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2020-08-06 11:28:34 +08:00
Peter eae4f24877 MDL-40227 mod_lesson: Use localised float formatting
* Leverage PARAM_LOCALISEDFLOAT
* Store all numbers with standard '.' dec formatting
* Show all numbers based on locale settings
* Behat test to cover different cases using numeric questions and modified locale setting
2020-08-06 10:44:59 +08:00
Adrian Greeve 72e24ec057 Merge branch 'MDL-69311-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-06 09:49:32 +08:00
Adrian Greeve da2cb39c15 Merge branch 'MOODLE_39_MDL-66626' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2020-08-06 09:07:26 +08:00
Eloy Lafuente (stronk7) 695b470305 Merge branch 'MDL-66670-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-08-06 00:58:26 +02:00
Leon Stringer 076bbff5a7 MDL-60492 core_tag: Fix title attribute
Attribute 'title' was specified inside a condition but closing `"` was
outside condition possibly resulting in <a href="..." class="..." ">.
Also moved </a> outside of condition to match <a>.
2020-08-05 12:55:02 +01:00
Shamim Rezaie 023064558f MDL-68932 core: showhidesettings to work with multiple hideIf()s 2020-08-05 19:08:27 +10:00
Adrian Greeve a934784741 Merge branch 'MDL-68647-39-forumprivacysql' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-08-05 14:22:22 +08:00
Adrian Greeve 13a31a6b83 Merge branch 'MDL-60932-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2020-08-05 10:08:50 +08:00
Eloy Lafuente (stronk7) f29c1bee74 Merge branch 'MDL-67831-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-08-05 00:47:33 +02:00
Tim Hunt 3c5ba23f7f MDL-69253 mod_quiz: unit test for the last commit 2020-08-04 14:50:57 +01:00
Josh Ebarvia 777c810671 MDL-69253 mod_quiz: Fix timecreated is 0 when creating a quiz activity 2020-08-04 14:50:57 +01:00
Jun Pataleta 9a642c49e1 Merge branch 'MDL-60574_39' of https://github.com/t-schroeder/moodle into MOODLE_39_STABLE 2020-08-04 19:51:20 +08:00
Eloy Lafuente (stronk7) a5708767a0 Merge branch 'MDL-55299-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-08-04 12:34:06 +02:00
Jun Pataleta 1117eb6579 Merge branch 'MDL-69336-39' of git://github.com/mickhawkins/moodle into MOODLE_39_STABLE 2020-08-04 16:54:21 +08:00
Tim Schroeder f131e22bc4 MDL-60574 atto_undo: fixed redo erasing content
When you'd hit ctrl-y with nothing on the redo stack the entire
content of Atto would get deleted with no way of getting it back.
2020-08-04 09:25:00 +02:00
Michael Hawkins 76fd40f2f9 MDL-69336 lib: Correctly return promises when table show/hide columns
Previously showColumn and HideColumn were returning nothing, so
attempts to catch exceptions were themselves throwing errors in the
browser console.
2020-08-04 15:20:29 +08:00
Michael Hawkins 52925cb9df MDL-69336 lib: Reinstating tablelib column show/hide functionality
Also added behat testing for hide/show columns in participants table.
2020-08-04 15:20:29 +08:00
Eloy Lafuente (stronk7) 3d68237956 Merge branch 'MDL-69367-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-03 16:29:09 +02:00
Leon Stringer b79b33c664 MDL-65847 auth_db: user_update() handle errors
The external database authentication plugin (auth_db) can update the
external database if mapped fields are set to Update external: On
update.  This change adds error handling in case this update fails.
2020-08-03 11:49:55 +01:00
Eloy Lafuente (stronk7) 8a6b5024a1 Merge branch 'MDL-62980-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-03 12:38:25 +02:00
Bas Brands f51dcd3c96 MDL-69114 theme_boost: improve the color contrast for .*-info classes 2020-08-03 11:36:48 +02:00
Eric Merrill 7a4f10ddda MDL-69112 assign: Improve parsing of uploaded feedback names 2020-07-31 19:08:27 -04:00
Marina Glancy 2d7f517b5b MDL-69381 core_backup: make progressbar selector more specific 2020-07-31 13:30:07 +02:00
Amaia Anabitarte 3161583d89 MDL-60932 core_user: Fix docs link for participants page
Co-authored by: David Mudrák <david@moodle.com>
2020-07-31 10:30:18 +02:00
Neill Magill 9e3b1f2d7e MDL-69296 resource: Pressing cancel should always exit settings form
Before this change if a user used navigated to a resource activity
from another activity and then edited the settings it was likely
that using the cancel button would result in file downloading,
rather than being returned to their last page.

After this change the user will be back on the page they came from.
2020-07-31 07:57:29 +01:00
Paul Holden ff2d425711 MDL-67394 dml: improve thrown exception when Oracle can't parse query. 2020-07-30 16:23:00 +01:00
Victor Deniz Falcon 95c4f624c8 weekly release 3.9.1+ 2020-07-30 12:54:18 +01:00
Victor Deniz Falcon 7882fff01a Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-07-30 12:54:12 +01:00
Paul Holden d68848383e MDL-62980 tool_dataprivacy: show persistent errors inside form. 2020-07-30 08:23:19 +01:00
AMOS bot f395c5b238 Automatically generated installer lang files 2020-07-30 00:09:02 +00:00
Eloy Lafuente (stronk7) a9782addfc Merge branch 'MDL-63252-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-07-30 00:47:57 +02:00
Victor Deniz Falcon d093887447 Merge branch 'MDL-66707-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2020-07-29 23:17:25 +01:00
Victor Deniz Falcon f0be299db3 Merge branch 'MDL-68968-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-07-29 22:02:28 +01:00
Paul Holden 6a3edc34bd MDL-60260 course: validate external fields on create/update course.
Ensure course fullname/shortname fields are not empty.
2020-07-29 19:57:22 +01:00
Victor Deniz Falcon 135dfe2144 Merge branch 'MDL-68706-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-07-29 19:05:02 +01:00
Ferran Recio 13de4b94dc MDL-69143 contentbank: fix tests when extra plugins installed 2020-07-29 17:52:26 +02:00
Ferran Recio c6ec3c048e MDL-69143 contentbank: add import file method to content 2020-07-29 17:52:26 +02:00
Victor Deniz Falcon 6d1680998d Merge branch 'MDL-69199-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2020-07-29 11:54:46 +01:00
Jonathon Fowler bbfcb91b1f MDL-68731 forum: fix digests not correctly updating post read statuses 2020-07-29 15:41:31 +10:00
Jun Pataleta 7d1f5e81ea Merge branch 'MDL-69252-close_tag-39' of https://github.com/leonstr/moodle into MOODLE_39_STABLE 2020-07-29 11:17:40 +08:00
Eloy Lafuente (stronk7) 5f9d183b46 Merge branch 'MDL-69319-39' of https://github.com/snake/moodle into MOODLE_39_STABLE 2020-07-29 00:20:37 +02:00
Paul Holden 646ebff5dd MDL-69367 quizaccess_seb: correct foreign key table reference. 2020-07-28 13:33:59 +01:00
Juan Leyva 8f6f312d65 MDL-69095 tool_mobile: Display warning if not allowed to use qr login 2020-07-28 13:55:21 +02:00
Juan Leyva 5762e5ec3e MDL-69095 tool_mobile: Avoid non-https sites using qrlogin by default 2020-07-28 13:55:21 +02:00
Leon Stringer 52dbe51339 MDL-60493 mod_assign: Unused JS variables
Removed unused JavaScript variables fixing CI warning "ESLint error
[no-unused-vars]".
2020-07-28 12:04:03 +01:00
Leon Stringer dfaad3e8ca MDL-60493 mod_assign: Remove rogue </span>
In the grading interface (/mod/assign/view.php?id=2&action=grader)
there was a rogue </span> with no opening <span>.  Also changed
<span><form> to <div><form> in included template fixing CiBoT HTML
Validation error.
2020-07-28 12:03:29 +01:00
Jun Pataleta 7da6f2675d Merge branch 'MDL-65453-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-07-28 11:42:17 +08:00
Simey Lameze 9ae2623d89 MDL-65453 core: fix behaviour of --skip-database option on install 2020-07-28 11:27:30 +08:00
Paul Holden e64f37c3c5 MDL-69204 tool_dataprivacy: summary link only on current user profile. 2020-07-27 17:25:02 +01:00
Jun Pataleta b39ed13500 Merge branch 'MDL-66755-39' of https://github.com/SergioComeron/moodle into MOODLE_39_STABLE 2020-07-27 16:55:43 +08:00
Adrian Greeve 532a81f846 Merge branch 'MDL-69079-39-1' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-07-27 08:54:26 +08:00
AMOS bot 2b96f7b343 Automatically generated installer lang files 2020-07-27 00:07:30 +00:00
AMOS bot 6a07b3c08c Automatically generated installer lang files 2020-07-27 00:07:30 +00:00
Mikhail Golenkov 744726275d MDL-66626 assignfeedback_editpdf: Check page count for attempt.
Co-Authored-By: John Yao <johnyao@catalyst-au.net>
2020-07-27 09:51:11 +10:00
Mikhail Golenkov 07afdeedac MDL-66626 assignfeedback_editpdf: Count files outside of foreach loop.
Co-Authored-By: John Yao <johnyao@catalyst-au.net>
2020-07-27 09:51:11 +10:00
AMOS bot b8c3fefd02 Automatically generated installer lang files 2020-07-25 00:07:55 +00:00
Paul Holden ac7cb0921b MDL-68706 customfield_textarea: allow field content to be cleared. 2020-07-24 13:44:48 +01:00
Paul Holden 6b6a083916 MDL-69353 admin: set page title when prompting for upgrade key. 2020-07-24 13:30:27 +01:00
Tim Hunt 6acd719f0f MDL-67002 quiz reports: fix sorting on Oracle in the responses report 2020-07-24 11:45:02 +01:00
Sergio Comerón 455e7f50d8 MDL-66755 forum: Subscription cancel when edit a message 2020-07-24 09:04:25 +02:00
Mihail Geshoski f49fe84488 MDL-69079 core: Restore and set missing guest user 2020-07-24 11:11:42 +08:00
Mihail Geshoski 5ce4bd05df MDL-69079 course: Handle missing guest when fetching recommended modules 2020-07-24 11:09:31 +08:00
Mihail Geshoski b9f2e3d99b MDL-69079 course: Handle fetch module data failures in activity chooser 2020-07-24 11:09:28 +08:00
AMOS bot 42bcf62000 Automatically generated installer lang files 2020-07-24 00:09:19 +00:00
Sam Marshall 86f5acdc88 MDL-63252 tool_xmldb: convert default to float to avoid false positives 2020-07-24 07:53:52 +08:00
Simey Lameze 45aa8db99d MDL-68968 core: fix wrong phpdoc on admin_externalpage 2020-07-24 07:46:22 +08:00
Amaia Anabitarte d35fc78761 MDL-69199 mod_quiz: Show timefinish in user Complete report 2020-07-23 18:54:05 +02:00
Victor Deniz Falcon d8b0be3eb3 weekly release 3.9.1+ 2020-07-23 16:10:40 +01:00
Victor Deniz Falcon 12e884c5b3 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-07-23 16:10:34 +01:00
David Mudrák 115d6033fc MDL-68558 admin: Allow to go back to plugins check page on failed deps
Once the admin reaches the Plugin dependencies check with a failed
plugin dependency, the "Continue" button should take him/her to the
previous page where the dependency can be sorted out, or the plugin
installation cancelled. Also the "Cancel this installation" should work
on this page, too.

None of this was happening correctly because the page with failed
dependencies is loaded with "confirmplugincheck" set to 1 as a result
of confirming the previous step. We must explicitly override it back to
0 to navigate the user back to the previous step.
2020-07-23 17:02:31 +02:00
Bas Brands 9ffeab1ad1 MDL-67831 core_message: use space available for message index page
- the prevents the message reply box from being out of view when
a user has many conversations.
2020-07-23 11:34:44 +02:00
AMOS bot 7bad9a9f15 Automatically generated installer lang files 2020-07-23 00:07:49 +00:00
Victor Deniz Falcon 5a003a1da9 Merge branch 'MDL-65819-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-07-22 19:00:14 +01:00
Ferran Recio 9e96129104 MDL-55299 mod_feedback: fix quoted values donwload 2020-07-22 19:23:46 +02:00
Paul Holden 5068d59b13 MDL-69311 dataformat: correct license docblock.
When this class was implemented in 8844cb82, it incorrectly set the
license to Moodle Workplace.
2020-07-22 10:44:38 +01:00
Andrew Nicols bf9c4ab68a MDL-69138 behat: Update session->visit() to use visit step 2020-07-22 16:46:51 +08:00
Andrew Nicols 44022305cc MDL-69138 behat: Add "I visit :localurl" step 2020-07-22 16:46:51 +08:00
Jun Pataleta 0595cfb07d Merge branch 'MDL-52052-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-07-22 13:47:06 +08:00
Jun Pataleta c8098c7a80 Merge branch 'MDL-68178-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-07-22 12:58:58 +08:00
Eloy Lafuente (stronk7) 2e71c132fe Merge branch 'MDL-69160-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-21 23:29:36 +02:00
Bas Brands 7c3522f902 MDL-69111 mod_forum: forum grading on small viewports
- changes to make the forum grading UI accessible in small
viewports to meet criterion 1.4.10 Reflow.
2020-07-21 17:43:03 +02:00
David Mudrák 4dcb3165e7 MDL-68647 forum: Add index over posts privatereplyto field
This is to further improve the performance of searching of posts related
to the given user. Once both userid and privatereplyto are indexed, the
query planner can use the merged index to search for posts records.
2020-07-21 11:51:20 +02:00
David Mudrák 4fbe8bec4a MDL-68647 forum: Improve the SQL performance in the privacy provider
The idea here is to replace the existing LEFT JOINs and
OR / IS NOT NULL conditions with INNER JOINs and ANDs. So we gather the
discussions data from all three areas in individual queries, make their
UNION. The GROUP BY was present before and maybe it is not even needed
any more (due to how UNION works) but it should not hurt to keep it.

This leads to significantly improved performance.
2020-07-21 11:48:35 +02:00
David Mudrák 4a723a329e MDL-68647 forum: Add missing advanced grading library inclusion
The method get_grading_manager() is called in the file so make sure the
library is loaded. Without it, the forum's privacy provider unit test
ended with error.

Not directly related to the issue, but noticed while working on it.
2020-07-21 11:48:35 +02:00
Adrian Greeve 592b8980aa Merge branch 'MDL-67657-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-21 14:48:10 +08:00
Ferran Recio 1e63a97698 MDL-68423 message: avoid self-xss when send a message 2020-07-20 19:52:58 +02:00
Eloy Lafuente (stronk7) 9d41810bed Merge branch 'm39_MDL-67440' of https://github.com/danmarsden/moodle into MOODLE_39_STABLE 2020-07-20 17:08:21 +02:00
Leon Stringer 8cdebcf4e0 MDL-60501 themes: Fix closing <h4> in template
In site admin pages (/admin/search.php) <h4> elements were generated
with an incorrect second opening <h4> instead of a closing </h4>.
2020-07-20 15:48:50 +01:00
Bas Brands 9744e6e8cb MDL-66670 theme_boost: list bullet styling
Ensure lists with bullets are not cut off
2020-07-20 14:49:08 +02:00
Jake Dallimore f4d6bd1188 MDL-69319 mod_lti: style and docs changes in external tests 2020-07-20 15:00:25 +08:00
Jake Dallimore d8c8c75ec4 MDL-69319 mod_lti: replace try/catch with expectException in ext tests 2020-07-20 15:00:25 +08:00
Jake Dallimore 9eaaa8997b MDL-69319 mod_lti: remove unused vars from externallib_test 2020-07-20 15:00:24 +08:00
Jake Dallimore ef2a7d7302 MDL-69319 mod_lti: move test data generation out of common setup 2020-07-20 15:00:24 +08:00
Jake Dallimore b660b92b3f MDL-69319 mod_lti: call clean_returnvalue in external tests 2020-07-20 15:00:24 +08:00
Mihail Geshoski 87ae4833c4 MDL-68178 auth: CSRF protection for the resend confirmation email form
Credit to Chandra Kishor.
2020-07-20 12:36:29 +08:00
Adrian Greeve 4f9d34da81 Merge branch 'MDL-69113_39' of https://github.com/jonof/moodle into MOODLE_39_STABLE 2020-07-20 10:37:03 +08:00
Mihail Geshoski 13ad9d1f5b MDL-52052 gradeimport_csv: Do not skip rows with blank user fields 2020-07-20 08:55:05 +08:00
Eloy Lafuente (stronk7) 8cf328dc54 Merge branch 'MDL-69278-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-18 11:56:01 +02:00
Paul Holden af1f371aa7 MDL-65819 message: send contact requests using recipient language. 2020-07-17 13:33:20 +01:00
Sara Arjona 3e78b603a5 weekly release 3.9.1+ 2020-07-16 21:28:34 +02:00
Andrew Nicols 50da793d5b MDL-67657 behat: Open course with editing using URL
This is a huge performance improvement for behat.

The current set of steps loads the page
It then looks for the Classic/Clean version of the settings menu
If it fails to find it looks for the Boost Cog
Then it clicks the "Turn editing on" button

This can take a substantial period.

We do not actually need to run these steps as we are able to jump
straight to the URL. We already have access to the sesskey value
required to do this.

There is not loss in testing functionality because the actual testing of
the Turn editing functionality is tested in other places sufficiently.
2020-07-16 11:06:43 +08:00
Andrew Nicols 4affbe94be MDL-67657 behat: Convert existing uses of executeScript 2020-07-16 11:06:31 +08:00
Andrew Nicols d18eacbd35 MDL-67657 behat: Add wrapper for JS execution 2020-07-16 11:05:32 +08:00
Jun Pataleta 3de3755281 Merge branch 'MDL-69215-39-2' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-16 09:42:52 +08:00
Andrew Nicols 04a1611139 MDL-69278 behat: Correct variable name 2020-07-16 08:29:57 +08:00
Andrew Nicols 0b5889d299 MDL-69278 behat: Mark tests as failed when unable to start Session 2020-07-16 08:29:57 +08:00
Andrew Nicols aa6bf0f367 MDL-69215 output: Correct use of icon_system::instance 2020-07-16 07:30:32 +08:00
Andrew Nicols 7164e1626e MDL-69215 output: Correct font awesome for themes 2020-07-16 07:30:32 +08:00
Eloy Lafuente (stronk7) a869415180 Merge branch 'MDL-69214-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-07-16 00:01:19 +02:00
Eloy Lafuente (stronk7) b39f2de8ad Merge branch 'MDL-69165-39' of https://github.com/HuongNV13/moodle into MOODLE_39_STABLE 2020-07-15 23:47:24 +02:00
Charles Fulton b02b1f3ea9 MDL-69074 admin: ensure consistent default for getremoteaddrconf 2020-07-15 19:05:52 +02:00
Sara Arjona 72ad5d94ea Merge branch 'MDL-68605_39' of https://github.com/t-schroeder/moodle into MOODLE_39_STABLE 2020-07-15 18:52:46 +02:00
Sara Arjona 1c2358de43 Merge branch 'MDL-68210-39' of https://github.com/snake/moodle into MOODLE_39_STABLE 2020-07-15 18:19:44 +02:00
Shamim Rezaie ba56dfb574 MDL-66707 mod_forum: do not blindly mark discussion replies as read 2020-07-15 22:27:10 +10:00
Sara Arjona da48e72353 Merge branch 'MDL-67671_39_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_39_STABLE 2020-07-15 14:11:46 +02:00
Sara Arjona 3c5757b0e2 Merge branch 'MDL-57678-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-07-15 12:56:20 +02:00
Jun Pataleta e1a310bde7 MDL-57678 core_course: Remove padding of nbsp's on category names
Padding nested course categories by space to make them render in a tree
structure does not really make a lot of sense as they are already being
rendered as full paths. It's simpler to show them without the
indentation.
2020-07-15 18:27:02 +08:00
Sara Arjona a040f29f03 Merge branch 'MDL-69068-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-15 12:20:30 +02:00
Andrew Nicols 3f3262c76e MDL-69068 behat: Allow singular, pivotted data generators 2020-07-15 15:27:31 +08:00
Andrew Nicols 5018c4e4db MDL-69068 behat: New step to support singular generators 2020-07-15 15:27:31 +08:00
Jake Dallimore 6e5ae126af Merge branch 'MDL-69206-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-07-15 10:29:28 +08:00
Sara Arjona a0b8d8c0ff Merge branch 'MDL-68715-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-07-14 14:31:55 +02:00
Shamim Rezaie 1636ee5980 MDL-68444 calendar: Improve how screenreaders say week titles
Also removed the scope attribute from the mini-calendar table
because according to https://www.w3.org/TR/WCAG20-TECHS/H63.html
it was not needed:
  Note 1: For simple tables that have the headers in the first row
  or column then it is sufficient to simply use the TH elements without
  scope.
2020-07-14 22:12:49 +10:00
Shamim Rezaie a092131b73 MDL-68444 calendar: Improve how screenreaders read day titles
Screenreaders now know if each day has any event or not
2020-07-14 22:12:49 +10:00
Paul Holden b4a73ff47f MDL-68715 completion: fix form default value for course prerequisites.
Adds filtering on the completion criteria form to ensure we are only
selecting actual course instances of this type. Prior to this change
we would also get NULL values from unrelated criteria types.
2020-07-14 12:45:58 +01:00
Sara Arjona 73c4f6c2a5 Merge branch 'MDL-69228-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-14 12:41:23 +02:00
Mihail Geshoski d8a886d75a MDL-69206 course: Tidy up behat test to avoid potential failures 2020-07-14 12:11:50 +08:00
Mihail Geshoski 480f26720d MDL-69206 course: Tidy up unit test to avoid potential failures 2020-07-14 12:11:50 +08:00
Sara Arjona 333d17b8e1 Merge branch 'MDL-69115-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-07-13 14:24:15 +02:00
Andrew Nicols f78caa59d2 MDL-69160 workshop: Ensure steps are chained 2020-07-13 14:22:32 +08:00
Andrew Nicols 1f09dea479 MDL-69160 behat: Add form field setter step 2020-07-13 14:22:31 +08:00
Eloy Lafuente (stronk7) 8e619076cb Moodle release 3.9.1 2020-07-12 12:13:02 +02:00
Leon Stringer d80e9d463d MDL-69252 templates: Invalid HTML
Invalid HTML generated when the page count exceeded the maximum number
of page links to display: <span>...</a>.  Also added example context.
2020-07-11 12:52:28 +01:00
AMOS bot 6a17f29147 Automatically generated installer lang files 2020-07-10 19:52:47 +00:00
Eloy Lafuente (stronk7) cafc042bf6 weekly release 3.9+ 2020-07-10 20:22:25 +02:00
Eloy Lafuente (stronk7) d2e303436b Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-07-10 20:22:18 +02:00
Jake Dallimore fb0d5acf4c Merge branch 'MDL-69232-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-10 15:12:29 +08:00
Andrew Nicols 376d34142f MDL-69232 behat: Simplify hooks
The behat hooks were needlessly complicated which made them much harder
to read, and understand, leading to bugs during development.

These have been significantly simplified to favour clarity over
overloading.
2020-07-10 08:40:30 +08:00
Andrew Nicols 8eb7f7e366 MDL-69232 behat: Make selenium start more fault tolerant
The session was previously only started once, but has now been moved to
restart between each test. Because of this the `$session->start()` is
now called more frequently which exposes a pre-existing issue whereby
Selenium will periodically fail to start.

When the session was only started at the beginning of the test, and at
occasional other times, it made sense to always stop the test runner
because it signified an issue with obtaining the session at all.

Since the session is restarted more frequently, and now between every
test, it no longer makes sense to do this. The test should only be
_stopped_ if the first attempt to obtain the Session fails. Once a
Session has been retrieved at least once it no longer makes sense to
assume that the failure was a configuration failure, but a connection
failure. Therefore subsequent tests should be attempted.
2020-07-10 08:40:29 +08:00
Mark Johnson 762e8afa6f MDL-67671 backup: Fix modname display on backup form 2020-07-09 10:11:52 +01:00
Jake Dallimore c3018e9ee7 Merge branch 'MDL-69135-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-09 10:38:21 +08:00
Michael Hawkins 996c94fd08 MDL-68426 theme: Set a limit on paths length in yui_combo
The maximum paths length is now consistent with the YUI loader.
This fix also removes any duplicate paths, so each file is only ever
fetched once.
2020-07-09 10:23:44 +08:00
Andrew Nicols fd7c3c4834 MDL-69232 behat: Add debugging information to Selenium fails 2020-07-09 09:45:32 +08:00
Andrew Nicols c3b7f2f974 MDL-69232 behat: Move suite tests to BeforeSuite hook 2020-07-09 09:45:32 +08:00
Eloy Lafuente (stronk7) 8589fbda8c Merge branch 'MDL-69134-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-08 20:53:22 +02:00
Jake Dallimore f1a681c983 Merge branch 'MDL-69104-39' of https://github.com/HuongNV13/moodle into MOODLE_39_STABLE 2020-07-08 13:07:01 +08:00
Huong Nguyen a17188f51c MDL-69165 Questions: Incorrect id used in init_submit_button function 2020-07-08 11:47:24 +07:00
Andrew Nicols 8a66849a57 Merge branch 'MDL-68784-39' of https://github.com/Peterburnett/moodle into MOODLE_39_STABLE 2020-07-08 12:37:27 +08:00
Andrew Nicols 20318b8b7d Merge branch 'm39_MDL-66322_Travis_Run_Using_Docker_ExtTests-v2' of https://github.com/scara/moodle into MOODLE_39_STABLE 2020-07-08 12:20:52 +08:00
Peter Burnett d84d6f57a3 MDL-68784: Updated variable for graph report 2020-07-08 14:06:23 +10:00
Andrew Nicols 619e11c07a MDL-69228 tool_mobile: Hide dependant settings 2020-07-08 11:44:31 +08:00
Juan Leyva 01ec0ee85b MDL-69031 tool_mobile: Add missing features that can be disabled in 3.9 2020-07-08 09:36:44 +08:00
Andrew Nicols 91b23a2caa Merge branch 'MDL-60494-stray_img_end-39' of https://github.com/leonstr/moodle into MOODLE_39_STABLE 2020-07-08 09:24:05 +08:00
Andrew Nicols 053a433d74 MDL-69134 competencies: Behat fails randomly opening dialogues 2020-07-08 09:21:51 +08:00
Jake Dallimore 3725a41b39 MDL-68210 mod_lesson: fix random failure in override behat test 2020-07-08 09:07:06 +08:00
Jake Dallimore fe5ca8e768 MDL-68210 overrides: allow copy and delete of inactive overrides
This brings lesson and assign in line with the expected behaviour
already implemented in quiz. When an override is inactive, all controls
are shown.
2020-07-08 09:06:58 +08:00
Marina Glancy b1a2e67326 MDL-69109 theme: try to load icons from the current theme 2020-07-08 08:40:52 +08:00
Marina Glancy 40553ed459 MDL-69109 core: use different cache keys for FA icon maps 2020-07-08 08:40:51 +08:00
Matt Clarkson ae9e1f1888 MDL-67440 analytics: optimse delete's in clean up task. 2020-07-08 11:18:20 +12:00
Matteo Scaramuccia 9127c17778 MDL-66322 travis: Configure a local copy of 'exttests' 2020-07-07 21:34:06 +02:00
Andrew Nicols 8f28fbee11 MDL-69086 theme_boost: Improve pendingJs checks for bootstrap
Where an element, like an `alert`, is closed it is removed from the DOM
before the event fires (this is a correct behaviour).

This means that the final event confirming that the action happened
(i.e. close => closed) fires, but does not bubble up the DOM to the
document.body.

This change moves the end event listener to only be added after a start
event has been fired, and to attach directly to the HTMLElement where it
will be fired. This means that the Event handler will still be called,
even though it has been removed from the DOM, because it does not need
to bubble up to the body.
2020-07-07 20:01:02 +02:00
Eloy Lafuente (stronk7) be7bda671e Merge branch 'm39_MDL-68588_Hide_Backuptempdir_From_Message_And_Debuginfo' of https://github.com/scara/moodle into MOODLE_39_STABLE 2020-07-07 19:10:41 +02:00
Eloy Lafuente (stronk7) c58101cde3 Merge branch 'MDL-68784-39' of https://github.com/Peterburnett/moodle into MOODLE_39_STABLE 2020-07-07 18:52:27 +02:00
Paul Holden 4a16804df7 MDL-69214 user: correct participant table forced group SQL. 2020-07-07 14:37:23 +01:00
Tim Schroeder ff92024ec2 MDL-68605 mod_assign: return grp submissns from ws
Co-authored-by: Septatrix <24257556+Septatrix@users.noreply.github.com>
2020-07-07 12:55:54 +02:00
Víctor Déniz Falcón 6e5b0b5c20 MDL-69093 enrol_manual: added check for allowed roles a user can assign 2020-07-07 08:33:08 +02:00
Andrew Nicols c201456f20 Merge branch 'MDL-69106-39' of git.in.moodle.com:cameron/moodle into MOODLE_39_STABLE 2020-07-07 14:15:54 +08:00
Eloy Lafuente (stronk7) 02b3d5aacf Merge branch 'MDL-60827-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-07-07 00:17:26 +02:00
Andrew Nicols dde1ead9fe MDL-69110 table: Remove commented code 2020-07-06 13:26:28 +08:00
Andrew Nicols 3915147b9b Merge branch 'MDL-69110-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-07-06 13:26:00 +08:00
Andrew Nicols 55c7fe15a0 Merge branch 'MDL-69158-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-07-06 12:12:12 +08:00
Jake Dallimore 82dba4d510 Merge branch 'MDL-69136-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-06 10:44:34 +08:00
Mihail Geshoski 9ecff3766a MDL-60827 oauth2: Consider requireconfirmation setting on login 2020-07-06 10:05:16 +08:00
Michael Hawkins 4fb85c9c9f MDL-69128 admin: Convert HTML entities when populating tasklogs filter 2020-07-06 10:04:17 +08:00
AMOS bot 6ea5922916 Automatically generated installer lang files 2020-07-06 00:08:30 +00:00
Leon Stringer 287e8f16e6 MDL-60494 mod_lti: Invalid </img>, example context
<img> was followed by an invalid </img>.  Also added example context for
template so it passes CI checks.
2020-07-05 15:57:42 +01:00
Matteo Scaramuccia 846422a90f MDL-68588 Backup: Hide ->backuptempdir in exception info 2020-07-03 21:18:30 +02:00
Jun Pataleta ea6621e00e MDL-69110 core: Unset the correct sort data element 2020-07-04 00:50:21 +08:00
Eloy Lafuente (stronk7) 44ffa8a801 weekly release 3.9+ 2020-07-03 18:41:38 +02:00
Eloy Lafuente (stronk7) a1d5911159 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-07-03 18:41:32 +02:00
Jake Dallimore c38e38d6b4 Merge branch 'MDL-69130-39-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-07-02 12:08:37 +08:00
Jake Dallimore f5b5f97f56 Merge branch 'MDL-69149-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-02 11:57:18 +08:00
Jake Dallimore 5528302282 Merge branch 'MDL-69122-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-07-02 11:49:19 +08:00
AMOS bot 995f0a3a58 Automatically generated installer lang files 2020-07-02 00:08:08 +00:00
Eloy Lafuente (stronk7) 894ebe38a2 Merge branch 'MDL-69072-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-01 23:23:45 +02:00
Andrew Nicols 0609febf16 MDL-69072 behat: Remove restart_browser_after feature
This is no longer required as the Mink session is restarted after every
test regardless.
2020-07-01 23:23:39 +02:00
Luca Bösch 1d6c1cc0ae MDL-68584 core_question: flexbox compatible separator for question types
* the br tag does not work well in a flexbox context, a 100% with div
works in both classic and boost.
2020-07-01 16:42:50 +08:00
Jun Pataleta 50b076c4af MDL-69115 course: More course management accessibility fixes
* Added aria-label for category single select element when on Courses
view mode.
* Fix correct labelling of custom control checkboxes. Instead of adding
aria-label in the label element, add an sr-only span within the label.
* Remove inappropriate 'group' role for the list of courses.
The list of courses is not being rendered as a tree structure
so adding a 'group' role to the list of courses is not really
necessary.
* Add aria-label for the search courses field.
* Add legend for the search courses fieldset.
* Use the primary colour for the category selection highlight instead
of the info colour.
* Changed the labels for the up/down icons using moveup/movedown
lang strings.
2020-07-01 14:45:26 +08:00
Paul Holden d783f12861 MDL-69150 message_airnotifier: correct apps portal link. 2020-07-01 08:39:47 +08:00
Paul Holden f324c2d16c MDL-69151 message_airnotifier: start output before accesskey request.
This allows debugging generated by the request to be shown on the
page.
2020-07-01 08:32:34 +08:00
Huong Nguyen 5486975097 MDL-69104 Questions: Drag and drop question family don't work with iOS
- Drag and Drop marker question type
 - Drag and Drop onto image question type
 - Drag and Drop into text question type
2020-06-30 14:48:47 +07:00
Cameron Ball d4b6b26f4f MDL-69106 assignfeedback_editpdf: Keep files in conversion queue
In some circumstances, a submission waiting to be converted needs to persist
in the conversion queue so that it can be polled on subsequent cron runs.
2020-06-30 13:56:57 +08:00
Peter Burnett 996dd0b0b9 MDL-68784 scorm: Removed limit on allowed scorm users in report 2020-06-30 15:17:51 +10:00
Luca Bösch b44588aaba MDL-69158 block_blog_menu: format search form. 2020-06-29 11:13:55 +02:00
Andrew Nicols 95fbf4d8e5 MDL-69136 behat: Improve reliability of navigation steps 2020-06-29 11:36:36 +08:00
Andrew Nicols 6f78024717 MDL-69136 behat: Support find on a NodeElement 2020-06-29 11:36:30 +08:00
Andrew Nicols 7b2e257157 MDL-69072 mod_scorm: Stop mink reset after tests
This is now done for all scenarios. It is no longer necessary to do so
specifically for mod_scorm.
2020-06-26 21:17:23 +08:00
Andrew Nicols bb344d07e7 MDL-69072 behat: Relaunch browser session between scenarios 2020-06-26 21:17:22 +08:00
Andrew Nicols 959c2cb84e MDL-69149 core_grade: Correct xpath attribute selector 2020-06-26 19:59:56 +08:00
Andrew Nicols ee7b438f61 MDL-69135 core_calendar: PendingJS for event filtering 2020-06-26 07:58:36 +08:00
Helen Foster dc0241306b MDL-69130 lang: Import fixed English strings (en_fix)
Significant string change:

- presentationoraltrequired,atto_image - wording changed to mention
  'decorative only' checkbox
2020-06-25 21:52:35 +02:00
Eloy Lafuente (stronk7) 89ce4db476 weekly release 3.9+ 2020-06-25 18:06:36 +02:00
Eloy Lafuente (stronk7) 55a1405a84 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-06-25 18:06:31 +02:00
Jonathon Fowler fb21fc9274 MDL-69113 assign: save grader app workflow/marker filters correctly 2020-06-25 14:40:07 +10:00
Bas Brands 57b920b8b7 MDL-69122 report_competency: fix clearfix
- a misplaced clearfix caused part of the recontrols to be
inaccessible
2020-06-24 09:15:28 +02:00
Nicolas Martignoni bae07c1bfb MDL-68992 Privacy: Update default minimal digital age of consent
Updating default minimal digital age of consent according to current legislation,
that was updated for several countries since 2018.
2020-06-24 10:14:53 +08:00
Peter Dias 4f7016f2da MDL-69065 course: Provide the id for the sr param
* Pass the section return id to the activity chooser
* Additional behat test to cover the case
2020-06-24 10:14:51 +08:00
Andrew Nicols 7af8441403 MDL-66568 behat: Reset theme CSS between scenarios 2020-06-23 18:03:52 +02:00
Andrew Nicols 7ba95339a6 MDL-66568 behat: Support building of themes for behat 2020-06-23 18:03:52 +02:00
Andrew Nicols b6c37f2926 MDL-66568 core_output: Return built theme CSS 2020-06-23 18:03:52 +02:00
AMOS bot b8408c3582 Automatically generated installer lang files 2020-06-23 12:25:17 +00:00
Bas Brands fb625069cf MDL-69021 theme_boost: improve link styles in alerts
- provide default styles for links in alerts if the .alert-link
css class is omitted.
2020-06-23 11:31:23 +08:00
hiendinh d4297993a4 MDL-68841 Modal dialogs: Wrong behavior of popup 2020-06-23 09:45:44 +08:00
Víctor Déniz Falcón 2104324ded Merge branch 'MDL-69099-39-disabledtasks' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-06-22 17:20:10 +01:00
David Mudrák 153b2cb484 MDL-69099 tasks: Do not mark the non-enabled plugin's task as disabled
The `core\plugininfo\base::is_enabled()` uses three-state logic for its
return value. It can return null as a valid value as per its
documentation. We need to test for the explicit false value in this
case.

To make the attached Behat test able to identify the table, the caption
is added. It seems to be helpful for all users so I leave it displayed
without using the accesshide mechanism.
2020-06-22 10:10:15 +02:00
Jake Dallimore c72adaa749 Merge branch 'MDL-69047-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2020-06-22 12:41:28 +08:00
Adrian Greeve 3c2ed1533c Merge branch 'MDL-69077_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-06-22 10:41:47 +08:00
Jun Pataleta b9518bf811 MDL-69008 core: Fix accessibility issues in paged content templates
* Added menuitem role for the "Show x per page" menu.
* Added appropriate aria-labels for the links in the paging bar.
2020-06-19 16:49:03 +02:00
Amaia Anabitarte 4f0f1bd84f MDL-69047 core_contentbank: Hard coding status messages 2020-06-18 18:07:41 +02:00
Sara Arjona e2ef786003 weekly release 3.9+ 2020-06-18 14:14:00 +02:00
Russell Boyatt 5b134b5de5 MDL-66899 quiz: Adding test for regrading quiz event. 2020-06-18 04:52:47 +01:00
Russell Boyatt 62c4da281a MDL-66899 quiz: Log a regrading event when quiz attempt is regraded. 2020-06-18 04:52:47 +01:00
Víctor Déniz Falcón 4c27f858b9 Merge branch 'MDL-69060-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-06-17 23:44:40 +01:00
Tim Hunt 6ced5c26d0 MDL-69077 questions: question tag capabilties are relevant 2020-06-17 13:07:30 +01:00
hiendinh ccd504115d MDL-68890 progressbar: prevent display exist file's progress bar 2020-06-17 19:54:06 +08:00
Jake Dallimore 647e5d8021 Merge branch 'MDL-68215-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-06-17 14:58:35 +08:00
Tim Hunt 6a7042d980 MDL-68971 webservice: errors should give enough info to find the problem 2020-06-17 11:36:46 +08:00
Jun Pataleta 7532b032bb Merge branch 'MDL-67294-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-06-17 10:36:14 +08:00
Jun Pataleta b5c1d17da5 MDL-69049 tool_dataprivacy: Add possibly missing comment format columns
The earlier CONTRIB plugin versions of the tool (<33.2.0, <34.2.0) were
missing the following columns in the data requests table:
* commentsformat
* dpocommentformat
And the upgrade scripts for the merged tool failed in
Moodle 3.3.8+/3.3.0+ failed to add these columns.
So a site which uses the CONTRIB plugin and eventually upgrading to 3.9
will encounter an error during upgrade because of the missing
dpocommentformat column.
2020-06-16 17:59:03 +01:00
Mihail Geshoski 56a7d91066 MDL-67294 assignsubmission_file: Make sure record exists before updating 2020-06-17 00:55:46 +08:00
Tim Hunt 93d636a95b MDL-68436 atto_recordrtc: only works once per page 2020-06-16 14:40:35 +08:00
Víctor Déniz Falcón 7ca771e4ac Merge branch 'MDL-69044_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2020-06-15 17:36:32 +01:00
Luca Bösch 6e7e7e1241 MDL-68215 block_activity_result: Format elements more nicely. 2020-06-15 15:26:13 +02:00
Luca Bösch 8b43f32f8c MDL-69060 core_contentbank: fix contenbank typos. 2020-06-15 13:37:00 +02:00
Eloy Lafuente (stronk7) a30eb7d16c MDL-69044 upgrade: add 3.9.0 separation line to all upgrade scripts 2020-06-14 13:09:13 +02:00
589 changed files with 7945 additions and 2319 deletions
+17 -1
View File
@@ -15,6 +15,7 @@ dist: xenial
services:
- mysql
- docker
php:
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
@@ -61,8 +62,9 @@ cache:
- $HOME/.npm
before_install:
- docker run -d -p 127.0.0.1:8080:80 --name exttests moodlehq/moodle-exttests
# Avoid IPv6 default binding as service (causes redis not to start).
sudo service redis-server start --bind 127.0.0.1
- sudo service redis-server start --bind 127.0.0.1
install:
- >
@@ -169,6 +171,12 @@ before_script:
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
config.php ;
# Enable test external resources
sed -i \
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://127.0.0.1:8080');" \
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://127.0.0.1:8080');" \
config.php ;
# Redis cache store tests
sed -i \
-e "/require_once/i \\define('TEST_CACHESTORE_REDIS_TESTSERVERS', '127.0.0.1');" \
@@ -284,3 +292,11 @@ script:
exit 1 ;
fi
fi
after_script:
- >
if [ "$TASK" = 'PHPUNIT' ];
then
EXTTESTS_HITS=$(docker logs exttests 2>&1 | grep -Fv -e 'AH00558' -e '[pid 1]' | wc -l)
echo -e "\nTest local resources number of hits: ${EXTTESTS_HITS}.\n"
fi
+99 -90
View File
@@ -266,6 +266,7 @@ list($options, $unrecognized) = cli_get_params(
);
$interactive = empty($options['non-interactive']);
$skipdatabase = $options['skip-database'];
// set up language
$lang = clean_param($options['lang'], PARAM_SAFEDIR);
@@ -637,96 +638,100 @@ do {
}
} while ($hintdatabase !== '');
// ask for fullname
if ($interactive) {
cli_separator();
cli_heading(get_string('fullsitename', 'moodle'));
// If --skip-database option is provided, we do not need to ask for site fullname, shortname, adminuser, adminpass, adminemail.
// These fields will be requested during the database install part.
if (!$skipdatabase) {
// Ask for fullname.
if ($interactive) {
cli_separator();
cli_heading(get_string('fullsitename', 'moodle'));
if ($options['fullname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['fullname']);
if ($options['fullname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['fullname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
do {
$options['fullname'] = cli_input($prompt, $options['fullname']);
} while (empty($options['fullname']));
} else {
$prompt = get_string('clitypevalue', 'admin');
if (empty($options['fullname'])) {
$a = (object)['option' => 'fullname', 'value' => $options['fullname']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
do {
$options['fullname'] = cli_input($prompt, $options['fullname']);
} while (empty($options['fullname']));
} else {
if (empty($options['fullname'])) {
$a = (object)array('option'=>'fullname', 'value'=>$options['fullname']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for shortname.
if ($interactive) {
cli_separator();
cli_heading(get_string('shortsitename', 'moodle'));
// ask for shortname
if ($interactive) {
cli_separator();
cli_heading(get_string('shortsitename', 'moodle'));
if ($options['shortname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['shortname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
if ($options['shortname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['shortname']);
do {
$options['shortname'] = cli_input($prompt, $options['shortname']);
} while (empty($options['shortname']));
} else {
$prompt = get_string('clitypevalue', 'admin');
if (empty($options['shortname'])) {
$a = (object)['option' => 'shortname', 'value' => $options['shortname']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
do {
$options['shortname'] = cli_input($prompt, $options['shortname']);
} while (empty($options['shortname']));
} else {
if (empty($options['shortname'])) {
$a = (object)array('option'=>'shortname', 'value'=>$options['shortname']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// ask for admin user name
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminusername', 'install'));
if (!empty($options['adminuser'])) {
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminuser']);
// Ask for admin user name.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminusername', 'install'));
if (!empty($options['adminuser'])) {
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminuser']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
do {
$options['adminuser'] = cli_input($prompt, $options['adminuser']);
} while (empty($options['adminuser']) or $options['adminuser'] === 'guest');
} else {
if ((empty($options['adminuser']) || $options['adminuser'] === 'guest')) {
$a = (object)['option' => 'adminuser', 'value' => $options['adminuser']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for admin user password.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminpassword', 'install'));
$prompt = get_string('clitypevalue', 'admin');
do {
$options['adminpass'] = cli_input($prompt);
} while (empty($options['adminpass']) or $options['adminpass'] === 'admin');
} else {
if ((empty($options['adminpass']) or $options['adminpass'] === 'admin')) {
$a = (object)['option' => 'adminpass', 'value' => $options['adminpass']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
do {
$options['adminuser'] = cli_input($prompt, $options['adminuser']);
} while (empty($options['adminuser']) or $options['adminuser'] === 'guest');
} else {
if (empty($options['adminuser']) or $options['adminuser'] === 'guest') {
$a = (object)array('option'=>'adminuser', 'value'=>$options['adminuser']);
// Ask for the admin email address.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminemail', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminemail']);
$options['adminemail'] = cli_input($prompt, $options['adminemail']);
}
// Validate that the address provided was an e-mail address.
if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
$a = (object)['option' => 'adminemail', 'value' => $options['adminemail']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// ask for admin user password
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminpassword', 'install'));
$prompt = get_string('clitypevalue', 'admin');
do {
$options['adminpass'] = cli_input($prompt);
} while (empty($options['adminpass']) or $options['adminpass'] === 'admin');
} else {
if (empty($options['adminpass']) or $options['adminpass'] === 'admin') {
$a = (object)array('option'=>'adminpass', 'value'=>$options['adminpass']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for the admin email address.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminemail', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminemail']);
$options['adminemail'] = cli_input($prompt, $options['adminemail']);
}
// Validate that the address provided was an e-mail address.
if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
$a = (object) array('option' => 'adminemail', 'value' => $options['adminemail']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
// Ask for the upgrade key.
if ($interactive) {
cli_separator();
@@ -745,22 +750,26 @@ if ($options['upgradekey'] !== '') {
$CFG->upgradekey = $options['upgradekey'];
}
if ($interactive) {
if (!$options['agree-license']) {
cli_separator();
cli_heading(get_string('copyrightnotice'));
echo "Moodle - Modular Object-Oriented Dynamic Learning Environment\n";
echo get_string('gpl3')."\n\n";
echo get_string('doyouagree')."\n";
$prompt = get_string('cliyesnoprompt', 'admin');
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
if ($input == get_string('clianswerno', 'admin')) {
exit(1);
// The user does not also need to pass agree-license when --skip-database is provided as the user will need to accept
// the license again in the database install part.
if (!$skipdatabase) {
if ($interactive) {
if (!$options['agree-license']) {
cli_separator();
cli_heading(get_string('copyrightnotice'));
echo "Moodle - Modular Object-Oriented Dynamic Learning Environment\n";
echo get_string('gpl3')."\n\n";
echo get_string('doyouagree')."\n";
$prompt = get_string('cliyesnoprompt', 'admin');
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
if ($input == get_string('clianswerno', 'admin')) {
exit(1);
}
}
} else {
if (!$options['agree-license'] && !$skipdatabase) {
cli_error(get_string('climustagreelicense', 'install'));
}
}
} else {
if (!$options['agree-license']) {
cli_error(get_string('climustagreelicense', 'install'));
}
}
@@ -809,7 +818,7 @@ if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
cli_error(get_string('pluginschecktodo', 'admin'));
}
if (!$options['skip-database']) {
if (!$skipdatabase) {
install_cli_database($options, $interactive);
// This needs to happen at the end to ensure it occurs after all caches
// have been purged for the last time.
+181
View File
@@ -3163,4 +3163,185 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.10" requires="3.5">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.2.29" />
<VENDOR name="mysql" version="5.7" />
<VENDOR name="postgres" version="9.6" />
<VENDOR name="mssql" version="11.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.2.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+4 -2
View File
@@ -509,7 +509,8 @@ if (!$cache and $version > $CFG->version) { // upgrade
// Always verify plugin dependencies!
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed, $CFG->branch)) {
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
echo $output->unsatisfied_dependencies_page($version, $failed, new moodle_url($PAGE->url,
array('confirmplugincheck' => 0)));
die();
}
unset($failed);
@@ -701,7 +702,8 @@ if (!$cache and moodle_needs_upgrading()) {
$failed = array();
if (!$pluginman->all_plugins_ok($version, $failed, $CFG->branch)) {
$output = $PAGE->get_renderer('core', 'admin');
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
echo $output->unsatisfied_dependencies_page($version, $failed, new moodle_url($PAGE->url,
array('confirmplugincheck' => 0)));
die();
}
unset($failed);
+2 -2
View File
@@ -1110,7 +1110,7 @@ class core_admin_renderer extends plugin_renderer_base {
if (!empty($installabortable[$plugin->component])) {
$status .= $this->output->single_button(
new moodle_url($this->page->url, array('abortinstall' => $plugin->component)),
new moodle_url($this->page->url, array('abortinstall' => $plugin->component, 'confirmplugincheck' => 0)),
get_string('cancelinstallone', 'core_plugin'),
'post',
array('class' => 'actionbutton cancelinstallone d-block mt-1')
@@ -1209,7 +1209,7 @@ class core_admin_renderer extends plugin_renderer_base {
if ($installabortable) {
$out .= $this->output->single_button(
new moodle_url($this->page->url, array('abortinstallx' => 1)),
new moodle_url($this->page->url, array('abortinstallx' => 1, 'confirmplugincheck' => 0)),
get_string('cancelinstallall', 'core_plugin', count($installabortable)),
'post',
array('class' => 'singlebutton cancelinstallall mr-1')
+3 -3
View File
@@ -645,14 +645,14 @@ if ($hassiteconfig) {
// Content bank content types.
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('contenbanksettings', new lang_string('contentbank')));
$ADMIN->add('modules', new admin_category('contentbanksettings', new lang_string('contentbank')));
$temp = new admin_settingpage('managecontentbanktypes', new lang_string('managecontentbanktypes'));
$temp->add(new admin_setting_managecontentbankcontenttypes());
$ADMIN->add('contenbanksettings', $temp);
$ADMIN->add('contentbanksettings', $temp);
$plugins = core_plugin_manager::instance()->get_plugins_of_type('contenttype');
foreach ($plugins as $plugin) {
/** @var \core\plugininfo\contentbank $plugin */
$plugin->load_settings($ADMIN, 'contenbanksettings', $hassiteconfig);
$plugin->load_settings($ADMIN, 'contentbanksettings', $hassiteconfig);
}
}
+1 -1
View File
@@ -94,7 +94,7 @@ $options = array(
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR|GETREMOTEADDR_SKIP_HTTP_CLIENT_IP => 'REMOTE_ADDR');
$temp->add(new admin_setting_configselect('getremoteaddrconf', new lang_string('getremoteaddrconf', 'admin'),
new lang_string('configgetremoteaddrconf', 'admin'),
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR|GETREMOTEADDR_SKIP_HTTP_CLIENT_IP, $options));
GETREMOTEADDR_SKIP_DEFAULT, $options));
$temp->add(new admin_setting_configtext('reverseproxyignore', new lang_string('reverseproxyignore', 'admin'), new lang_string('configreverseproxyignore', 'admin'), ''));
$temp->add(new admin_setting_heading('webproxy', new lang_string('webproxy', 'admin'), new lang_string('webproxyinfo', 'admin')));
+18
View File
@@ -261,10 +261,28 @@ if ($hassiteconfig) {
$temp->add($setting);
// See {@link https://gdpr-info.eu/art-8-gdpr/}.
// See {@link https://www.betterinternetforkids.eu/web/portal/practice/awareness/detail?articleId=3017751}.
$ageofdigitalconsentmap = implode(PHP_EOL, [
'*, 16',
'AT, 14',
'BE, 13',
'BG, 14',
'CY, 14',
'CZ, 15',
'DK, 13',
'EE, 13',
'ES, 14',
'FI, 13',
'FR, 15',
'GB, 13',
'GR, 15',
'IT, 14',
'LT, 14',
'LV, 13',
'MT, 13',
'NO, 13',
'PT, 13',
'SE, 13',
'US, 13'
]);
$setting = new admin_setting_agedigitalconsentmap('agedigitalconsentmap',
+1 -1
View File
@@ -66,7 +66,7 @@ echo $OUTPUT->header();
// Output the search form.
echo $OUTPUT->render_from_template('core_admin/tasklogs', (object) [
'action' => $pageurl->out(),
'filter' => $filter,
'filter' => htmlentities($filter),
'resultfilteroptions' => [
(object) [
'value' => -1,
+6
View File
@@ -164,6 +164,8 @@ if ($options['install']) {
mtrace("Acceptance tests site installed");
}
// Note: Do not build the themes here. This is done during the 'enable' stage.
} else if ($options['drop']) {
// Ensure no tests are running.
test_lock::acquire('behat');
@@ -182,6 +184,10 @@ if ($options['install']) {
// Enable test mode.
behat_util::start_test_mode($options['add-core-features-to-theme'], $options['optimize-runs'], $parallel, $run);
// Themes are only built in the 'enable' command.
behat_util::build_themes();
mtrace("Testing environment themes built");
// This is only displayed once for parallel install.
if (empty($run)) {
// Notify user that 2.5 profile has been converted to 3.5.
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_cohortroles_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2020020600, 'tool', 'cohortroles');
}
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -36,7 +36,7 @@ $string['customlang:view'] = 'View local translation';
$string['filter'] = 'Filter strings';
$string['filtercomponent'] = 'Show strings of these components';
$string['filtercustomized'] = 'Customised only';
$string['filtermodified'] = 'Modified only';
$string['filtermodified'] = 'Modified in this session only';
$string['filteronlyhelps'] = 'Help only';
$string['filtershowstrings'] = 'Show strings';
$string['filterstringid'] = 'String identifier';
@@ -26,10 +26,11 @@ namespace tool_dataprivacy;
defined('MOODLE_INTERNAL') || die();
use lang_string;
use core\persistent;
/**
* Class for loading/storing competencies from the DB.
* Class for loading/storing data requests from the DB.
*
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -62,6 +63,7 @@ class data_request extends persistent {
],
'comments' => [
'type' => PARAM_TEXT,
'message' => new lang_string('errorinvalidrequestcomments', 'tool_dataprivacy'),
'default' => ''
],
'commentsformat' => [
@@ -75,7 +77,10 @@ class data_request extends persistent {
'default' => FORMAT_PLAIN
],
'userid' => [
'default' => 0,
'default' => function() {
global $USER;
return $USER->id;
},
'type' => PARAM_INT
],
'requestedby' => [
+2 -2
View File
@@ -67,8 +67,8 @@ if (!$manage && !\tool_dataprivacy\api::can_contact_dpo()) {
redirect($returnurl, get_string('contactdpoviaprivacypolicy', 'tool_dataprivacy'), 0, \core\output\notification::NOTIFY_ERROR);
}
$mform = new tool_dataprivacy_data_request_form($url->out(false), ['manage' => !empty($manage)]);
$mform->set_data(['type' => $requesttype]);
$mform = new tool_dataprivacy_data_request_form($url->out(false), ['manage' => !empty($manage),
'persistent' => new \tool_dataprivacy\data_request(0, (object) ['type' => $requesttype])]);
// Data request cancelled.
if ($mform->is_cancelled()) {
@@ -23,6 +23,7 @@
*/
use tool_dataprivacy\api;
use tool_dataprivacy\data_request;
use tool_dataprivacy\local\helper;
defined('MOODLE_INTERNAL') || die();
@@ -36,7 +37,10 @@ require_once($CFG->libdir.'/formslib.php');
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package tool_dataprivacy
*/
class tool_dataprivacy_data_request_form extends moodleform {
class tool_dataprivacy_data_request_form extends \core\form\persistent {
/** @var string Name of the persistent class. */
protected static $persistentclass = data_request::class;
/** @var bool Flag to indicate whether this form is being rendered for managing data requests or for regular requests. */
protected $manage = false;
@@ -96,14 +100,13 @@ class tool_dataprivacy_data_request_form extends moodleform {
api::DATAREQUEST_TYPE_EXPORT => get_string('requesttypeexport', 'tool_dataprivacy'),
api::DATAREQUEST_TYPE_DELETE => get_string('requesttypedelete', 'tool_dataprivacy')
];
$mform->addElement('select', 'type', get_string('requesttype', 'tool_dataprivacy'), $options);
$mform->setType('type', PARAM_INT);
$mform->addHelpButton('type', 'requesttype', 'tool_dataprivacy');
// Request comments text area.
$textareaoptions = ['cols' => 60, 'rows' => 10];
$mform->addElement('textarea', 'comments', get_string('requestcomments', 'tool_dataprivacy'), $textareaoptions);
$mform->setType('type', PARAM_ALPHANUM);
$mform->addHelpButton('comments', 'requestcomments', 'tool_dataprivacy');
// Action buttons.
@@ -129,34 +132,49 @@ class tool_dataprivacy_data_request_form extends moodleform {
}
}
/**
* Get the default data. Unset the default userid if managing data requests
*
* @return stdClass
*/
protected function get_default_data() {
$data = parent::get_default_data();
if ($this->manage) {
unset($data->userid);
}
return $data;
}
/**
* Form validation.
*
* @param array $data
* @param stdClass $data
* @param array $files
* @param array $errors
* @return array
* @throws coding_exception
* @throws dml_exception
*/
public function validation($data, $files) {
public function extra_validation($data, $files, array &$errors) {
global $USER;
$errors = [];
$validrequesttypes = [
api::DATAREQUEST_TYPE_EXPORT,
api::DATAREQUEST_TYPE_DELETE
];
if (!in_array($data['type'], $validrequesttypes)) {
if (!in_array($data->type, $validrequesttypes)) {
$errors['type'] = get_string('errorinvalidrequesttype', 'tool_dataprivacy');
}
if (api::has_ongoing_request($data['userid'], $data['type'])) {
$userid = $data->userid;
if (api::has_ongoing_request($userid, $data->type)) {
$errors['type'] = get_string('errorrequestalreadyexists', 'tool_dataprivacy');
}
// Check if current user can create data deletion request.
$userid = $data['userid'];
if ($data['type'] == api::DATAREQUEST_TYPE_DELETE) {
if ($data->type == api::DATAREQUEST_TYPE_DELETE) {
if ($userid == $USER->id) {
if (!api::can_create_data_deletion_request_for_self()) {
$errors['type'] = get_string('errorcannotrequestdeleteforself', 'tool_dataprivacy');
+22 -3
View File
@@ -322,10 +322,29 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2019121700) {
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2020061501) {
// Define field commentsformat to be added to tool_dataprivacy_request.
$table = new xmldb_table('tool_dataprivacy_request');
$field = new xmldb_field('commentsformat', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'comments');
// Conditionally launch add field commentsformat.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Define field dpocommentformat to be added to tool_dataprivacy_request.
$field = new xmldb_field('dpocommentformat', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'dpocomment');
// Conditionally launch add field dpocommentformat.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Define field systemapproved to be added to tool_dataprivacy_request.
$table = new xmldb_table('tool_dataprivacy_request');
$field = new xmldb_field('systemapproved', XMLDB_TYPE_INTEGER, '4', null, XMLDB_NOTNULL, null, '0', 'dpocommentformat');
// Conditionally launch add field systemapproved.
@@ -334,7 +353,7 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
}
// Dataprivacy savepoint reached.
upgrade_plugin_savepoint(true, 2019121700, 'tool', 'dataprivacy');
upgrade_plugin_savepoint(true, 2020061501, 'tool', 'dataprivacy');
}
return true;
@@ -135,6 +135,7 @@ $string['effectiveretentionperioduser'] = '{$a} (since the last time the user ac
$string['emailsalutation'] = 'Dear {$a},';
$string['errorcannotrequestdeleteforself'] = 'You don\'t have permission to create deletion request for yourself.';
$string['errorcannotrequestdeleteforother'] = 'You don\'t have permission to create deletion request for this user.';
$string['errorinvalidrequestcomments'] = 'The comments field may contain plain text only.';
$string['errorinvalidrequestcreationmethod'] = 'Invalid request creation method!';
$string['errorinvalidrequeststatus'] = 'Invalid request status!';
$string['errorinvalidrequesttype'] = 'Invalid request type!';
+1 -1
View File
@@ -95,7 +95,7 @@ function tool_dataprivacy_myprofile_navigation(tree $tree, $user, $iscurrentuser
$showsummary = true;
}
if ($showsummary) {
if ($showsummary && $iscurrentuser) {
$summaryurl = new moodle_url('/admin/tool/dataprivacy/summary.php');
$summarynode = new core_user\output\myprofile\node('privacyandpolicies', 'retentionsummary',
get_string('dataretentionsummary', 'tool_dataprivacy'), null, $summaryurl);
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2020061500;
$plugin->version = 2020061501;
$plugin->requires = 2020060900;
$plugin->component = 'tool_dataprivacy';
+3
View File
@@ -45,5 +45,8 @@ function xmldb_tool_log_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -46,5 +46,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -46,5 +46,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -1,2 +1,2 @@
define ("tool_lp/dialogue",["core/yui"],function(a){var b=function(b,c,d,e,f){this.yuiDialogue=null;var g=this;if("undefined"==typeof f){f=!1}a.use("moodle-core-notification","timers",function(){var h="480px";if(f){h="800px"}g.yuiDialogue=new M.core.dialogue({headerContent:b,bodyContent:c,draggable:!0,visible:!1,center:!0,modal:!0,width:h});g.yuiDialogue.after("visibleChange",function(b){if(b.newVal){if("undefined"!=typeof d){a.soon(function(){d(g);g.yuiDialogue.centerDialogue()})}}else{if("undefined"!=typeof e){a.soon(function(){e(g)})}}});g.yuiDialogue.show()})};b.prototype.close=function(){this.yuiDialogue.hide();this.yuiDialogue.destroy()};b.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()};return b});
define ("tool_lp/dialogue",["core/yui"],function(a){var b=function(b,c,d,e,f){M.util.js_pending("tool_lp/dialogue:dialogue");this.yuiDialogue=null;var g=this;if("undefined"==typeof f){f=!1}a.use("moodle-core-notification","timers",function(){var h="480px";if(f){h="800px"}g.yuiDialogue=new M.core.dialogue({headerContent:b,bodyContent:c,draggable:!0,visible:!1,center:!0,modal:!0,width:h});g.yuiDialogue.before("visibleChange",function(){M.util.js_pending("tool_lp/dialogue:before:visibleChange")});g.yuiDialogue.after("visibleChange",function(b){if(b.newVal){if("undefined"!=typeof d){a.soon(function(){d(g);g.yuiDialogue.centerDialogue();M.util.js_complete("tool_lp/dialogue:before:visibleChange")})}else{M.util.js_complete("tool_lp/dialogue:before:visibleChange")}}else{if("undefined"!=typeof e){a.soon(function(){e(g);M.util.js_complete("tool_lp/dialogue:before:visibleChange")})}else{M.util.js_complete("tool_lp/dialogue:before:visibleChange")}}});g.yuiDialogue.show();M.util.js_complete("tool_lp/dialogue:dialogue")})};b.prototype.close=function(){this.yuiDialogue.hide();this.yuiDialogue.destroy()};b.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()};return b});
//# sourceMappingURL=dialogue.min.js.map
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,2 +1,2 @@
define ("tool_lp/grade_dialogue",["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]);this._ratingOptions=a};g.prototype=Object.create(e.prototype);g.prototype._popup=null;g.prototype._ratingOptions=null;g.prototype._afterRender=function(){var b=this._find("[data-action=\"rate\"]"),c=this._find("[name=\"rating\"]"),d=this._find("[name=\"comment\"]");this._find("[data-action=\"cancel\"]").click(function(a){a.preventDefault();this._trigger("cancelled");this.close()}.bind(this));c.change(function(){var c=a(this);if(!c.val()){b.prop("disabled",!0)}else{b.prop("disabled",!1)}}).change();b.click(function(a){a.preventDefault();var b=c.val();if(!b){return}this._trigger("rated",{rating:b,note:d.val()});this.close()}.bind(this))};g.prototype.close=function(){this._popup.close();this._popup=null};g.prototype.display=function(){return a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){this._popup=new d(a,b[0],this._afterRender.bind(this));return this._popup}.bind(this)).catch(b.exception)};g.prototype._find=function(b){return a(this._popup.getContent()).find(b)};g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)};return g});
define ("tool_lp/grade_dialogue",["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]);this._ratingOptions=a};g.prototype=Object.create(e.prototype);g.prototype._popup=null;g.prototype._ratingOptions=null;g.prototype._afterRender=function(){var b=this._find("[data-action=\"rate\"]"),c=this._find("[name=\"rating\"]"),d=this._find("[name=\"comment\"]");this._find("[data-action=\"cancel\"]").click(function(a){a.preventDefault();this._trigger("cancelled");this.close()}.bind(this));c.change(function(){var c=a(this);if(!c.val()){b.prop("disabled",!0)}else{b.prop("disabled",!1)}}).change();b.click(function(a){a.preventDefault();var b=c.val();if(!b){return}this._trigger("rated",{rating:b,note:d.val()});this.close()}.bind(this))};g.prototype.close=function(){this._popup.close();this._popup=null};g.prototype.display=function(){M.util.js_pending("tool_lp/grade_dialogue:display");return a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){this._popup=new d(a,b[0],function(){this._afterRender();M.util.js_complete("tool_lp/grade_dialogue:display")}.bind(this));return this._popup}.bind(this)).catch(b.exception)};g.prototype._find=function(b){return a(this._popup.getContent()).find(b)};g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)};return g});
//# sourceMappingURL=grade_dialogue.min.js.map
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
define ("tool_lp/grade_user_competency_inline",["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length){throw new Error("Could not find the trigger")}this._scaleId=c;this._competencyId=d;this._userId=e;this._planId=g;this._courseId=h;this._chooseStr=i;this._setUp();j.click(function(a){a.preventDefault();this._dialogue.display()}.bind(this));if(this._planId){this._methodName="core_competency_grade_competency_in_plan";this._args={competencyid:this._competencyId,planid:this._planId}}else if(this._courseId){this._methodName="core_competency_grade_competency_in_course";this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}}else{this._methodName="core_competency_grade_competency";this._args={userid:this._userId,competencyid:this._competencyId}}};h.prototype=Object.create(f.prototype);h.prototype._setUp=function(){var a=[],d=this,f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0,e;c<b.length;c++){e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){a.on("rated",function(a,e){var f=d._args;f.grade=e.rating;f.note=e.note;c.call([{methodname:d._methodName,args:f,done:function done(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])});return a}).then(function(a){d._dialogue=a}).fail(b.exception)};h.prototype._scaleId=null;h.prototype._competencyId=null;h.prototype._userId=null;h.prototype._planId=null;h.prototype._courseId=null;h.prototype._chooseStr=null;h.prototype._dialogue=null;return h});
define ("tool_lp/grade_user_competency_inline",["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length){throw new Error("Could not find the trigger")}this._scaleId=c;this._competencyId=d;this._userId=e;this._planId=g;this._courseId=h;this._chooseStr=i;this._setUp();j.click(function(a){a.preventDefault();this._dialogue.display()}.bind(this));if(this._planId){this._methodName="core_competency_grade_competency_in_plan";this._args={competencyid:this._competencyId,planid:this._planId}}else if(this._courseId){this._methodName="core_competency_grade_competency_in_course";this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}}else{this._methodName="core_competency_grade_competency";this._args={userid:this._userId,competencyid:this._competencyId}}};h.prototype=Object.create(f.prototype);h.prototype._setUp=function(){var a=[],d=this;M.util.js_pending("tool_lp/grade_user_competency_inline:_setUp");var f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0,e;c<b.length;c++){e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){a.on("rated",function(a,e){var f=d._args;f.grade=e.rating;f.note=e.note;c.call([{methodname:d._methodName,args:f,done:function done(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])});return a}).then(function(a){d._dialogue=a;M.util.js_complete("tool_lp/grade_user_competency_inline:_setUp")}).fail(b.exception)};h.prototype._scaleId=null;h.prototype._competencyId=null;h.prototype._userId=null;h.prototype._planId=null;h.prototype._courseId=null;h.prototype._chooseStr=null;h.prototype._dialogue=null;return h});
//# sourceMappingURL=grade_user_competency_inline.min.js.map
File diff suppressed because one or more lines are too long
+13
View File
@@ -35,6 +35,8 @@ define(['core/yui'], function(Y) {
* @param {Boolean} wide Specify we want an extra wide dialogue (the size is standard, but wider than the default).
*/
var dialogue = function(title, content, afterShow, afterHide, wide) {
M.util.js_pending('tool_lp/dialogue:dialogue');
this.yuiDialogue = null;
var parent = this;
@@ -59,6 +61,10 @@ define(['core/yui'], function(Y) {
width: width
});
parent.yuiDialogue.before('visibleChange', function() {
M.util.js_pending('tool_lp/dialogue:before:visibleChange');
});
parent.yuiDialogue.after('visibleChange', function(e) {
if (e.newVal) {
// Delay the callback call to the next tick, otherwise it can happen that it is
@@ -67,18 +73,25 @@ define(['core/yui'], function(Y) {
Y.soon(function() {
afterShow(parent);
parent.yuiDialogue.centerDialogue();
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
});
} else {
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
}
} else {
if ((typeof afterHide !== 'undefined')) {
Y.soon(function() {
afterHide(parent);
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
});
} else {
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
}
}
});
parent.yuiDialogue.show();
M.util.js_complete('tool_lp/dialogue:dialogue');
});
};
+5 -1
View File
@@ -102,6 +102,7 @@ define(['jquery',
* @return {Promise}
*/
Grade.prototype.display = function() {
M.util.js_pending('tool_lp/grade_dialogue:display');
return $.when(
Str.get_string('rate', 'tool_lp'),
this._render()
@@ -110,7 +111,10 @@ define(['jquery',
this._popup = new Dialogue(
title,
templateResult[0],
this._afterRender.bind(this)
function() {
this._afterRender();
M.util.js_complete('tool_lp/grade_dialogue:display');
}.bind(this)
);
return this._popup;
@@ -94,6 +94,7 @@ define(['jquery',
var options = [],
self = this;
M.util.js_pending('tool_lp/grade_user_competency_inline:_setUp');
var promise = ScaleValues.get_values(self._scaleId);
promise.then(function(scalevalues) {
options.push({
@@ -134,6 +135,7 @@ define(['jquery',
.then(function(dialogue) {
self._dialogue = dialogue;
M.util.js_complete('tool_lp/grade_user_competency_inline:_setUp');
return;
})
.fail(notification.exception);
@@ -12,8 +12,8 @@ Feature: See the competencies for an activity on the course competencies page.
| Test-Comp1 | ID-FW1 |
| Test-Comp2 | ID-FW1 |
Given the following "courses" exist:
| shortname | fullname |
| C1 | Course 1 |
| shortname | fullname | enablecompletion |
| C1 | Course 1 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
@@ -21,9 +21,9 @@ Feature: See the competencies for an activity on the course competencies page.
| user | course | role |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| page | PageName1 | PageDesc1 | C1 | PAGE1 |
| page | PageName2 | PageDesc2 | C1 | PAGE2 |
| activity | name | intro | course | idnumber | completion | completionview |
| page | PageName1 | PageDesc1 | C1 | PAGE1 | 1 | 1 |
| page | PageName2 | PageDesc2 | C1 | PAGE2 | 1 | 1 |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
@@ -61,3 +61,15 @@ Feature: See the competencies for an activity on the course competencies page.
And I should not see "Test-Comp1"
And I should not see "Test-Comp2"
And I should see "No competencies have been linked to this activity or resource."
@javascript
Scenario: None course competencies page.
When I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I follow "PageName1"
Then I should see "Test page content"
And I am on site homepage
And I follow "Course 1"
And I follow "PageName1"
Then I should see "Test page content"
+7
View File
@@ -489,6 +489,7 @@ class api {
'$mmSideMenuDelegate_mmaFiles' => new lang_string('files'),
'$mmSideMenuDelegate_website' => new lang_string('webpage'),
'$mmSideMenuDelegate_help' => new lang_string('help'),
'CoreMainMenuDelegate_QrReader' => new lang_string('scanqrcode', 'tool_mobile'),
),
"$course" => array(
'NoDelegate_CourseBlocks' => new lang_string('blocks'),
@@ -527,6 +528,12 @@ class api {
$features["$remoteaddons"] = $remoteaddonslist;
}
if (!empty($availablemods['lti'])) {
$ltidisplayname = $availablemods['lti']->displayname;
$features["$ltidisplayname"]['CoreCourseModuleDelegate_AddonModLti:openInAppBrowser'] =
new lang_string('openusingembeddedbrowser', 'tool_mobile');
}
// Display OAuth 2 identity providers.
if (is_enabled_auth('oauth2')) {
$identityproviderslist = array();
@@ -184,6 +184,13 @@ class subscription implements \renderable, \templatable {
'type' => 'danger', 'message' => get_string('subscriptionfeaturenotapplied', 'tool_mobile')];
}
break;
// Check QR automatic login.
case 'qrautomaticlogin':
if ($ms->qrcodetype == \tool_mobile\api::QR_CODE_LOGIN) {
$feature['message'] = [
'type' => 'danger', 'message' => get_string('subscriptionfeaturenotapplied', 'tool_mobile')];
}
break;
}
}
}
+3
View File
@@ -48,5 +48,8 @@ function xmldb_tool_mobile_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3 -1
View File
@@ -105,6 +105,7 @@ $string['notificationssentnotifications'] = 'Notifications sent';
$string['notificationscurrentactivedevices'] = 'Devices receiving notifications this month';
$string['oauth2identityproviders'] = 'OAuth 2 identity providers';
$string['offlineuse'] = 'Offline use';
$string['openusingembeddedbrowser'] = 'Open using embedded browser';
$string['pluginname'] = 'Moodle app tools';
$string['pluginnotenabledorconfigured'] = 'Plugin not enabled or configured.';
$string['qrcodedisabled'] = 'Access via QR code disabled';
@@ -113,11 +114,12 @@ $string['qrcodeformobileapploginabout'] = 'Scan the QR code with your mobile app
$string['qrcodeformobileappurlabout'] = 'Scan the QR code with your mobile app to fill in the site URL in your app.';
$string['qrsiteadminsnotallowed'] = 'For security reasons login via QR code is not allowed for site administrators or if you are logged in as another user.';
$string['qrcodetype'] = 'QR code access';
$string['qrcodetype_desc'] = 'A QR code can be provided for mobile app users to scan and either have the site URL filled in or be automatically logged in without having to enter their credentials.';
$string['qrcodetype_desc'] = 'A QR code can be provided for mobile app users to scan. This can be used to fill in the site URL, or where the site is secured using HTTPS, to automatically log the user in without having to enter their username and password.';
$string['qrcodetypeurl'] = 'QR code with site URL';
$string['qrcodetypelogin'] = 'QR code with automatic login';
$string['readingthisemailgettheapp'] = 'Reading this in an email? <a href="{$a}">Download the mobile app and receive notifications on your mobile device</a>.';
$string['remoteaddons'] = 'Remote add-ons';
$string['scanqrcode'] = 'Scan QR code';
$string['selfsignedoruntrustedcertificatewarning'] = 'It seems that the HTTPS certificate is self-signed or not trusted. The mobile app will only work with trusted sites.';
$string['setuplink'] = 'App download page';
$string['setuplink_desc'] = 'URL of page with options to download the mobile app from the App Store and Google Play. The app download page link is displayed in the page footer and in a user\'s profile. Leave blank to not display a link.';
+147 -120
View File
@@ -48,125 +48,152 @@ if ($hassiteconfig) {
$ADMIN->add('mobileapp', $temp);
// Show only mobile settings if the mobile service is enabled.
if (!empty($CFG->enablemobilewebservice)) {
$featuresnotice = null;
if (empty($CFG->disablemobileappsubscription)) {
// General notification about limited features due to app restrictions.
$subscriptionurl = (new moodle_url("/$CFG->admin/tool/mobile/subscription.php"))->out(false);
$notify = new \core\output\notification(
get_string('moodleappsportalfeatureswarning', 'tool_mobile', $subscriptionurl),
\core\output\notification::NOTIFY_WARNING);
$featuresnotice = $OUTPUT->render($notify);
$ADMIN->add('mobileapp', new admin_externalpage('mobileappsubscription',
new lang_string('mobileappsubscription', 'tool_mobile'),
"$CFG->wwwroot/$CFG->admin/tool/mobile/subscription.php"));
}
// Type of login.
$temp = new admin_settingpage('mobileauthentication', new lang_string('mobileauthentication', 'tool_mobile'));
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeaturesauth', '', $featuresnotice));
$options = array(
tool_mobile\api::LOGIN_VIA_APP => new lang_string('loginintheapp', 'tool_mobile'),
tool_mobile\api::LOGIN_VIA_BROWSER => new lang_string('logininthebrowser', 'tool_mobile'),
tool_mobile\api::LOGIN_VIA_EMBEDDED_BROWSER => new lang_string('loginintheembeddedbrowser', 'tool_mobile'),
);
$temp->add(new admin_setting_configselect('tool_mobile/typeoflogin',
new lang_string('typeoflogin', 'tool_mobile'),
new lang_string('typeoflogin_desc', 'tool_mobile'), 1, $options));
$options = [
tool_mobile\api::QR_CODE_DISABLED => new lang_string('qrcodedisabled', 'tool_mobile'),
tool_mobile\api::QR_CODE_URL => new lang_string('qrcodetypeurl', 'tool_mobile'),
tool_mobile\api::QR_CODE_LOGIN => new lang_string('qrcodetypelogin', 'tool_mobile'),
];
$temp->add(new admin_setting_configselect('tool_mobile/qrcodetype',
new lang_string('qrcodetype', 'tool_mobile'),
new lang_string('qrcodetype_desc', 'tool_mobile'), tool_mobile\api::QR_CODE_LOGIN, $options));
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme',
new lang_string('forcedurlscheme_key', 'tool_mobile'),
new lang_string('forcedurlscheme', 'tool_mobile'), 'moodlemobile', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('tool_mobile/minimumversion',
new lang_string('minimumversion_key', 'tool_mobile'),
new lang_string('minimumversion', 'tool_mobile'), '', PARAM_NOTAGS));
$ADMIN->add('mobileapp', $temp);
// Appearance related settings.
$temp = new admin_settingpage('mobileappearance', new lang_string('mobileappearance', 'tool_mobile'));
if (!empty($featuresnotice)) {
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeaturesappearance', '', $featuresnotice));
}
$temp->add(new admin_setting_configtext('mobilecssurl', new lang_string('mobilecssurl', 'tool_mobile'),
new lang_string('configmobilecssurl', 'tool_mobile'), '', PARAM_URL));
// Reference to Branded Mobile App.
if (empty($CFG->disableserviceads_branded)) {
$temp->add(new admin_setting_description('moodlebrandedappreference',
new lang_string('moodlebrandedapp', 'admin'),
new lang_string('moodlebrandedappreference', 'admin')
));
}
$temp->add(new admin_setting_heading('tool_mobile/smartappbanners',
new lang_string('smartappbanners', 'tool_mobile'), ''));
$temp->add(new admin_setting_configcheckbox('tool_mobile/enablesmartappbanners',
new lang_string('enablesmartappbanners', 'tool_mobile'),
new lang_string('enablesmartappbanners_desc', 'tool_mobile'), 0));
$temp->add(new admin_setting_configtext('tool_mobile/iosappid', new lang_string('iosappid', 'tool_mobile'),
new lang_string('iosappid_desc', 'tool_mobile'), tool_mobile\api::DEFAULT_IOS_APP_ID, PARAM_ALPHANUM));
$temp->add(new admin_setting_configtext('tool_mobile/androidappid', new lang_string('androidappid', 'tool_mobile'),
new lang_string('androidappid_desc', 'tool_mobile'), tool_mobile\api::DEFAULT_ANDROID_APP_ID, PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('tool_mobile/setuplink', new lang_string('setuplink', 'tool_mobile'),
new lang_string('setuplink_desc', 'tool_mobile'), 'https://download.moodle.org/mobile', PARAM_URL));
$ADMIN->add('mobileapp', $temp);
// Features related settings.
$temp = new admin_settingpage('mobilefeatures', new lang_string('mobilefeatures', 'tool_mobile'));
if (!empty($featuresnotice)) {
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeatures', '', $featuresnotice));
}
$temp->add(new admin_setting_heading('tool_mobile/logout',
new lang_string('logout'), ''));
$temp->add(new admin_setting_configcheckbox('tool_mobile/forcelogout',
new lang_string('forcelogout', 'tool_mobile'),
new lang_string('forcelogout_desc', 'tool_mobile'), 0));
$temp->add(new admin_setting_heading('tool_mobile/features',
new lang_string('mobilefeatures', 'tool_mobile'), ''));
$options = tool_mobile\api::get_features_list();
$temp->add(new admin_setting_configmultiselect('tool_mobile/disabledfeatures',
new lang_string('disabledfeatures', 'tool_mobile'),
new lang_string('disabledfeatures_desc', 'tool_mobile'), array(), $options));
$temp->add(new admin_setting_configtextarea('tool_mobile/custommenuitems',
new lang_string('custommenuitems', 'tool_mobile'),
new lang_string('custommenuitems_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
$temp->add(new admin_setting_heading('tool_mobile/language',
new lang_string('language'), ''));
$temp->add(new admin_setting_configtextarea('tool_mobile/customlangstrings',
new lang_string('customlangstrings', 'tool_mobile'),
new lang_string('customlangstrings_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
$ADMIN->add('mobileapp', $temp);
$featuresnotice = null;
if (empty($CFG->disablemobileappsubscription)) {
// General notification about limited features due to app restrictions.
$subscriptionurl = (new moodle_url("/$CFG->admin/tool/mobile/subscription.php"))->out(false);
$notify = new \core\output\notification(
get_string('moodleappsportalfeatureswarning', 'tool_mobile', $subscriptionurl),
\core\output\notification::NOTIFY_WARNING);
$featuresnotice = $OUTPUT->render($notify);
}
$hideappsubscription = empty($CFG->enablemobilewebservice);
$hideappsubscription = $hideappsubscription || (isset($CFG->disablemobileappsubscription) && !empty($CFG->disablemobileappsubscription));
$ADMIN->add(
'mobileapp',
new admin_externalpage(
'mobileappsubscription',
new lang_string('mobileappsubscription', 'tool_mobile'),
"$CFG->wwwroot/$CFG->admin/tool/mobile/subscription.php",
'moodle/site:config',
$hideappsubscription
)
);
// Type of login.
$temp = new admin_settingpage(
'mobileauthentication',
new lang_string('mobileauthentication', 'tool_mobile'),
'moodle/site:config',
empty($CFG->enablemobilewebservice)
);
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeaturesauth', '', $featuresnotice));
$options = array(
tool_mobile\api::LOGIN_VIA_APP => new lang_string('loginintheapp', 'tool_mobile'),
tool_mobile\api::LOGIN_VIA_BROWSER => new lang_string('logininthebrowser', 'tool_mobile'),
tool_mobile\api::LOGIN_VIA_EMBEDDED_BROWSER => new lang_string('loginintheembeddedbrowser', 'tool_mobile'),
);
$temp->add(new admin_setting_configselect('tool_mobile/typeoflogin',
new lang_string('typeoflogin', 'tool_mobile'),
new lang_string('typeoflogin_desc', 'tool_mobile'), 1, $options));
$options = [
tool_mobile\api::QR_CODE_DISABLED => new lang_string('qrcodedisabled', 'tool_mobile'),
tool_mobile\api::QR_CODE_URL => new lang_string('qrcodetypeurl', 'tool_mobile'),
];
$qrcodetypedefault = tool_mobile\api::QR_CODE_URL;
if (is_https()) { // Allow QR login for https sites.
$options[tool_mobile\api::QR_CODE_LOGIN] = new lang_string('qrcodetypelogin', 'tool_mobile');
$qrcodetypedefault = tool_mobile\api::QR_CODE_LOGIN;
}
$temp->add(new admin_setting_configselect('tool_mobile/qrcodetype',
new lang_string('qrcodetype', 'tool_mobile'),
new lang_string('qrcodetype_desc', 'tool_mobile'), $qrcodetypedefault, $options));
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme',
new lang_string('forcedurlscheme_key', 'tool_mobile'),
new lang_string('forcedurlscheme', 'tool_mobile'), 'moodlemobile', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('tool_mobile/minimumversion',
new lang_string('minimumversion_key', 'tool_mobile'),
new lang_string('minimumversion', 'tool_mobile'), '', PARAM_NOTAGS));
$ADMIN->add('mobileapp', $temp);
// Appearance related settings.
$temp = new admin_settingpage(
'mobileappearance',
new lang_string('mobileappearance', 'tool_mobile'),
'moodle/site:config',
empty($CFG->enablemobilewebservice)
);
if (!empty($featuresnotice)) {
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeaturesappearance', '', $featuresnotice));
}
$temp->add(new admin_setting_configtext('mobilecssurl', new lang_string('mobilecssurl', 'tool_mobile'),
new lang_string('configmobilecssurl', 'tool_mobile'), '', PARAM_URL));
// Reference to Branded Mobile App.
if (empty($CFG->disableserviceads_branded)) {
$temp->add(new admin_setting_description('moodlebrandedappreference',
new lang_string('moodlebrandedapp', 'admin'),
new lang_string('moodlebrandedappreference', 'admin')
));
}
$temp->add(new admin_setting_heading('tool_mobile/smartappbanners',
new lang_string('smartappbanners', 'tool_mobile'), ''));
$temp->add(new admin_setting_configcheckbox('tool_mobile/enablesmartappbanners',
new lang_string('enablesmartappbanners', 'tool_mobile'),
new lang_string('enablesmartappbanners_desc', 'tool_mobile'), 0));
$temp->add(new admin_setting_configtext('tool_mobile/iosappid', new lang_string('iosappid', 'tool_mobile'),
new lang_string('iosappid_desc', 'tool_mobile'), tool_mobile\api::DEFAULT_IOS_APP_ID, PARAM_ALPHANUM));
$temp->add(new admin_setting_configtext('tool_mobile/androidappid', new lang_string('androidappid', 'tool_mobile'),
new lang_string('androidappid_desc', 'tool_mobile'), tool_mobile\api::DEFAULT_ANDROID_APP_ID, PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('tool_mobile/setuplink', new lang_string('setuplink', 'tool_mobile'),
new lang_string('setuplink_desc', 'tool_mobile'), 'https://download.moodle.org/mobile', PARAM_URL));
$ADMIN->add('mobileapp', $temp);
// Features related settings.
$temp = new admin_settingpage(
'mobilefeatures',
new lang_string('mobilefeatures', 'tool_mobile'),
'moodle/site:config',
empty($CFG->enablemobilewebservice)
);
if (!empty($featuresnotice)) {
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeatures', '', $featuresnotice));
}
$temp->add(new admin_setting_heading('tool_mobile/logout',
new lang_string('logout'), ''));
$temp->add(new admin_setting_configcheckbox('tool_mobile/forcelogout',
new lang_string('forcelogout', 'tool_mobile'),
new lang_string('forcelogout_desc', 'tool_mobile'), 0));
$temp->add(new admin_setting_heading('tool_mobile/features',
new lang_string('mobilefeatures', 'tool_mobile'), ''));
$options = tool_mobile\api::get_features_list();
$temp->add(new admin_setting_configmultiselect('tool_mobile/disabledfeatures',
new lang_string('disabledfeatures', 'tool_mobile'),
new lang_string('disabledfeatures_desc', 'tool_mobile'), array(), $options));
$temp->add(new admin_setting_configtextarea('tool_mobile/custommenuitems',
new lang_string('custommenuitems', 'tool_mobile'),
new lang_string('custommenuitems_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
$temp->add(new admin_setting_heading('tool_mobile/language',
new lang_string('language'), ''));
$temp->add(new admin_setting_configtextarea('tool_mobile/customlangstrings',
new lang_string('customlangstrings', 'tool_mobile'),
new lang_string('customlangstrings_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
$ADMIN->add('mobileapp', $temp);
}
+3
View File
@@ -45,5 +45,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -52,7 +52,7 @@ class external extends external_api {
public static function verify_webfinger_parameters() {
return new external_function_parameters(
array(
'profileurl' => new external_value(PARAM_RAW, 'The profile url that the user has given us', VALUE_REQUIRED),
'profileurl' => new external_value(PARAM_NOTAGS, 'The profile url that the user has given us', VALUE_REQUIRED),
'course' => new external_value(PARAM_INT, 'The course we are adding to', VALUE_REQUIRED),
'section' => new external_value(PARAM_INT, 'The section within the course we are adding to', VALUE_REQUIRED),
)
@@ -46,7 +46,7 @@ class profile_manager {
$user = \core_user::get_user($userid, 'moodlenetprofile');
try {
$userprofile = $user->moodlenetprofile ? $user->moodlenetprofile : '';
return (isset($user)) ? new moodlenet_user_profile($userprofile, $userid) : null;
return (isset($user)) ? new moodlenet_user_profile(s($userprofile), $userid) : null;
} catch (\moodle_exception $e) {
// If an exception is thrown, means there isn't a valid profile set. No need to log exception.
return null;
@@ -59,7 +59,7 @@ class profile_manager {
if ($field->get_category_name() == self::get_category_name()
&& $field->inputname == 'profile_field_mnetprofile') {
try {
return new moodlenet_user_profile($field->display_data(), $userid);
return new moodlenet_user_profile(s($field->display_data()), $userid);
} catch (\moodle_exception $e) {
// If an exception is thrown, means there isn't a valid profile set. No need to log exception.
return null;
+21
View File
@@ -102,5 +102,26 @@ function xmldb_tool_moodlenet_upgrade(int $oldversion) {
upgrade_plugin_savepoint(true, 2020061502, 'tool', 'moodlenet');
}
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2020061503) {
// Find out if there are users with MoodleNet profiles set.
$sql = "SELECT u.*
FROM {user} u
WHERE u.moodlenetprofile IS NOT NULL";
$records = $DB->get_records_sql($sql);
foreach ($records as $record) {
// Force clean user value just incase there is something malicious.
$record->moodlenetprofile = clean_text($record->moodlenetprofile, PARAM_NOTAGS);
$DB->update_record('user', $record);
}
upgrade_plugin_savepoint(true, 2020061503, 'tool', 'moodlenet');
}
return true;
}
+1 -1
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'tool_moodlenet';
$plugin->version = 2020061502;
$plugin->version = 2020061503;
$plugin->requires = 2020060900;
$plugin->maturity = MATURITY_ALPHA;
+3
View File
@@ -69,5 +69,8 @@ function xmldb_tool_policy_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2 -1
View File
@@ -48,6 +48,7 @@ class tool_task_renderer extends plugin_renderer_base {
$showloglink = \core\task\logmanager::has_log_report();
$table = new html_table();
$table->caption = get_string('scheduledtasks', 'tool_task');
$table->head = [
get_string('name'),
get_string('component', 'tool_task'),
@@ -180,7 +181,7 @@ class tool_task_renderer extends plugin_renderer_base {
$plugininfo->init_display_name();
$componentname = $plugininfo->displayname;
if (!$plugininfo->is_enabled()) {
if ($plugininfo->is_enabled() === false) {
$componentname .= ' ' . html_writer::span(
get_string('disabled', 'tool_task'), 'badge badge-secondary');
}
@@ -65,3 +65,9 @@ Feature: Manage scheduled tasks
| Name | Component | Minute | Hour | Day | Day of week | Month |
| Log table cleanup | Standard log | */5 | 1 | 2 | 4 | 3 |
And I should see "Log table cleanup" in the "tr.table-primary" "css_element"
Scenario: Disabled plugin's tasks are labelled as disabled too
When "CAS users sync job \auth_cas\task\sync_task" row "Next run" column of "Scheduled tasks" table should contain "Plugin disabled"
Then "CAS users sync job \auth_cas\task\sync_task" row "Component" column of "Scheduled tasks" table should contain "Disabled"
And "Background processing for scheduled allocation \workshopallocation_scheduled\task\cron_task" row "Next run" column of "Scheduled tasks" table should not contain "Plugin disabled"
And "Background processing for scheduled allocation \workshopallocation_scheduled\task\cron_task" row "Component" column of "Scheduled tasks" table should not contain "Disabled"
+16 -1
View File
@@ -138,13 +138,28 @@ class manager {
*/
const CONFIG_SHIPPED_VERSION = 'shipped_version';
/**
* Helper method to initialize admin page, setting appropriate extra URL parameters
*
* @param string $action
*/
protected function setup_admin_externalpage(string $action): void {
admin_externalpage_setup('tool_usertours/tours', '', array_filter([
'action' => $action,
'id' => optional_param('id', 0, PARAM_INT),
'tourid' => optional_param('tourid', 0, PARAM_INT),
'direction' => optional_param('direction', 0, PARAM_INT),
]));
}
/**
* This is the entry point for this controller class.
*
* @param string $action The action to perform.
*/
public function execute($action) {
admin_externalpage_setup('tool_usertours/tours');
$this->setup_admin_externalpage($action);
// Add the main content.
switch($action) {
case self::ACTION_NEWTOUR:
+3
View File
@@ -54,5 +54,8 @@ function xmldb_tool_usertours_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2020061501, 'tool', 'usertours');
}
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

@@ -93,6 +93,17 @@ class check_defaults extends XMLDBCheckAction {
$physicaldefault = null;
}
// For number fields there are issues with type differences, so let's convert
// everything to a float.
if ($xmldbfield->getType() === XMLDB_TYPE_NUMBER) {
if ($physicaldefault !== null) {
$physicaldefault = (float) $physicaldefault;
}
if ($xmldbdefault !== null) {
$xmldbdefault = (float) $xmldbdefault;
}
}
// There *is* a default and it's wrong.
if ($physicaldefault !== $xmldbdefault) {
$xmldbtext = self::display_default($xmldbdefault);
+19 -3
View File
@@ -624,9 +624,25 @@ class manager {
LEFT JOIN {context} ctx ON ap.contextid = ctx.id
WHERE ctx.id IS NULL)");
$contextsql = "SELECT id FROM {context} ctx";
$DB->delete_records_select('analytics_predictions', "contextid NOT IN ($contextsql)");
$DB->delete_records_select('analytics_indicator_calc', "contextid NOT IN ($contextsql)");
// Cleanup analaytics predictions/calcs with MySQL friendly sub-select.
$DB->execute("DELETE FROM {analytics_predictions} WHERE id IN (
SELECT oldpredictions.id
FROM (
SELECT p.id
FROM {analytics_predictions} p
LEFT JOIN {context} ctx ON p.contextid = ctx.id
WHERE ctx.id IS NULL
) oldpredictions
)");
$DB->execute("DELETE FROM {analytics_indicator_calc} WHERE id IN (
SELECT oldcalcs.id FROM (
SELECT c.id
FROM {analytics_indicator_calc} c
LEFT JOIN {context} ctx ON c.contextid = ctx.id
WHERE ctx.id IS NULL
) oldcalcs
)");
// Clean up stuff that depends on analysable ids that do not exist anymore.
+11
View File
@@ -44,5 +44,16 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2020061501) {
// Normalize the memberattribute_isdn plugin config.
set_config('memberattribute_isdn',
!empty(get_config('auth_cas', 'memberattribute_isdn')), 'auth_cas');
upgrade_plugin_savepoint(true, 2020061501, 'auth', 'cas');
}
return true;
}
+2 -2
View File
@@ -239,9 +239,9 @@ if ($ADMIN->fulltree) {
get_string('auth_ldap_memberattribute', 'auth_ldap'), '', PARAM_RAW));
// Member attribute uses dn.
$settings->add(new admin_setting_configtext('auth_cas/memberattribute_isdn',
$settings->add(new admin_setting_configselect('auth_cas/memberattribute_isdn',
get_string('auth_ldap_memberattribute_isdn_key', 'auth_ldap'),
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), '', PARAM_RAW));
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), 0, $yesno));
// Object class.
$settings->add(new admin_setting_configtext('auth_cas/objectclass',
+1 -1
View File
@@ -26,7 +26,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2020061500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2020061501; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2020060900; // Requires this Moodle version
$plugin->component = 'auth_cas'; // Full name of the plugin (used for diagnostics)
+6 -3
View File
@@ -603,9 +603,12 @@ class auth_plugin_db extends auth_plugin_base {
}
}
if (!empty($update)) {
$authdb->Execute("UPDATE {$this->config->table}
SET ".implode(',', $update)."
WHERE {$this->config->fielduser}='".$this->ext_addslashes($extusername)."'");
$sql = "UPDATE {$this->config->table}
SET ".implode(',', $update)."
WHERE {$this->config->fielduser} = ?";
if (!$authdb->Execute($sql, array($this->ext_addslashes($extusername)))) {
print_error('auth_dbupdateerror', 'auth_db');
}
}
$authdb->Close();
return true;
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_db_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1
View File
@@ -74,5 +74,6 @@ $string['auth_dbcannotconnect'] = 'Cannot connect to external database.';
$string['auth_dbcannotreadtable'] = 'Cannot read external table.';
$string['auth_dbtableempty'] = 'External table is empty.';
$string['auth_dbcolumnlist'] = 'External table contains the following columns:<br />{$a}';
$string['auth_dbupdateerror'] = 'Error updating external database.';
$string['pluginname'] = 'External database';
$string['privacy:metadata'] = 'The External database authentication plugin does not store any personal data.';
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_email_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -49,6 +49,6 @@ class behat_auth_email extends behat_base {
$confirmationpath = $confirmationurl->out_as_local_url(false);
$url = $confirmationpath . '?' . 'data='. $secret .'/'. $username;
$this->getSession()->visit($this->locate_path($url));
$this->execute('behat_general::i_visit', [$url]);
}
}
+11
View File
@@ -44,5 +44,16 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2020061501) {
// Normalize the memberattribute_isdn plugin config.
set_config('memberattribute_isdn',
!empty(get_config('auth_ldap', 'memberattribute_isdn')), 'auth_ldap');
upgrade_plugin_savepoint(true, 2020061501, 'auth', 'ldap');
}
return true;
}
+1 -1
View File
@@ -57,7 +57,7 @@ $string['auth_ldap_ldap_encoding'] = 'Encoding used by the LDAP server, most lik
$string['auth_ldap_ldap_encoding_key'] = 'LDAP encoding';
$string['auth_ldap_login_settings'] = 'Login settings';
$string['auth_ldap_memberattribute'] = 'Optional: Overrides user member attribute, when users belongs to a group. Usually \'member\'';
$string['auth_ldap_memberattribute_isdn'] = 'Optional: Overrides handling of member attribute values, either 0 or 1';
$string['auth_ldap_memberattribute_isdn'] = 'Overrides handling of member attribute values';
$string['auth_ldap_memberattribute_isdn_key'] = 'Member attribute uses dn';
$string['auth_ldap_memberattribute_key'] = 'Member attribute';
$string['auth_ldap_noconnect'] = 'LDAP-module cannot connect to server: {$a}';
+2 -2
View File
@@ -142,9 +142,9 @@ if ($ADMIN->fulltree) {
get_string('auth_ldap_memberattribute', 'auth_ldap'), '', PARAM_RAW));
// Member attribute uses dn.
$settings->add(new admin_setting_configtext('auth_ldap/memberattribute_isdn',
$settings->add(new admin_setting_configselect('auth_ldap/memberattribute_isdn',
get_string('auth_ldap_memberattribute_isdn_key', 'auth_ldap'),
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), '', PARAM_RAW));
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), 0, $yesno));
// Object class.
$settings->add(new admin_setting_configtext('auth_ldap/objectclass',
+19 -8
View File
@@ -108,16 +108,19 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
$o['ou'] = 'users';
ldap_add($connection, 'ou='.$o['ou'].','.$topdn, $o);
$createdusers = array();
for ($i=1; $i<=5; $i++) {
$this->create_ldap_user($connection, $topdn, $i);
$createdusers[] = 'username' . $i;
}
// Set up creators group.
$assignedroles = array('username1', 'username2');
$o = array();
$o['objectClass'] = array('posixGroup');
$o['cn'] = 'creators';
$o['gidNumber'] = 1;
$o['memberUid'] = array('username1', 'username2');
$o['memberUid'] = $assignedroles;
ldap_add($connection, 'cn='.$o['cn'].','.$topdn, $o);
$creatorrole = $DB->get_record('role', array('shortname'=>'coursecreator'));
@@ -174,15 +177,23 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
// Check events, 5 users created with 2 users having roles.
$this->assertCount(7, $events);
foreach ($events as $index => $event) {
$usercreatedindex = array(0, 2, 4, 5, 6);
$roleassignedindex = array (1, 3);
if (in_array($index, $usercreatedindex)) {
$this->assertInstanceOf('\core\event\user_created', $event);
}
if (in_array($index, $roleassignedindex)) {
$this->assertInstanceOf('\core\event\role_assigned', $event);
$username = $DB->get_field('user', 'username', array('id' => $event->relateduserid)); // Get username.
if ($event->eventname === '\core\event\user_created') {
$this->assertContains($username, $createdusers);
unset($events[$index]); // Remove matching event.
} else if ($event->eventname === '\core\event\role_assigned') {
$this->assertContains($username, $assignedroles);
unset($events[$index]); // Remove matching event.
} else {
$this->fail('Unexpected event found: ' . $event->eventname);
}
}
// If all the user_created and role_assigned events have matched
// then the $events array should be now empty.
$this->assertCount(0, $events);
$this->assertEquals(5, $DB->count_records('user', array('auth'=>'ldap')));
$this->assertEquals(2, $DB->count_records('role_assignments'));
+1 -1
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2020061500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2020061501; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2020060900; // Requires this Moodle version
$plugin->component = 'auth_ldap'; // Full name of the plugin (used for diagnostics)
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_none_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+4 -3
View File
@@ -455,8 +455,9 @@ class auth extends \auth_plugin_base {
}
}
$issuer = $client->get_issuer();
// First we try and find a defined mapping.
$linkedlogin = api::match_username_to_user($userinfo['username'], $client->get_issuer());
$linkedlogin = api::match_username_to_user($userinfo['username'], $issuer);
if (!empty($linkedlogin) && empty($linkedlogin->get('confirmtoken'))) {
$mappeduser = get_complete_user_data('id', $linkedlogin->get('userid'));
@@ -474,7 +475,7 @@ class auth extends \auth_plugin_base {
$SESSION->loginerrormsg = get_string('invalidlogin');
$client->log_out();
redirect(new moodle_url('/login/index.php'));
} else if ($mappeduser && $mappeduser->confirmed) {
} else if ($mappeduser && ($mappeduser->confirmed || !$issuer->get('requireconfirmation'))) {
// Update user fields.
$userinfo = $this->update_user($userinfo, $mappeduser);
$userwasmapped = true;
@@ -503,7 +504,7 @@ class auth extends \auth_plugin_base {
redirect(new moodle_url('/login/index.php'));
}
$issuer = $client->get_issuer();
if (!$issuer->is_valid_login_domain($oauthemail)) {
// Trigger login failed event.
$failurereason = AUTH_LOGIN_UNAUTHORISED;
+3
View File
@@ -81,5 +81,8 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_shibboleth_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -58,7 +58,7 @@ class behat_auth extends behat_base {
}
// Visit login page.
$this->getSession()->visit($this->locate_path($loginurl->out_as_local_url()));
$this->execute('behat_general::i_visit', [$loginurl]);
// Enter username and password.
$this->execute('behat_forms::i_set_the_field_to', array('Username', $this->escape($username)));
@@ -410,7 +410,7 @@ M.core_availability.List = function(json, root, parentRoot) {
noneNode.appendChild(deleteIcon.span);
// Also if it's not the root, none is actually invalid, so add a label.
noneNode.appendChild(Y.Node.create('<span class="mt-1 label label-warning">' +
noneNode.appendChild(Y.Node.create('<span class="mt-1 badge badge-warning">' +
M.util.get_string('invalid', 'availability') + '</span>'));
}
@@ -924,7 +924,7 @@ M.core_availability.Item = function(json, root) {
// Add the invalid marker (empty).
this.node.appendChild(document.createTextNode(' '));
this.node.appendChild(Y.Node.create('<span class="label label-warning"/>'));
this.node.appendChild(Y.Node.create('<span class="badge badge-warning"/>'));
};
/**
@@ -960,7 +960,7 @@ M.core_availability.Item.prototype.fillErrors = function(errors) {
errors.push('core_availability:item_unknowntype');
}
// If any errors were added, add the marker to this item.
var errorLabel = this.node.one('> .label-warning');
var errorLabel = this.node.one('> .badge-warning');
if (errors.length !== before && !errorLabel.get('firstChild')) {
errorLabel.appendChild(document.createTextNode(M.util.get_string('invalid', 'availability')));
} else if (errors.length === before && errorLabel.get('firstChild')) {
File diff suppressed because one or more lines are too long
@@ -410,7 +410,7 @@ M.core_availability.List = function(json, root, parentRoot) {
noneNode.appendChild(deleteIcon.span);
// Also if it's not the root, none is actually invalid, so add a label.
noneNode.appendChild(Y.Node.create('<span class="mt-1 label label-warning">' +
noneNode.appendChild(Y.Node.create('<span class="mt-1 badge badge-warning">' +
M.util.get_string('invalid', 'availability') + '</span>'));
}
@@ -924,7 +924,7 @@ M.core_availability.Item = function(json, root) {
// Add the invalid marker (empty).
this.node.appendChild(document.createTextNode(' '));
this.node.appendChild(Y.Node.create('<span class="label label-warning"/>'));
this.node.appendChild(Y.Node.create('<span class="badge badge-warning"/>'));
};
/**
@@ -960,7 +960,7 @@ M.core_availability.Item.prototype.fillErrors = function(errors) {
errors.push('core_availability:item_unknowntype');
}
// If any errors were added, add the marker to this item.
var errorLabel = this.node.one('> .label-warning');
var errorLabel = this.node.one('> .badge-warning');
if (errors.length !== before && !errorLabel.get('firstChild')) {
errorLabel.appendChild(document.createTextNode(M.util.get_string('invalid', 'availability')));
} else if (errors.length === before && errorLabel.get('firstChild')) {
+3 -3
View File
@@ -408,7 +408,7 @@ M.core_availability.List = function(json, root, parentRoot) {
noneNode.appendChild(deleteIcon.span);
// Also if it's not the root, none is actually invalid, so add a label.
noneNode.appendChild(Y.Node.create('<span class="mt-1 label label-warning">' +
noneNode.appendChild(Y.Node.create('<span class="mt-1 badge badge-warning">' +
M.util.get_string('invalid', 'availability') + '</span>'));
}
@@ -922,7 +922,7 @@ M.core_availability.Item = function(json, root) {
// Add the invalid marker (empty).
this.node.appendChild(document.createTextNode(' '));
this.node.appendChild(Y.Node.create('<span class="label label-warning"/>'));
this.node.appendChild(Y.Node.create('<span class="badge badge-warning"/>'));
};
/**
@@ -958,7 +958,7 @@ M.core_availability.Item.prototype.fillErrors = function(errors) {
errors.push('core_availability:item_unknowntype');
}
// If any errors were added, add the marker to this item.
var errorLabel = this.node.one('> .label-warning');
var errorLabel = this.node.one('> .badge-warning');
if (errors.length !== before && !errorLabel.get('firstChild')) {
errorLabel.appendChild(document.createTextNode(M.util.get_string('invalid', 'availability')));
} else if (errors.length === before && errorLabel.get('firstChild')) {
+8 -9
View File
@@ -122,7 +122,7 @@ class restore_gradebook_structure_step extends restore_structure_step {
}
// Identify the backup we're dealing with.
$backuprelease = floatval($this->get_task()->get_info()->backup_release); // The major version: 2.9, 3.0, ...
$backuprelease = $this->get_task()->get_info()->backup_release; // The major version: 2.9, 3.0, 3.10...
$backupbuild = 0;
preg_match('/(\d{8})/', $this->get_task()->get_info()->moodle_release, $matches);
if (!empty($matches[1])) {
@@ -132,7 +132,7 @@ class restore_gradebook_structure_step extends restore_structure_step {
// On older versions the freeze value has to be converted.
// We do this from here as it is happening right before the file is read.
// This only targets the backup files that can contain the legacy freeze.
if ($backupbuild > 20150618 && ($backuprelease < 3.0 || $backupbuild < 20160527)) {
if ($backupbuild > 20150618 && (version_compare($backuprelease, '3.0', '<') || $backupbuild < 20160527)) {
$this->rewrite_step_backup_file_for_legacy_freeze($fullpath);
}
@@ -505,8 +505,7 @@ class restore_gradebook_structure_step extends restore_structure_step {
$gradebookcalculationsfreeze = get_config('core', 'gradebook_calculations_freeze_' . $this->get_courseid());
preg_match('/(\d{8})/', $this->get_task()->get_info()->moodle_release, $matches);
$backupbuild = (int)$matches[1];
// The function floatval will return a float even if there is text mixed with the release number.
$backuprelease = floatval($this->get_task()->get_info()->backup_release);
$backuprelease = $this->get_task()->get_info()->backup_release; // The major version: 2.9, 3.0, 3.10...
// Extra credits need adjustments only for backups made between 2.8 release (20141110) and the fix release (20150619).
if (!$gradebookcalculationsfreeze && $backupbuild >= 20141110 && $backupbuild < 20150619) {
@@ -521,7 +520,7 @@ class restore_gradebook_structure_step extends restore_structure_step {
// Courses from before 3.1 (20160518) may have a letter boundary problem and should be checked for this issue.
// Backups from before and including 2.9 could have a build number that is greater than 20160518 and should
// be checked for this problem.
if (!$gradebookcalculationsfreeze && ($backupbuild < 20160518 || $backuprelease <= 2.9)) {
if (!$gradebookcalculationsfreeze && ($backupbuild < 20160518 || version_compare($backuprelease, '2.9', '<='))) {
require_once($CFG->libdir . '/db/upgradelib.php');
upgrade_course_letter_boundary($this->get_courseid());
}
@@ -4631,11 +4630,11 @@ class restore_create_categories_and_questions extends restore_structure_step {
// Before 3.5, question categories could be created at top level.
// From 3.5 onwards, all question categories should be a child of a special category called the "top" category.
$backuprelease = floatval($this->get_task()->get_info()->backup_release);
$backuprelease = $this->get_task()->get_info()->backup_release; // The major version: 2.9, 3.0, 3.10...
preg_match('/(\d{8})/', $this->get_task()->get_info()->moodle_release, $matches);
$backupbuild = (int)$matches[1];
$before35 = false;
if ($backuprelease < 3.5 || $backupbuild < 20180205) {
if (version_compare($backuprelease, '3.5', '<') || $backupbuild < 20180205) {
$before35 = true;
}
if (empty($mapping->info->parent) && $before35) {
@@ -4892,11 +4891,11 @@ class restore_move_module_questions_categories extends restore_execution_step {
protected function define_execution() {
global $DB;
$backuprelease = floatval($this->task->get_info()->backup_release);
$backuprelease = $this->task->get_info()->backup_release; // The major version: 2.9, 3.0, 3.10...
preg_match('/(\d{8})/', $this->task->get_info()->moodle_release, $matches);
$backupbuild = (int)$matches[1];
$after35 = false;
if ($backuprelease >= 3.5 && $backupbuild > 20180205) {
if (version_compare($backuprelease, '3.5', '>=') && $backupbuild > 20180205) {
$after35 = true;
}
+2 -2
View File
@@ -581,11 +581,11 @@ abstract class restore_dbops {
$rc = restore_controller_dbops::load_controller($restoreid);
$restoreinfo = $rc->get_info();
$rc->destroy(); // Always need to destroy.
$backuprelease = floatval($restoreinfo->backup_release);
$backuprelease = $restoreinfo->backup_release; // The major version: 2.9, 3.0, 3.10...
preg_match('/(\d{8})/', $restoreinfo->moodle_release, $matches);
$backupbuild = (int)$matches[1];
$after35 = false;
if ($backuprelease >= 3.5 && $backupbuild > 20180205) {
if (version_compare($backuprelease, '3.5', '>=') && $backupbuild > 20180205) {
$after35 = true;
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -524,7 +524,7 @@ define(['jquery', 'core/ajax', 'core/str', 'core/notification', 'core/templates'
*/
function getAllCopyProgress() {
var copyids = [];
var progressbars = $('.progress').find('.progress-bar').not('.complete');
var progressbars = $('.progress').find('.progress-bar[data-operation][data-backupid][data-restoreid]').not('.complete');
progressbars.each(function() {
let progressvars = {
+2 -1
View File
@@ -402,7 +402,8 @@ abstract class base_moodleform extends moodleform {
// Get list of module types on course.
$modinfo = get_fast_modinfo($COURSE);
$modnames = $modinfo->get_used_module_names(true);
$modnames = array_map('strval', $modinfo->get_used_module_names(true));
core_collator::asort($modnames);
$PAGE->requires->yui_module('moodle-backup-backupselectall', 'M.core_backup.backupselectall',
array($modnames));
$PAGE->requires->strings_for_js(array('select', 'all', 'none'), 'moodle');
+2 -2
View File
@@ -111,8 +111,8 @@ class copy {
* Take the validated form data and extract the required information for copy operations.
*
* @param \stdClass $formdata Data from the validated course copy form.
* @throws \moodle_exception
* @return \stdClass $copydata Data required for course copy operations.
* @throws \moodle_exception If one of the required copy fields is missing
*/
private final function get_copy_data(\stdClass $formdata): \stdClass {
$copydata = new \stdClass();
@@ -121,7 +121,7 @@ class copy {
if (isset($formdata->{$field})) {
$copydata->{$field} = $formdata->{$field};
} else {
throw new \moodle_exception('copy_class_field_not_found');
throw new \moodle_exception('copyfieldnotfound', 'backup', '', null, $field);
}
}
+8 -6
View File
@@ -162,15 +162,17 @@ class copy_form extends \moodleform {
}
// Keep source course user data.
$mform->addElement('select', 'userdata', get_string('userdata', 'backup'),
[0 => get_string('no'), 1 => get_string('yes')]);
$mform->setDefault('userdata', 0);
$mform->addHelpButton('userdata', 'userdata', 'backup');
$requiredcapabilities = array(
'moodle/restore:createuser', 'moodle/backup:userinfo', 'moodle/restore:userinfo'
);
if (has_all_capabilities($requiredcapabilities, $coursecontext)) {
$dataarray = array();
$dataarray[] = $mform->createElement('advcheckbox', 'userdata',
get_string('enable'), '', array('group' => 1), array(0, 1));
$mform->addGroup($dataarray, 'dataarray', get_string('userdata', 'backup'), ' ', false);
$mform->addHelpButton('dataarray', 'userdata', 'backup');
if (!has_all_capabilities($requiredcapabilities, $coursecontext)) {
$mform->hardFreeze('userdata');
$mform->setConstants('userdata', 0);
}
// Keep manual enrolments.
+3 -3
View File
@@ -56,7 +56,7 @@ class behat_backup extends behat_base {
// table elements are used, and we need to catch exceptions contantly.
// Go to homepage.
$this->getSession()->visit($this->locate_path('/?redirect=0'));
$this->execute('behat_general::i_visit', ['/?redirect=0']);
$this->execute("behat_general::wait_until_the_page_is_ready");
// Click the course link.
@@ -98,7 +98,7 @@ class behat_backup extends behat_base {
// table elements are used, and we need to catch exceptions contantly.
// Go to homepage.
$this->getSession()->visit($this->locate_path('/?redirect=0'));
$this->execute('behat_general::i_visit', ['/?redirect=0']);
// Click the course link.
$this->execute("behat_general::click_link", $backupcourse);
@@ -134,7 +134,7 @@ class behat_backup extends behat_base {
// table elements are used, and we need to catch exceptions contantly.
// Go to homepage.
$this->getSession()->visit($this->locate_path('/?redirect=0'));
$this->execute('behat_general::i_visit', ['/?redirect=0']);
$this->execute("behat_general::wait_until_the_page_is_ready");
// Click the course link.
+1 -1
View File
@@ -70,7 +70,7 @@ class badge extends moodleform {
$mform->addRule('description', null, 'required');
$str = $action == 'new' ? get_string('badgeimage', 'badges') : get_string('newimage', 'badges');
$imageoptions = array('maxbytes' => 262144, 'accepted_types' => array('web_image'));
$imageoptions = array('maxbytes' => 262144, 'accepted_types' => array('optimised_image'));
$mform->addElement('filepicker', 'image', $str, null, $imageoptions);
if ($action == 'new') {
+10 -10
View File
@@ -80,16 +80,16 @@ class external_backpack extends \moodleform {
$issuercontact = $CFG->badges_defaultissuercontact;
$mform->addElement('static', 'issuerinfo', get_string('defaultissuercontact', 'core_badges'), $issuercontact);
if ($backpack && $backpack->apiversion != OPEN_BADGES_V2P1) {
$mform->addElement('passwordunmask', 'password', get_string('defaultissuerpassword', 'core_badges'));
$mform->setType('password', PARAM_RAW);
$mform->addHelpButton('password', 'defaultissuerpassword', 'badges');
$mform->hideIf('password', 'apiversion', 'eq', 1);
} else {
$oauth2options = badges_get_oauth2_service_options();
$mform->addElement('select', 'oauth2_issuerid', get_string('oauth2issuer', 'core_badges'), $oauth2options);
$mform->setType('oauth2_issuerid', PARAM_INT);
}
$mform->addElement('passwordunmask', 'password', get_string('defaultissuerpassword', 'core_badges'));
$mform->setType('password', PARAM_RAW);
$mform->addHelpButton('password', 'defaultissuerpassword', 'badges');
$mform->hideIf('password', 'apiversion', 'neq', 2);
$oauth2options = badges_get_oauth2_service_options();
$mform->addElement('select', 'oauth2_issuerid', get_string('oauth2issuer', 'core_badges'), $oauth2options);
$mform->setType('oauth2_issuerid', PARAM_INT);
$mform->hideIf('oauth2_issuerid', 'apiversion', 'neq', '2.1');
if ($backpack) {
$this->set_data($backpack);
}
@@ -67,11 +67,6 @@ class external_backpacks_page implements \renderable {
foreach ($this->backpacks as $backpack) {
$exporter = new backpack_exporter($backpack);
$backpack = $exporter->export($output);
if ($backpack->apiversion == OPEN_BADGES_V2 || $backpack->apiversion == OPEN_BADGES_V2P1) {
$backpack->canedit = true;
} else {
$backpack->canedit = false;
}
$backpack->cantest = ($backpack->apiversion == OPEN_BADGES_V2);
$backpack->iscurrent = ($backpack->id == $CFG->badges_site_backpack);
@@ -25,7 +25,7 @@
Example context (json):
{
"backpacks": [
{"backpackweburl": "http://localhost/", "sitebackpack": true, "canedit": false, "cantest": true}
{"backpackweburl": "http://localhost/", "sitebackpack": true, "cantest": true}
]
}
}}
@@ -50,9 +50,7 @@
<td> {{{backpackweburl}}} </td>
<td> {{#sitebackpack}}Yes{{/sitebackpack}} </td>
<td>
{{#canedit}}
<a href="{{baseurl}}?id={{id}}&action=edit">{{#pix}}t/edit, core,{{#str}}editsettings{{/str}}{{/pix}}</a>
{{/canedit}}
{{^iscurrent}}
<a href="{{baseurl}}?id={{id}}&action=delete" role="button" data-action="deletebackpack">
{{#pix}}t/delete, core,{{#str}}delete{{/str}}{{/pix}}
+2 -1
View File
@@ -107,7 +107,8 @@ Feature: Backpack badges
And I set the field "backpackweburl" to "http://backpackweburl.cat"
And I press "Save changes"
Then I should see "http://backpackweburl.cat"
And "Delete" "button" should exist
And "Delete" "icon" should exist in the "http://backpackweburl.cat" "table_row"
And "Edit settings" "icon" should exist in the "http://backpackweburl.cat" "table_row"
@javascript
Scenario: Remove a site backpack
@@ -342,13 +342,13 @@ class block_activity_results extends block_base {
$rank = 0;
if (!empty($best)) {
$this->content->text .= '<table class="grades"><caption>';
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
if ($numbest == 1) {
$this->content->text .= get_string('bestgroupgrade', 'block_activity_results');
} else {
$this->content->text .= get_string('bestgroupgrades', 'block_activity_results', $numbest);
}
$this->content->text .= '</caption><colgroup class="number" />';
$this->content->text .= '</h6></caption><colgroup class="number" />';
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
foreach ($best as $groupid => $averagegrade) {
switch ($nameformat) {
@@ -398,13 +398,13 @@ class block_activity_results extends block_base {
$rank = 0;
if (!empty($worst)) {
$worst = array_reverse($worst, true);
$this->content->text .= '<table class="grades"><caption>';
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
if ($numworst == 1) {
$this->content->text .= get_string('worstgroupgrade', 'block_activity_results');
} else {
$this->content->text .= get_string('worstgroupgrades', 'block_activity_results', $numworst);
}
$this->content->text .= '</caption><colgroup class="number" />';
$this->content->text .= '</h6></caption><colgroup class="number" />';
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
foreach ($worst as $groupid => $averagegrade) {
switch ($nameformat) {
@@ -529,13 +529,13 @@ class block_activity_results extends block_base {
$rank = 0;
if (!empty($best)) {
$this->content->text .= '<table class="grades"><caption>';
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
if ($numbest == 1) {
$this->content->text .= get_string('bestgrade', 'block_activity_results');
} else {
$this->content->text .= get_string('bestgrades', 'block_activity_results', $numbest);
}
$this->content->text .= '</caption><colgroup class="number" />';
$this->content->text .= '</h6></caption><colgroup class="number" />';
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
foreach ($best as $userid => $gradeid) {
switch ($nameformat) {
@@ -592,13 +592,13 @@ class block_activity_results extends block_base {
$rank = 0;
if (!empty($worst)) {
$worst = array_reverse($worst, true);
$this->content->text .= '<table class="grades"><caption>';
$this->content->text .= '<table class="grades"><caption class="pb-0"><h6>';
if ($numbest == 1) {
$this->content->text .= get_string('worstgrade', 'block_activity_results');
} else {
$this->content->text .= get_string('worstgrades', 'block_activity_results', $numworst);
}
$this->content->text .= '</caption><colgroup class="number" />';
$this->content->text .= '</h6></caption><colgroup class="number" />';
$this->content->text .= '<colgroup class="name" /><colgroup class="grade" /><tbody>';
foreach ($worst as $userid => $gradeid) {
switch ($nameformat) {
@@ -678,17 +678,17 @@ class block_activity_results extends block_base {
}
/**
* Generates the Link to the activity module when displaed outside of the module
* Generates the Link to the activity module when displayed outside of the module.
* @param stdclass $activity
* @param stdclass $cm
* @return string
*/
private function activity_link($activity, $cm) {
$o = html_writer::start_tag('h3');
$o = html_writer::start_tag('h5');
$o .= html_writer::link(new moodle_url('/mod/'.$activity->itemmodule.'/view.php',
array('id' => $cm->id)), format_string(($activity->itemname), true, ['context' => context_module::instance($cm->id)]));
$o .= html_writer::end_tag('h3');
$o .= html_writer::end_tag('h5');
return $o;
}
-5
View File
@@ -21,8 +21,3 @@
.block_activity_results table.grades .grade {
text-align: right;
}
.block_activity_results table.grades caption {
font-weight: bold;
font-size: 18px;
}
+3
View File
@@ -57,5 +57,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+8 -4
View File
@@ -99,10 +99,14 @@ class block_blog_menu extends block_base {
// Prepare the footer for this block
if (has_capability('moodle/blog:search', context_system::instance())) {
// Full-text search field
$form = html_writer::tag('label', get_string('search', 'admin'), array('for'=>'blogsearchquery', 'class'=>'accesshide'));
$form .= html_writer::empty_tag('input', array('id'=>'blogsearchquery', 'type'=>'text', 'name'=>'search'));
$form .= html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('search')));
$this->content->footer = html_writer::tag('form', html_writer::tag('div', $form), array('class'=>'blogsearchform', 'method'=>'get', 'action'=>new moodle_url('/blog/index.php')));
$form = html_writer::tag('label', get_string('search', 'admin'), array('for' => 'blogsearchquery',
'class' => 'accesshide'));
$form .= html_writer::empty_tag('input', array('id' => 'blogsearchquery', 'class' => 'form-control mr-1',
'type' => 'text', 'name' => 'search'));
$form .= html_writer::empty_tag('input', array('type' => 'submit', 'class' => 'btn btn-secondary',
'value' => get_string('search')));
$this->content->footer = html_writer::tag('form', html_writer::tag('div', $form), array(
'class' => 'blogsearchform form-inline', 'method' => 'get', 'action' => new moodle_url('/blog/index.php')));
} else {
// No footer to display
$this->content->footer = '';
+3
View File
@@ -57,5 +57,8 @@ function xmldb_block_calendar_month_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -57,5 +57,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -60,5 +60,8 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -60,5 +60,8 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -9,9 +9,14 @@ Feature: Random glossary entry block linking to global glossary
| fullname | shortname |
| Course 1 | C1 |
| Course 2 | C2 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | globalglossary | defaultapproval |
| glossary | Tips and Tricks | Frontpage glossary description | C2 | glossary0 | 1 | 1 |
And the following "activity" exists:
| activity | glossary |
| name | Tips and Tricks |
| intro | Frontpage glossary description |
| course | C2 |
| idnumber | glossary0 |
| globalglossary | 1 |
| defaultapproval | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Sam1 | Student1 | student1@example.com |
+3
View File
@@ -45,5 +45,8 @@ function xmldb_block_html_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -78,5 +78,8 @@ function xmldb_block_myoverview_upgrade($oldversion) {
upgrade_block_savepoint(true, 2019111801, 'myoverview', false);
}
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}

Some files were not shown because too many files have changed in this diff Show More