Compare commits

...

1205 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 5af6e79b38 Moodle release 3.10.7 2021-09-12 12:37:31 +02:00
Eloy Lafuente (stronk7) afa3c2a13f weekly release 3.10.6+ 2021-09-11 12:12:23 +02:00
Eloy Lafuente (stronk7) 10e6791ee0 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-09-11 12:12:21 +02:00
Shamim Rezaie 194b964dc5 MDL-71240 filter_tex: Add allowlist for filter_tex_sanitize_formula 2021-09-10 18:10:26 +02:00
Eloy Lafuente (stronk7) 3d94d6fb6a Merge branch 'MDL-71385-310-3' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-09-09 13:01:37 +02:00
Eloy Lafuente (stronk7) 83e94a25cf Merge branch 'MDL-63207-310' of git://github.com/cescobedo/moodle into MOODLE_310_STABLE 2021-09-09 13:01:37 +02:00
Eloy Lafuente (stronk7) 60a4c78f98 Merge branch 'MDL-69855-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-09-09 13:01:37 +02:00
Jun Pataleta 0095f26934 MDL-71385 theme: Fix contrast for dimmed text against striped table rows
In order to achieve good colour contrast between dimmed text and striped
table rows, the background colour of the striped rows are being
lightened to 0.03 alpha. While $gray-600 is being adjusted to a bit
darker shade of #6a737b. This gives a colour contrast ratio of 4.5:1
between the dimmed text colour and the striped table row background
which meets WCAG 2.1 Level AA requirements.

Comparing the normal font colour (#212529) with the adjusted dimmed text
colour gives a contrast ratio of 3.20:1 which meets WCAG 2.1 Level AA
requirements and still makes them distinguishable from one another.
2021-09-09 16:02:58 +08:00
AMOS bot 18678fc78e Automatically generated installer lang files 2021-09-09 00:07:22 +00:00
Eloy Lafuente (stronk7) b5366af358 Merge branch 'MDL-72216-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-09-08 11:29:16 +02:00
Eloy Lafuente (stronk7) 90e0a2c746 Merge branch 'MDL-72499-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-09-07 23:52:09 +02:00
Eloy Lafuente (stronk7) 45a7e77e6c Merge branch 'MDL-72071-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-09-07 23:30:04 +02:00
Eloy Lafuente (stronk7) 0110d5a4ad Merge branch 'MDL-72488-310-importdatastring' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-09-07 23:00:23 +02:00
cescobedo f01cff47d2 MDL-63207 auth_ldap: Update user profile if field is empty 2021-09-07 22:57:02 +02:00
Eloy Lafuente (stronk7) 83b771c9be Merge branch 'MDL-69504-310' of https://github.com/snake/moodle into MOODLE_310_STABLE 2021-09-07 20:04:22 +02:00
Eloy Lafuente (stronk7) a85148d645 Merge branch 'MDL-67610-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-09-07 19:25:35 +02:00
Jun Pataleta d65f46103a MDL-67610 mod_forum: Do not include private replies in unread count
Fetching the counts of unread posts should only include unread regular
posts or unread private reply posts directed to the user unless the user
has the capability to read private replies.
In order to retrieve the correct counts, we also need to loop through
each forum instance in the course to check the capability of the user to
read private replies in each forum.
2021-09-07 23:20:33 +08:00
AMOS bot 98679b981c Automatically generated installer lang files 2021-09-07 00:07:23 +00:00
Paul Holden ec4c5a0e35 MDL-71726 course: respect user access when exporting participants.
We should ensure that users being exported are enrolled on the
course being exported from. In courses where the current user can't
access all groups we should ensure that users being exported belong
to the same groups as them.
2021-09-07 00:14:39 +02:00
Sujith Haridasan 4ffc17be15 MDL-71160 auth_db: Use strict comaprison
Use strict comparison to avoid type juggling.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-09-07 00:14:39 +02:00
Paul Holden e2b3d5fec5 MDL-71976 auth_shibboleth: consistent session parsing during logout. 2021-09-07 00:14:39 +02:00
Shamim Rezaie 1b6f1756f6 MDL-71240 filter_tex: Sanitize the whole latex document
LaTeX documents have a preamble section and admins can use a \newcommand
statement to define new commands there (or to give an alias to another
command). This commit makes sure no blocked command can escape
sanitization by being used in a new seemingly harmless command that is
defined in the LaTeX preamble.
2021-09-07 00:14:39 +02:00
Shamim Rezaie cd7fa2e513 MDL-71240 filter_tex: Support paranoid mode for openin_any in latex 2021-09-07 00:14:39 +02:00
Huong Nguyen 0cd2cbccfb MDL-71797 quiz: Improve the checks when fetching user's attempts 2021-09-07 00:14:39 +02:00
Eloy Lafuente (stronk7) c05d2669bd Merge branch 'MDL-72286-310-test' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-09-06 23:58:25 +02:00
David Mudrák c755938aa3 MDL-72488 lang: Fix hard-coded English string at grades import form
Also adding a help tooltip as this seems to be the most important field
in the form and yet it was the only one without a help.
2021-09-06 17:41:50 +02:00
Paul Holden 55deada25a MDL-72499 event: add/correct event language strings as required. 2021-09-06 11:16:45 +01:00
Eloy Lafuente (stronk7) 536876611d Merge branch 'MDL-72428-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-09-03 19:10:45 +02:00
Eloy Lafuente (stronk7) 7aded627d8 Merge branch 'MDL-72478-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-09-03 17:03:19 +02:00
Sara Arjona 9fa81da1f2 MDL-72478 calendar: Fix PHPUnit failure with offset
Before PHP 8.0.10, the time is lost when datetime->modify() is used
with weekdays. However, with PHP 8.0.10, the time is kept.
In consequence, the test_yearly_every_20th_monday_forever method
started failing.
For fixing it, the offset has been removed and the time has been set
to 00:00, so the behaviour will be the same regardless the PHP
version.
2021-09-03 09:35:00 +02:00
Luca Bösch 4a47a0a0d6 MDL-72216 questions: Don't stick buttons together in preview. 2021-09-02 13:35:45 +02:00
Sara Arjona 3e6900105a weekly release 3.10.6+ 2021-09-02 11:51:27 +02:00
Jun Pataleta cf687ae49f Merge branch 'MDL-72440_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-09-02 09:52:11 +08:00
David Mudrák 2cce6c76af MDL-72428 lang: Use the fixed strings in the tests 2021-09-01 22:04:58 +02:00
Helen Foster 32b25556e1 MDL-72428 lang: Import fixed English strings (en_fix) 2021-09-01 22:04:04 +02:00
Sara Arjona 8d0457447a Merge branch 'MDL-72169-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-09-01 17:46:52 +02:00
Sara Arjona cfb69b6578 Merge branch 'MDL-71375-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-09-01 17:09:39 +02:00
Sara Arjona 54d1702e97 Merge branch 'MDL-70376-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-09-01 16:52:14 +02:00
Sara Arjona 87cf2ed706 Merge branch 'MDL-71674-310' of https://github.com/dcai/moodle into MOODLE_310_STABLE 2021-09-01 11:36:47 +02:00
Dongsheng Cai 1da0e42f0f MDL-71674 editor_atto: more assessible errors 2021-09-01 18:35:59 +10:00
Eloy Lafuente (stronk7) a7733c35b4 Merge branch 'MDL-71999-310' of https://github.com/danielneis/moodle into MOODLE_310_STABLE 2021-08-31 23:16:24 +02:00
Eloy Lafuente (stronk7) adcfb52c1e Merge branch 'MDL-71121-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-31 23:13:15 +02:00
Jun Pataleta b7d4a858f4 Merge branch 'MDL-71778-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-08-31 22:58:29 +08:00
Paul Holden 4dc7f8e76e MDL-72296 admin: style form when prompting for upgrade key. 2021-08-31 13:53:03 +02:00
Paul Holden c3be0cca40 MDL-72071 message: preserve window scroll opening processor modal. 2021-08-31 11:57:15 +01:00
Paul Holden 63fea60126 MDL-72169 privacy: format course name/summary during export. 2021-08-31 11:56:12 +01:00
Eloy Lafuente (stronk7) 12026abb03 MDL-72440 js: reconcile npm installed stuff
When npm-shrinkwrap.json was regenerated few days ago by MDL-72014
running audit-fix on it, it seems that some checksums in the "lodash"
package were missing.

Now they are properly set and that's leading to npm-shrinkwrap.json
changes when people runs npm install (note npm ci is the recommended
way to install all the dev dependencies).

So, just reconcile the file to include the new checksums.
2021-08-31 11:21:16 +02:00
cperves e9e2d3188a MDL-71778 admin: patch for hard-set check filter 2021-08-31 12:34:42 +08:00
Peter Dias a290e721e3 MDL-70376 mod_assign: Reintroduce pdf orientation check
Reintroduce the orientation check and sizing when importing an image
2021-08-31 12:29:27 +08:00
Jake Dallimore 465120ed76 Merge branch 'MDL-70433-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-08-30 10:42:36 +08:00
Simeon Naydenov 40adf6defd MDL-71375 lib: Fix tooltip in show_hide_icon in flexible table 2021-08-30 09:42:39 +08:00
Luca Bösch dab7b02b86 MDL-70433 grades: prevent double escaping in titles 2021-08-27 10:55:53 +02:00
Andrew Nicols 6259988cb6 weekly release 3.10.6+ 2021-08-27 12:00:24 +08:00
Andrew Nicols 0c1e6cc4b3 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-08-27 12:00:23 +08:00
Sara Arjona 14f831490a Merge branch 'MDL-71029-310' of https://github.com/dcai/moodle into MOODLE_310_STABLE 2021-08-26 07:12:35 +02:00
Andrew Nicols 38cf23f98f Merge branch 'MDL-72403-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-08-26 13:02:27 +08:00
Heena Agheda e8bdb79b95 MDL-72187 logstore: record log store's visibility change 2021-08-26 12:57:15 +08:00
Andrew Nicols 36ef1de379 Merge branch 'MDL-70176_310' of https://github.com/TomoTsuyuki/moodle into MOODLE_310_STABLE 2021-08-26 12:16:44 +08:00
Andrew Nicols c651c43de9 Merge branch 'MDL-72271_310' of https://github.com/larsbonczek/moodle into MOODLE_310_STABLE 2021-08-26 11:45:38 +08:00
Andrew Nicols 6c4be982c2 Merge branch 'MDL-72152-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2021-08-26 11:36:25 +08:00
Andrew Nicols ea67397163 Merge branch 'MDL-72153-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-26 11:32:13 +08:00
Andrew Nicols 554958612b Merge branch 'MDL-72312_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-08-26 11:26:54 +08:00
AMOS bot 528df7870c Automatically generated installer lang files 2021-08-26 00:07:26 +00:00
Sara Arjona d56f16671d Merge branch 'MDL-72106-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-25 18:38:45 +02:00
Eloy Lafuente (stronk7) 3c5ce312d3 Merge branch 'MDL-72163-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-08-24 20:12:39 +02:00
Sara Arjona 5ee12998e4 Merge branch '310_MDL-70006' of git://github.com/danmarsden/moodle into MOODLE_310_STABLE 2021-08-24 13:13:21 +02:00
Shamim Rezaie 194379a0f8 MDL-72403 calendar: prereserve courseid after form submit 2021-08-24 18:05:12 +10:00
Jake Dallimore 3c64ea8d3c MDL-69504 mod_lti: check role switches when setting lti roles on launch
is_siteadmin isn't aware of role switches, so make sure we're not in a
switched role before calling that method.
2021-08-24 14:35:16 +08:00
Andrew Nicols 5b3b01f1c4 Merge branch 'MDL-72014_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-08-24 09:17:05 +08:00
Andrew Nicols f5708eee2c Merge branch 'MDL-72207-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2021-08-24 09:10:07 +08:00
Eloy Lafuente (stronk7) 2e7f57f975 Merge branch 'MDL-71055-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-08-23 23:22:40 +02:00
Sara Arjona 5666d8e792 Merge branch 'MDL-72257-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-23 17:52:33 +02:00
Eloy Lafuente (stronk7) 525b10b861 MDL-72312 environment: Add new optional custom check for igbinary
This optional environmental check will look if:

- the site is running php72.
- the site has igbinary extension enabled.
- the igbinary extension version is a buggy one >=3.2.2 <= 3.2.4
- the bug is reproducible.

And will warn if all the conditions are met.
2021-08-23 15:51:57 +02:00
Eloy Lafuente (stronk7) ced1550177 MDL-72312 GHA: Force use of igbinary working version
And also remove memcached and redis that have dependencies on it.

Versions 3.2.2 - 3.2.4 have a bug returning
arrays with index messed up. This affects
key() and next() operations when reading
information serialised with igbinary.

Notably Moodle's MUC uses igbinary when
available and was leading to some wrong
operations and test failures.

Once a fixed version is used by GHA this
can be reverted. See MDL-72399.

Note this only affects to php72, newer php
versions are not affected.
2021-08-23 15:51:22 +02:00
Andrew Nicols 30de8275c0 MDL-71055 behat: Update core settings to use generator
These changes have only been applied to settings which were already
using settings names and values, but which were still using the UI.
2021-08-23 12:23:03 +08:00
Eloy Lafuente (stronk7) bfaeecb183 Merge branch 'MDL-71973-310' of https://github.com/mohalisad/moodle into MOODLE_310_STABLE 2021-08-20 19:06:47 +02:00
Eloy Lafuente (stronk7) c5be7c53c6 MDL-72014 nodejs: audit fix to solve some security reports
Simply run npm audit fix that updates these main packages:

- xmldom 0.6.0
- grunt 1.4.1
- gherkin-lint 4.2.2

(and also a bunch of dependencies)
2021-08-20 13:49:56 +02:00
Ilya Tregubov 65b6e86406 weekly release 3.10.6+ 2021-08-20 13:24:35 +02:00
Ilya Tregubov 029e68e619 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-08-20 13:24:35 +02:00
Tomo Tsuyuki add4186322 MDL-70176 mod_forum: Grading respects separate groups filter 2021-08-20 13:36:28 +10:00
Ilya Tregubov bf0795c567 MDL-49202 core: Comment broken test.
Should be fixed properly as part of MDL-72377.
2021-08-19 17:20:48 +02:00
Ilya Tregubov 7c749fba9c Merge branch 'MDL-49202_310' of git://github.com/mdjnelson/moodle into MOODLE_310_STABLE 2021-08-19 17:17:04 +02:00
Mark Nelson bbe8be25fc MDL-49202 core: fix failing unit tests
See MDL-72377.
2021-08-19 20:15:59 +08:00
Mark Nelson 4527f760ea MDL-49202 core_grades: add Behat tests 2021-08-19 20:15:59 +08:00
Juan Leyva bfc0fabe44 MDL-72207 assign: Support all participants in get_submission_status WS 2021-08-19 14:12:08 +02:00
Mark Nelson 10963bad39 MDL-49202 core_grades: perform same action on categories in form
When you click on 'Edit' then 'Hide' on a grade item like a course category
that contains many grade items, the course and the grade items are set to
hidden. However, if you use the 'hidden' option on the 'Edit settings'
page it only hides that item and none of the items (assignment etc)
under that course category. We want them to be consistent.
2021-08-19 17:44:11 +08:00
Mark Nelson 1ae7e18d55 MDL-49202 core_grades: perform same action on items in form
When you click on 'Edit' then 'Hide' on a grade item like an
assignment it also hides the grades. However, If you use the
'hidden' option on the 'Edit settings' page it just hides that
item and doesn't hide grades as well. We want them to be
consistent.
2021-08-19 17:44:11 +08:00
Andrew Nicols 67284dfc05 Merge branch 'MDL-72282-310' of https://github.com/dcai/moodle into MOODLE_310_STABLE 2021-08-19 11:15:28 +08:00
Andrew Nicols 28d9031e44 Merge branch 'MDL-68639-3.10' of https://github.com/xcaro/moodle into MOODLE_310_STABLE 2021-08-19 10:07:41 +08:00
Eloy Lafuente (stronk7) ddcd34612f Merge branch 'MDL-72206-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-08-18 19:32:47 +02:00
Andrew Nicols 43cc0d43f7 Merge branch 'MDL-69451-shared-temptables-3.10' of https://github.com/srdjan-catalyst/moodle into MOODLE_310_STABLE 2021-08-18 21:41:09 +08:00
Víctor Déniz cbe888148d Merge branch 'MOODLE_310_MDL-72239-v2' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-08-18 13:57:54 +01:00
Mikhail Golenkov a4f657d846 MDL-72239 phpunit: Assert the number of db queries to be less or equal
The course unit test assumes the number of db call. This assumption
is correct in vanilla moodle only. Once some plugins installed their
observers may do extra db calls. Due to caching the number of actual
db calls in the unit test may be fewer.
2021-08-18 21:35:38 +10:00
Víctor Déniz f6f0f5bb6a Merge branch 'MDL-71487-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-18 09:55:04 +01:00
AMOS bot aea79216ce Automatically generated installer lang files 2021-08-18 00:07:22 +00:00
Nhan Vo 26420f609a MDL-68639 HTML Editor (Atto): Invalid HTML for nested lists 2021-08-18 04:16:21 +07:00
Dongsheng Cai 1b35161c37 MDL-72282 accessibility: update tree attributes to pass a11y check
- Move aria-* atrributes from <p> to <li>
- Move "role" attribute from <p> to <li>
- Update behat tests

Based on reference implementation from:
- https://www.w3.org/TR/wai-aria-practices-1.1/examples/treeview/treeview-2/treeview-2a.html
- https://www.w3.org/WAI/GL/wiki/Using_ARIA_trees
2021-08-17 16:28:00 +10:00
Dongsheng Cai 55eddd9989 MDL-72282 accessibility: update color to increase contrast 2021-08-17 16:27:06 +10:00
Frédéric Massart 78a5927d4d MDL-72286 editor_atto: Declare type on plugins button groups 2021-08-17 12:00:33 +10:00
Ilya Tregubov 350b022f8d Merge branch 'MDL-71814-310' of git://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-08-16 13:57:34 +02:00
Jun Pataleta 0548156a3f MDL-69855 mod_forum: Don't show reply link in email for private replies 2021-08-16 17:46:25 +08:00
Thach Le Huy 16d8b84472 MDL-71814 Atto: File picker – file info panel focus issue 2021-08-16 16:37:01 +07:00
AMOS bot 45429deb00 Automatically generated installer lang files 2021-08-14 00:07:22 +00:00
Paul Holden 1d3aa1b798 MDL-72153 privacy: correctly export user description/files. 2021-08-13 12:40:52 +01:00
Ilya Tregubov f88c85056c Merge branch 'MDL-72035-excel_csv_bom-310' of git://github.com/leonstr/moodle into MOODLE_310_STABLE 2021-08-13 11:25:58 +02:00
Jun Pataleta a393c543e1 Merge branch 'MDL-72330-310' of git://github.com/vmdef/moodle into MOODLE_310_STABLE 2021-08-13 11:00:55 +08:00
Andrew Nicols 90638ef08f Merge branch 'MDL-72325-310-tourspolicy' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-08-13 10:01:42 +08:00
Víctor Déniz a7dba247cf MDL-72330 behat: revert previous incorrect change 2021-08-13 00:02:50 +01:00
Ilya Tregubov fa2e1ed7ec weekly release 3.10.6+ 2021-08-12 16:50:19 +02:00
Ilya Tregubov f98d542d0d Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-08-12 16:50:19 +02:00
David Mudrák 41d2fb93c8 MDL-72325 user: Do not show user tours without site policy agreed
Fetching user tours used to fail on external_api::validate_context() and
require_login() calls if the user did not have the site policy agreed.

The patch introduces a check to see if the user is fully set up and
ready to use the site before attempting to load the tours.
2021-08-12 13:26:47 +02:00
Víctor Déniz cdcf1e7ee3 MDL-71500 calendar_threemonth: fix wrong behat step 2021-08-12 11:43:06 +01:00
Andrew Nicols d7da1d28a7 Merge branch 'MDL-72252-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-12 10:27:16 +08:00
Andrew Nicols 824cb06df8 Merge branch 'MDL-71844-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-12 10:25:47 +08:00
Eloy Lafuente (stronk7) e246c8b7da Merge branch 'MDL-72265_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-08-12 00:05:53 +02:00
Eloy Lafuente (stronk7) ede634df91 Merge branch 'MDL-71500-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-08-11 20:17:43 +02:00
Eloy Lafuente (stronk7) 4c690bb1cf Merge branch 'MDL-71945-M310S' of https://github.com/lucisgit/moodle into MOODLE_310_STABLE 2021-08-11 11:47:18 +02:00
Eloy Lafuente (stronk7) de211d92c7 Merge branch 'MDL-72242-310-svgforcedfilter' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-08-11 11:40:18 +02:00
Eloy Lafuente (stronk7) 8389fcb9fc Merge branch 'MDL-71656-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-08-10 19:09:50 +02:00
Eloy Lafuente (stronk7) fb03c9640d Merge branch 'MDL-70165-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-10 18:53:24 +02:00
Ilya Tregubov 6ee1ffa200 Merge branch 'MDL-72033-310' of git://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-08-10 16:09:35 +02:00
Tony Butler 025e5e9970 MDL-71945 mod_assign: Remove unneccesary call to assign_update_grades()
The update_grade() call achieves the same thing with additional checks.
2021-08-10 11:08:38 +01:00
Lars Bonczek 1148377a5c MDL-72271 mod_quiz: fix secure_window close function 2021-08-10 11:54:11 +02:00
Paul Holden 5b30467894 MDL-72106 calendar: redirect to same page post-subscription process.
Avoid issues when reloading page/re-sending POST data.
2021-08-10 09:41:01 +01:00
Paul Holden 21df5bc50e MDL-71844 tool_task: preserve navigation when executing task. 2021-08-09 10:45:00 +01:00
Paul Holden a23c3e4507 MDL-71487 admin: ensure filesize settings don't overflow integer. 2021-08-09 10:35:57 +01:00
Paul Holden 2833bafefb MDL-70165 course: always import inplace editable module.
It's required on the course participants table for the roles/groups
columns, but isn't always loaded after adding the first participant.
2021-08-09 10:30:06 +01:00
AMOS bot 98c3a5912f Automatically generated installer lang files 2021-08-06 00:07:24 +00:00
Srdjan 93f70c9d9d MDL-69451 dml: use same temptables for both rw and ro database handle
moodle_read_slave_trait: when creating another handle, restore temptables
property that is clobbered by raw_connect().

Also a better condition for temptable related queries detection in
pgsql_native_moodle_database.

dml_pgsql_read_slave_test::test_temp_table(): use real db connection
if possible, otherwise skip the test.
2021-08-06 10:02:08 +10:00
Tim Hunt 94026281ed MDL-72265 backup: fix checking of override capabilites on restore
Thanks to Peter Dias <peter@moodle.com> for his help with the unit test.
2021-08-05 17:01:02 +01:00
Víctor Déniz 3a3060a08e weekly release 3.10.6+ 2021-08-05 16:27:30 +01:00
Víctor Déniz 7ee56a2016 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-08-05 16:27:29 +01:00
Víctor Déniz e4640f986d Merge branch 'MDL-71835-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-04 23:32:25 +01:00
Víctor Déniz 27603ce747 Merge branch 'MDL-71152-310' of git://github.com/roland04/moodle into MOODLE_310_STABLE 2021-08-04 20:38:10 +01:00
Víctor Déniz 5443767af6 Merge branch 'MDL-72262-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-08-04 12:44:35 +01:00
abgreeve b597ecfbcd Merge branch 'MDL-71050-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-04 15:51:28 +08:00
abgreeve 811e47e0b4 Merge branch 'MDL-67833-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-03 10:24:39 +08:00
Dan Marsden c231cb5e64 MDL-70006 analytics: Don't send notifications to suspended enrolments. 2021-08-03 10:55:48 +12:00
Paul Holden bfe5e85895 MDL-71121 backup: apply config defaults for async backups. 2021-08-02 23:35:10 +01:00
David Mudrák 7b81244786 MDL-72242 files: Do not force text filtering of SVG files
It was a mistake to force filtering of SVG files in MDL-55243. It can
easily lead to corrupted SVG files.

The patch removes that forced filtering and clarifies the inline comment
of what and why we need to do.
2021-08-02 15:19:35 +02:00
Paul Holden 6ab27a723f MDL-72257 gradeexport_xml: detect absense of grade items to export.
Where there are no grade items with idnumbers for selection, then
nothing should be exported. Currently, this is being interpreted as
the user exporting all grade items.
2021-08-02 10:24:12 +01:00
Ilya Tregubov c23589a218 MDL-72262 behat: Make alias shorter to fix Oracle failures. 2021-08-02 08:26:44 +02:00
AMOS bot d652bad225 Automatically generated installer lang files 2021-07-31 00:07:26 +00:00
Víctor Déniz a5285d5c88 Merge branch 'MDL-72085-MOODLE_310_STABLE' of https://github.com/dmitriim/moodle into MOODLE_310_STABLE 2021-07-30 08:56:22 +01:00
Dmitrii Metelkin 07e6488a88 MDL-72085 core_phpunit: reset session notifications 2021-07-30 10:03:57 +10:00
Paul Holden f076f88211 MDL-72252 core: remove TODO file from 82e63108. 2021-07-29 08:58:05 +01:00
Jun Pataleta a0942c97ea Moodle release 3.10.6 2021-07-29 10:01:58 +08:00
Ilya Tregubov e8b0373b93 weekly release 3.10.5+ 2021-07-28 16:48:24 +02:00
Ilya Tregubov d888097b07 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-07-28 16:48:23 +02:00
Ilya Tregubov cdc89ce2f9 Merge branch 'MDL-71672-310-2' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-07-28 11:17:30 +02:00
Jun Pataleta 785e26ff0d Merge branch 'MDL-72203-310' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2021-07-28 11:27:31 +08:00
AMOS bot b21898443a Automatically generated installer lang files 2021-07-28 00:07:25 +00:00
Michael Hawkins 4425f819ae MDL-72203 curl: Improve redirect unit testing and update upgrade.txt
lib/upgrade.txt was updated to reflect the fact that all cURL redirects
will be emulated.
2021-07-27 23:20:34 +08:00
David Mudrák 3c1788abc8 MDL-72203 curl: Remove duplicate unit tests for emulated redirects
Before, we had each redirect test duplicated: one for the native
redirects via native cURL, second for our emulated implementation. Now
all redirects are always emulated so there is no need to have them
tested twice.
2021-07-27 23:15:59 +08:00
David Mudrák 150c5eabe6 MDL-72203 curl: Check each URL in redirect chain to see if it is blocked
The security problem here was that only the first and the last URL in
the redirect chain was checked by the security helper. This patch forces
the curl wrapper to always emulate cURL redirects and check every
redirect URL in the chain before actually visiting it.
2021-07-27 23:15:59 +08:00
David Mudrák 4598f2265c MDL-72203 curl: Warn if someone actually started to use $maxredirects
The new parameter of curl_security_helper::url_is_blocked() introduced
in MDL-71916 became part of the API. Even if we reverted it quickly,
someone can use a released Moodle version that has that parameter in
place. For that reason and also to avoid potential troubles in the
future (e.g. when yet another argument would be added to this method),
we need to make it clear that the second parameter of this method should
never be used again.

Poor $maxredirects, you did not live long with us. Oh well.
2021-07-27 23:15:59 +08:00
David Mudrák 775c03ad2e MDL-72203 curl: Revert original fix of redirects to blocked URLs
This reverts the original fix introduced in MDL-71916. It introduced an
extra native cURL call inside curl_security_helper to check if the given
URL triggers a redirect to a blocked URL or not.

Shortly after the release, a couple of regressions were reported as a
result of the integrated solution. It was agreed to revert the fix and
progress with implementing an alternative approach.
2021-07-27 23:15:59 +08:00
Ilya Tregubov 19c6d9a089 Merge branch 'MDL-72179-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-07-27 12:38:27 +02:00
Andrew Nicols 82e63108fa MDL-72179 behat: Make use of page resolvers 2021-07-24 18:56:38 +08:00
Andrew Nicols 9f99c226dd MDL-72179 behat: Add page resolvers for activity roles/perms 2021-07-23 20:44:26 +08:00
Andrew Nicols 6f6b16f5b2 MDL-72179 behat: Add page resolver for activity names 2021-07-23 20:32:44 +08:00
Andrew Nicols 15c819ad90 MDL-72179 behat: Add activity editing page resolution 2021-07-23 20:32:15 +08:00
Andrew Nicols bfdf25df86 MDL-72179 behat: Fix page resolvers to remove ambiguity
The simple pattern matches were conflicting in some situations. To make
this backwards compatable we need to convert it to a Regex pattern match
instead, and provide the quoted and unquoted variants.
2021-07-23 20:31:45 +08:00
Andrew Nicols 18f9fd70a0 MDL-72179 behat: Correct course category page resolving
There were two issues here:
* I am on the [categoryname] category page page (duplicated page)
* the wrong URL was being used

Since an incorrect URL was used I felt it safe to rename the step from
'category page page' to 'category page'.
2021-07-23 20:28:15 +08:00
Andrew Nicols 79b1f0e924 MDL-72179 behat: Lowercase all page instance resolvers 2021-07-23 20:28:14 +08:00
Andrew Nicols 6eac0da6ad MDL-72179 behat: Improve core page resolvers
This commit makes the following improvements to core page resolverss:
* allows for mixed case naming (course, Course, etc.)
* allows fields other than the idnumber to be specified:
** course: idnumber, shortname, fullname
** course category: idnumber, name

Whilst some of these fields are not unique, they will typically be
unique in most test scenarios. Where they are not then the idnumber
should be used in preference.
2021-07-23 20:28:10 +08:00
Ilya Tregubov 887bb33d11 weekly release 3.10.5+ 2021-07-23 11:31:03 +02:00
Ilya Tregubov 13173cc241 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-07-23 11:31:02 +02:00
Jun Pataleta 44d24acd6d MDL-72206 theme_boost: Have env check classes extend alert classes
To achieve good colour contrast and consistency with other parts of
Moodle, the environment check classes need to extend the alert-*
classes.
2021-07-23 15:08:11 +08:00
Jun Pataleta 66b23fbbe5 Merge branch 'MDL-72125-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-07-23 09:50:23 +08:00
Andrew Nicols b8fd3da2a8 MDL-72125 mod_assign: Correct step usage of undef step
This was due to an incorrectly resolved conflict when backporting from
3.11.
2021-07-23 08:36:43 +08:00
Andrew Nicols 7e2b291e34 Merge branch 'MDL-70427-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-07-22 11:23:11 +08:00
AMOS bot 7fba84f746 Automatically generated installer lang files 2021-07-22 00:07:30 +00:00
Víctor Déniz f1b64fb742 Merge branch 'MDL-72108-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-07-21 19:29:59 +01:00
Ilya Tregubov 3440e4155d Merge branch 'MDL-72125-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-07-19 14:02:35 +02:00
Andrew Nicols 729ee696fc MDL-72125 mod_assign: Use assign submission data generators 2021-07-19 18:41:31 +08:00
Andrew Nicols 0397710c44 MDL-72125 mod_assign: Add data generator for assign submissions 2021-07-19 18:41:31 +08:00
Andrew Nicols fc457581a4 MDL-72125 testing: Make global $CFG available when including generators
This will remove the requirement to add the global $CFG call to the top
of generator scripts.
2021-07-19 18:41:31 +08:00
Shamim Rezaie faa1b7e640 MDL-71672 javascript: Fix the markup in the header of YUI dialogs
Move the close button out of the element that is set as the
aria-labelledby for the dialog.
Also used h5 for the dialog titles so they are consistent with
AMD modals.
2021-07-19 16:42:05 +10:00
Shamim Rezaie 987166f5e0 MDL-71672 atto_equation: Fix the markup and the initial focused element
The initial focused element should be the first operator button.
This commit also fixes the accessibility issues that previously were
wrongly fixed by a redundant click on the first tab using javascript.
2021-07-19 16:42:05 +10:00
Shamim Rezaie 0fdf326b17 MDL-71672 atto_managefiles: Focus the first file manager button 2021-07-19 16:42:05 +10:00
Shamim Rezaie c47395c1ea MDL-71672 atto_emojipicker: Focus the search bar initially 2021-07-19 16:42:05 +10:00
Shamim Rezaie 136312c3ce MDL-71672 atto_recordrtc: focus Atto button after hide 2021-07-19 16:42:04 +10:00
Shamim Rezaie d227e72aa4 MDL-71672 javascript: Fix the issue of focusOnShowSelector being ignored
When focusOnShowSelector is not present, as a fallback, focus the first
focusable element in YUI dialogues
Ref:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/dialog_role
2021-07-19 16:42:04 +10:00
Mikel Martín b4c09b497c MDL-71152 theme_boost: Use 'scroll-margin-top' for anchor links
Current anchor link offset fix is not working with 'display:flex' elements
2021-07-16 11:56:17 +02:00
boygr49p ec8fa5fc20 MDL-71500 calendar_threemonth: add behat step and coverage 2021-07-16 15:08:42 +08:00
boygr49p f3600e52cf MDL-71500 calendar_threemonth: clicking in a diff day should refresh day view
Clicking in a day in the three month block replaces the div with id starting
with calendar- so we can do so repeatedly and successfully and test that it does (with behat).
2021-07-16 15:08:41 +08:00
Andrew Nicols 6d0a3915c1 MDL-72163 admin: Plugins overview page should link to categories 2021-07-16 13:49:55 +08:00
Andrew Nicols 1858a98a22 MDL-72125 behat: Add get_activity_id() behat generators helper 2021-07-16 12:33:56 +08:00
Andrew Nicols be00aebefe MDL-72125 testing: Set a default idnumber when creating activities
The activity generator currently requires an idnumber when creating
activities, but this is not a requirement when creating the same
activity through the UI. The requirement comes because we want to
provide a way to refer to activities in subsequent steps.

This commit modifies the behaviour such that the generator uses the name
of the activity as the default idnumber.

This has two  main benefits:
1. it simplfies generation of activities; and
2. it makes the language used when writing behat tests much more natural.

With this change, steps will refer to the activity by its idnumber/title
in all cases, rather than sometimes by an idnumber which bears no
relevance to the title.
2021-07-16 12:33:56 +08:00
Andrew Nicols 1ab6cd84c2 MDL-72125 testing: Add helper to run generators as a user 2021-07-16 12:33:56 +08:00
Thach Le Huy 5c8bd91162 MDL-72033 User tours: step placement issues if screen too narrow 2021-07-16 11:24:48 +07:00
abgreeve 2e1212eeae weekly release 3.10.5+ 2021-07-16 10:16:41 +08:00
abgreeve e660067a9f Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-07-16 10:16:40 +08:00
AMOS bot 32648ae6a5 Automatically generated installer lang files 2021-07-16 00:07:26 +00:00
sam marshall c5d0f7605a MDL-72152 Behat: No way to test key shortcuts with letter keys
Extends the existing step 'And I press the Shift Left key' so that
it supports letter/other keys: 'And I press the Ctrl C key'.
2021-07-15 10:48:49 +01:00
Jun Pataleta 4560e11858 Merge branch 'MDL-63770-310' of /home/jun/moodles/stable_310/moodle into MOODLE_310_STABLE 2021-07-15 16:16:38 +08:00
Matteo Scaramuccia abc35abf38 MDL-63770 core: 'port' should be an integer like in parse_url()
Plus trivial comment cleanup.
2021-07-15 11:39:38 +08:00
Dmitri Pisarev 19e7915818 MDL-63770 core: Fix a false-positive in reverseproxyabused check
A `reverseproxyabused` error is wrongly triggered when external port number doesn't equal internal.
2021-07-15 11:39:38 +08:00
Eloy Lafuente (stronk7) 2ae51fd4de Merge branch 'MDL-67338-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-07-15 00:35:18 +02:00
Paul Holden ae097fe1f5 MDL-67338 message: re-implement block page type patterns.
The `page_type_list` method for the message component was deprecated
in 5b0769db as part of MDL-54744. However it is still required when
trying to configure blocks on any messaging pages.
2021-07-14 19:31:33 +01:00
Eloy Lafuente (stronk7) 99d77f27c5 Merge branch 'MDL-72139-310' of git://github.com/cescobedo/moodle into MOODLE_310_STABLE 2021-07-14 14:00:08 +02:00
cescobedo dc8a28e4f0 MDL-72139 core_message: Fix encoding UTF-8 in prevent unclosed tags 2021-07-14 07:41:28 +02:00
Sara Arjona 426dbce03c Merge branch 'MDL-71782_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-07-13 16:44:46 +02:00
Jun Pataleta b8592dc8ee Merge branch 'MDL-72036-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-07-13 16:05:27 +08:00
Sara Arjona 62bc9cda28 MDL-72036 atto_h5p: Random error with external URL
After a major upgrade was done in h5p.com, some random errors appeared
in the "H5P options are ignored for H5P URLs" scenario.
They have been fixed replacing the URL for different (which should
load quicker). As we're checking external content, no other improvement
can be done on the Moodle site.
2021-07-13 08:37:50 +02:00
Huong Nguyen 38ea26fe41 MDL-71656 atto: Add meaningful labels to colour items
Colour chooser supported:
 - atto_fontcolor
 - atto_backcolor
2021-07-13 13:07:17 +07:00
Paul Holden aa6e48c6be MDL-70427 task: correct missing component when queuing adhoc task.
If the task belongs to a component, and doesn't have it's own
component property set then we can lazy-load it based on class
namespace.
2021-07-12 20:46:56 +01:00
Paul Holden cc341d85fd MDL-70427 admin: remove plugin adhoc tasks during uninstall. 2021-07-12 20:46:47 +01:00
Paul Holden d93f29fa56 MDL-71050 h5p: account for parent languages retrieving translations.
Take account of parent languages when requesting given library
translation. For example if we are currently using "de_kids" as the
current language, we need to recurse each language pack looking for
a matching H5P translation ("de_kids" -> "de_du" -> "de").
2021-07-12 13:17:12 +01:00
AMOS bot c00e4a02e2 Automatically generated installer lang files 2021-07-11 00:07:21 +00:00
Eloy Lafuente (stronk7) acd4236df9 Moodle release 3.10.5 2021-07-10 18:56:08 +02:00
Eloy Lafuente (stronk7) 4f8f170f54 MDL-71782 behat: Ensure page after saving changes is there
A similar approach was followed @ MDL-67935, although the
case doesn't seem to be the same.

In any case, it's curious that all local execution are
100% passing and only CIs fail so often. Just guessing if,
maybe, there is some Chrome version factor around (we
are running older, sticky, versions @ CIs.
2021-07-10 15:50:48 +02:00
Paul Holden e203e89891 MDL-71835 report_log: correct query returning user fullname from DB. 2021-07-09 13:54:27 +01:00
Paul Holden 74f366c50a MDL-67833 tool_customlang: break long text in component column. 2021-07-09 11:37:11 +01:00
AMOS bot e47bf9a095 Automatically generated installer lang files 2021-07-09 00:07:29 +00:00
Eloy Lafuente (stronk7) f577c9f128 weekly release 3.10.4+ 2021-07-08 23:44:10 +02:00
Jun Pataleta 39a8d3ada6 Merge branch 'MDL-71919-310-fix' of https://github.com/cescobedo/moodle into MOODLE_310_STABLE 2021-07-08 23:33:31 +02:00
Jun Pataleta 7bcaff1f45 Merge branch 'MDL-70594_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-07-08 23:33:31 +02:00
cescobedo 2ad0a4d863 MDL-71919 core_message: Fix tests in message_send 2021-07-08 23:33:31 +02:00
Huong Nguyen 625703c176 MDL-71922 file: Enhance endless recursion requests protection 2021-07-08 23:33:31 +02:00
cescobedo 045fe3f45f MDL-71919 core_message: Fix unclosed html tags in email notification 2021-07-08 23:33:31 +02:00
Paul Holden a2bd7e21df MDL-71957 auth_shibboleth: safer session retrieval during logout. 2021-07-08 23:33:31 +02:00
Eloy Lafuente (stronk7) f83598d827 MDL-70335 behat: Ensure the scenario passes under all themes
Also, get rid of not needed @javascript tag
2021-07-08 23:33:31 +02:00
Dongsheng Cai 1e199ea63d MDL-71978 core_calendar: only allow owner to edit user subscriptions 2021-07-08 23:33:31 +02:00
Adrian Greeve 2a26fa5c33 Merge branch 'MDL-71887-310' of https://github.com/snake/moodle into MOODLE_310_STABLE 2021-07-08 23:33:31 +02:00
Mihail Geshoski 0d340b657d MDL-58393 core: Remove firstname argument from emailconfirmation string 2021-07-08 23:33:31 +02:00
Sujith Haridasan 9c621d53e9 MDL-71241 course: Validate and sanitize sort arguments
Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-07-08 23:33:25 +02:00
Mihail Geshoski 50c9a3f3ee MDL-71242 core_course: Fix failing unit test 2021-07-08 23:33:25 +02:00
Mihail Geshoski 717f81810e MDL-71242 core_course: Test the validation of the sort value
Adds new unit test, test_course_get_recent_courses_sort_validation(),
which is reponsible for testing the validation of the sort value in
course_get_recent_courses().
2021-07-08 23:33:24 +02:00
Mihail Geshoski 4bad6006b4 MDL-71242 core_course: Update test_course_get_recent_courses() unit test
Adds additional assertions in test_course_get_recent_courses() test to
ensure that the sort funcionality works as expected.
2021-07-08 23:33:24 +02:00
Mihail Geshoski 97a56d77a9 MDL-71242 core_course: Validate the value of the sort argument
This change validates the value of the sort argument in
course_get_recent_courses().
2021-07-08 23:33:07 +02:00
Andrew Nicols 3359f00688 MDL-72108 js: Fix incorrect jsdoc examples for core/ajax 2021-07-08 10:39:53 +08:00
Claude Vervoort 89feb325b7 MDL-71887 mod_lti: repost when no cookie due to crosssite request 2021-07-07 14:18:23 +08:00
Michael Hawkins 582b013046 MDL-71916 lib: Check cURL redirects for blocked URLs before following 2021-07-06 23:43:06 +02:00
Eloy Lafuente (stronk7) 09c13ae3b7 Merge branch 'MDL-70638-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-07-06 20:21:34 +02:00
Eloy Lafuente (stronk7) a7f7dfa156 Merge branch 'MDL-70335-310' of https://github.com/juancs/moodle into MOODLE_310_STABLE 2021-07-06 20:18:40 +02:00
Eloy Lafuente (stronk7) 98b86f78f6 Merge branch 'MDL-71537-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-07-06 20:16:37 +02:00
Paul Holden 175389ba3f MDL-70638 user: correct access checks when serving profile files.
Requests for files from a users profile file area should follow
the same access checks as for the profile itself.
2021-07-06 10:28:19 +01:00
cescobedo 5cf7b4bd09 MDL-71917 core_message: Use $USER in WS delete_message_for_all_users 2021-07-06 13:33:02 +08:00
Thach Le Huy adedf35e4c MDL-71537 User tours: Minor display errors on mobile 2021-07-06 09:36:28 +07:00
Paul Holden 2725f7a7fe MDL-71981 user: escape identity fields if writer supports HTML. 2021-07-06 09:28:46 +08:00
Paul Holden 61b4283c22 MDL-71981 dataformat: indicate HTML support in writer callback. 2021-07-06 09:28:46 +08:00
Eloy Lafuente (stronk7) 2feb383659 Merge branch 'MDL-72063-310-en_fix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-07-04 11:02:46 +02:00
Juan Segarra Montesinos 3de775ae41 MDL-70335 mod_forum: Subscribe users from Forced to Auto mode
When a teacher changes the subscription mode from forced
subscription to auto subscription using the "cog" icon in the
forum page, users are not seen in the Show/edit current
subscribers" page.

This does not happens when done from the Edit settings page.
2021-07-03 09:54:19 +02:00
Eloy Lafuente (stronk7) 6ff56f63f1 MDL-70594 environment: Apply agreed changes
- PostgreSQL 10 required.
- Exif PHP extension recommended.
2021-07-01 22:41:57 +02:00
Eloy Lafuente (stronk7) a0beffc03f MDL-70594 environment: 4.0 base information
This is a direct copy of the 3.11 branch to have
the changes under control in next commits.
2021-07-01 22:41:56 +02:00
David Mudrák 242bda330f MDL-72063 lang: Use fixed strings in tests, too 2021-07-01 19:32:13 +02:00
Helen Foster da5fce12a1 MDL-72063 lang: Import fixed English strings (en_fix) 2021-07-01 19:31:33 +02:00
Ilya Tregubov 773984295b weekly release 3.10.4+ 2021-07-01 16:42:05 +02:00
Bas Brands b2e353c169 MDL-71366 core_question: prevent question options overflow 2021-07-01 11:56:59 +08:00
Bas Brands 2e7109d7ae MDL-71366 core_question: prevent shrinking of input radio 2021-07-01 11:56:49 +08:00
Andrew Nicols 11831dd9f3 Merge branch 'MDL-72010_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-07-01 11:11:21 +08:00
Paul Holden 5e12c0a717 MDL-71314 course: add category record snapshot to deletion event. 2021-07-01 10:32:23 +08:00
Andrew Nicols 55877ad94e Merge branch 'MDL-68003_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-07-01 09:54:11 +08:00
Sara Arjona 83046e5063 Merge branch 'MDL-67208-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-06-30 16:55:45 +02:00
Simey Lameze bb5253b923 MDL-71789 calendar: fix subscription url validation 2021-06-30 16:30:15 +02:00
Sara Arjona c645a1b933 Merge branch 'MDL-71971-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-06-30 16:16:20 +02:00
Sara Arjona 4dfbcd7954 Merge branch 'MDL-71991_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-06-30 16:09:44 +02:00
Leon Stringer 0eb14ac1d4 MDL-72035 csvlib: Write BOM for Excel
Add option to class csv_export_writer to prefix CSV file with UTF-8 byte
order mark (BOM).  This helps Microsoft Excel detect the file's character
encoding.
2021-06-30 14:59:15 +01:00
Eloy Lafuente (stronk7) 1eee862487 Merge branch 'MDL-71947-310' of https://github.com/bmbrands/moodle into MOODLE_310_STABLE 2021-06-29 18:30:44 +02:00
Tim Hunt ce80aa2a90 MDL-68003 session timeout warning: don't show in iframes 2021-06-29 17:00:12 +01:00
Sara Arjona b304fa4a85 Merge branch 'MDL-71777-310' of https://github.com/appalachianstate/moodle into MOODLE_310_STABLE 2021-06-28 11:33:32 +02:00
Fred Woolard 99eae85be4 MDL-71777 antivirus: Use hash_from_path (sha1_file) 2021-06-25 09:52:14 -04:00
Luca Bösch bd041244f4 MDL-71971 mod_quiz: separate "Repaginate" and "Select multiple items" 2021-06-25 00:03:27 +02:00
Eloy Lafuente (stronk7) 017dce9cc3 weekly release 3.10.4+ 2021-06-24 23:03:17 +02:00
Eloy Lafuente (stronk7) 40b13110aa NOBUG: Fixed SVG browser compatibility 2021-06-24 23:03:17 +02:00
Eloy Lafuente (stronk7) 81e044debf Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-06-24 23:03:16 +02:00
Tim Hunt dedfc451f3 MDL-72010 quiz: prevent session timeouts during attempts 2021-06-24 12:25:36 +01:00
Bas Brands 4ef81f5510 MDL-71947 core_quiz: vertical forms for access rule popups 2021-06-24 12:32:12 +02:00
Bas Brands c5381e8756 MDL-71947 theme_boost: fix styles for vertical forms 2021-06-24 12:32:12 +02:00
Simey Lameze 09902461b6 MDL-67208 calendar: fix manage subscription redirection
This patch fix the subcription page only adding the course parameter
only when viewing the calendar on course context. It also passes the
url to the form instance, so we have the course parameter on the
form action attribute.
2021-06-24 17:00:20 +08:00
Tony Butler 8cbd95be5b MDL-71694 assignfeedback_comments: Behat test for feedback preservation
Including efficiency improvements from https://github.com/davosmith
2021-06-24 12:03:02 +08:00
Tony Butler 0474ebc970 MDL-71694 assignfeedback_comments: Fill latest submitted comment data
Otherwise if grading validation fails, any new/updated comments are
lost and replaced with previously saved data (or an empty editor).
2021-06-24 12:03:02 +08:00
Andrew Nicols 3cb27b509e Merge branch 'MDL-71837-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-06-24 11:00:45 +08:00
Andrew Nicols b9080a4a47 Merge branch 'MDL-55243-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-06-24 10:56:49 +08:00
Huong Nguyen a9ad30810f MDL-55243 files: Make is_valid_image support SVG files 2021-06-24 09:03:37 +07:00
Daniel Neis Araujo 3e62c6c272 MDL-71999 enrol: enrol_imsenterprise_allow_group_member_remove global 2021-06-23 13:19:46 -03:00
Andrew Nicols e978c39359 MDL-71669 editor_atto: Rebuild editor_atto/events 2021-06-23 14:48:16 +08:00
Andrew Nicols ed3413ec91 Merge branch 'MDL-71669-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-06-23 14:08:12 +08:00
Jun Pataleta a26f14d314 MDL-71669 atto_table: Set appropriate ARIA roles for table button
The table button can become a menu button when the cursor's position
in the editor is within a table. So we'd need to update the button with
ARIA attributes appropriate for a menu button.
This is best done when the button's highlight gets toggled, so we're
adding an event listener for when this happens and add/remove the ARIA
attributes accordingly.
2021-06-23 13:13:08 +08:00
Jun Pataleta 17d75afab7 MDL-71669 editor_atto: Fire custom event when toggling button highlight 2021-06-23 13:13:07 +08:00
Jun Pataleta d402b62a06 MDL-71669 editor_atto: Create an events module for the atto editor 2021-06-23 13:13:07 +08:00
Jun Pataleta a42008f2ae MDL-71669 editor_atto: Set proper roles to toolbar menus
* Menu button fix
  - Added aria-haspopup, aria-controls, and aria-expanded attributes.
* Menu fixes
  - Added aria-labelledby that points to the menu button label.
  - Removed the dialog role in the menu's container.
  - The ul tag needs the "menu" role.
  - The li tag needs the role "none" instead of the "presentation" role

Reference:
https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton
2021-06-23 13:13:07 +08:00
AMOS bot 85f55e8931 Automatically generated installer lang files 2021-06-23 00:07:28 +00:00
Dongsheng Cai baa2eb2619 MDL-71029 forum: fix post count for users have more than 1 enrolment 2021-06-23 09:43:56 +10:00
Tim Hunt 898e36baf6 MDL-71991 files: check return value of rename when writing files 2021-06-22 19:37:08 +01:00
Sara Arjona c356cbfc23 Merge branch 'MDL-70750-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-06-22 10:21:13 +02:00
Andrew Nicols 5343c8a720 Merge branch 'MDL-70233-alternative-disabled-cache-310' of https://github.com/Peterburnett/moodle into MOODLE_310_STABLE 2021-06-22 15:47:54 +08:00
mohalisad fd7ce03fd2 MDL-71973 analytics cli: fix enabling model bug
Fix the exception at line 143 caused by wrong argument for constructor in line 140
2021-06-21 18:51:51 +04:30
Ilya Tregubov d4ba29cac0 MDL-70750 mod_survey: Fix warning for undefined offset. 2021-06-21 08:42:38 +02:00
Eloy Lafuente (stronk7) 84733bcf4f Merge branch 'MDL-71113-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-06-19 18:05:41 +02:00
AMOS bot 52898c2980 Automatically generated installer lang files 2021-06-19 00:07:30 +00:00
Andrew Nicols 9df1e30267 MDL-71113 javascript: Improve basic JS Documentation 2021-06-18 09:38:05 +08:00
Andrew Nicols e5454f31ab MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
Andrew Nicols 4c826a2d4c MDL-71113 js: Bare minimum fixes to build jsdoc 2021-06-18 09:38:04 +08:00
Andrew Nicols c57cf0d660 MDL-71113 js: Add jsdoc configuration and Grunt 2021-06-18 09:38:04 +08:00
AMOS bot ac94b4d787 Automatically generated installer lang files 2021-06-18 00:07:27 +00:00
Víctor Déniz 10daae7ab7 weekly release 3.10.4+ 2021-06-17 14:55:00 +01:00
Andrew Nicols 98b1fd1dfc Merge branch 'MDL-71813-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-06-17 11:28:54 +08:00
Eloy Lafuente (stronk7) 7c5cde9a01 Merge branch 'MDL-71896-310' of git://github.com/merrill-oakland/moodle into MOODLE_310_STABLE 2021-06-17 00:11:49 +02:00
Eloy Lafuente (stronk7) e62b152f53 Merge branch 'MDL-71888-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-06-17 00:08:20 +02:00
Eloy Lafuente (stronk7) 1cc8179bba Merge branch 'MDL-71736-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-06-17 00:01:59 +02:00
Andrew Nicols 042963a6d9 Merge branch 'MDL-71804_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-06-15 11:27:48 +08:00
Eloy Lafuente (stronk7) 02aa7d8974 MDL-71804 travis: Bump to bionic 2021-06-13 22:53:41 +02:00
abgreeve dbf0d0bfae weekly release 3.10.4+ 2021-06-11 13:52:15 +08:00
abgreeve b5908813d3 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-06-11 13:52:15 +08:00
Eric Merrill 9cc18365e0 MDL-71896 dml: Add auroramysql to config-dist 2021-06-10 15:30:37 -04:00
Sujith Haridasan 593b55fa7d MDL-68915 core_form: Fix the behat test failure
Fix the behat test failure for the forum when
grades exist.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-06-10 15:01:46 +08:00
Adrian Greeve 79bd8050be Merge branch 'MDL-71369-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-06-10 11:49:27 +08:00
Andrew Nicols 4d592de0f7 Merge branch 'MDL-71838_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-06-10 11:43:06 +08:00
Adrian Greeve e3b6806a51 Merge branch 'MDL-68915-310' of https://github.com/sharidas/moodle into MOODLE_310_STABLE 2021-06-10 11:36:57 +08:00
Adrian Greeve 0aef9ee01b Merge branch 'MDL-64236-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-06-10 11:28:04 +08:00
Sujith Haridasan f3b98362da MDL-68915 lesson: Do not allow maxgrade change
Do not allow maxgrade change when some of the
users are already graded. As of now this is applicable
to the following activities:
1. Forum
2. Database
3. Lesson
4. Glossary

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-06-10 08:33:37 +05:30
Andrew Nicols bc1d555be5 Merge branch 'MDL-71876_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-06-10 08:51:19 +08:00
AMOS bot d899937724 Automatically generated installer lang files 2021-06-10 00:07:23 +00:00
Paul Holden 9d02f9212e MDL-71888 admin: define clitablesexist string used by CLI installer. 2021-06-09 22:06:17 +01:00
Andrew Nicols 9d95615ae2 MDL-71736 javascript: Run the ignorefiles command more liberally 2021-06-09 19:08:53 +08:00
abgreeve f91cedfb08 Merge branch 'MDL-67975-310' of https://github.com/sharidas/moodle into MOODLE_310_STABLE 2021-06-09 16:10:53 +08:00
Sujith Haridasan 2dbd9a9554 MDL-67975 nextcloud: Add support for Link to file
This change set would bring the following new additions
to the nextcloud repo:
1. Create a new radio button in filepicker: "Link to file"
2. When user clicks this radio button a warning message
   would be created, saying this file would become public.
   Meaning a public link is created in the nextcloud server.
3. Created a sync_reference method to sync the files downloaded
   from nextcloud server. The sync/refresh time given is 1 day/24 hours.
4. Made sure that when the file is downloaded, we use the file
   from moodledata file pool.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-06-09 13:38:38 +05:30
Andrew Nicols f8b76db001 Merge branch 'MDL-65637-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-06-09 13:35:33 +08:00
Jun Pataleta 3688154f92 MDL-71876 mod_h5pactivity: Increase window size during test
The addition of the activity information moves the h5p content down
out of the window view on Firefox which causes the Check button to be
unclickable. This patch increases the window size to ensure that the
check button is visible and clickable.

Credits to Eloy <stronk7@moodle.org> for the thorough investigation
of the root cause of this issue :)

This is a backport of MDL-71337
2021-06-09 00:53:03 +02:00
Eloy Lafuente (stronk7) 03dea98563 Merge branch 'MOODLE_310_MDL-71471_v2' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-06-07 20:15:15 +02:00
Mikhail Golenkov db6764cf87 MDL-71471 assign: Remove submission from queue when converted in web 2021-06-04 15:28:30 +10:00
Eloy Lafuente (stronk7) 2d7386420c weekly release 3.10.4+ 2021-06-03 23:56:14 +02:00
Eloy Lafuente (stronk7) f7b500148d Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-06-03 23:56:13 +02:00
hiendinh 8b70552460 MDL-71813 filepicker: view file not available using keyboard (Enter) 2021-06-03 14:16:58 +07:00
Andrew Nicols 4b279c7ab5 Merge branch 'MDL-71741-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-06-03 11:51:57 +08:00
Huong Nguyen 8a125028fb MDL-71741 portfolio: Reset header information between requests
The reset process also removes the CURLFile option in the HTTP object,
which will avoid the serialisation issue on PHP7.4 and upward
2021-06-03 10:51:24 +07:00
Huong Nguyen db1a7003e6 MDL-71741 portfolio: Use the correct configurations 2021-06-03 10:51:24 +07:00
abgreeve 1402a4acfc Merge branch 'MDL-71284-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-06-03 11:42:05 +08:00
Andrew Nicols 4da9df136f Merge branch 'MDL-71668-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-06-03 11:34:34 +08:00
Andrew Nicols 75780c347b Merge branch 'MDL-71737-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-06-03 11:10:23 +08:00
abgreeve 266b8e2901 Merge branch 'MDL-71693-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-06-03 10:19:17 +08:00
abgreeve 8d79b80f47 Merge branch 'MDL-71644-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-06-03 09:21:39 +08:00
Eloy Lafuente (stronk7) ac452323f0 Merge branch 'MOODLE_310_MDL-71438_v2' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-06-02 23:52:51 +02:00
Paul Holden 43c60cbb8a MDL-71837 calendar: turn off export form double submit protection. 2021-06-02 19:53:08 +01:00
Tim Hunt 1e36bf1e39 MDL-71838 quiz reports: average rows calc can run out of memory
Should not use get_records when you mean record_exists.
2021-06-02 16:49:09 +01:00
Mikhail Golenkov 55fa7c84ec MDL-71438 blocks: Add index on mdl_user_preferences.name 2021-06-02 22:13:58 +10:00
Shamim Rezaie 8864520742 MDL-71668 editor_atto: Accissibility focus styling for Atto buttons
Make all Atto buttons consistent in the way they show the focus outline
2021-06-02 17:11:59 +10:00
Peter Dias e0fdddf5e9 MDL-65637 core_oauth2: Introduce a new custom linkedin oauth2 client 2021-06-02 10:24:43 +08:00
Peter Dias d1c0acdd55 MDL-65637 core_oauth2: Create new oauth2 mapping function
Separated userinfo mapping into a function and new unit test
2021-06-02 08:08:59 +08:00
Andrew Nicols d4b3f6cd30 Merge branch 'MDL-71731_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-06-01 12:48:04 +08:00
AMOS bot 6b0b076f34 Automatically generated installer lang files 2021-05-29 00:07:23 +00:00
Huong Nguyen bbe22a4f2f MDL-71737 portfolio: Make is_valid_image become internal function 2021-05-28 15:07:29 +07:00
Luca Bösch 82b3ed3939 MDL-71284 assign: prevent double escaping assignment name. 2021-05-27 20:29:48 +02:00
Eloy Lafuente (stronk7) deae0eb7e4 MDL-71731 phpunit: isolate tests requiring lots of peak mem
It's mostly addDocuments(), used by test_add_document_batch_large()
with 100 big documents what requires a lot of ram
although apparently, it's freed (partially) once ended.
Just the peak usage remains high. In any case, isolating that
test to avoid the non-freed side of it to consume too
much memory for the rest. (We allow "only" 2GB).

Still, I think that there is a good work about to detect which
tests are leaking / consuming too much, I'd bet there are
a bunch running completely out of control.
2021-05-27 19:42:31 +02:00
Sara Arjona 232d668264 weekly release 3.10.4+ 2021-05-27 17:45:12 +02:00
Sara Arjona 992cbc3c8f Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-05-27 17:45:12 +02:00
Sara Arjona 8f1eda6b69 Merge branch 'MDL-69703-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-27 12:25:07 +02:00
Paul Holden 6479736323 MDL-69703 theme_boost: ensure multi-select options take all space. 2021-05-27 10:45:55 +01:00
Sara Arjona 809a73137f Merge branch 'MDL-71145-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-05-27 11:37:16 +02:00
Huong Nguyen 897ebd28df MDL-71145 qtype_ddmarker: Fix Behat failure 2021-05-27 15:29:35 +07:00
Andrew Nicols f62ba9c05e Merge branch 'MDL-69703-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-27 12:06:36 +08:00
Andrew Nicols 950871f25a Merge branch 'MDL-71637-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-05-27 11:53:47 +08:00
Andrew Nicols 86e10b6960 Merge branch 'MDL-71047-3.10' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-05-27 11:20:14 +08:00
Andrew Nicols ada3626996 Merge branch 'MDL-71462-MOODLE_310_STABLE' of https://github.com/SysBind/moodle into MOODLE_310_STABLE 2021-05-27 09:54:22 +08:00
Andrew Nicols 20f8c8579d Merge branch 'MDL-67771-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-05-27 09:45:27 +08:00
Andrew Nicols 2679fa4597 Merge branch 'MDL-71145-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-05-27 09:40:52 +08:00
AMOS bot 1168bf97e3 Automatically generated installer lang files 2021-05-27 00:07:24 +00:00
Eloy Lafuente (stronk7) 161c0985a9 Merge branch 'MDL-71159-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-05-26 18:48:05 +02:00
Peter Dias 0685644add MDL-71637 core: Set default for mb_substitute_character 2021-05-26 14:20:09 +08:00
Mihail Geshoski ac70df2f3c MDL-64236 gradereport_grader: Add padding to content in grader report
In certain operative systems the browser's scrollbar may partly cover
the content in the student header and user cells when horizontally
scrolling through the table contents. This is most noticeable when in
RTL mode. Adding slight padding on the left (or right in RTL mode) to
the content in these cells would fix this UI issue.
2021-05-26 13:47:48 +08:00
Sara Arjona 1a6d336a33 Merge branch 'MDL-68925_310' of git://github.com/mdjnelson/moodle into MOODLE_310_STABLE 2021-05-25 15:34:40 +02:00
Paul Holden 09abf0ed7d MDL-69703 theme_boost: remove right padding for multi-selects.
This removes the whitespace obscuring longer option elements when
selected, particularly on narrow screens.
2021-05-24 15:56:40 +01:00
avi 9ead5f3307 MDL-71462 core: Add phpstorm metadata file to gitignore 2021-05-24 15:52:37 +03:00
AMOS bot 84c98d3f7f Automatically generated installer lang files 2021-05-24 00:07:22 +00:00
AMOS bot 02a705975d Automatically generated installer lang files 2021-05-23 00:07:20 +00:00
Andrew Nicols cfad9c36f7 MDL-71369 admin: Apply form change checker to admin/category view 2021-05-21 09:58:25 +08:00
Huong Nguyen 47e6948847 MDL-71145 qtype_ddmarker: Incorrect marker positions in responsive mode 2021-05-21 08:47:51 +07:00
Jun Pataleta 00738cf40f Merge branch 'MDL-60431_310' of https://github.com/jonof/moodle into MOODLE_310_STABLE 2021-05-21 08:57:33 +08:00
Jonathon Fowler 56a1e134f2 MDL-60431 qtype_calculated: handle NAN and INF calculation outcomes
With significant-digits presentation mode, NAN would be formatted as
'NAN' followed by zeroes, which looks silly, and +INF would cause an
execution timeout as Moodle tries to divide +∞ by 10 until it becomes
less than 1, which can happen in a divide-by-zero situation.

Note that the user can't answer NAN or INF to any question, but at this
at least now looks consistent and also doesn't break Moodle in the case
of +INF.
2021-05-21 09:35:24 +10:00
Paul Holden f7a4eefd9b MDL-71693 admin: set default for debugdisplay to off.
The previous default value for this config was based on the
PHP ini file `display_error` property (6349a3ba). However we
override this propertly during page setup (25338300) according
to the value of the configuration itself.

This had the effect of always setting the default value for
this config to it's current value.
2021-05-20 21:39:41 +01:00
Sara Arjona a3b8da0903 weekly release 3.10.4+ 2021-05-20 11:09:07 +02:00
Sara Arjona aa6662b806 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-05-20 11:09:06 +02:00
Peter Dias dd4d3bdb98 MDL-67771 theme: Add side-post to incourse views 2021-05-20 15:15:22 +08:00
Mark Nelson c5e6f13143 MDL-68925 assignfeedback_editpdf: avoid hiding comments with a menu open
Co-authored by: Jonathon Fowler <fowlerj@usq.edu.au>
2021-05-20 13:16:16 +08:00
Jun Pataleta f5fb4467ab Merge branch 'MDL-71157-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-05-20 12:29:44 +08:00
abgreeve 0653fc49d4 Merge branch 'MDL-65203-310' of https://github.com/dcai/moodle into MOODLE_310_STABLE 2021-05-20 11:02:04 +08:00
Thong Bui f8ce721ac4 MDL-71644 Quiz: The issues outstanding from MDL-70947.
Issue 1: While essay question's uploading progress, we need to disable submit
buttons to prevent submit form event.

Issue 2: Enable buttons after pressing cancel button on the popup
confirming overwrite file existed.
2021-05-20 08:34:01 +07:00
Andrew Nicols 1df8590b76 Merge branch 'MDL-71626-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-20 09:32:37 +08:00
Eloy Lafuente (stronk7) 450b231952 Merge branch 'MDL-71126-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-05-19 23:03:26 +02:00
Eloy Lafuente (stronk7) 987f0de317 Merge branch 'MDL-67935-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-05-19 22:50:30 +02:00
Eloy Lafuente (stronk7) 7a1f813852 Merge branch 'MDL-71373-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-05-19 19:41:06 +02:00
Sara Arjona 7efc2aeaba MDL-71157 block_myoverview: remove wait from behat
The step "And I wait until ".block_myoverview
[data-control='next']" "css_element" exists" is not correct
because this [data-control='next'] element exists before and
after the step so, in some cases, it might cause the following
step will start earlier than expected.
As pending JS has been added, this wait steps are not required
any more.
2021-05-19 12:37:09 +02:00
Andrew Nicols 63b5b5be49 MDL-71157 core: Pending JS in paged content bars 2021-05-19 12:37:09 +02:00
Luca Bösch 8d8c21f99e MDL-71373 tool_usertours: localize "previous"/"next" in user tours.
AMOS BEGIN
        CPY [previous,core],[previousstep,tool_usertours]
        CPY [next,core],[nextstep,tool_usertours]
       AMOS END
2021-05-19 09:56:01 +02:00
Luca Bösch 5abddbe868 MDL-71373 core_enrol: localize "close" in role manager. 2021-05-19 09:56:01 +02:00
Luca Bösch b773189d3b MDL-71373 tool_usertours: localize "previous"/"next" in user tours. 2021-05-19 09:56:01 +02:00
Luca Bösch 8ce33c5431 MDL-71373 core_table: localize "previous"/"next" in pagination. 2021-05-19 09:56:01 +02:00
Eloy Lafuente (stronk7) 3c4c7d39ad Merge branch 'MDL-71619-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-18 22:59:36 +02:00
Eloy Lafuente (stronk7) 6d1e2c4411 Merge branch 'MDL-71373-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-05-18 22:54:37 +02:00
Dongsheng Cai 960050454d MDL-65203 template: tab should be quoted to produce valid json 2021-05-18 20:41:57 +10:00
Nhan Vo 16fe2bdc5e MDL-71047 HTML Editor (Atto): Cursor position is not correct when paste 2021-05-18 10:05:48 +07:00
AMOS bot 6c7f328f20 Automatically generated installer lang files 2021-05-18 00:07:32 +00:00
Luca Bösch 4db2773881 MDL-71373 core_enrol: localize "close" in role manager. 2021-05-14 14:16:37 +02:00
Luca Bösch d0562bd5c5 MDL-71373 tool_usertours: localize "previous"/"next" in user tours. 2021-05-14 14:16:37 +02:00
Luca Bösch ea7c3d6b8f MDL-71373 core_table: localize "previous"/"next" in pagination. 2021-05-14 14:16:37 +02:00
Huong Nguyen 03aa22e05c MDL-71126 Quiz: Manual grading page size preference can get stuck at 0
Including in this change:
 - New positiveint regex rule to check if the value is a positive integer
2021-05-14 17:02:35 +07:00
Sara Arjona 486ba9af35 weekly release 3.10.4+ 2021-05-14 11:06:23 +02:00
Sara Arjona c638f70bf8 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-05-14 11:06:22 +02:00
Sara Arjona feede81204 MDL-67935 tool_lp: fix random errors with login/logout 2021-05-14 10:53:19 +02:00
AMOS bot 89fb13c3f1 Automatically generated installer lang files 2021-05-14 00:07:30 +00:00
Paul Holden da35a2374b MDL-71626 admin: filter site fullname in CLI maintenance script. 2021-05-13 20:28:14 +01:00
Paul Holden e7d1363565 MDL-71619 privacy: extend correct class in provider testcases.
Extending the privacy provider testcase means that it's tearDown
method will reset the request writer.
2021-05-13 20:25:10 +01:00
Eloy Lafuente (stronk7) 954c20c521 Merge branch 'MDL-71580-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-05-12 23:00:14 +02:00
Helen Foster d13badc089 MDL-71580 lang: Import fixed English strings (en_fix) 2021-05-12 11:08:09 +02:00
Sara Arjona 183348c219 weekly release 3.10.4+ 2021-05-11 12:42:34 +02:00
Sara Arjona c394fc970d Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-05-11 12:42:34 +02:00
AMOS bot 158054b3bd Automatically generated installer lang files 2021-05-11 00:07:30 +00:00
Víctor Déniz 595b858da0 Merge branch 'MDL-71060-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-05-10 23:42:52 +01:00
Thong Bui dcd5dfd22c MDL-71060 Questions: Duplicates 'Current category' text. 2021-05-10 00:24:28 +07:00
Eloy Lafuente (stronk7) 237f4ccada Moodle release 3.10.4 2021-05-08 16:40:42 +02:00
Eloy Lafuente (stronk7) f674b77d34 weekly release 3.10.3+ 2021-05-07 16:54:50 +02:00
Eloy Lafuente (stronk7) 9215f9d294 NOBUG: Fixed SVG browser compatibility 2021-05-07 16:54:50 +02:00
Eloy Lafuente (stronk7) b72be5f142 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-05-07 16:54:49 +02:00
abgreeve 5ed11926a6 Merge branch 'MDL-68747-310' of https://github.com/dcai/moodle into MOODLE_310_STABLE 2021-05-07 11:45:45 +08:00
Mathew May e4274d80a4 MDL-70622 mod_lti: Tighten redirect param typing 2021-05-07 11:45:45 +08:00
Adam Olley 87883bb43c MDL-70622 mod_lti: Prevent xss on lti 1.3 authentication script
Without this, people can craft URLs that other users might use not realising
what they do - and as a XSS vulnerability, it could do any number of things the
clicking-user has access to do on the site.

Change-Id: I82adc71e8706d8929011b4b24523d5b62b8ccea1
2021-05-07 11:45:34 +08:00
Jun Pataleta cd83b3732e Merge branch 'MDL-71395-310-2' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2021-05-07 10:30:39 +08:00
abgreeve c6ec73b12e Merge branch 'MDL-70181_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-05-07 10:22:28 +08:00
Víctor Déniz 3c23c78500 Merge branch 'MDL-71303-310' of https://github.com/StudiUM/moodle into MOODLE_310_STABLE 2021-05-06 23:34:33 +01:00
Eloy Lafuente (stronk7) 1b22f24666 Merge branch 'MDL-70049-310_count_submissions' of https://github.com/agrowe/moodle into MOODLE_310_STABLE 2021-05-06 23:27:20 +02:00
Eloy Lafuente (stronk7) 0656fb0d19 Merge branch 'MDL-70772-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-06 23:20:13 +02:00
Eloy Lafuente (stronk7) d13532e364 Merge branch 'MDL-71313_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-05-06 23:15:06 +02:00
Eloy Lafuente (stronk7) 0e077d9b68 Merge branch 'MDL-71343-m310' of https://github.com/rjnl/moodle into MOODLE_310_STABLE 2021-05-06 23:07:46 +02:00
Sara Arjona 35fbf2b4af MDL-70110 mod_assign: make phpunit test DB order agnostic 2021-05-06 19:38:45 +02:00
Sara Arjona 3938b91363 Merge branch 'MDL-71491-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-06 18:42:32 +02:00
Marina Glancy d87d0973f5 MDL-71395 core: fix bug in google lib wrapper
because of changes in PHP8 the '' == 0 is no longer true and the error in the google api wrapper was discovered
2021-05-06 18:39:10 +02:00
Sara Arjona c5298a3d9a Merge branch 'MDL-71420_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-05-06 17:58:29 +02:00
Marina Glancy 83dda7ae04 MDL-71395 block_tag_youtube: sometimes exception may have empty message 2021-05-06 17:49:14 +02:00
Víctor Déniz 2561b61d81 Merge branch 'MDL-71402-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-06 16:47:02 +01:00
Paul Holden 119c201a10 MDL-71491 repository_flickr: return more file data.
See also 643b0cca.
2021-05-06 16:36:35 +01:00
Sara Arjona 3cdb182a70 Merge branch 'MDL-71268-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-05-06 17:11:31 +02:00
Paul Holden 5e6e118a2e MDL-71402 availability: fix group restriction button in mod form.
* The button to "Add group/grouping access restriction" under
   common module settings should only be present if corresponding
   availability plugins are enabled; and
 * Prevent the same button behaving as a submit button, which
   intercepted the user hitting return in the form and added a
   restriction without deliberate action taken by the user.
2021-05-06 14:20:32 +01:00
Sara Arjona cd0b5a63fa Merge branch 'MDL-70110-310' of https://github.com/septatrix/moodle into MOODLE_310_STABLE 2021-05-06 13:16:13 +02:00
Víctor Déniz afc3b1dd3d Merge branch 'MDL-71434-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-06 11:15:18 +01:00
Sara Arjona d1983c3ce1 Merge branch 'MDL-71390-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2021-05-06 08:07:40 +02:00
Adrian Greeve 0094d8e66e Merge branch 'MDL-70786-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-05-06 10:05:02 +08:00
AMOS bot b34246ca19 Automatically generated installer lang files 2021-05-06 00:07:32 +00:00
Juan Leyva 5e29bd67e6 MDL-71513 mobile: Fix last access visibility 2021-05-05 22:49:07 +01:00
Eloy Lafuente (stronk7) ad7c296dc9 MDL-71420 environment: Lower sodium requirement to recommended 2021-05-05 23:06:18 +02:00
Sara Arjona 9aad1581bc Merge branch 'MDL-71517-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-05 12:17:43 +02:00
Sara Arjona 56882a76d1 Merge branch 'MDL-71187-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-05-05 12:14:13 +02:00
Víctor Déniz 14c8b8bd56 Merge branch 'MDL-71460-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-05-05 10:43:08 +01:00
Luca Bösch e66bf8a5c1 MDL-71187 quizaccess_seb: Change "Launch Safe Exam Browser" to a href.
In order to allow for correct seb:// or sebs:// calls without browser
warnings of insecure links, it is not possible to send a get request
with an attached cmid parameter to the unknown seb:// or sebs://
URL via a form button.
We've got to use a <a href> link outside a form to circumvent
browsers warning of an insecure link and call Safe Exam Browser
correctly.
2021-05-05 10:54:34 +02:00
Leon Stringer 01aee79df0 MDL-70181 database: Quote database object names
Table names and database name now enclosed in backticks.
admin/cli/mysql_collation.php failed if $CFG->prefix was blank with
MySQL 8.0 because table 'groups' conflicted with a new reserved word.

Note that this quotes both mysql_collation.php and mysql_compressed_rows.php
but only the former was mal-functioning.

The case of mysql_compressed_rows.php is a little bit special because
not all tables are processed, only those having big rows. And the groups
table is not one of them. In any case, better add the quotes there for
any future case.

Also, when testing this patch https://tracker.moodle.org/browse/MDL-71512
was discovered and will need to be fixed to make core 100% compliant
with MySQL 8.0 and MariaDB 10.6 and up.
2021-05-05 10:16:54 +02:00
Peter Dias e3b4f6d3fd MDL-71460 hub: Use checkboxes instead of dropdowns
Change the yes/no dropdowns to a checkbox. Defaults to unchecked.
2021-05-05 10:27:28 +08:00
Víctor Déniz 73d36ebafa Merge branch 'MDL-70864-310-zip_packer_windows' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-05-05 00:03:40 +01:00
Eloy Lafuente (stronk7) d73d9dd99f Merge branch 'MDL-71425-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-05-04 23:39:50 +02:00
Paul Holden 301f78c282 MDL-71359 mod_forum: empty forums shouldn't export anything. 2021-05-04 17:22:47 +02:00
Sara Arjona 373c263482 MDL-71408 h5plib_v124: Add required changes after lib upgrade
- The mbstring extension is required since Moodle 3.9 onwards so
the upgrading steps have been removed because they are not
required any more.
- The pull-request for fixing some minor PHP7.4 problems has been
integrated so this patch is not required.
2021-05-04 17:22:47 +02:00
Sara Arjona ac7cd6c603 MDL-71408 h5plib_v124: Upgrade H5P core library to 1.24.02 2021-05-04 17:22:47 +02:00
Huong Nguyen 62b4ebab51 MDL-70720 Quiz: Improve capability checks when fetching users' best grades 2021-05-04 17:22:47 +02:00
Shamim Rezaie abbda5d025 MDL-69028 repository: Put a rate limit on draft file uploads 2021-05-04 17:22:47 +02:00
Paul Holden 0debb3cac0 MDL-71130 quiz_grading: escape user idnumber on display. 2021-05-04 17:22:47 +02:00
David Mudrák 9f4404e80d MDL-70804 mnet: Use proper DML method to get records from the table
This improves the code and avoids the risk of SQL injection through the
malicious XML-RPC request from the MNet peer.
2021-05-04 17:22:47 +02:00
Sara Arjona d9af87d70a Merge branch 'MDL-71274-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2021-05-04 17:10:48 +02:00
David Mudrák 804f1f5ac7 MDL-71425 lang: Fix reworded strings in tests 2021-05-04 16:56:09 +02:00
Helen Foster 23f0d09ec7 MDL-71425 lang: Import fixed English strings (en_fix) 2021-05-04 16:48:21 +02:00
Paul Holden 641b678d4b MDL-71517 mod_data: remove invalid form custom data access.
On PHP7.4, trying to access array offsets of NULL triggers a notice.
2021-05-04 15:35:46 +01:00
Luca Bösch 5183181f94 MDL-70786 report_loglive: respect fullname setting. 2021-05-04 14:19:17 +02:00
Luca Bösch b74abdbea1 MDL-70786 report_log: respect fullname setting. 2021-05-04 14:19:17 +02:00
Luca Bösch a11c2cb391 MDL-70786 report_completion: respect fullname setting. 2021-05-04 14:19:17 +02:00
Luca Bösch 204748856a MDL-70786 report_competency: respect fullname setting. 2021-05-04 14:19:17 +02:00
Luca Bösch 8962bd76c3 MDL-70786 report_progress: respect fullname setting. 2021-05-04 14:19:17 +02:00
Luca Bösch 8a07e2f53d MDL-71268 graphics: Use new Moodle logo for RSS feeds by Moodle 2021-05-04 14:15:29 +02:00
Sara Arjona 3de329785d weekly release 3.10.3+ 2021-05-04 13:27:55 +02:00
Sara Arjona 63a4a88dd1 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-05-04 13:27:55 +02:00
Adrian Greeve 4f46b8449b Merge branch 'MDL-66673-MOODLE_310_STABLE' of https://github.com/ScottVerbeek/moodle into MOODLE_310_STABLE 2021-05-04 15:47:33 +08:00
AMOS bot 72c300facf Automatically generated installer lang files 2021-05-04 00:07:31 +00:00
Eloy Lafuente (stronk7) c96074aafd Merge branch 'MDL-71463-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-03 19:01:01 +02:00
David Mudrák 7f507d94d9 MDL-70864 files: Fix zip_packer extracting files with trailing dots
File and folder names cannot end with dots on Windows. So replace the
trailing dots with underscore consistently with how some other zip tools
(such as 7-zip) handle this case.
2021-05-03 18:14:17 +02:00
Marina Glancy 6211bc0be5 MDL-71390 core: raise max_input_vars requirement for Moodle 3.11 2021-05-03 13:25:36 +02:00
Adrian Greeve 6dc0b43072 Merge branch 'MDL-71440-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-05-03 16:04:36 +08:00
Mihail Geshoski 502076cde6 MDL-71440 mod_assign: New capability for viewing the submission summary
Creates a new capability mod/assign:viewownsubmissionsummary which will
be required in order to display the submission summary to the user in
the assignment page.
2021-05-03 15:32:21 +08:00
Jake Dallimore 79368aaa6a Merge branch 'MDL-52724-310' of git://github.com/merrill-oakland/moodle into MOODLE_310_STABLE 2021-05-03 13:25:36 +08:00
Víctor Déniz 5431063238 Merge branch 'MDL-69956-310' of https://github.com/dcai/moodle into MOODLE_310_STABLE 2021-05-01 13:43:19 +01:00
Víctor Déniz 36764c36c0 weekly release 3.10.3+ 2021-04-30 12:54:29 +01:00
Rajneel Totaram f902e75bae MDL-71343 core_h5p: Convert all line-endings to UNIX format 2021-04-30 23:45:21 +12:00
Andrew Nicols 8fd5eb7be5 MDL-71343 core_h5p: Add unit test for helper::parse_js_array
Signed-off-by: Rajneel Totaram <rjnlfj@yahoo.com>
2021-04-30 23:40:49 +12:00
Dongsheng Cai 8399b45fd0 MDL-69956 forum: throw exception when advanced grading is not ready 2021-04-30 14:59:36 +10:00
Adrian Greeve dc783d3d5e Merge branch 'MDL-71481-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-30 11:19:46 +08:00
Jun Pataleta aaaf3abc4d Merge branch 'MDL-70947-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-04-30 10:34:24 +08:00
Sara Arjona 9a36fe6886 Merge branch 'MDL-60331-310_take3' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-04-29 17:49:55 +02:00
Paul Holden 1b8ccba1f2 MDL-71463 dml: escape square brackets for SQL Server LIKE operator. 2021-04-29 13:49:28 +01:00
Amaia Anabitarte 723ffea626 MDL-71274 analytics: Don't generate insight for hidden courses
Hidden courses can be used for training
but we do not want to generate insights for them
because students do not have access to hidden courses.
This was fixed in MDL-66806 for "Students at risk" model.
Fixed for "Students who have not accessed the course recently" in this issue.
2021-04-29 11:13:02 +02:00
Paul Holden 0c57ffc2b5 MDL-71481 repository_flickr_public: return more file data.
A HTTP HEAD request is required to get the image filesize.
The remaining data can be obtained from existing calls to
the Flickr API.
2021-04-29 09:49:16 +01:00
Huong Nguyen f3ae9f9d45 MDL-70947 File upload: Upload protection
Interacts badly with double-submit protection, and not all uploads protected
2021-04-29 15:32:12 +07:00
Sara Arjona 3bffbfabb5 Merge branch 'MDL-71016-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-29 09:21:52 +02:00
Jun Pataleta 3afeaed3ff Merge branch 'MDL-70863-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2021-04-29 15:05:15 +08:00
Andrew Nicols c05862dc9a Merge branch 'MDL-56609_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-04-29 09:41:59 +08:00
Víctor Déniz 9cd78a8b4f Merge branch 'MDL-71200-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-28 20:53:49 +01:00
Paul Holden 8f630db213 MDL-71016 gradeexport_xml: ensure user/grade idnumbers are encoded. 2021-04-28 19:03:56 +01:00
Luca Bösch 689d10b02b MDL-60331 questions: prevent double escaping question categories. 2021-04-28 17:32:27 +02:00
Sara Arjona 71f40d0018 Merge branch 'MDL-70979-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-28 13:06:18 +02:00
Sara Arjona b9f9758f5e Merge branch 'MDL-71127-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-28 12:58:28 +02:00
Sara Arjona 9e19f3c1f5 Merge branch 'MDL-70763-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-28 12:36:36 +02:00
Septatrix 8f0daf43b7 MDL-70110 assign: add group submission attemptnumber test 2021-04-28 11:50:24 +02:00
Sara Arjona fa72038987 Merge branch 'MDL-71244-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-04-28 09:17:39 +02:00
Andrew Nicols 6679c41c89 Merge branch 'MDL-71168-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-28 10:50:19 +08:00
Andrew Nicols 1ed97439dd MDL-70909 mod_h5pactivity: Whitespace fix 2021-04-28 10:33:29 +08:00
Andrew Nicols 17625bd5b2 Merge branch 'MDL-70909-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE 2021-04-28 10:26:41 +08:00
Andrew Nicols 475ea093b4 Merge branch 'MDL-71386-310' of git://github.com/NoelDeMartin/moodle into MOODLE_310_STABLE 2021-04-28 10:15:54 +08:00
Eloy Lafuente (stronk7) 40d45ede41 MDL-56609 phpunit: Fix bogus expectation on DST changes day
Current test works ok every day of the year but the day of
DST begin changes (last Sunday of March currently).

That day, 01:00 Europe/London simply doesn't exist, because
the time is moved forward by 60 minutes.

Hence the expectation for the next cron execution is not 1 "normal"
day (24h) but 1 less hour.

Note this only happens for the current test on DST begins, the
opposite change (DST ends), happening the last Sunday of October
is not affected, because, at all effects, 01:00 is a perfectly normal
and existing hour.
2021-04-27 18:31:01 +02:00
Luca Bösch 6651b3f940 MDL-71244 enrol_manual: Add bootstrap classes to buttons 2021-04-27 17:26:24 +02:00
Ferran Recio e1ac84a458 MDL-70909 mod_h5pactivity: fix reports on freeze context 2021-04-27 15:35:39 +02:00
Sara Arjona ff833a08de weekly release 3.10.3+ 2021-04-27 15:14:58 +02:00
Adrian Greeve d426ee3ccc Merge branch 'MDL-71329-310' of https://github.com/Chocolate-lightning/moodle into MOODLE_310_STABLE 2021-04-27 09:35:52 +08:00
Víctor Déniz 813338182c Merge branch 'MDL-65687-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-27 01:13:18 +01:00
Víctor Déniz 5e7f937481 Merge branch 'MDL-71003-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-27 00:37:00 +01:00
Sara Arjona 1bbfbd7444 Merge branch 'MDL-70917-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-26 15:18:12 +02:00
Sara Arjona 0f308b0df1 Merge branch 'MDL-71416-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-26 12:35:50 +02:00
Eloy Lafuente (stronk7) fea40706b1 Merge branch 'MDL-70446-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2021-04-26 10:45:16 +02:00
Paul Holden eb60ece090 MDL-71434 mod_data: add form control class to template textarea. 2021-04-25 18:35:04 +01:00
Tim Schroeder 062dc30ffd MDL-70110 assign: fixed ws get_submissions for groups 2021-04-24 12:11:15 +02:00
Paul Holden a834862ce4 MDL-71416 report_log: user context header should show users name.
Co-Authored-By: Luca Bösch <luca.boesch@bfh.ch>
2021-04-23 20:24:34 +01:00
Sara Arjona e148629f48 weekly release 3.10.3+ 2021-04-23 10:47:03 +02:00
Mathew May 8e750158a0 MDL-71329 tool_moodlenet: Check to see if we get errors before curl 2021-04-23 15:49:55 +08:00
Jun Pataleta 78ea26ad7b Merge branch 'MDL-71171_310' of git://github.com/mdjnelson/moodle into MOODLE_310_STABLE 2021-04-23 12:40:47 +08:00
Mark Nelson b58a1b9e34 MDL-71171 customfield_text: ensure we set defaults properly 2021-04-23 12:37:38 +08:00
Andrew Nicols 298a70eba1 Merge branch 'MOODLE_310_STABLE-MDL-71376' of https://github.com/rjnl/moodle into MOODLE_310_STABLE 2021-04-23 11:53:24 +08:00
Andrew Nicols 0e301e88a5 Merge branch 'MDL-70970-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-23 11:39:04 +08:00
ScottVerbeek 4b9b0839b6 MDL-66673 groups: Stop notice when messaging system is disabled 2021-04-23 08:54:38 +10:00
Ferran Recio d7d94cf30f MDL-70909 behat: context freeze and not freeze steps 2021-04-22 15:51:36 +02:00
Sara Arjona 72b6d0be84 Merge branch 'MDL-71136_310' of https://github.com/TomoTsuyuki/moodle into MOODLE_310_STABLE 2021-04-22 13:56:49 +02:00
Sara Arjona fa2d1ab5d3 Merge branch 'MDL-71400-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-04-22 13:16:38 +02:00
Ferran Recio 78aabd1e28 MDL-70909 core: add cannotmatchanyrows to capabilities join 2021-04-22 13:10:37 +02:00
Jun Pataleta 72e7b87b92 Merge branch 'MDL-71170_310' of git://github.com/mdjnelson/moodle into MOODLE_310_STABLE 2021-04-22 18:55:12 +08:00
Noel De Martin 3a83f57043 MDL-71386 behat: Support for 3.9.5+ mobile app 2021-04-22 12:16:01 +02:00
Paul Holden 2a706c3e5c MDL-71200 mod_folder: ensure "Download folder" option is backed up. 2021-04-22 10:29:12 +01:00
Paul Holden faaa25b5cc MDL-70979 search: validate external user search parameters.
Clean return value in unit test for same.
2021-04-22 10:22:57 +01:00
Mihail Geshoski 6b5a1b02fe MDL-71400 assignfeedback_offline: Fix message after worksheet upload 2021-04-22 13:08:52 +08:00
Jun Pataleta 96ddfecda3 Merge branch 'MDL-71156-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-04-22 11:53:39 +08:00
Simey Lameze 94259f8a7d MDL-71156 core: machinery to recover orphaned calendar events
The machinery to fix orphaned calendar events that were broken by MDL-67494.

The solution consists of:

1) Upgrade step that checks if this site has executed the problematic upgrade steps and
   if positive, it will schedule a new run for calendar_fix_orphaned_events adhoc task.

2) Adhoc task that will self-spawn calling the recovery machinery, running until
   all the orphaned calendar events are fixed. It also sets the maximum runtime of
   60 seconds. It is also possible to override that number by specifing the desired
   number setting the ->calendareventsmaxseconds in your config.php

3) CLI script that will look for all the calendar events which userids
   where broken by a wrong upgrade step, affecting to Moodle 3.9.5
   and up.

   It performs checks to both:
     a) Detect if the site was affected (ran the wrong upgrade step).
     b) Look for orphaned calendar events, categorising them as:
       - standard: site / category / course / group / user events
       - subscription: events created via subscriptions.
       - action: normal action events, created to show common important dates.
       - override: user and group override events, particular, that some activities support.
       - custom: other events, not being any of the above, common or particular.

   By specifying it (--fix) try to recover as many broken events (missing userid) as
   possible. Standard, subscription, action, override events in core are fully supported but
   override or custom events should be fixed by each plugin as far as there isn't any standard
   API (plugin-wise) to launch a rebuild of the calendar events.

4) Unit tests and helper functions to generate calendar events. We have decided to
   keep the tests simple, testing only true and false and not using data generators because
   the code is purely to recover the calendar events and won't turn into an API or something
   and also due to the urgency of this issue.
   The helpers have been created in calendar/tests/helpers.php since there are no data generators
   for calendar.
2021-04-22 10:43:37 +08:00
Andrew Nicols 855e7e9ede Merge branch 'MDL-70412-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2021-04-22 10:07:57 +08:00
Neill Magill e6725b8cbb MDL-64336 assign: Add missing PHP doc 2021-04-21 17:21:19 +02:00
Neill Magill bd80f68c11 MDL-64336 assign: Teachers should be able to see all submissions
Before this change a teacher would be able to see users listed if:

* They have an active enrolment and can submit
* They have an an inactive enrolment for a role that can submit

After this change they will additonally be able to see users listed:

* That have an active enrolment and have submitted
* That have an inactive enrolment and have submitted

This means that if an assignment has it's context frozen all users
that have made some form of submission will still be listed.

It will also apply if the submission capability is removed from a
user.

If a user's enrolment is deleted they will not be listed.

The submission and grading counts have also been updated so
they will reflect the new rules.
2021-04-21 17:15:54 +02:00
Neill Magill dbcfda9641 MDL-64336 assign: Submissions should be visible while frozen
Before this change if a student visited an assignment that is
frozen they would only see the title and description even if
they had made a submission to it.

After the change they will be able to see the status of their
submission and any feedback and grades they have recived.

It will also make the Moodle app recognise that submission
should not happen because the assignment is frozen.

Tests based on ones created by Andrew Nicols
2021-04-21 17:15:45 +02:00
Sara Arjona b62526d0ad Merge branch 'MDL-62244_310_label_view' of https://github.com/sheesania/moodle into MOODLE_310_STABLE 2021-04-20 17:45:06 +02:00
Sara Arjona d9293c77bc weekly release 3.10.3+ 2021-04-20 15:51:19 +02:00
Sara Arjona 6f9415fea0 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-04-20 15:51:18 +02:00
Paul Holden 647020f584 MDL-70970 quizaccess_seb: consistent property array sorting by key.
In PHP8.0 using `ksort` was producing incorrect results by sorting
keys differing only in case in the wrong order. This change makes
sorting consistent between PHP versions.

Co-Authored-By: Tim Hunt <T.J.Hunt@open.ac.uk>
2021-04-20 14:36:19 +01:00
Rajneel Totaram afc20e7caa MDL-71376 mod_quiz: fix undefined object reference 2021-04-20 20:13:40 +12:00
Jun Pataleta 6d82a01438 Merge branch 'MDL-71364_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-04-20 09:23:43 +08:00
AMOS bot 3e47cdda94 Automatically generated installer lang files 2021-04-20 00:07:27 +00:00
Víctor Déniz 7ccaf08d5a Merge branch 'MDL-71087-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-04-19 23:45:02 +01:00
Eloy Lafuente (stronk7) 5d309ef2a8 Merge branch 'MDL-69256-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-04-20 00:05:05 +02:00
Víctor Déniz ce023afec9 Merge branch 'MOODLE_310_STABLE_fix_gradeimport_csv' of https://github.com/intrajp/moodle into MOODLE_310_STABLE 2021-04-19 22:49:09 +01:00
Dongsheng Cai fdb9a664f6 MDL-68747 mod_quiz: force LTR for quiz grading overview chart 2021-04-19 21:06:37 +10:00
Sara Arjona 79d705df64 Merge branch 'MDL-71365_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-04-19 10:18:39 +02:00
Paul Holden 73e9259c10 MDL-71127 mod_quiz: fix thrown exception for invalid question columns. 2021-04-19 09:07:13 +01:00
Paul Holden 785cf4fb22 MDL-71168 report_participation: fix select all users checkbox. 2021-04-19 09:05:13 +01:00
Sara Arjona c30923d77d Merge branch 'MDL-66475-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-19 09:49:23 +02:00
Sara Arjona ea388d74ab Merge branch 'MDL-65553-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2021-04-19 08:53:45 +02:00
AMOS bot 61d1af0818 Automatically generated installer lang files 2021-04-18 00:07:25 +00:00
Eloy Lafuente (stronk7) 93960101e9 MDL-71365 grunt: fix ignores missing LF @ EOF 2021-04-18 00:44:06 +02:00
Eloy Lafuente (stronk7) 26e8b4a0fa MDL-71364 behat: fix randomness causes by "now" advancing
Some recent tests do set a date time element
to ##now## or tomorrow and, immediately after that
the look if, effectively, ##now## and #tomorrow#
have been set (with minutes resolution).

Problem is that, between the field is set and the field
is verified, it can happen that the time advances to
next minute (from H:M:59 to H:M+1:00) and then the
assertion fails.

To avoid this, we could have lowered the resolution to be
hours... but that doesn't solve the problem just makes it
to happen less often.

So, instead of that... we are setting the 2 now and tomorrow
cases to be "today noon" and "tomorrow noon" (12:00:00) so
we ensure they won't be ever in the risk of jumping of minute.
2021-04-17 12:33:32 +02:00
Eloy Lafuente (stronk7) a1523774bc Merge branch 'MDL-70099-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-17 09:40:37 +02:00
Sara Arjona 7c1feb97b2 weekly release 3.10.3+ 2021-04-16 17:03:33 +02:00
Sara Arjona 26e00f4640 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-04-16 17:03:32 +02:00
Andrew Nicols bf4038a971 Merge branch 'MOODLE_310_MDL-71233' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-04-16 12:08:51 +08:00
Andrew Nicols 10c4a67760 Merge branch 'MDL-60490-missing_close_div-310' of https://github.com/leonstr/moodle into MOODLE_310_STABLE 2021-04-16 11:54:13 +08:00
Andrew Nicols def3f4a074 Merge branch 'MDL-69415-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-04-16 11:27:06 +08:00
Amaia Anabitarte 71613b1055 MDL-70412 groups: Improving create_group data generator
Increasing the size of the name for generated groups
to ensure we don't have problems with ordering.
2021-04-15 16:57:23 +02:00
Amaia Anabitarte db374d6a80 MDL-65553 core_analytics: Don't allow to flag predictions several times
Even if a prediction is hidden from the report once is flagged,
it can be flagged several times if the user visits detailed view via URL.
We remove the checkbox to select a prediction and flag it
once it has already been flagged.
2021-04-15 16:39:09 +02:00
Jake Dallimore 6958a078a6 Merge branch 'MDL-71338-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-15 14:42:44 +08:00
Jake Dallimore 5566bfe436 Merge branch 'MDL-71119-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-04-15 08:32:29 +08:00
AMOS bot 40cdfc58fc Automatically generated installer lang files 2021-04-15 00:07:34 +00:00
Paul Holden 416b25fc77 MDL-71338 tool_usertours: correct Content-Type on tour export.
Replace existing code with standard file serving mechanism, in
turn correcting the previously incorrect Content-Type header.
2021-04-14 21:12:02 +01:00
Eloy Lafuente (stronk7) ae88411798 Merge branch 'MDL-70616-310-fixed' of https://github.com/izendegi/moodle into MOODLE_310_STABLE 2021-04-14 12:45:23 +02:00
Iñigo Zendegi 909c977e00 MDL-70616 gradingform_rubric: Filters not applied to rubric name 2021-04-14 11:51:11 +02:00
Sara Arjona 3306411314 MDL-71119 core_badges: Add more information to errors
Some errors raised when calling external services were ignored.
Displaying this information helps to debug and find the real reasons
why some action, like connecting to an external backpack, can't be
done.
2021-04-14 11:04:06 +02:00
Sara Arjona 4203a0389e MDL-71119 core_badges: Use basicauth and remove urlencode
Basic authorization header is required to get token. Besides, client
id and secret shouldn't call urlencode.
2021-04-14 11:01:27 +02:00
Sara Arjona 2d308243f4 MDL-71119 core_badges: Initialise scopes param in backpack-connect.php
The scopes parameter should be passed when creating the OAuth2 badges
client. As it is an optional parameter, when it's empty, it will
be initilised with the supported scopes for the backpack issuer.

It will happen, for instance, when a call is done to oauth2callback.php
because, as defined in RFC6749, OAuth2 authorization response only
supports code and state.
2021-04-14 11:01:27 +02:00
Paul Holden 6a7baaced0 MDL-70772 mod_forum: check for valid usernode before making active. 2021-04-14 09:20:20 +01:00
Andrew Nicols 0c611e0a13 Merge branch 'MDL-71154_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-04-14 12:11:21 +08:00
AMOS bot 905511e816 Automatically generated installer lang files 2021-04-14 00:07:28 +00:00
Eloy Lafuente (stronk7) d883536e6f MDL-71154 ci: Prevent upstream branches and tags to be built
Both for travis and GHA:

- master and MOODLE_XXX_STABLE branches
- any vX.Y.Z tag

won't lead to a build anymore.
2021-04-13 16:55:50 +02:00
Eloy Lafuente (stronk7) 653d6f0229 weekly release 3.10.3+ 2021-04-13 10:26:39 +02:00
Eloy Lafuente (stronk7) 4ab41d6090 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-04-13 10:26:38 +02:00
Eloy Lafuente (stronk7) c50d68cfd9 Merge branch 'MDL-71059-310' of git://github.com/abias/moodle into MOODLE_310_STABLE 2021-04-13 00:42:34 +02:00
Tim Hunt 33d6929e1f MDL-71313 repositories: warn if get_instances context is wrong type 2021-04-12 20:35:02 +01:00
Sara Arjona f4a604e4e2 Merge branch 'MDL-68716-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-12 17:24:46 +02:00
Sara Arjona 0ecc30eb85 Merge branch 'MDL-71264_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-04-12 16:40:16 +02:00
Sara Arjona 4de37cf603 Merge branch 'MDL-70595-310' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2021-04-12 16:01:40 +02:00
Sara Arjona dda7890857 Merge branch 'MDL-71107-10' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2021-04-12 12:41:16 +02:00
Eloy Lafuente (stronk7) b470f7b246 Merge branch 'MDL-69102-310' of https://github.com/martygilbert/moodle into MOODLE_310_STABLE 2021-04-12 00:02:05 +02:00
Eloy Lafuente (stronk7) f5087ef548 MDL-69102 phpunit: Add test to cover ALL cohort criteria
That way we can check that the expectations are
working ok for every database. Previously only the
ANY case was being tested.

Also, convert them to course badges and check, via
review_all_criteria() that the SQL structures returned
by award_criteria_cohort->get_completed_criteria_sql()
doesn't fail and return the expected counters.
2021-04-10 12:38:46 -04:00
Issam Taboubi 7e146f752a MDL-71303 core: HTML not escaped in block skip link 2021-04-09 17:31:27 -04:00
AMOS bot ece30526dd Automatically generated installer lang files 2021-04-09 00:07:31 +00:00
Eric Merrill a3fa31fa21 MDL-52724 editor_atto: Scrub atto html for invalid ol, ul, and li tags
Try to correct broken ul/ol/li tags, as they have an outsized impact
on course layout. Uses basic regex and loops to track open and closed
tags.

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

Behat changes are a fix for setting multiline strings in Atto, and
creating a multiline match step.
2021-04-08 15:30:50 -04:00
Eloy Lafuente (stronk7) 06b3ac6ca1 Merge branch 'MDL-70802-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-04-08 18:37:39 +02:00
Víctor Déniz 4c8c9a4c4b Merge branch 'MDL-71116-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-04-08 01:05:55 +01:00
Amaia Anabitarte 538c8eddb5 MDL-71107 core_contentbank: Behat test. Authoring when copying a course 2021-04-07 10:03:37 +02:00
Amaia Anabitarte fafed9dc90 MDL-71107 core_contentbank: Fill content author when copying a course
'usercreated' and 'usermodified' fields can not be always mapped.
We are filling those fields with 'old' users when working on the same
site, or with current user when working on a different instance.
2021-04-07 10:03:37 +02:00
Peter Burnett c2661e3ffc MDL-70233 cache: Disabled factory now gets writer from parent 2021-04-07 15:32:44 +10:00
Alex Rowe 1611b30b1c MDL-70049 assign: count_submissions_need_grading call when can't grade 2021-04-07 08:57:05 +10:00
Eloy Lafuente (stronk7) 69455d835c Merge branch 'MDL-70959-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-04-06 22:29:07 +02:00
Eloy Lafuente (stronk7) c33060d008 Merge branch 'MDL-68635-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-06 22:23:42 +02:00
Víctor Déniz 10f934e300 Merge branch 'MDL-71128-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-06 19:51:02 +01:00
Michael Hawkins 9d63efed82 MDL-70595 core: Updated security.txt expiry 2021-04-06 13:13:45 +08:00
AMOS bot da5111e321 Automatically generated installer lang files 2021-04-06 00:07:37 +00:00
Paul Holden ebfe1d5945 MDL-70099 enrol: increase accuracy of current enrolments by date.
By rounding the current time it was possible that the most recently
created user enrolments (e.g. self enrolments) were being excluded.

This would manifest itself in a user being enrolled on a course,
but it not appearing under "My courses" navigation or on their own
Dashboard until the rounded time had caught up with the current
time.
2021-04-05 19:32:15 +01:00
Paul Holden 359cc7e787 MDL-71003 user: fix alignment of autocomplete participant filters. 2021-04-04 23:21:25 +01:00
Paul Holden 981784000d MDL-70917 tool_behat: fix profile/replace option comparison.
The `isset` call always returned true for the 'replace' option,
because even if not specified it receives a non-null value. The
`strpos` call now does a strict equality check rather than
greater-than-or-equal (which always returns true).
2021-04-04 23:18:37 +01:00
Paul Holden 542a7490f2 MDL-70763 core: export preferences for correct user.
Ensure we are using the ID of the given user rather than falling
back to that of the current user during privacy export.
2021-04-04 23:15:43 +01:00
Paul Holden e44ae4df58 MDL-70763 quiz_overview: export preferences for correct user. 2021-04-04 23:15:43 +01:00
Paul Holden e89432fb19 MDL-70763 gradereport_grader: export preferences for correct user. 2021-04-04 23:15:43 +01:00
Paul Holden 3e30dffa31 MDL-66475 task: fix random timing failures in logger cleanup test. 2021-04-04 23:12:38 +01:00
AMOS bot e084f4c0b4 Automatically generated installer lang files 2021-04-04 00:07:33 +00:00
Eloy Lafuente (stronk7) 215851c4c0 MDL-71264 behat: Change date(time) element update order
This includes 2 change to the order date(time) elements are filled,
each one addressing one type of problem, where current order is
problematic and can lead to unexpected dates.

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

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

This test covers all the critical changes (day, month and year),
back and forth. All times are Perth/Australia.
2021-04-03 10:59:45 +02:00
AMOS bot ab1207e8eb Automatically generated installer lang files 2021-04-02 00:07:25 +00:00
Marty Gilbert 5ef3241ae3 MDL-69102 badge: Fixes broken WHERE clause
When buildilng the 'WHERE' clause, the SQL generated
a query that selected any user who was a member of the
**last** group, not all of the groups.

I believe the query has to be re-worked so that it only
returns users who are in ALL of the groups. This can
be done by a GROUP BY and HAVING.
2021-04-01 14:51:21 -04:00
Alison Blomenberg eebc6ba6a8 MDL-62244 Resource: label view redirects to label, not course 2021-04-01 11:54:48 -06:00
Leon Stringer 6cd746cb4d MDL-60490 tool_lp: Missing div close
Mustache template had opening <div> with missing </div>.
2021-04-01 12:18:13 +01:00
sam marshall 6877043d8c MDL-70446 search_solr: File indexing can fail due to multipart upload
Due to Solr bug SOLR-15039, uploading files for indexing can fail if
it uses multipart upload. This changes it to use direct binary upload.

Unfortunately, the direct binary version in PHP curl only supports a
string, so we have to load the file into memory. I added extra code to
restrict the size of files indexed to (memory limit - 100MB), which is
usually 284MB unless configured differently because cron runs under
MEMORY_EXTRA.
2021-04-01 11:40:36 +01:00
AMOS bot 2c249dbee1 Automatically generated installer lang files 2021-04-01 00:07:27 +00:00
Juan Leyva 6c14348b41 MDL-70863 mod_forum: Allow NULL in timecreated 2021-03-31 17:49:58 +02:00
Víctor Déniz c7b4cf91f8 weekly release 3.10.3+ 2021-03-30 15:37:42 +01:00
Víctor Déniz 3bc49b14bf Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-03-30 15:37:41 +01:00
Paul Holden f4e28ca6c2 MDL-65687 message: increase confirmation dialog zindex.
Make sure that confirmation dialogs (such as block/unblock user,
delete conversation) are shown with prominence in the messaging
drawer.
2021-03-30 10:50:48 +01:00
Tomo Tsuyuki ed1ce9cf9b MDL-71136 backup: Fix moodle_exception path. 2021-03-30 10:56:09 +11:00
Mikhail Golenkov 31530a2730 MDL-71233 backup: Fix Moodle version for MDL-69418 2021-03-30 10:45:14 +11:00
Paul Holden 82babe08ea MDL-68635 tool_cohortroles: observe user initial table filter. 2021-03-29 14:12:17 +01:00
Paul Holden 76e39a9c2a MDL-68716 mod_forum: extra column sorting options in privacy export.
Accounts for extra sort options that were added in bc23cbaf.
2021-03-29 14:05:37 +01:00
Eloy Lafuente (stronk7) f41360dd50 Merge branch 'MDL-70963-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-03-29 12:39:56 +02:00
Andrew Nicols 838190a43a Merge branch 'MDL-71004_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-03-29 11:54:27 +08:00
AMOS bot e2b34c37bd Automatically generated installer lang files 2021-03-29 00:07:26 +00:00
AMOS bot 250afa688f Automatically generated installer lang files 2021-03-28 00:07:23 +00:00
Víctor Déniz 325915ef34 Merge branch 'MDL-70537-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2021-03-26 20:15:29 +00:00
Sara Arjona fec16e68c9 MDL-70963 core_badges: Use expected JSON format for OBv2.1
This patch adds some changes to guarantee that OpenBadges 2.1 (OBv2.1)
will return always the same JSON format that OBv2.0 (because the only
difference between both versions it's the BadgeConnect API).
2021-03-26 09:02:18 +01:00
Shintaro Fujiwara c906a33e1e MDL-69304 gradeimport_csv: Validate if the user id is numerical. 2021-03-26 10:31:40 +09:00
Víctor Déniz e8a5efe835 Merge branch 'MDL-71194-310' of git://github.com/NoelDeMartin/moodle into MOODLE_310_STABLE 2021-03-25 15:15:09 +00:00
Noel De Martin aa07315267 MDL-71194 behat: Fix app tests 2021-03-25 13:51:01 +01:00
Andrew Nicols d4de6e594d Merge branch 'MDL-70980-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE 2021-03-25 08:07:41 +08:00
AMOS bot 14138237ee Automatically generated installer lang files 2021-03-25 00:07:27 +00:00
Eloy Lafuente (stronk7) ef7fcf4261 Moodle release 3.10.3 2021-03-24 20:13:09 +01:00
Eloy Lafuente (stronk7) 0e74a6c0c5 MDL-71004 git: Ignore moodle-plugin-ci.phar in any directory 2021-03-24 20:10:34 +01:00
Víctor Déniz fa85c3b806 weekly release 3.10.2+ 2021-03-24 14:21:00 +00:00
Eloy Lafuente (stronk7) 8518f6307f Merge branch 'MDL-71182-310-2' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-03-24 10:50:23 +01:00
Simey Lameze 0c799ad2e1 MDL-71182 calendar: add logic for category events in get_context
This commit adds the missing logic for category events in
get_context() method. Without this fix, users will get errors
if they have category events with userid set to 0.
2021-03-24 17:34:31 +08:00
Andrew Nicols 06c9de6b05 MDL-70802 javascript: Normalise component consistently in templates 2021-03-24 11:18:33 +08:00
Simey Lameze 7a09d64104 MDL-71182 calendar: Revert "Merge branch 'MDL-67494-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE"
This reverts commit 5a407772c7, reversing
changes made to 82f2fe02e6.
2021-03-24 09:22:04 +08:00
Víctor Déniz 5f7136f17c Merge branch 'MDL-71022-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-23 23:01:31 +00:00
Víctor Déniz 3278f5ca50 Merge branch 'MDL-70727-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-03-23 18:24:19 +00:00
Andrew Nicols 43520e3eaa Merge branch 'MDL-71039-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2021-03-23 11:18:39 +08:00
Andrew Nicols 107244cf20 Merge branch 'MDL-69036-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-23 09:54:42 +08:00
Andrew Nicols 7cb384756e Merge branch 'MDL-67870-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-03-23 09:24:54 +08:00
Andrew Nicols a8d18f88a1 MDL-69256 tests: Fix random slow test failures in completion cron 2021-03-23 08:08:29 +08:00
Mark Nelson a87f5b6e8c MDL-71170 customfield_text: use correct error string 2021-03-22 21:56:48 +08:00
Sara Arjona 9e52a6a0e1 MDL-69415 core_h5p: prepend H5P libraries in autoloader
Core and mod_hvp are using the same namespace for some H5P
libraries. This is causing some random errors.
In order to get the expected behaviour in Moodle core, this patch
prepends H5P libraries in order to guarantee they are loaded first.
Plugins using same libraries will need to use a different namespace
if they overlap and a different version of these libraries should
be used.
2021-03-22 12:41:02 +01:00
Ferran Recio e21872130d MDL-70980 mod_h5pactivity: fix review mode 2021-03-22 10:58:00 +01:00
Mihail Geshoski 65aceea7ed MDL-67870 backup: Skip value change if setting is locked by hierarchy
The given condition in the if statement did not take into account cases
when the setting is locked by hierarchy. Settings which are locked by
hierarchy should should keep their current values which were inherited
from the parent.
2021-03-22 15:33:47 +08:00
Thinh Pham 3567998cfd MDL-71087 File picker: Focus lost after 'Create folder' 2021-03-22 14:30:43 +07:00
Andrew Nicols 76c6d2f225 MDL-71159 output: Do not run content prefetch during install 2021-03-22 13:15:17 +08:00
Chris Brown 61d4fcc812 MDL-71139 trademark: Improve the trademark messaging 2021-03-22 12:00:28 +08:00
Sara Arjona 0820e24c18 MDL-71116 core_badges: Backpack URLs with more than 50 chars
Backpack URLs (web and API) can have up to 255. However, the form
for creating/editing them, doesn't allow URLs with more than 50
characters. This patch align limitation to DB value (255).
2021-03-19 15:09:07 +01:00
Eloy Lafuente (stronk7) 2b260526fc weekly release 3.10.2+ 2021-03-19 14:06:33 +01:00
Eloy Lafuente (stronk7) 1d38f7c3eb Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-03-19 14:06:31 +01:00
Jun Pataleta 35f368a1b4 MDL-70959 completion: Fix completion_info::get_data() unit tests
* Fixed inverted $sameuser test data.
* Fixed caching expectation check. Caching only relies on whether the
user accessing the completion data is the same user or not.
* Fixed checking for the caching of other modules. Should have been
checking cm ID and not instance ID.
* Additional test case when whole course parameter is passed as
true, but the requesting user is different from the target user.
2021-03-19 11:50:14 +08:00
sam marshall 31aedd4c1c MDL-70537 Availability: Avoid recursive calls to $cm->name
These recursive calls didn't work in PHP 7.3 and below, but in PHP
7.4 they also cause a fatal error which means if you have invalid
availability data, the whole page might die.
2021-03-18 15:56:28 +00:00
Jun Pataleta 348d2c66df Merge branch 'MDL-70992-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-03-18 12:23:27 +08:00
Adrian Greeve cdc875c25c Merge branch 'MDL-70924-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-18 11:51:59 +08:00
Adrian Greeve a3c38be96b Merge branch 'MDL-71048-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-18 11:10:13 +08:00
Adrian Greeve 2f1b88412d Merge branch 'MDL-70977-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-18 10:27:24 +08:00
Adrian Greeve a688fc9d6c Merge branch 'MDL-71068-protectusername-confirmed-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2021-03-18 09:46:21 +08:00
AMOS bot 401c241450 Automatically generated installer lang files 2021-03-18 00:07:25 +00:00
Brendan Heywood 6b7850290b MDL-71068 login: Fix edge cases with $CFG->protectusernames 2021-03-17 17:39:43 +11:00
sangnguyen ba0a487685 MDL-70992 Folder: Unnecessary tab stops to the left of files 2021-03-17 09:37:21 +07:00
Paul Holden 147a25d87f MDL-71128 mod_quiz: escape question idnumber on display. 2021-03-16 20:28:48 +00:00
Sara Arjona 0e462101e0 Merge branch 'MDL-44613-integration-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-03-16 08:27:03 +01:00
Mihail Geshoski fae4570571 MDL-44613 mod_assign: Fix behat failure in classic
The link to the calendar page is missing in the navigation block in
classic which causes a behat failure in the 'Set availibility dates
for an assignment' feature. The fix includes adding the calendar block
to the Course page which can be used to navigate to the calendar page.
2021-03-16 11:32:36 +08:00
Adrian Greeve 096b28dee9 Merge branch 'MDL-70780-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-03-16 11:24:29 +08:00
Sara Arjona 4a4912ecbf Merge branch 'MDL-44613-310-1' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-03-15 15:53:58 +01:00
Paul Holden 8c276d003c MDL-70977 mod_forum: fix empty equality check updating post content.
Using the external method for updating posts, the check for empty
subject/message content wasn't correct (disallowed the string '0'),
in addition to being impossible to set a posts message format
property to FORMAT_MOODLE (integer 0).
2021-03-15 12:49:06 +00:00
Paul Holden 23fd19658d MDL-70924 course: ensure required fields present when getting courses. 2021-03-15 12:46:49 +00:00
Mihail Geshoski 2551709dbd MDL-44613 mod_assign: Automate testing of the assignment availability 2021-03-15 20:01:36 +08:00
Mihail Geshoski 9d2f8acfb4 MDL-44613 tool_behat: Update datetime format usages to strftime
Updates all existing datetime format usages to strftime in the
'time to timestamp' transformation in tool_behat behat tests.
2021-03-15 20:01:36 +08:00
Mihail Geshoski 6484e5ae81 MDL-44613 core_message: Update datetime format usages to strftime
Updates all existing datetime format usages to strftime in the
'time to timestamp' transformation in core_message behat tests.
2021-03-15 20:01:36 +08:00
Mihail Geshoski 7726160ef3 MDL-44613 behat: strftime format in time to timestamp transformation
Modifies the 'string time to timestamp' behat trasformation to use
userdate() instead of date(). The userdate() method is generally used
throught Moodle for constructing formatted date strings and this change
will provide more consistency and prevent any potential behat failures.
Therefore, if the date format is defined in the given trasformation, it
has to be strftime compatible. Example:
'I should see "##tomorrow noon##%A, %d %B %Y, %I:%M %p##"'
2021-03-15 20:01:36 +08:00
Adrian Greeve 936f22755c Merge branch 'MDL-70306-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-03-15 11:14:51 +08:00
Peter Dias d199b23598 MDL-70306 auth: Update the thirdpartylib.xml 2021-03-15 11:10:23 +08:00
AMOS bot f2ff9d8256 Automatically generated installer lang files 2021-03-13 00:07:27 +00:00
Jun Pataleta 7eb9ddc5ae MDL-70959 completion: Fix unit tests for get_data()
The unit tests for completion_info::get_data() does not make a lot of
sense with mocking being incorrectly used and the actual functionality
is not being properly tested. I have rewritten the test to use actual
cm_info instances and data providers for better coverage.
2021-03-12 13:34:58 +08:00
Jun Pataleta 3afc0edaf9 MDL-70959 completion: Documentation improvements
* Fix typo in $cm parameter's type in PHPDoc
* Improve the comment to better explain the logic why fetching the
completion data for the whole course can only be done when caching is
used.
Even if $wholecourse is set to true, there's no point in fetching the
completion data for all the course modules unless we're caching the
results.
2021-03-12 13:34:55 +08:00
Sara Arjona 6b804f9e1f weekly release 3.10.2+ 2021-03-11 17:18:50 +01:00
Sara Arjona 201734b465 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-03-11 17:18:49 +01:00
Adrian Greeve cb8a282e05 Merge branch 'MDL-66025-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-11 11:40:39 +08:00
Adrian Greeve 3f1a70c171 Merge branch 'MDL-71026-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-03-11 11:02:44 +08:00
Eloy Lafuente (stronk7) dc9f2d2509 Merge branch 'MDL-70726-3.10' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-03-11 00:11:52 +01:00
Eloy Lafuente (stronk7) acd3b26df0 Merge branch 'MDL-70789-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-10 23:52:54 +01:00
Eloy Lafuente (stronk7) d5e880ca73 Merge branch 'MDL-70967-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2021-03-10 23:35:08 +01:00
AMOS bot f1e7a22672 Automatically generated installer lang files 2021-03-10 00:07:21 +00:00
Paul Holden 2730c1a987 MDL-69036 theme_boost: consistent table row hovering for links.
When hovering over table rows with the `dimmed_text` class we
should consistently set the text/link colour.

Co-Authored-By: Mikel Martín <mikel@moodle.com>
2021-03-09 16:22:42 +00:00
Andrew Nicols 3f87850bc2 MDL-70780 customfield: Address random behat fails
A number of behat fails have been creeping in with the customfield code
as behat is moving onto the next step before the current step finishes.

This change introduces some additional pending JS tracking to prevent
this.
2021-03-09 07:52:24 +08:00
AMOS bot a7e720be5f Automatically generated installer lang files 2021-03-07 00:07:20 +00:00
Eloy Lafuente (stronk7) 15f3dddd04 Moodle release 3.10.2 2021-03-06 18:03:57 +01:00
AMOS bot b0aa3ba6af Automatically generated installer lang files 2021-03-06 00:07:19 +00:00
Sara Arjona c6f3ecb4f0 weekly release 3.10.1+ 2021-03-05 16:01:41 +01:00
Sara Arjona 573158a4f3 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-03-05 16:01:40 +01:00
Alexander Bias e1fcbc9d3d MDL-71059 repository_contentbank: set default returntype
The content bank was designed for making easier to reuse content.
So "Link to the file" should be the default option when using the
contentbank repository, in order to let teachers modify their
content in the content bank and update automatically it everywhere
is used.
2021-03-05 11:34:38 +01:00
Amaia Anabitarte f8b584f09a MDL-70726 behat: Fixing existing fail tests
Some of the current behat tests were wrong but not failing because of the bug in 'should not exist' step.
Once the bug is fixed, we must fix also wrong behats.
2021-03-05 14:08:55 +07:00
Ilya Tregubov b33790d932 MDL-69680 lib: Fix behat test backup_and_restore.feature 2021-03-04 22:51:28 +01:00
Paul Holden 627fcc0ebc MDL-71048 lang: fix null equality check of lang string args. 2021-03-04 19:43:55 +00:00
Marina Glancy 37ff88f18d MDL-71039 core_form: support valuehtmlcallback in autocomplete inline 2021-03-04 13:39:51 +01:00
Thinh Pham bbdd616d5c MDL-70727 Behat: function scrollIntoView not working in the app 2021-03-04 13:37:13 +07:00
Ilya Tregubov 0e0b494d4a MDL-69680 lib: Replace deprecated jQuery functions 2021-03-04 12:47:56 +08:00
Ilya Tregubov b61c7fe0f9 MDL-69680 lib: Update jQuery version in Moodle files 2021-03-04 12:47:56 +08:00
Ilya Tregubov 044754dddb MDL-69680 lib: Upgrade jQuery lib to 3.5.1 2021-03-04 12:47:56 +08:00
Eloy Lafuente (stronk7) c25ae6986c Merge branch 'MDL-70424-auth-avoid-changes-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2021-03-04 00:29:21 +01:00
Brendan Heywood f5e822222d MDL-70424 auth: Avoid random changes to $CFG->auth 2021-03-04 09:30:17 +11:00
Ilya Tregubov 67aa4abd73 MDL-70767 feedback: Prevent xss in feedback answer text. 2021-03-03 23:09:09 +01:00
Sara Arjona f3e6ed90d0 Merge branch 'MDL-68721-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE 2021-03-03 17:51:31 +01:00
Ferran Recio cfd58aae3e MDL-68721 mod_h5pactivity: report acceptance tests 2021-03-03 17:23:24 +01:00
Paul Holden 822eea5638 MDL-65552 block_activity_results: correct Behat tests for idnumbers.
Teachers can see user idnumber fields only when they are configured
identity fields. Students cannot.
2021-03-03 23:14:47 +08:00
Marina Glancy 9c29fcaae0 MDL-65552 user: escape idnumber and email in table_sql 2021-03-03 23:14:47 +08:00
Paul Holden bee5d9d27e MDL-65552 user: escape idnumber field on output.
This commit also corrects parameter definition of the field to
match core_user.
2021-03-03 23:14:47 +08:00
Sara Arjona 695e05f1e8 Merge branch 'MDL-70125_310-3' of git://github.com/mdjnelson/moodle into MOODLE_310_STABLE 2021-03-03 15:47:37 +01:00
Sara Arjona 5a407772c7 Merge branch 'MDL-67494-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-03-03 11:49:20 +01:00
Sara Arjona 82f2fe02e6 Merge branch 'MDL-67119-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2021-03-03 11:11:41 +01:00
Ilya Tregubov f81bc6488d MDL-71026 user: Fix incorrect get_string call. 2021-03-03 11:44:23 +02:00
Jun Pataleta b9a6effccb Merge branch 'MDL-70987-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-03-03 16:42:03 +08:00
Simey Lameze 7108bf827d MDL-67494 calendar: user_delete_user should delete all user events 2021-03-03 16:31:24 +08:00
Simey Lameze e5ce3297ba MDL-67494 calendar: privacy provider should not delete shared events 2021-03-03 16:31:24 +08:00
Simey Lameze 0f7ba5c1d2 MDL-67494 calendar: shared subscriptions should not set userid to 0 2021-03-03 16:31:24 +08:00
Simey Lameze 45266a3611 MDL-67494 calendar: only user overrides should retain userid 2021-03-03 16:31:24 +08:00
Simey Lameze bc6fa0ad98 MDL-67494 calendar: set userid to zero for shared events 2021-03-03 16:31:24 +08:00
Simey Lameze b528e38d53 MDL-67494 calendar: step to set userid 0 to all shared events 2021-03-03 16:31:22 +08:00
Simey Lameze d6d923a26a MDL-67494 calendar: add logic for category events in get_context 2021-03-03 16:27:05 +08:00
Jun Pataleta 970fc5dfd5 Merge branch 'MDL-71009_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-03-03 16:22:37 +08:00
Sara Arjona d7136fa135 Merge branch 'MDL-69097_310' of https://github.com/inigozendegi/moodle into MOODLE_310_STABLE 2021-03-03 09:06:58 +01:00
Jun Pataleta 14f98eefcf Merge branch 'MDL-70995-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-03 15:05:15 +08:00
Jun Pataleta 15f6a8977a Merge branch 'MDL-69883-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-03 14:34:44 +08:00
Andrew Nicols cd10e95fd9 Merge branch 'MDL-70268-310-2' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-03-03 12:22:34 +08:00
Peter Dias f50885a3a4 MDL-70268 core: Update the oauthlib to exclude scope if none provided 2021-03-03 12:06:24 +08:00
AMOS bot 17f6e10e4e Automatically generated installer lang files 2021-03-03 00:07:21 +00:00
Paul Holden 69dc0ef1cf MDL-70822 enrol: respect capability to view other users profile.
When retrieving courses of another user via web services, we should
respect the capability to view that users profile in a given course.
2021-03-02 23:44:24 +01:00
Sander Wind 3f9d4a08a5 MDL-70668 auth: Fix secret validation during user confirmation
Co-authored-by: Michael Hawkins <michaelh@moodle.com>
2021-03-02 23:44:24 +01:00
Eloy Lafuente (stronk7) 5d6e97dabb Merge branch 'MDL-70340-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2021-03-02 23:33:08 +01:00
Víctor Déniz 45a7f417ce Merge branch 'MDL-70676-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE
Fixed mod/workshop/db/upgrade.php: \xmldb_field::getNotNull()
does not verify if the column is nullable in the database.
2021-03-02 22:10:14 +00:00
Peter Dias 62d098d787 MDL-59293 block_onlineusers: Update behat tests 2021-03-02 16:09:07 +00:00
Peter Dias 6cc044522a MDL-59293 block_onlineusers: Check whether current user can view online users
- Removed block from site admin.
- Blocked guest from viewuserlist cap
2021-03-02 16:09:07 +00:00
Ilya Tregubov ff09683e6c MDL-70676 workshop: Allow empty grades. 2021-03-02 13:44:54 +02:00
Sara Arjona d65a32ba29 Merge branch 'MDL-67515-310' of git://github.com/vmdef/moodle into MOODLE_310_STABLE 2021-03-02 11:21:33 +01:00
Jun Pataleta 4ddc2a627c Merge branch 'MDL-70457_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-03-02 17:39:20 +08:00
Víctor Déniz aa0d546355 Merge branch 'MDL-70172-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-03-02 09:17:10 +00:00
Paul Holden 7bbab5d400 MDL-71022 gradereport_history: prevent double escaping of users.
The user identity fields are already escaped by the AJAX endpoint
that returns them, we don't need to do it again at the client.
2021-03-02 09:14:40 +00:00
Víctor Déniz ae9785389a MDL-67515 tool_customlang: Ignore invalid component strings
After uninstalling a plugin, the translated strings remain in
tool_customlang table, throwing an exception when trying to localise
any strings. Currently there is no mechanism to
clean up customlang tables and files during the uninstall process,
so with this patch the invalid components will be ignored.
2021-03-02 09:09:16 +00:00
AMOS bot 5f4af646ee Automatically generated installer lang files 2021-03-02 00:07:19 +00:00
Eloy Lafuente (stronk7) c228509061 Merge branch 'MDL-67974-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-03-01 22:33:39 +01:00
Shamim Rezaie 8ec7ddb92b MDL-70172 output: pages with main logo should have a first-level header 2021-03-02 05:41:50 +11:00
Shamim Rezaie af390c4495 MDL-70172 output: Fix empty links
The approach taken is inline with font-awesome documentation:
https://fontawesome.com/how-to-use/on-the-web/other-topics/accessibility
2021-03-02 05:39:49 +11:00
Eloy Lafuente (stronk7) ded345c09a Merge branch 'MDL-70912-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-03-01 16:47:47 +01:00
Sara Arjona 5ecae0a17e Merge branch 'MDL-68735_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-03-01 16:17:40 +01:00
Eloy Lafuente (stronk7) 16deaaf095 Merge branch 'MDL-70913-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-03-01 14:22:23 +01:00
Sara Arjona 91d3150e6a MDL-70913 core_badges: Use and update properly sortorder
Sortorder field in badge_external_backpack was updated with a wrong
value. This patch fixes this behaviour and adds sortorder as
sorting criteria for displaying the list of site backpacks.

In the phpunit method reviewed for covering this, a couple of
assertEquals() calls have been changed too to put the expected value
first.
2021-03-01 13:10:37 +01:00
Thong Bui 1de403d9b7 MDL-70726 behat: should_not_exist function does not work correctly 2021-03-01 17:50:36 +07:00
Eloy Lafuente (stronk7) 930c1a303f Merge branch 'MDL-70931-310-xmldbeol' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-03-01 10:01:14 +01:00
Eloy Lafuente (stronk7) aacb7a3cda Merge branch 'MDL-70941-310' of git://github.com/dravek/moodle into MOODLE_310_STABLE 2021-03-01 09:54:18 +01:00
Eloy Lafuente (stronk7) 6e43990254 Merge branch 'MDL-70910-310' of git://github.com/dravek/moodle into MOODLE_310_STABLE 2021-03-01 09:50:16 +01:00
Eloy Lafuente (stronk7) 7556d45c17 Merge branch 'MDL-70964-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-03-01 09:34:09 +01:00
AMOS bot d19433e901 Automatically generated installer lang files 2021-03-01 00:07:22 +00:00
AMOS bot 08dae87267 Automatically generated installer lang files 2021-02-28 00:07:20 +00:00
AMOS bot 565a9c2af5 Automatically generated installer lang files 2021-02-27 00:07:24 +00:00
David Matamoros fefdb9ad68 MDL-70941 contentbank: fix empty equality check when renaming content 2021-02-26 14:34:42 +01:00
Tim Hunt 5f0e09f367 MDL-71009 question bank: escape idnumbers when displayed 2021-02-26 12:48:11 +00:00
Eloy Lafuente (stronk7) 5bb3ac5c9a MDL-68735 env: Moodle 3.8.x, 3.9.x and 3.10.x do not support PHP 8.0 2021-02-26 13:08:07 +01:00
David Matamoros 384e6b03b1 MDL-70910 contentbank: fix for using contentid not validated 2021-02-26 12:02:25 +01:00
Eloy Lafuente (stronk7) d921a644ba MDL-70457 forms: php74 fix for the (not used in core) date element
Curly brackets to access by index to strings or arrays is
deprecated since php74.
2021-02-26 11:55:32 +01:00
Amaia Anabitarte 60fcd69368 MDL-67119 core_analytics: Analyse users once per course
User's activity in a course should be analysed only once
no matter the number of enrolments the user has in that course.
2021-02-26 11:48:09 +01:00
Jun Pataleta 3799c7f535 weekly release 3.10.1+ 2021-02-26 13:42:53 +08:00
Jun Pataleta e8425ed3af Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-02-26 13:42:52 +08:00
David Mudrák 4fc700ec96 MDL-70964 lang: Use the fixed strings in tests 2021-02-25 16:35:58 +01:00
Helen Foster c9ee7a2092 MDL-70964 lang: Import fixed English strings (en_fix) 2021-02-25 16:35:34 +01:00
Jun Pataleta 54a1d40758 Merge branch 'MDL-70169-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-02-25 12:29:30 +08:00
AMOS bot 92a8afc1e4 Automatically generated installer lang files 2021-02-25 00:07:24 +00:00
Paul Holden 46a52c6ad2 MDL-69883 message: fix lazy loading of conversations.
Set max-height on each container section rather than the container
itself, so that each can respond to the scrollBottom event within
the lazy loading module (which handles the overflow itself).
2021-02-24 22:01:37 +00:00
Paul Holden ab5e184301 MDL-70995 user: format group names in course participants filter. 2021-02-24 19:26:10 +00:00
Iñigo Zendegi 8b8c96ff3c MDL-69097 mod_forum: Apply filters to whole forum grading 2021-02-24 17:12:02 +01:00
Víctor Déniz ae9cf72fb6 Merge branch 'MDL-51111-muc-reset-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2021-02-24 14:08:25 +00:00
Brendan Heywood 42ddf9c0da MDL-51111 cache: Don't lock and write the config file if unchanged 2021-02-24 12:44:38 +11:00
Andrew Nicols 00f23b218a MDL-70987 core_form: Use correct id for elementid during validation
The id of the formid was being passed instead of the elementid.
2021-02-24 09:06:37 +08:00
Sara Arjona 07685e8116 MDL-67974 core_badges: Recovered expired stamp
Expired stamp icon displayed over the badge images has been added
again to CSS (it was lost at any point).
2021-02-23 15:32:57 +01:00
Sara Arjona 729b244321 MDL-67974 core_badges: Badge expiry date when hover
Text displayed for expired badges when the user hovers over the
warning (!) icon has been fixed in the "Issued badge information"
page.
2021-02-23 15:32:57 +01:00
Eloy Lafuente (stronk7) 147cd2557c Merge branch 'MDL-43697-310' of https://github.com/praxisdigital/moodle into MOODLE_310_STABLE 2021-02-22 23:10:12 +01:00
Marina Glancy 6578994426 MDL-70967 enrol_meta: fix error in unittest 2021-02-22 18:06:43 +01:00
Mark Nelson fbef841ee3 MDL-70125 core_grade: do not change overridden status during regrading 2021-02-22 17:35:38 +08:00
AMOS bot 6a4f5a7d80 Automatically generated installer lang files 2021-02-22 00:07:22 +00:00
Andrew Nicols 4e25ca4aad Merge branch 'MDL-70879_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-02-22 07:51:00 +08:00
Daniel Kristian Steffensen 8fd59d9009 MDL-43697 backup: Archived badges are restored during course restore 2021-02-19 15:50:13 +01:00
Eloy Lafuente (stronk7) eda36d1eab MDL-70879 behat: Bump to Behat 3.8.x 2021-02-19 14:49:19 +01:00
Víctor Déniz 9b2400e94e weekly release 3.10.1+ 2021-02-19 12:39:15 +00:00
Víctor Déniz 051b9b8317 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-02-19 12:39:14 +00:00
AMOS bot 1f27baf216 Automatically generated installer lang files 2021-02-19 00:07:32 +00:00
Jun Pataleta 28d5ee7876 Merge branch 'MDL-47410-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-02-18 11:24:07 +08:00
Andrew Nicols 6aadb04fe1 MDL-47410 behat: Perform exact match for date_time selectors 2021-02-18 09:35:23 +08:00
David Mudrák fe6470b852 MDL-70931 xmldb: Generate install.xml files with EOL and EOF
As discussed in MDLSITE-6397, all Moodle code files should end with
single Unix-style end of line character. Files created and edited
through the XMLDB editor should follow this rule, too.
2021-02-17 21:06:00 +01:00
Víctor Déniz 858078a374 Merge branch 'MOODLE_310_MDL-70752' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-02-17 16:57:36 +00:00
Eloy Lafuente (stronk7) 317af7632a Merge branch 'MDL-70552-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-02-17 10:26:48 +01:00
Ilya Tregubov 53fcd633e5 MDL-70552 core_message: Show popup for teachers when anonymous
user completed feedback.
2021-02-17 08:43:28 +02:00
Andrew Nicols 40e11ee44a Merge branch 'MDL-47410-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-02-17 09:41:40 +08:00
AMOS bot 875ee2f1d2 Automatically generated installer lang files 2021-02-17 00:07:28 +00:00
Andrew Nicols 3b9d4c2cc8 Merge branch 'MDL-70264-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-02-17 07:26:56 +08:00
Eloy Lafuente (stronk7) 296e9ed320 Merge branch 'MDL-69562_310' of https://github.com/dvdcastro/moodle into MOODLE_310_STABLE 2021-02-16 22:39:36 +01:00
Eloy Lafuente (stronk7) be526048f6 Merge branch 'MDL-70525_310' of https://github.com/TomoTsuyuki/moodle into MOODLE_310_STABLE 2021-02-16 19:56:30 +01:00
Sara Arjona 9f2a875b0f MDL-70912 mod_data: Add filepicker to the H5P Atto button
The filepicker wasn't displayed fot the H5P Atto button when a text
area database field was created because some options were missing
in the textarea field class.
2021-02-16 18:17:26 +01:00
AMOS bot 8f86550c41 Automatically generated installer lang files 2021-02-16 00:07:25 +00:00
Paul Holden 7b4f2014c3 MDL-66025 user: require message content in bulk action.
Also import missing 'core/notification' dependency.
2021-02-14 20:10:35 +00:00
AMOS bot 579a25273d Automatically generated installer lang files 2021-02-13 00:07:29 +00:00
Simey Lameze 9ff0798864 MDL-70169 login: fix accessibility issues 2021-02-12 12:12:58 +08:00
Paul Holden fd80c7a6b7 MDL-70789 theme_boost: fix double click on drawer hiding content.
If the drawer toggle button was clicked in quick succession to close
and then re-open, then the delayed Aria.hide method would be called
which hid the drawer content when it finished opening.
2021-02-11 21:45:51 +00:00
Sara Arjona dcee7949db MDL-70264 badges: remove badges/oauth2callback.php
File badges/oauth2callback.php has been removed and now badges
API will use admin/oauth2callback.php because it makes no sense having
it twice.

Credits go to Andrew Nicols for raising it!
2021-02-11 16:58:48 +01:00
Sara Arjona 2e96a6508e weekly release 3.10.1+ 2021-02-11 14:54:47 +01:00
Sara Arjona 81e59a9ae7 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-02-11 14:54:45 +01:00
Mihail Geshoski 880224da1b MDL-47410 mod_assign: Update mod_assign behat tests
Updates the mod_assign behat tests to utilize the ability to
conviniently populate the datetime selector fields.
2021-02-11 12:13:04 +08:00
Mihail Geshoski 07d73cc416 MDL-47410 behat: Support selection from the datetime selector element
Adds behat support for selecting date and time from a datetime selector
element. The passed values should represent a textual date and time
description wrapped in '##' (e.g. '##first day of January 2020 08:00##',
'##1 Jan 2020 10:30##'). Also, the value 'disabled' is valid and can be
used to disable the datetime selector element.
2021-02-11 12:13:04 +08:00
Mihail Geshoski c68967af02 MDL-47410 tool_licensemanager: Update tool_licensemanager behat tests
Updates the tool_licensemanager behat tests to utilize the ability to
conviniently populate the date selector fields.
2021-02-11 12:13:04 +08:00
Mihail Geshoski 7a868e586f MDL-47410 behat: Support date selection from the date selector element
Adds behat support for selecting a date from the date selector element.
The passed values should represent a textual date description wrapped
in '##' (e.g. '##first day of January 2020##', '##1 Jan 2020##'). Also,
the value 'disabled' is valid and can be used to disable the date
selector element.
2021-02-11 12:13:02 +08:00
Mihail Geshoski c9ecca60c1 MDL-47410 behat: Create custom selector for the date and datetime fields
Creates a custom field selector to locate the requested date or datetime
form fields.
2021-02-11 12:11:15 +08:00
Mihail Geshoski 8031c68d12 MDL-47410 behat: Move logic from guess_type() to a separate method
Moves the logic from guess_type() to a separate protected method
get_field_instance_for_element(). This would be quite useful for
form field classes as they can now use this method when there is
a need to determine the type of a given node element.
2021-02-11 12:11:15 +08:00
Mihail Geshoski 41d8472136 MDL-47410 behat: Use data-fieldtype attribute to guess the field type
The data-fieldtype attribute (if present) should be also utilized in
guess_field_type() and match the behavior in get_field_node_type().
2021-02-11 12:11:15 +08:00
Mihail Geshoski d2304bfbe5 MDL-47410 form: Add data-fieldtype attribute to checkbox inline element
Includes the data-fieldtype attribute to the checkbox inline form
element. This element does not extend the parent inline element
template due to its specific nature and therefore this attribute was
missing.
2021-02-11 12:11:15 +08:00
Adrian Greeve 26ec6b3f69 Merge branch 'MDL-70513_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-11 10:05:51 +08:00
Adrian Greeve a057e10630 Merge branch 'MDL-69867-310_display_grade_with_scale' of git://github.com/moffe42/moodle into MOODLE_310_STABLE 2021-02-11 09:24:38 +08:00
AMOS bot 47373b3d37 Automatically generated installer lang files 2021-02-11 00:07:24 +00:00
Sara Arjona b21bbfbb53 Merge branch 'MDL-70732-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2021-02-10 17:20:36 +01:00
Sara Arjona 9dd33a7e4a Merge branch 'MDL-70796_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-10 16:50:15 +01:00
Sara Arjona 4205f0d819 Merge branch 'MDL-69101_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-10 15:12:05 +01:00
Sara Arjona eb7c0f7d12 Merge branch 'MDL-70631-310-unzip' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-02-10 12:38:18 +01:00
Sara Arjona 064c3f2b4b Merge branch 'MDL-70736_MOODLE_310_STABLE' of https://github.com/TomoTsuyuki/moodle into MOODLE_310_STABLE 2021-02-10 08:28:26 +01:00
Jacob Christiansen 17d2e4a79d MDL-69867 mod_assign: Display current grade with scale value
When using workflow we show the current grade with its scale value
instead of the internal index
2021-02-10 08:08:58 +01:00
John Yao c6df8dc20b MDL-65390 accessibility: correct focus after "Show more" clicked 2021-02-09 15:11:12 +01:00
Sara Arjona 8f66f8807d Merge branch 'MDL-70173-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-02-09 08:29:26 +01:00
Sara Arjona 94fa7da52a Merge branch 'MDL-70377_310' of https://github.com/mkassaei/moodle into MOODLE_310_STABLE 2021-02-09 08:23:36 +01:00
Shamim Rezaie c61b50e6a0 MDL-70173 core: Use a meaningful first level header 2021-02-09 16:32:45 +11:00
Shamim Rezaie 950e44c82f MDL-70173 theme_boost: Fix empty link issue on the "Go to top" button
On behat, we have to use a more specific test step if we are looking
for a "Go" button on a modal. The reason is that the html of the modal
content is put after the html of the "Go to top" button, so behat
may find the "Go to top" button if we just look for "Go".
2021-02-09 16:32:45 +11:00
Shamim Rezaie 71b49a5b87 MDL-70173 theme_boost: Increase the size of notification counter
WAVE considers any text with the size of 10px or below really small.
Increasing the font size of the navbar counter by 1px should not make a
big negative impact on the design, but improves accessibility.
2021-02-09 16:32:45 +11:00
Shamim Rezaie e7b0985d5e MDL-70173 output: All pages should have a heading
In MDL-63040, it was decided that the page header for the dashboad page
should be removed.
However, Based on Success Criteria 1.3.1 and 2.4.6 from the WebAIM's
WCAG 2 Checklist, all pages should have an <h1> element.
So I put an sr-only heading on the dashboard and all other pages, where
no page header is shown.
2021-02-09 16:32:45 +11:00
Shamim Rezaie ac4b7f1193 MDL-70173 dashboard: ARIA role presentation conflicted the empty alt
The markup <img role="presentation" alt="alt text"> is contradictory.

According to https://www.w3.org/TR/2017/WD-wai-aria-practices-1.1-20170628/examples/presentation/PresentationRoleExamples.html
 It is recommended that authors instead use empty alt text (alt="")
 where they use role="presentation".
2021-02-09 16:32:45 +11:00
Shamim Rezaie 30354e039a MDL-70173 message: Fix empty link 2021-02-09 16:32:40 +11:00
Shamim Rezaie a9c9d74fa0 MDL-70173 output: use an empty alt to hide user pic from screen readers
There is no need to use WAI-ARIA to hide images from screen readers.
See https://www.w3.org/WAI/tutorials/images/decorative/
2021-02-09 16:15:57 +11:00
Tomo Tsuyuki 0570323dab MDL-70525 tool_profiling: Cannot import profiling file
Change type from int to integer to be able to have big numbers
2021-02-09 10:15:48 +11:00
Mahmoud Kassaei fc538e946a MDL-70377 qtype_essay: When reviewing an attempt as a teacher
In the Response history table, Action Saved: does not display the value
of $a in the language string.
2021-02-08 16:52:48 +00:00
Andrew Nicols 17c85b704c Merge branch 'MDL-70614-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-02-08 10:36:15 +08:00
Andrew Nicols 340bd2726a Merge branch 'MDL-70725-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-02-08 10:30:28 +08:00
AMOS bot 0ad3e036d2 Automatically generated installer lang files 2021-02-06 00:07:24 +00:00
Tim Hunt cfcfaba862 MDL-70796 count_words: match the count from LibraOffice & MS Word 2021-02-05 15:28:34 +00:00
Amaia Anabitarte 582f636756 MDL-70732 behat: Adding second parameter to ExpectationException() 2021-02-05 11:01:38 +01:00
Sara Arjona 726d5dfc65 weekly release 3.10.1+ 2021-02-04 14:56:20 +01:00
Sara Arjona de8df592c9 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-02-04 14:56:18 +01:00
Mikhail Golenkov 30646de80a MDL-70752 restore: Fix remote file recovery 2021-02-04 19:21:45 +11:00
Tomo Tsuyuki bf7f52d775 MDL-70736 gradingform_guide: Fix loading marking guide template issue
Do not check grade item name if it is from shared template.
2021-02-04 16:15:44 +11:00
Andrew Nicols b1cf84453d Merge branch 'MDL-69748-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-02-04 11:52:21 +08:00
Shamim Rezaie e0f895ea8e MDL-69748 core: Fix hideif issue with array elements
Changed the element selector to get all array elements,
whether named or unnamed. The previus selector was only
working for elements that thir names were like name="something[]".
It was not working for name="something[a]" elements.
2021-02-04 14:38:53 +11:00
Andrew Nicols 975c9f7a82 Merge branch 'MDL-70579-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-02-04 09:30:20 +08:00
AMOS bot 32e56d6e65 Automatically generated installer lang files 2021-02-04 00:07:29 +00:00
Eloy Lafuente (stronk7) adc56c3df0 MDL-70741 capability overview: missing whitespace after placeholder 2021-02-04 00:01:12 +01:00
Tim Hunt 546ca90251 MDL-70513 quiz manual grading: use formchangechecker to avoid dataloss 2021-02-03 16:10:30 +00:00
David Mudrák 1d32d1d64f MDL-70631 files: Replace hard-coded value with FL_ENC_RAW constant
This is not related to the issue but I noticed it while trying to debug
it.

Back when this line was introduced in 9c140a681e, the ZipArchive had
not yet exposed this flag as a constant. It was added later with PHP
7.0.8 and we can switch to using it now.
2021-02-03 16:10:28 +01:00
David Mudrák 31f71d93b9 MDL-70631 files: Fix performance of zip_packer::extract_to_pathname()
The original implementation was based on ZipArchive::getStream() which
turns out to be very slow and if the archive contains many files, the
unzipping performance is very slow.

The patch changes the implementation to use ZipArchive::extractTo()
unless the extracted entry path contains a folder name ending with dot
(such as some/path./to/file.txt). There is a known upstream bug in the
PHP ZIP extension #77214 (also #74619 and #69477) so that we fall back
to keep using the stream in those cases.
2021-02-03 16:10:28 +01:00
Sara Arjona eb8938e15b Merge branch 'MDL-70705-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-02-03 15:33:19 +01:00
Luca Bösch d49c11e4ec MDL-70705 block_blog_recent: support multilang blog entry titles 2021-02-03 15:15:25 +01:00
Sara Arjona a0183a8251 Merge branch 'MDL-70741_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-03 14:49:51 +01:00
David Castro 6c4989dca7 MDL-69562 admin: Allow getting IP from all sources. 2021-02-03 07:22:48 -05:00
Eloy Lafuente (stronk7) 656fc5e11b Merge branch 'MDL-70711-M310' of git://github.com/kordan/moodle into MOODLE_310_STABLE 2021-02-03 13:04:11 +01:00
Sara Arjona fec01c3415 Merge branch 'MDL-70163-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-02-03 12:25:41 +01:00
Sara Arjona 27bdf9b710 Merge branch 'MDL-70535-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-02-03 11:19:35 +01:00
Sara Arjona e6803f9345 Merge branch 'MDL-67959-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-02-03 10:50:47 +01:00
Tim Hunt 7015334d6d MDL-69101 Essay/Moodle XML: recent new settings not imported/exported 2021-02-03 08:14:00 +00:00
Sara Arjona b6f7ebe5e6 Merge branch 'MDL-70621-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-02-03 09:02:59 +01:00
Sara Arjona 5f2879986a Merge branch 'MDL-68970_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-03 08:51:23 +01:00
Luca Bösch b53915eabb MDL-70621 mod_glossary: use glossary rsstype string. 2021-02-03 08:34:46 +01:00
Luca Bösch a4cc053dd1 MDL-70621 mod_forum: use forum rsstype string. 2021-02-03 08:34:46 +01:00
Andrew Nicols 101667dc59 Merge branch 'MDL-56772-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-02-03 10:57:51 +08:00
Andrew Nicols c25da3ed87 Merge branch 'MDL-66932_M310' of https://github.com/nadavkav/moodle into MOODLE_310_STABLE 2021-02-03 10:23:58 +08:00
Andrew Nicols 82e32d8012 Merge branch 'MDL-68893-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-02-03 09:41:09 +08:00
Andrew Nicols 73822e2790 Merge branch 'MDL-68958-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-02-03 09:37:49 +08:00
Andrew Nicols a6f3c28afd Merge branch 'MDL-70339-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-02-03 09:09:22 +08:00
Víctor Déniz ed48cfd287 Merge branch 'MDL-59782-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2021-02-02 09:35:40 +00:00
Sara Arjona a9d19d3f20 Merge branch 'MDL-70574_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-02 08:20:34 +01:00
Sara Arjona 4a1748a0d8 Merge branch 'MDL-70288-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-02-02 07:59:42 +01:00
Jun Pataleta 399ed2ef31 MDL-70288 qtype: Remove unnecessary empty label string
* When a label is passed to an (advanced) checkbox and no text
  was provided, the label will be displayed on the right of the the
  checkbox element. So there's no point in passing an empty string for
  the label just to render the text to the right of the checkbox.
2021-02-02 14:21:57 +08:00
Jun Pataleta 14710e4652 MDL-70288 mod_lti: Remove unnecessary empty label string
* When a label is passed to an (advanced) checkbox and no text
  was provided, the label will be displayed on the right of the the
  checkbox element. So there's no point in passing an empty string for
  the label just to render the text to the right of the checkbox.
2021-02-02 14:21:57 +08:00
Jun Pataleta 72c7ab1fcd MDL-70288 core: Remove duplicate labels for checkbox elements
* If there's a label, the text will serve as the description of  the
element.
2021-02-02 14:21:57 +08:00
Jun Pataleta 1feb3e130d MDL-70288 theme_boost: Manage aria-describedby on form validation
* The aria-describedby attribute can be a list of element IDs that
describe the element. On form validation, the ID of the error message
container is added to this attribute which may already be containing
another ID. So we need to properly add/remove the error message ID
so that we don't delete any existing ID(s) in the aria-describedby
attribute during form validation.
2021-02-02 14:21:57 +08:00
Eloy Lafuente (stronk7) 120ab864a1 Merge branch 'MDL-46256_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-01 23:20:23 +01:00
Eloy Lafuente (stronk7) 4be8f22e59 Merge branch 'MDL-70648-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-02-01 19:19:46 +01:00
Sara Arjona 63c16676ff Merge branch 'MDL-70625-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-02-01 15:37:09 +01:00
Sara Arjona 66de72d17f Merge branch 'MDL-70734-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-02-01 12:30:21 +01:00
Sara Arjona fc6d356416 Merge branch 'MDL-70740-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-02-01 11:25:22 +01:00
Paul Holden e2d9c997d5 MDL-70614 user: consistent roles spacing in course profile. 2021-02-01 07:54:21 +00:00
Andrew Nicols a7d8af4a9e MDL-70734 behat: Increase the WebDriver Curl timeout 2021-02-01 09:50:08 +08:00
AMOS bot 901e09e890 Automatically generated installer lang files 2021-02-01 00:07:28 +00:00
Andrew Nicols 1cb8980be0 MDL-70740 behat: Composer bump for new version of Mink Driver 2021-01-31 20:26:35 +08:00
AMOS bot 57efb76aba Automatically generated installer lang files 2021-01-31 00:07:24 +00:00
Luca Bösch 3394914940 MDL-68893 mod_data: use own RSS feed string.
AMOS BEGIN
 CPY [rsstype,core],[rsstype,mod_data]
AMOS END
2021-01-29 23:19:57 +01:00
Tim Hunt 78bcf502a3 MDL-70741 capability overview: avoid errors from orphan contexts 2021-01-29 20:50:41 +00:00
Víctor Déniz cd2e91aa18 weekly release 3.10.1+ 2021-01-29 17:13:20 +00:00
Víctor Déniz f72bb528e8 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-01-29 17:13:14 +00:00
Jake Dallimore 629905943f Merge branch 'MDL-66979-310-7' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-01-29 15:44:01 +08:00
Andrew Nicols 1f4b80c9f1 MDL-66979 behat: Mark some tests as being slow
Uses of the httpsreplace and customlang tools are known to be extremely
slow.

In our CI infrastructure on slwoer DBs, the customlang tool can take
over 90 seconds to load the page, whilst the httpsreplace tool can take
up to about 60 seconds.

These changes set appropriate timeout factors to increase the timeout
accordingly.
2021-01-29 14:18:54 +08:00
Andrew Nicols 9cb46e24f2 MDL-66979 behat: Add a step to set a timeout factor for a test 2021-01-29 14:18:54 +08:00
Eloy Lafuente (stronk7) 0db430c5a7 MDL-66979 behat: Goutte driver doesn't implement setTimeouts()
Also, change:

get_real_timeout(30000)

to:

get_real_timeout(30) * 1000

because the original functions are defined to use seconds, and
having the 1000 around will help us detecting cases in the case
of a hypothetical review of uses.
2021-01-29 14:18:46 +08:00
Jun Pataleta b8a0eb2472 MDL-67959 mod_forum: Display group pictures in forum only if available
Displaying a default group picture in forum posts leads to confusion,
so better to not display a default group picture when the group
picture is not set for the group.
2021-01-29 12:30:19 +08:00
AMOS bot 45978714d4 Automatically generated installer lang files 2021-01-29 00:07:27 +00:00
Eloy Lafuente (stronk7) 219694730c MDL-66979 behat: Goutte driver doesn't implement setTimeouts()
Also, change:

get_real_timeout(30000)

to:

get_real_timeout(30) * 1000

because the original functions are defined to use seconds, and
having the 1000 around will help us detecting cases in the case
of a hypothetical review of uses.
2021-01-28 17:12:15 +01:00
Bas Brands b36bc055d4 MDL-59782 core_question: improve questionbank highlighting 2021-01-28 11:08:05 +01:00
Eloy Lafuente (stronk7) d2a001ed67 Merge branch 'MDL-66979-310-7' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-01-28 09:09:01 +01:00
Kordan 1f6f68ad16 MDL-70711 form: deleted useless if block
get_magic_quotes_gpc() always return false since PHP 5.3 so (1 == get_magic_quotes_gpc()) is never verified.
This allows me to safetly delete what I dropped out.
2021-01-28 08:45:36 +01:00
Andrew Nicols 3a0d042395 MDL-66979 behat: Set script timeout with timeout factor 2021-01-28 15:27:49 +08:00
Andrew Nicols 889c9ca8d6 MDL-66979 behat: Correct selenium2 reference in config-dist 2021-01-28 15:08:10 +08:00
Andrew Nicols ebd36d2ac2 MDL-66979 behat: Handle driver stop failure properly
An case was found where the webdriver stop() call could fail in an
AfterScenario hook, leading to a complete rerun if no other errors were
experienced.
2021-01-28 15:07:52 +08:00
Andrew Nicols 46e121473f Merge branch 'MDL-70048-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-01-28 08:04:51 +08:00
Peter Dias c1f73e72b4 MDL-70048 dropbox: Augmented unit tests to account for additional params 2021-01-28 07:32:35 +08:00
Peter Dias 276e963f29 MDL-70048 dropbox: Update the dropbox search URL.
- Update fetch_dropbox_data to allow different result nodes and version
- Update search to the new URL with new params
- Update the get entities function to account for the change in structure.
2021-01-28 07:32:35 +08:00
Sara Arjona c856a7f9bb MDL-70725 oauth2: move expectException to separate method 2021-01-27 17:54:17 +01:00
Víctor Déniz b6aed6feaa Merge branch 'MDL-70585-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-01-27 10:52:31 +00:00
AMOS bot 7a3233a7ca Automatically generated installer lang files 2021-01-27 00:07:27 +00:00
Eloy Lafuente (stronk7) cf7eab3db1 Merge branch 'MDL-66979-310-7' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-01-26 22:45:23 +01:00
Víctor Déniz 75b7539e32 Merge branch 'MDL-70528-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-01-26 14:05:10 +00:00
Ilya Tregubov 90d42dfc84 MDL-70528 h5pactivity: Fix block can't be added to h5pactivity page. 2021-01-26 15:45:55 +02:00
Paul Holden 92d60b64a8 MDL-70163 core: fix attachment validation when localrequestdir absent.
Switch the order of operations performed when collating list of paths
from which a user can include attachments.

First collect all normalised/absolute paths then filter empty entries,
which fixes an issue where $CFG->localrequestdir could be defined but
not exist. This would lead to an empty string being passed to strpos
which triggered a PHP warning.

Co-authored-by: Peter Burnett <peterburnett@catalyst-au.net>
2021-01-25 19:53:53 +00:00
Tim Hunt dce2e6c03a MDL-68970 quiz: prevent page caching during attempts
This ensures that the page reloads if the student uses
the Back or Forwards buttons within an attempt. This
avoids questions being in a stale state, or
the timer showing the wrong time.

Thanks to Jake Dallimore and Russell Boyatt for suggestions
which lead to this fix.
2021-01-25 18:35:22 +00:00
Peter Dias 6c364c0011 MDL-70339 mod_lti: Use the convenience function to get the right img 2021-01-25 13:39:14 +08:00
Peter Dias b6c5df8181 MDL-68958 mod_imscp: Return manifestfilename as default response. 2021-01-25 13:23:26 +08:00
Peter Dias 120c2ee7a6 MDL-56772 core: Update the picker styles for rtl langs 2021-01-25 11:36:45 +08:00
Andrew Nicols 058394a412 MDL-66979 behat: Warn about old behat.yml file location 2021-01-23 20:44:53 +08:00
AMOS bot 2acb070a39 Automatically generated installer lang files 2021-01-23 00:07:23 +00:00
Paul Holden 52bc8499aa MDL-70585 course: deeper clean of path names in course export.
This fixes an issue on those systems that don't fully support unicode
characters within zip structures, which subsequently led to broken
links when browsing downloaded course content.
2021-01-22 08:15:32 +00:00
Andrew Nicols ef4a652abe MDL-66979 behat: Rename and warn on old config 2021-01-22 14:52:14 +08:00
Andrew Nicols 5282a67615 MDL-66979 behat: Uncomment step disabled for old firefox 2021-01-22 14:52:14 +08:00
Andrew Nicols d44fdcf54c MDL-66979 behat: Pad messaging drawer
This works around an issue highlighted by MDL-70411 whereby some of the
messaging links are covered by the scrollbar in Firefox on MacOS.
2021-01-22 14:52:14 +08:00
Andrew Nicols 30e2579222 MDL-66979 behat: Work around weird gradebook focus behaviour
I can't expand this one in a sane fashion but the older JS is doing some
weird and wonderful things with focus.

The only way I could get this to behave correctly was to move away from
the field, move back to it, and then move away again. Other combinations
failed in different browsers for different reasons.
2021-01-22 14:52:14 +08:00
Andrew Nicols ce30baea59 MDL-66979 behat: availability field extends textarea
The availability behat field extends the textarea type, and therefore
needs to include this type.
2021-01-22 14:52:13 +08:00
Andrew Nicols c56395fba6 MDL-66979 behat: Improve chromeOptions configuration
Simplify the chromeOptions configuration to improve readability.
2021-01-22 14:52:13 +08:00
Andrew Nicols dabca5c457 MDL-66979 question: Improve behat test reliability
Expand all fieldsets rather than individual fieldsets.

This can fail in some situations where the page moves as the first
fieldset opens and HTML transitions take effect. This causes subsequent
fieldsets to move after WebDriver has calculated the click target.
2021-01-22 14:52:13 +08:00
Andrew Nicols 5e077b8a2b MDL-66979 mod_assign: Stop clicking the user filters
Remove the documented hack which was re-opening a popup because it
"closes for some reason". It no longer randomly closes.
2021-01-22 14:52:13 +08:00
Andrew Nicols 7984048d45 MDL-66979 behat: Switch to generators
These steps were creating content manually in an unnecessary fashion. I
had to debug some issues with features in these areas so took the time
to update them to make use of data generators, which are significantly
faster.
2021-01-22 14:52:13 +08:00
Andrew Nicols 767c5f4512 MDL-66979 behat: Remove unused var 2021-01-22 14:52:13 +08:00
Andrew Nicols 73e428979d MDL-66979 behat: Whitespace fix 2021-01-22 14:52:13 +08:00
Andrew Nicols cbb2547c32 MDL-66979 behat: Remove manually triggered events
Behat should not trigger Synthetic browser events. It is incorrect to do
so as the UI should be used to trigger events correctly.

The W3C WebDriver specification explicitly states when and where these
events will be triggered from (the browser) and therefore there is no
ambiguity and no need to synthetically trigger them from Behat.
2021-01-22 14:52:13 +08:00
Andrew Nicols 2b0b259d09 MDL-66979 group: Replace direct element interaction with steps
The W3C WebDriver leads to faster operation of individual steps which
highlights where WebDriver is moving to a new step faster than the
browser can process it.

The solution here is to use the `execute` function to interact with the
browsers as this makes use of the various wait and check steps.
2021-01-22 14:52:13 +08:00
Andrew Nicols 084973f8a2 MDL-66979 behat: Remove unnecessary steps which fail
These steps were completely pointless and were failing with the W3C
Webdriver becuase focus was never on the Update Profile button in the
first place.

At a minimum we should remove the Focus change step as it not valid, but
the following step is also pointless.
2021-01-22 14:52:13 +08:00
Andrew Nicols ac0f7dd2ab MDL-66979 scorm: Increase behat window size
On Firefox there can be some issues with ensuring that all nodes are
visible in order to click them.

This is likely an upstream geckodriver bug and not one that can be
easily addressed across all of Moodle.

In this instance the "Next" button is just outside the Visible Window,
but it is in an iFrame which is fully visible. In this situation
Firefox is unable to click the button but does not error.
2021-01-22 14:52:13 +08:00
Andrew Nicols 035d4eb72a MDL-66979 behat: Scroll nodes into view before hover
The W3C Specification does not require that a NodeElement be in the
current viewport before triggering a mouseOver. As a result the
mouseOver will generate an Exception because the element is not in the
viewport, and the X/Y co-ordinates are invalid.

To handle this the node is scrolled into view.
2021-01-22 14:52:13 +08:00
Andrew Nicols eec766f375 MDL-66979 behat: Fix window switching
Normalise switching of window contexts by setting the main window name
to a null.

Where the window has no name (null/empty), then the root context is
selected.
2021-01-22 14:52:13 +08:00
Andrew Nicols 5212bfc961 MDL-66979 behat: Use tab to blur current focus
The focus should be on something, rather than removed.

The way in which focus removal works can lead to side effects.
2021-01-22 14:52:13 +08:00
Andrew Nicols d1e52f7086 MDL-66979 behat: Update passwordunmask form field control
Update the passwordunmask form field type for behat to interact with the
form element as a human would rather than via synthetic event triggers.
2021-01-22 14:52:13 +08:00
Andrew Nicols 330b665f82 MDL-66979 behat: iFrames must have a name for switchTo
The W3C WebDriver protocol supports switching of contexts using a named
context, and not the class asscoiated with that context.
2021-01-22 14:52:13 +08:00
Andrew Nicols e89be896df MDL-66979 mod_data: Improve behat chart data step
Charts data visibility is more reliable when checked via the
aria-expanded attribute.

The isVisible attribute can cause some failures under Firefox.
2021-01-22 14:52:13 +08:00
Andrew Nicols ca2acd10c9 MDL-66979 behat: Handle JS on elements better
This change introduces a new function to execute Javascript directly on
a node.

This should not, ordinarily, be used directly by steps, but may be
required in other parts of the Behat interaction.
2021-01-22 14:52:13 +08:00
Andrew Nicols 863d68a344 MDL-66979 behat: Rename selenium config to webdriver
The PHP WebDriver Mink Driver does not necessarily require Selenium. It
supports Selenium 3 upwards, and can be used directly with ChromeDriver,
EdgeDriver, SafariDriver, GeckoDriver, and others.

It therefore uses a slightly different configuraitno path.
2021-01-22 14:52:13 +08:00
Andrew Nicols c816ca79fa MDL-66979 behat: Core updates for W3C WebDriver
This commit updates core Behat features to make use of the
php-webdriver/webdriver library instead of the legacy Instaclick
library.

Most of these changes relate to use of features of WebDriver which we
are required to use directly rather than through the Mink Driver.
2021-01-22 14:52:13 +08:00
Andrew Nicols fc021f968a MDL-66979 behat: Switch to new W3C Behat driver
This commit updates the composer dependencies to make use of the updated
version of moodlehq/moodle-behat-extension which depends upon the
php-webdriver/webdriver and relevant Mink WebDriver.
2021-01-22 14:52:13 +08:00
Jake Dallimore 2477b04d12 weekly release 3.10.1+ 2021-01-22 11:30:57 +08:00
Jake Dallimore a6af5fd054 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-01-22 11:30:54 +08:00
Tim Hunt 8321e49c8a MDL-46256 count_words: fix handling of paragraphs 2021-01-21 09:54:36 +00:00
Tim Hunt 509eef8fcf MDL-46256 count_letters: an unit tests and fix HTML editity handling 2021-01-21 09:54:36 +00:00
Tim Hunt cb9c2320b6 MDL-46256 word count: Convert existing tests to a data provider 2021-01-21 09:54:36 +00:00
Adrian Greeve b11792ac11 Merge branch 'MDL-57020-310-allow_delete_unused_scale' of https://github.com/sharidas/moodle into MOODLE_310_STABLE 2021-01-21 12:02:49 +08:00
Nadav Kavalerchik dc8a751815 MDL-66932 theme/boost: Use LTR directionality to display user % grades 2021-01-20 09:31:12 +02:00
Simey Lameze 8e6cbc6e18 MDL-70648 calendar: upgrade step to delete wrong cat events 2021-01-20 09:28:54 +08:00
Simey Lameze 33a8c2d06a MDL-70648 calendar: add form validation for category events 2021-01-20 09:26:48 +08:00
AMOS bot 9c4379153f Automatically generated installer lang files 2021-01-17 00:07:26 +00:00
Eloy Lafuente (stronk7) 00821c744c Moodle release 3.10.1 2021-01-16 16:58:29 +01:00
Paul Holden 390326fd17 MDL-70535 media_videojs: fallback to English language video player.
When current language doesn't have accompanying videojs language file
we should fallback to displaying the player in English, otherwise the
web service returns empty and a Javascript exception is triggered.
2021-01-15 13:50:47 +00:00
Sujith Haridasan cbc2b593e7 MDL-57020 scales: Allow deletion of unused scales in forum
Allow deletion of unused scales used in a
forum for the course.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-01-15 15:06:19 +05:30
Sara Arjona f420af1016 weekly release 3.10+ 2021-01-15 08:25:49 +01:00
Sara Arjona 67150560b2 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-01-15 08:25:47 +01:00
Sara Arjona 9fac7a8d59 Merge branch 'MDL-69308_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-01-14 12:03:52 +01:00
Jake Dallimore e1ca7e93d9 Merge branch 'MDL-69877-310' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2021-01-14 14:52:18 +08:00
Michael Hawkins 8bd6cfb4c4 MDL-69877 core: Added security.txt 2021-01-14 14:30:50 +08:00
AMOS bot a3afe546fd Automatically generated installer lang files 2021-01-14 00:07:23 +00:00
Eloy Lafuente (stronk7) db30a623bf MDL-69308 environment: Apply agreed changes
- PHP 7.3 required.
- Moodle 3.6 required.
- SQL*Server 2017 (aka, 14.0) required.
- Sodium PHP extension required.
2021-01-13 19:29:44 +01:00
Eloy Lafuente (stronk7) 3afcb70b3d MDL-69308 environment: 3.11 base information
This is a direct copy of the 3.10 branch to have
the changes under control in next commits.
2021-01-13 19:29:39 +01:00
Shamim Rezaie f9b58dd719 MDL-70625 core_calendar: Fix whitespace appearance in the id attribute 2021-01-14 01:59:08 +11:00
Sara Arjona 9ca6f8199e Merge branch 'MDL-70394-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-01-13 15:31:26 +01:00
Mihail Geshoski 4fec7a276d MDL-68486 auth_shibboleth: Reset convert_data if it uses dataroot file
Upgrade step that resets the 'Data modification API' (convert_data)
setting to its default value if this setting is currently configured
to use a file located within the $CFG->dataroot directory.
2021-01-13 12:35:00 +08:00
Mihail Geshoski b70a1c71e1 MDL-68486 auth_shibboleth: Prevent using dataroot files in convert_data
Prevents configuring the 'Data modification API' (convert_data) setting
to use files located within the $CFG->dataroot directory as it exposes
the site to security risks.
2021-01-13 12:35:00 +08:00
Jun Pataleta 90c450839d Merge branch 'MDL-70580-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-01-13 10:19:51 +08:00
AMOS bot b7a62b4286 Automatically generated installer lang files 2021-01-13 00:07:25 +00:00
Paul Holden 33427c7c5d MDL-70580 core: retrieve closest tree node in click handler. 2021-01-12 20:17:32 +00:00
Michael Hawkins 8fa9d159bc MDL-69911 core: Clean content passed through TeX filter 2021-01-12 10:24:26 +01:00
Ferran Recio f8f154236d MDL-67782 message: fix messages max length 2021-01-12 10:24:26 +01:00
Juan Segarra Montesinos d54cc8fbd7 MDL-69797 core_grades: Implement authorization into fetch method 2021-01-12 10:24:26 +01:00
Juan Segarra Montesinos 7e6fc779c7 MDL-69797 core_grades: Implement authorization into fetch method 2021-01-12 10:24:26 +01:00
Juan Segarra Montesinos 3467d87c80 MDL-69797 gradingform_rubric: Implement authorization into fetch method 2021-01-12 10:24:26 +01:00
Juan Segarra Montesinos 855957180a MDL-69797 gradingform_guide: Implement authorization into fetch method 2021-01-12 10:24:26 +01:00
Sara Arjona 8862b80c56 Merge branch 'MDL-70009-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-01-12 10:21:09 +01:00
Jake Dallimore 8b8142d8d9 Merge branch 'MDL-69431_Moodle_310_Validate_section_arg_modedit' of git://github.com/watson8/moodle into MOODLE_310_STABLE 2021-01-12 17:09:01 +08:00
Ilya Tregubov f0260219fa MDL-70009 h5pactivity: Split get_pluginfile_hash in two methods. 2021-01-12 09:10:57 +02:00
Jun Pataleta be36ead8b0 Merge branch 'MDL-70580-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-01-12 13:15:43 +08:00
AMOS bot f270bd8c8e Automatically generated installer lang files 2021-01-12 00:07:34 +00:00
Andrew Nicols 357909b23b MDL-70580 core: Tree nodes should check if they were clicked directly 2021-01-11 23:43:28 +00:00
Tim Hunt 84302e4a76 MDL-70574 qtype_multianswer: fractional scores should be possible 2021-01-11 17:37:25 +00:00
Michael Hawkins 2c45443ad7 MDL-70571 lib: Added additional escaping to search_input template 2021-01-11 16:20:32 +01:00
Sara Arjona 77d7480096 Merge branch 'MDL-70034_310' of git://github.com/mdjnelson/moodle into MOODLE_310_STABLE 2021-01-11 15:19:32 +01:00
Sara Arjona b57b9b41cd Merge branch 'MDL-70567-MOODLE_310_STABLE' of https://github.com/dmitriim/moodle into MOODLE_310_STABLE 2021-01-11 13:09:49 +01:00
Sara Arjona cfa2b28de6 Merge branch 'MDL-70578-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-01-11 12:58:20 +01:00
Sara Arjona e22723680d Merge branch 'MDL-70352-MOODLE_310_STABLE' of https://github.com/dmitriim/moodle into MOODLE_310_STABLE 2021-01-11 12:24:05 +01:00
AMOS bot db2a9784ef Automatically generated installer lang files 2021-01-11 00:08:40 +00:00
David Watson 06d7da192b MDL-69431 course: validate section url param against maxsections 2021-01-10 17:14:58 +00:00
Eloy Lafuente (stronk7) 586a6da356 Merge branch 'MDL-70550-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-01-09 13:17:50 +01:00
Mark Nelson 2ab950039c MDL-70034 gradingform_guide: use new API to retrieve grade item name 2021-01-09 14:31:09 +08:00
AMOS bot 3b3c246aaa Automatically generated installer lang files 2021-01-09 00:07:26 +00:00
Sara Arjona b3b476ce3c Merge branch 'MDL-70558-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-01-08 17:07:23 +01:00
Sara Arjona 682ee99293 Merge branch 'MDL-70102-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2021-01-08 15:51:05 +01:00
David Mudrák b8069c3372 MDL-70550 lang: Use the fixed strings in Behat tests, too 2021-01-08 09:11:38 +01:00
Helen Foster 992d1b29b4 MDL-70550 lang: Import fixed English strings (en_fix) 2021-01-08 09:11:38 +01:00
Jun Pataleta ceab4136aa Merge branch 'MDL-70310-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-01-08 14:47:14 +08:00
Luca Bösch 8241aa75d5 MDL-70578 cohorts: Add bootstrap classes to buttons 2021-01-08 07:28:15 +01:00
Jun Pataleta f186074a54 weekly release 3.10+ 2021-01-08 12:14:56 +08:00
Jun Pataleta 8585fe1404 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-01-08 12:14:55 +08:00
AMOS bot d4dff59b82 Automatically generated installer lang files 2021-01-08 00:07:23 +00:00
Eloy Lafuente (stronk7) af4b97f57a Merge branch 'MDL-70245-MOODLE_310_STABLE' of https://github.com/TomoTsuyuki/moodle into MOODLE_310_STABLE 2021-01-07 23:49:47 +01:00
Eloy Lafuente (stronk7) c3341dea30 Merge branch 'MDL-70584-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2021-01-07 23:31:24 +01:00
sam marshall 2b0b250162 MDL-70102 PHPunit: Core test fails with weird added modules
Specifically it fails if the modules have unusual default capabilities
so that editingteacher doesn't have addinstance.
2021-01-07 16:11:55 +00:00
Marina Glancy dd17f6b1bf MDL-70584 core_iplookup: increase tolerance in test 2021-01-07 14:17:19 +01:00
Ilya Tregubov 4e1786f27f MDL-70310 user: Remove yahoo icon since domain no longer exists. 2021-01-07 09:15:28 +02:00
Jun Pataleta 247437ce25 Merge branch 'MDL-70374_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-01-07 12:24:18 +08:00
Eloy Lafuente (stronk7) 8d306e640f Merge branch 'MDL-70476_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-01-07 00:28:08 +01:00
Eloy Lafuente (stronk7) 17d296f1ea Merge branch 'MOODLE_310_MDL-70520' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-01-07 00:19:12 +01:00
Paul Holden b8948751f9 MDL-70579 course: filter site fullname when exporting course content. 2021-01-06 21:30:33 +00:00
Dmitrii Metelkin c9dfaec749 MDL-70567 task: fix broken result filter on logs page 2021-01-06 14:29:17 +11:00
Adrian Greeve 304aaf2b7b Merge branch 'MDL-70482_310_STABLE' of https://github.com/sebmehr/moodle into MOODLE_310_STABLE 2021-01-06 11:23:47 +08:00
Dmitrii Metelkin 34153bcc77 MDL-70352 core: attach modal to a specific element 2021-01-06 11:19:57 +11:00
Paul Holden 65ef2f90bf MDL-70558 tool_langimport: sort available language packs. 2021-01-04 23:56:03 +00:00
AMOS bot b12ab80cf5 Automatically generated installer lang files 2020-12-27 00:07:25 +00:00
Sébastien Mehr 9ee975f3a9 MDL-70482 template: add missing closing bracket 2020-12-24 14:04:54 +01:00
AMOS bot fb02551622 Automatically generated installer lang files 2020-12-24 00:07:25 +00:00
Eloy Lafuente (stronk7) 64db9dc75a weekly release 3.10+ 2020-12-23 20:24:53 +01:00
Eloy Lafuente (stronk7) 9d5931b6e2 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2020-12-23 20:24:51 +01:00
Eloy Lafuente (stronk7) 0369198637 Merge branch 'MDL-56119-310' of https://github.com/inigozendegi/moodle into MOODLE_310_STABLE 2020-12-23 01:27:07 +01:00
Eloy Lafuente (stronk7) 62b9a44045 Merge branch 'MDL-70279-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-12-23 00:47:00 +01:00
Eloy Lafuente (stronk7) 1251f26d67 Merge branch 'MDL-70436-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2020-12-22 18:29:55 +01:00
Eloy Lafuente (stronk7) 77a6c383bf Merge branch 'MDL-70386-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2020-12-22 18:22:00 +01:00
Jake Dallimore 53e81c00fa Merge branch 'MDL-70459-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-12-22 16:51:36 +08:00
Jake Dallimore 9480706466 Merge branch 'MDL-69422-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-12-22 16:03:17 +08:00
Jake Dallimore bb48ca47ef Merge branch 'MDL-70426-310' of https://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2020-12-22 15:16:41 +08:00
Mikhail Golenkov 93b2fe7d38 MDL-70520 mod_assign: Use task API to get scheduled task lastruntime 2020-12-22 15:30:50 +11:00
Mikhail Golenkov 6ba4712549 MDL-70520 tasks: Keep lastruntime when a scheduled task is reset 2020-12-22 15:30:45 +11:00
AMOS bot b192dc7c64 Automatically generated installer lang files 2020-12-22 00:07:24 +00:00
Víctor Déniz 2d9922f388 Merge branch 'MDL-70355-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2020-12-21 23:19:20 +00:00
Eloy Lafuente (stronk7) 639f6143e7 Merge branch 'MDL-70430-310-oauth2refreshtoken' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-12-22 00:07:00 +01:00
Víctor Déniz 0a27966b67 Merge branch 'MDL-70284-dynreg-bug-310' of https://github.com/cengage/moodle into MOODLE_310_STABLE 2020-12-21 16:33:17 +00:00
Sara Arjona 79b89c2d42 Merge branch 'MDL-69107-310-2' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-12-18 15:22:24 +01:00
Tim Hunt 591107c208 MDL-70374 qtype_multichoice: improve alignment of choices 2020-12-18 13:10:13 +00:00
Tim Hunt ccfc9f7bc9 MDL-70476 permission overrides: role names double-escaped in tool tip 2020-12-18 13:04:16 +00:00
Luca Bösch 06bf0c89d6 MDL-70355 calendar: Filter popuptext for calendar entries. 2020-12-17 17:44:04 +01:00
Sara Arjona c25f0087f7 weekly release 3.10+ 2020-12-17 15:52:52 +01:00
Sara Arjona 12830e4214 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2020-12-17 15:52:50 +01:00
Shamim Rezaie 2e1b2cf30e MDL-70394 paygw_paypal: Fix the incorrect foreign key 2020-12-17 00:26:48 +11:00
Víctor Déniz 0bfb0a58a0 Merge branch 'MDL-70261-310' of git://github.com/ilya-catalyst/moodle into MOODLE_310_STABLE 2020-12-16 12:34:29 +00:00
Sara Arjona 50ba1375e8 Merge branch 'MDL-70373_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-12-16 12:40:52 +01:00
Shamim Rezaie 5f57b10712 MDL-70459 enrol_fee: Sort the list of currencies when displaying 2020-12-16 22:30:52 +11:00
Shamim Rezaie ec6720a836 MDL-70459 core_payment: use array_merge to merge currencies 2020-12-16 22:30:52 +11:00
Sara Arjona e00b006d51 Merge branch 'MDL-70322-310' of git://github.com/roland04/moodle into MOODLE_310_STABLE 2020-12-16 12:04:22 +01:00
Jun Pataleta 7ce3918e83 Merge branch 'MDL-54907_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-12-16 10:26:58 +08:00
Andrew Nicols aa1c7e0a64 MDL-69107 user: Fix autocomplete usages 2020-12-16 07:50:56 +08:00
Sara Arjona cc87756c10 Merge branch 'MDL-70422-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-12-15 16:43:02 +01:00
Sara Arjona e7a53e9410 Merge branch 'MDL-70409-310' of git://github.com/merrill-oakland/moodle into MOODLE_310_STABLE 2020-12-15 16:15:50 +01:00
Sara Arjona a050d3f41b Merge branch 'MDL-70342-310' of git://github.com/abias/moodle into MOODLE_310_STABLE 2020-12-15 15:29:18 +01:00
Sara Arjona bc103afb53 Merge branch 'MDL-70357-310-cronlibthrowables' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-12-15 14:56:04 +01:00
Ilya Tregubov 50d1003bb7 MDL-70261 course: Allow update locked course custom fields
on course upload.
2020-12-15 14:43:11 +02:00
Jake Dallimore 5c899c722c Merge branch 'MDL-67623-310_blocks_myoverview_pagination_regression' of https://github.com/tomdickman/moodle into MOODLE_310_STABLE 2020-12-15 18:22:11 +08:00
Jun Pataleta 73ad678e73 Merge branch 'MDL-70361-dlrlid-310' of https://github.com/cengage/moodle into MOODLE_310_STABLE 2020-12-15 11:17:25 +08:00
Andrew Nicols 22a5445346 MDL-69107 form_autocomplete: Rewrite item selection
The form_autocomplete is essentially a custom element. Unfortunately the
`setValue()` function in Mink has undesired actions so it is necessary
to write our own handling for it.

The standard Mink `setValue()` function focuses the element, sets a
value, and then blurs the element. In the case of the autocomplete this
can cause the autocomplete suggestions list to be closed in some
situations. Instead of using the setValue we click, and type the value,
but do not immediately blur.
2020-12-15 09:08:05 +08:00
AMOS bot 3ca8535203 Automatically generated installer lang files 2020-12-15 00:07:24 +00:00
Sara Arjona 7697ac6538 Merge branch 'MDL-70397-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-12-14 17:12:05 +01:00
Jake Dallimore c97eb87506 Merge branch 'MDL-70324-3.10' of https://github.com/JBThong/moodle into MOODLE_310_STABLE 2020-12-14 11:30:16 +08:00
Tom Dickman 66b3c79275 MDL-67623 block overview: fix pagination regression
Fixed a regression caused by MDL-64194 resulting in Dashboard - Course
overview pagination not working from second page of courses onwards.

Course overview block should now do the following:
- Display no pagination controls when user has no courses
- Display no pagination controls when less than 12 courses to display
- Only display pagination controls up to the number of courses user is
enrolled in
- Work correctly when on a page greater than the second page.
2020-12-14 13:28:11 +11:00
AMOS bot 773db77081 Automatically generated installer lang files 2020-12-13 00:07:25 +00:00
AMOS bot a07acd9464 Automatically generated installer lang files 2020-12-12 00:07:28 +00:00
AMOS bot 12b20cbf3b Merge branch 'MOODLE_310_STABLE' into install_310_STABLE 2020-12-12 00:07:27 +00:00
Mikel Martín fa31950c6a MDL-70322 core_search: consistent search icon 2020-12-11 15:40:45 +01:00
AMOS bot 6ef5f4ced0 Automatically generated installer lang files 2020-12-11 00:07:31 +00:00
Víctor Déniz c537ed7fed weekly release 3.10+ 2020-12-10 21:10:47 +00:00
Víctor Déniz f3b2f604e2 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2020-12-10 21:10:40 +00:00
Huong Nguyen f987001a61 MDL-70426 qtype_ddmarker: infinite markers keep duplicating 2020-12-10 15:52:46 +07:00
Shamim Rezaie f1ec340cca MDL-69301 theme_boost: Remove the special handling of Escape key 2020-12-10 14:59:55 +08:00
Tomo Tsuyuki 6998cbfad4 MDL-70245 core_grade: Fix grade_get_setting unit test failures
To fix the phpunit issue, change from static variable to use cache
2020-12-10 16:47:51 +11:00
Jake Dallimore 655f4d4f3f Merge branch 'MDL-70320-310' of https://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-12-10 12:01:48 +08:00
Andrew Nicols d9e22f40b4 MDL-70320 behat: User full path to page admin node 2020-12-10 07:55:50 +08:00
Bas Brands df8a5aeab5 MDL-70386 theme_boost: quizes correctness badges 2020-12-09 18:07:29 +01:00
Bas Brands 17cc12c381 MDL-70436 theme_boost: closebutton styles in moodle-dialog-fullscreen 2020-12-09 14:59:44 +01:00
Víctor Déniz e76c5c764b Merge branch 'MDL-63683-310' of https://github.com/dravek/moodle into MOODLE_310_STABLE 2020-12-09 12:47:52 +00:00
Jake Dallimore be45f4c47f Merge branch 'MDL-70151-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-12-09 14:46:14 +08:00
Shamim Rezaie fa7e218546 MDL-69301 behat: comment a test out
The e.key is not filled correctly by Geckodriver on the verssion of
Firefox that we use.
2020-12-09 13:40:04 +08:00
Andrew Nicols 5c0a5a531d Merge branch 'MDL-70320_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-12-09 12:06:22 +08:00
Andrew Nicols 200ec6b6ac Merge branch 'MDL-62707-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-12-09 08:53:27 +08:00
David Mudrák 0e7dc879de MDL-70430 oauth2: Fix storing of the new refresh token
There was a typo - missing underscore. As a result, the new refresh
token was never updated in the database. Depending on the issuer and
whether or when theyu invalidate issued refresh tokens, this might or
might not make the token refresh stop working.
2020-12-08 11:24:27 +01:00
Jake Dallimore 70fe644191 Merge branch 'MDL-70285_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-12-08 16:33:43 +08:00
AMOS bot 5178b349e8 Automatically generated installer lang files 2020-12-08 00:07:22 +00:00
Paul Holden c8e335fbe3 MDL-70422 restore: fix for undefined question answer ordering in test. 2020-12-07 10:15:53 +00:00
Adrian Greeve 567e587dbb Merge branch 'MDL-69301-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-12-07 09:29:24 +08:00
AMOS bot 37348f1c2e Automatically generated installer lang files 2020-12-06 00:07:27 +00:00
Eric Merrill e2feddadd9 MDL-70409 chat: Use require_once to import lib.php 2020-12-04 10:45:59 -05:00
Paul Holden 0a62138795 MDL-70279 tool_templatelibrary: preserve component search field value. 2020-12-04 14:55:32 +00:00
Paul Holden c24a16a819 MDL-62707 search: account for no matching courses when listing areas.
When limiting the list of courses during retrieval of the search areas
the user can access, make sure we have some contexts before looking
for blocks.
2020-12-04 09:43:17 +00:00
inigozendegi 8091ab8078 MDL-56119 gradingform_rubric: Rubric display layout issue 2020-12-04 09:41:42 +01:00
David Matamoros 12b9c6051e MDL-63683 enrol: Fix plugin settings when no role has student archetype 2020-12-04 09:25:54 +01:00
Andrew Nicols 92e6eb437c MDL-70397 behat: Prevent browser restarting after initial start 2020-12-04 12:07:20 +08:00
Jake Dallimore 32866a1758 weekly release 3.10+ 2020-12-04 08:42:48 +08:00
Jake Dallimore 9ce415b207 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2020-12-04 08:42:45 +08:00
Jake Dallimore ec69ae5929 Merge branch 'MDL-70326-MOODLE_310_STABLE' of https://github.com/durzo/moodle into MOODLE_310_STABLE 2020-12-03 11:54:18 +08:00
Andrew Nicols f5545b5c0e Merge branch 'MDL-70327-310' of git://github.com/cescobedo/moodle into MOODLE_310_STABLE 2020-12-03 11:51:59 +08:00
Andrew Nicols 7c22b71916 Merge branch 'MDL-70321_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-12-03 11:39:54 +08:00
Jake Dallimore b5414af214 Merge branch 'MDL-69411-310' of git://github.com/dravek/moodle into MOODLE_310_STABLE 2020-12-03 11:37:00 +08:00
Jake Dallimore 686b5beb23 Merge branch 'MDL-67460-310_profile_secure' of https://github.com/beenet-dev/moodle into MOODLE_310_STABLE 2020-12-03 11:16:31 +08:00
Adrian Greeve af87a57052 Merge branch 'wip_MDL-70267_m310' of git://github.com/gjb2048/moodle into MOODLE_310_STABLE 2020-12-03 10:56:37 +08:00
Adrian Greeve dec6e261e2 Merge branch 'MDL-70167-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-12-03 09:57:42 +08:00
AMOS bot 24058ace40 Automatically generated installer lang files 2020-12-03 00:07:26 +00:00
Andrew Nicols d552427f61 Merge branch 'MDL-69868-310' of git://github.com/ilya-catalyst/moodle into MOODLE_310_STABLE 2020-12-03 07:47:48 +08:00
Tim Hunt 0eeb391472 MDL-70373 qtype_essay: missing border on atto input 2020-12-02 20:09:57 +00:00
Shamim Rezaie 433556de1f MDL-69301 theme_boost: Use event.key in aria.js
Both event.which and event.keyCode are deprecated. So
We switched to using event.key. We can only do so now
because IE is no longer supported.
2020-12-03 04:22:09 +11:00
Shamim Rezaie b24f13eca2 MDL-69301 course: Remove custom keyboard navigation code 2020-12-03 04:22:09 +11:00
Shamim Rezaie 65a9b26791 MDL-69301 core: Enhanced WAI-ARIA support for tab elements 2020-12-03 04:22:09 +11:00
Shamim Rezaie 2cc04e2b29 MDL-69301 theme_boost: convert aria.js to es6 module 2020-12-03 04:22:09 +11:00
Jake Dallimore 6be44e7d06 Merge branch 'MDL-67514-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-12-02 16:23:54 +08:00
AMOS bot 93b3efa5a7 Automatically generated installer lang files 2020-12-02 00:07:23 +00:00
Thong Bui 2908ed5405 MDL-70324 Question: get_all_response_file_areas() not work correctly 2020-12-01 16:11:21 +07:00
AMOS bot 966c8a37cb Automatically generated installer lang files 2020-12-01 00:07:30 +00:00
Claude Vervoort c8637d645e MDL-70361 mod_lti: deeplinking multiple preserve resourceid and tag 2020-11-30 14:59:54 -05:00
David Mudrák b427f21cca MDL-70357 cron: Catch Throwables not just Exceptions when running tasks
Starting from PHP 7, most language errors throw Error exceptions. We
want to deal with those equally as with any other exception so we need
to catch all Throwables here.
2020-11-30 17:37:25 +01:00
Alexander Bias 25a0001b9f MDL-70342 block_timeline: Get rid of double quotes
This commit gets rid of double quotes around the activity name and course name
which have sneaked into block_timeline's view in MDL-65183.
2020-11-30 13:20:05 +01:00
Gareth Barnard 843cc0ee8d MDL-70267 ux, theme: Course user profile inconsistent page layout. 2020-11-29 23:51:01 +00:00
AMOS bot 0172d13163 Automatically generated installer lang files 2020-11-29 00:07:31 +00:00
Tim Hunt 78bddace2c MDL-54907 quiz unit tests: clean up code style in attempts_test.php 2020-11-27 18:30:43 +00:00
Tim Hunt 779c1687a4 MDL-54907 quiz: better timefinish for attempts finished asynchronously
There are serveral ways a quiz attempt can be submitted:

1. The student click the Submit and finish button. In this case,
   no problem. We record the current time as the finish time
   for the quiz attempt.

2. The student is activly working away at the quiz, and the
   count-down timer reachers zero. In this case, we also record
   the current time. Note that, if the server is under high load,
   then this could well end up being a few seconds after the
   theoretical end time, so you could have a quiz with a 30 minute
   time limit, with an attempt that lasted 30:07. However, this
   is just an accurate reflection of what happened, so should
   be recorded like this.

3. If the student is offline when the time expires, then
   (depending on the quiz settings) the attempt may be
   automatically submitted by cron, but this will happen with
   at least some delay (to prevent race conditions between cron
   and a student working online) and if cron is running slow
   on the server, it could be a lot later. Previously, this led
   to, say, a 30 minute quiz where an attempt seemed to have
   lasted 67 minutes, which confused people.

   Now, in this situation, the finsh time for the quiz attempt is
   recorded as the time when the time limit ran out. This is not
   just less confusing for teachers looking at the quiz report,
   it is also more accurate. That is the latest time at which
   students could have made any changes to their responses.
2020-11-27 18:30:43 +00:00
Tim Hunt c99a83bc5c MDL-54907 quiz generator: defaults should match a new Moodle install 2020-11-27 18:30:43 +00:00
Tim Hunt 0b523e6031 MDL-54907 dml: Correct incorrect PHPdoc 2020-11-27 18:30:42 +00:00
Juan Leyva 4e5dee71b4 MDL-70340 mod_workshop: Do not apply format to peer comments
This text is not directly output to final users, it is used just in the textarea in both the site and the app.
Applying format, case issues like adding glossary links etc...
2020-11-27 18:16:39 +01:00
Jun Pataleta 8cd8daa285 MDL-69422 mod_data: Export form accessibility fixes
* Set appropriate heading element IDs
* Replace usages of deprecated HTML tag acronym with abbr instead.
* Add a label for the export fields fieldset.
* Move the CSV delimiter list outside the radio group.
* Fix div under a label element and duplicate labels
for the checkboxes of the fields to be exported by showing the field
name and type together.
* Group the fields to be exported as a fieldset.
* Move unsupported fields into a separate list.
* Move export options into its own section and group the options as a
fieldset.
2020-11-27 23:24:13 +08:00
Jun Pataleta 1bd007e815 MDL-69422 core: Convert required and help button container to div
* A span element cannot have a div as a child.
2020-11-27 23:24:13 +08:00
Sara Arjona 9c35064345 weekly release 3.10+ 2020-11-27 07:50:48 +01:00
Sara Arjona 5945a1a926 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2020-11-27 07:50:45 +01:00
AMOS bot fac91d11d8 Automatically generated installer lang files 2020-11-27 06:21:03 +00:00
Sara Arjona 9fcd6522ce Merge branch 'MDL-70276_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-11-26 15:04:30 +01:00
Andrew Nicols 85673c859e MDL-70153 qtype_essay: Whitespace/behat fixes 2020-11-26 12:54:26 +01:00
Andrew Nicols 4dba8e8359 Merge branch 'MDL-70153-310' of git://github.com/dpalou/moodle into MOODLE_310_STABLE 2020-11-26 12:54:26 +01:00
Andrew Nicols f03c875cf3 Merge branch 'MDL-70237-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-11-26 12:54:26 +01:00
Andrew Nicols 9fcb5ece12 Merge branch 'MDL-70242-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2020-11-26 12:54:26 +01:00
Andrew Nicols b07833ddf4 Merge branch 'MDL-65852-310' of git://github.com/ilya-catalyst/moodle into MOODLE_310_STABLE 2020-11-26 12:54:26 +01:00
Sara Arjona 333f6cb753 Merge branch 'MDL-70248-310' of https://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2020-11-26 12:54:25 +01:00
Sara Arjona 1c594e729b Merge branch 'MDL-70265_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-11-26 12:54:25 +01:00
Ilya Tregubov d8c8f544b3 MDL-69868 h5pactivity: Prevent breaking $USER when seeing
attempt report.
2020-11-26 12:40:28 +02:00
Eloy Lafuente (stronk7) a284ced9a1 MDL-70276 github actions: First cut, phpunit and grunt checks
First working version, supports phpunit (using build matrix):

- php72 (lowest), running mysql.
- php74 (highest), running postgres.

Also verifies that the branch has been "gruntified" and there
isn't any missing change (build js/css files).

TODO: Verify the remaining checks currently in .travis.yml, namely:
 - CITEST
 - Add caching
 - Better health-check for DB images.
 - Support from the tracker (satus badges and enable check).
 - Support from CiBoT (status and enable check).
 - Consider moving both the common setup (git, composer...)
   and the database (mysql, postgres) to own actions for
   easier tweaking.
2020-11-26 00:23:22 +01:00
Tim Hunt cb82824f6a MDL-70320 permission overrides: role names were double-escaped 2020-11-25 21:21:28 +00:00
Claude Vervoort 613c37d54b MDL-70284 mod_lti: dynreg fix response claims 2020-11-25 10:51:08 -05:00
cescobedo 53f9417795 MDL-70327 core_h5p: Add preventredirect to the player 2020-11-25 16:30:46 +01:00
Jordan Tomkinson 407807df6b MDL-70326 antivirus: fixing regression in MDL-66222 2020-11-25 11:28:56 +01:00
Ilya Tregubov 7c80e15392 MDL-65852 user: Fix permission check to download course participants. 2020-11-25 11:27:36 +02:00
Tim Hunt e95c0a90ac MDL-70321 question backup: fix MDL-47178 unit tests
They were failing if you had CodeRunner installed
2020-11-24 15:29:41 +00:00
Simon Mok 48905f6b75 MDL-67460 profile: User profile link to use HTTPS 2020-11-24 20:48:52 +08:00
Tim Hunt b5b562b7ee MDL-70285 completion upgrade: fix performance of the MDL-69687 code 2020-11-23 20:59:08 +00:00
David Matamoros 4a82e72b00 MDL-69411 core_message: Fix return structure for empty result set
Passing a timefrom higher than last message timecreated needs to
return a formatted response so it does not break ws.
2020-11-23 19:25:43 +01:00
Eloy Lafuente (stronk7) ef95f5262f MDL-70265 travis: Completely remove the UPGRADE check
It was broken since ages ago, see MDL-64874, so no sense
to keep it eating minutes for nothing.
2020-11-23 14:28:33 +01:00
Adrian Greeve e2d911c07b Merge branch 'MDL-67668-310-2' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-11-23 15:37:44 +08:00
Jake Dallimore 71bae0da0f Merge branch 'MDL-70160-function-cache-310' of https://github.com/Peterburnett/moodle into MOODLE_310_STABLE 2020-11-23 15:22:49 +08:00
Andrew Nicols e7bfbaf7b2 MDL-70151 assign: Fix bulk change for behat
Behat does not play well with confirmation dialogues and in some
situations it does not wait for the page to reload before starting the
next step.

This change adds a pending_js call which is only resolved if the cancel
button was pressed, otherwise it remains in-progress until the page
reloads resetting the entire state of it.
2020-11-23 11:12:03 +08:00
Andrew Nicols 6882d7399b MDL-70167 behat: Rewrite attribute check steps
This commit updates the following steps to use the
`the_attribute_of_should_be_set` step under the hood:
- the [element] [type] should be disabled
- the [element] [type] should be enabled
- the [element] [type] should be readonly
- the [element] [type] should not be readonly

This reduces unnecssary code duplication.
2020-11-23 11:03:28 +08:00
Andrew Nicols 80bf03d583 MDL-70167 behat: Boolean attributes should either exist or not 2020-11-23 11:03:28 +08:00
Andrew Nicols 1039537d83 MDL-67668 behat: Update tests for inplace editable field type 2020-11-23 09:00:46 +08:00
Andrew Nicols 0214c50b18 MDL-67668 behat: Add inplace editable field type
This commit promotes the Inplace Editable field to a first-class form
element by introducing a new partial selector for inplace editable
fields, and teaching the field manager how to recognise these, then
introducing a new field type which can handle setting values for this
field.
2020-11-23 09:00:46 +08:00
Andrew Nicols e29e8373e6 MDL-67668 behat: Share behat_behat functionality with forms
Behat form fields are implemented in a way completely isolated from the
rest of the Behat Context system. Whereas regular step definitions have
access to execute steps, to call `find`, check for JS running, and other
related functionality, the Moodle implementation of a field type does
not have any access to this.

By moving the core functionality of behat_base to a new trait, and the
constants to a new interface, the functionality can also be used in
behat form fields in the same way as elsewhere.
2020-11-23 09:00:46 +08:00
Andrew Nicols 9e11009eb1 MDL-67668 behat: Correct js pending check
Pending checks should only run when JS is running, but some uses were
not apply this check.
2020-11-23 09:00:46 +08:00
Andrew Nicols a01ca7a600 MDL-67668 behat: Support NodeElement when fetching node in container
This is similar to change made in MDL-69136 to allow an already-fetched
NodeElement to be provided to the get_node_in_container() function and
makes it easier to be deterministic when writing steps.
2020-11-23 09:00:46 +08:00
Eloy Lafuente (stronk7) 6a662825f7 MDL-70265 travis: Only run highest phpunit if configured via env
By default only lowest php version will be executed, and only pgsql.

This default behavior can be changed with a new variable:

MOODLE_PHP = [all]
MOODLE_DATABASE = [pgsql | mysqli | all]
2020-11-21 11:28:31 +01:00
Eloy Lafuente (stronk7) 03e3219884 weekly release 3.10+ 2020-11-20 23:17:06 +01:00
Huong Nguyen 681b7f4e78 MDL-70248 qtype_ddimageortext: Drop zones have UI issue in Editing form 2020-11-19 17:03:49 +07:00
Adrian Greeve f098f28d01 Merge branch 'MOODLE_310_STABLE-MDL-67636' of https://github.com/yao9394/moodle into MOODLE_310_STABLE 2020-11-19 11:57:33 +08:00
John Yao bf17d50cf6 MDL-67636 gradebook: Prevent exposing hidden grade in locked category 2020-11-19 14:33:26 +11:00
Adrian Greeve 8e0f036b29 Merge branch 'MDL-56653-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2020-11-19 11:10:48 +08:00
Andrew Nicols 51c6924206 Merge branch 'MDL-69809-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-11-19 10:47:46 +08:00
Jun Pataleta f589a25459 Merge branch 'MDL-70094-310' of https://github.com/SangNguyen2601/moodle into MOODLE_310_STABLE 2020-11-19 09:36:53 +08:00
Eloy Lafuente (stronk7) dee389dff6 Merge branch 'MDL-69201-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-11-18 23:00:18 +01:00
Shamim Rezaie a9b83b3c01 MDL-70237 payment: Allow html tags in gateway description 2020-11-18 23:25:06 +11:00
sangnguyen2601 0ab0a293a8 MDL-70094 Question: Technical info section expands if click help icon 2020-11-18 17:32:40 +07:00
Dani Palou b76093e90c MDL-70153 qtype_essay: Add behat test for attachments max size 2020-11-18 10:48:17 +01:00
Dani Palou 8f0d40a39c MDL-70153 qtype_essay: Fix max size displayed for attachments 2020-11-18 10:48:17 +01:00
Vitaly 3a2d8a175e MDL-56653 enrol_meta: a single DB query in edit_instance_validation
The 'edit_instance_validation()' method checks for existing meta enrolment instances.
The fix replaces DB queries in a loop for each course with a single query for all courses.
Also, a new testing method 'test_edit_instance_validation_with_existing_courses()'
was added to /enrol/meta/tests/plugin_test.php to test if the new implementation
returns an error in case of trying to save the already linked courses in the 'customint1' field.
2020-11-18 15:05:42 +08:00
Andrew Nicols ff72ca7340 Merge branch '310_MDL-68896' of git://github.com/danmarsden/moodle into MOODLE_310_STABLE 2020-11-18 09:33:06 +08:00
Eloy Lafuente (stronk7) 4e346470a5 Merge branch 'MDL-70148-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-11-17 23:13:17 +01:00
Paul Holden 13c76cc295 MDL-67514 customfield: correct external usescategories return type. 2020-11-17 22:13:16 +00:00
Marina Glancy 2c4426bb10 MDL-70242 auth_oauth2: set page context and url 2020-11-17 16:47:59 +01:00
Andrew Nicols d3a9e2935d MDL-70148 gradereport_grader: Improve reliability of keyboard usage
In some browsers the ajax grade select does not properly update the
grade after setting values. The previous solution was to press the
[enter] key, but doing this with the new key type step opens the select
box again. This is what happens when a real user presses enter on the
select.

This is the last possible field in the report, so pressing the tab key
to move to the next gradable element does not work.

The solution uses a shift-tab to move the focus away to the previous
gradale element. In this case it must also be moved to an earlier step
because the previously selected value must be checked in the Then
section of the test and if it is selected then its value cannot be
checked.
2020-11-17 15:14:43 +08:00
Andrew Nicols 2adc010b85 MDL-70148 qtype: Update qtype steps to new key interaction
Note: The ddmarker question type was previously getting the number of
keypresses wrong. This was because it was using both keyDown/keyUp, and
also keyPress. As a result each keypress was essentially happening two
times.
2020-11-17 15:14:43 +08:00
Andrew Nicols c330c9276c MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Andrew Nicols e9b443b3a1 MDL-70148 behat: Add steps to send keys without an element 2020-11-17 15:14:43 +08:00
Andrew Nicols 7bb692666b Merge branch 'MDL-69526-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2020-11-17 14:55:10 +08:00
Adrian Greeve 5e924f295a Merge branch 'MDL-50955-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2020-11-17 13:08:48 +08:00
Andrew Nicols 739cbcf7e9 Merge branch 'MDL-69964-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-11-17 10:22:38 +08:00
Paul Holden 22df02089a MDL-69964 course: toggle participant checkboxes in root element.
For a given toggleGroup, the relevant action elements are not
necessarily descendants of the same tableRoot element, on the
course participants page.
2020-11-16 17:44:23 +00:00
Andrew Nicols be2afb52c1 MDL-67513 core: Only move modal to body if currently attached
A previous change as part of this commitset was intended to move the
modal to the document.body, but where the modal had been destroyed it
was instead added back to the body.
2020-11-16 09:37:48 +01:00
Peter Dias 09520f8e0d MDL-50955 core: Reset lessons completion criteria if grade type is none 2020-11-16 16:35:33 +08:00
Andrew Nicols d661fbfbc1 Merge branch 'MDL-67513-m310' of https://github.com/NeillM/moodle into MOODLE_310_STABLE 2020-11-16 08:27:35 +08:00
Luca Bösch e29069d45b MDL-69526 block_myoverview: custom course fields natural sorting 2020-11-13 00:57:42 +01:00
Neill Magill a2dcfd5bf6 MDL-67513 forum: View conversations while fullscreen grading
Before this change when a modal was shown and an element on the page
was fullscreen the modal would be created behind it.

This change ensures that the modal will be inside an element that is
fullscreen so that it will be correctly displayed.
2020-11-12 08:30:54 +00:00
Peter Burnett ebe19aa434 MDL-70160 cache: plugin_functions checks for function_exists() 2020-11-10 16:03:53 +10:00
Paul Holden 898dd7bf5b MDL-69201 core: consistent table primary sort column/order. 2020-11-09 19:45:41 +00:00
Neill Magill 4423581f8d MDL-67513 forum: Test that discussions can be viewed while grading 2020-11-09 14:24:56 +00:00
Paul Holden 9597baa6e8 MDL-69809 mod_folder: include forcedownload setting in WS responses. 2020-10-12 12:28:26 +01:00
Sam Hemelryk 04073c7e31 MDL-68896 mod_scorm: improved sendBeacon use when unloading 2020-08-19 20:30:17 +12:00
2403 changed files with 31801 additions and 15156 deletions
-95
View File
@@ -1,95 +0,0 @@
# Generated by "grunt ignorefiles"
*/**/yui/src/*/meta/
*/**/build/
node_modules/
vendor/
admin/tool/policy/amd/src/jquery-eu-cookie-law-popup.js
auth/cas/CAS/
cache/stores/mongodb/MongoDB/
enrol/lti/ims-blti/
filter/algebra/AlgParser.pm
filter/tex/mimetex.*
h5p/h5plib/v124/joubel/core/
h5p/h5plib/v124/joubel/editor/
lib/editor/atto/plugins/html/yui/src/codemirror/
lib/editor/atto/plugins/html/yui/src/beautify/
lib/editor/atto/yui/src/rangy/js/*.*
lib/editor/tinymce/plugins/pdw/tinymce/
lib/editor/tinymce/plugins/spellchecker/rpc.php
lib/editor/tinymce/tiny_mce/
lib/mlbackend/php/phpml/
lib/adodb/
lib/behat/axe/
lib/bennu/
lib/evalmath/
lib/phpspreadsheet/
lib/google/
lib/htmlpurifier/
lib/jabber/
lib/minify/matthiasmullie-minify/
lib/minify/matthiasmullie-pathconverter/
lib/pear/HTML/Common.php
lib/pear/HTML/QuickForm.php
lib/pear/HTML/QuickForm/
lib/pear/PEAR.php
lib/phpmailer/
lib/simplepie/
lib/tcpdf/
lib/typo3/
lib/yuilib/
lib/yuilib/gallery/
lib/jquery/
lib/html2text/
lib/markdown/
lib/xhprof/
lib/horde/
lib/requirejs/
lib/amd/src/loglevel.js
lib/mustache/
lib/amd/src/mustache.js
lib/graphlib.php
lib/php-css-parser/
lib/rtlcss/
lib/scssphp/
lib/spout/
lib/amd/src/chartjs-lazy.js
lib/maxmind/GeoIp2/
lib/maxmind/MaxMind/
lib/ltiprovider/
lib/amd/src/truncate.js
lib/fonts/
lib/amd/src/adapter.js
lib/validateurlsyntax.php
lib/amd/src/popper.js
lib/geopattern-php/
lib/php-jwt/
lib/babel-polyfill/
lib/polyfills/
lib/emoji-data/
lib/plist/
lib/zipstream/
lib/php-enum/
lib/http-message/
media/player/videojs/amd/src/video-lazy.js
media/player/videojs/amd/src/Youtube-lazy.js
media/player/videojs/videojs/
media/player/videojs/amd/src/videojs-flash-lazy.js
media/player/videojs/videojs/video-js.swf
mod/assign/feedback/editpdf/fpdi/
repository/s3/S3.php
theme/boost/scss/bootstrap/
theme/boost/amd/src/bootstrap/alert.js
theme/boost/amd/src/bootstrap/button.js
theme/boost/amd/src/bootstrap/carousel.js
theme/boost/amd/src/bootstrap/collapse.js
theme/boost/amd/src/bootstrap/dropdown.js
theme/boost/amd/src/bootstrap/index.js
theme/boost/amd/src/bootstrap/modal.js
theme/boost/amd/src/bootstrap/popover.js
theme/boost/amd/src/bootstrap/tools/sanitizer.js
theme/boost/amd/src/bootstrap/scrollspy.js
theme/boost/amd/src/bootstrap/tab.js
theme/boost/amd/src/bootstrap/toast.js
theme/boost/amd/src/bootstrap/tooltip.js
theme/boost/amd/src/bootstrap/util.js
theme/boost/scss/fontawesome/
+1 -1
View File
@@ -204,7 +204,7 @@
}
},
{
files: ["**/amd/src/*.js", "**/amd/src/**/*.js", "Gruntfile*.js", "babel-plugin-add-module-to-define.js"],
files: ["**/amd/src/*.js", "**/amd/src/**/*.js", "Gruntfile*.js", "babel-plugin-add-module-to-define.js", "jsdoc.conf.js"],
// We support es6 now. Woot!
env: {
es6: true
+71
View File
@@ -0,0 +1,71 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Template configuraton file for github actions CI/CD.
*
* @package core
* @copyright 2020 onwards Eloy Lafuente (stronk7) {@link https://stronk7.com}
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// This cannot be used out from a github actions workflow, so just exit.
getenv('GITHUB_WORKFLOW') || die; // phpcs:ignore moodle.Files.MoodleInternal.MoodleInternalGlobalState
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = getenv('dbtype');
$CFG->dblibrary = 'native';
$CFG->dbhost = '127.0.0.1';
$CFG->dbname = 'test';
$CFG->dbuser = 'test';
$CFG->dbpass = 'test';
$CFG->prefix = 'm_';
$CFG->dboptions = ['dbcollation' => 'utf8mb4_bin'];
$host = 'localhost';
$CFG->wwwroot = "http://{$host}";
$CFG->dataroot = realpath(dirname(__DIR__)) . '/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
// Debug options - possible to be controlled by flag in future.
$CFG->debug = (E_ALL | E_STRICT); // DEBUG_DEVELOPER.
$CFG->debugdisplay = 1;
$CFG->debugstringids = 1; // Add strings=1 to url to get string ids.
$CFG->perfdebug = 15;
$CFG->debugpageinfo = 1;
$CFG->allowthemechangeonurl = 1;
$CFG->passwordpolicy = 0;
$CFG->cronclionly = 0;
$CFG->pathtophp = getenv('pathtophp');
$CFG->phpunit_dataroot = realpath(dirname(__DIR__)) . '/phpunitdata';
$CFG->phpunit_prefix = 't_';
define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://localhost:8080');
define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://localhost:8080');
define('TEST_SESSION_REDIS_HOST', 'localhost');
define('TEST_CACHESTORE_REDIS_TESTSERVERS', 'localhost');
// TODO: add others (solr, mongodb, memcached, ldap...).
// Too much for now: define('PHPUNIT_LONGTEST', true); // Only leaves a few tests out and they are run later by CI.
require_once(__DIR__ . '/lib/setup.php');
+117
View File
@@ -0,0 +1,117 @@
name: Core
on:
push:
branches-ignore:
- master
- MOODLE_[0-9]+_STABLE
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
env:
php: 7.4
jobs:
Grunt:
runs-on: ubuntu-18.04
steps:
- name: Checking out code
uses: actions/checkout@v2
- name: Configuring node & npm
shell: bash -l {0}
run: nvm install
- name: Installing node stuff
run: npm install
- name: Running grunt
run: npx grunt
- name: Looking for uncommitted changes
# Add all files to the git index and then run diff --cached to see all changes.
# This ensures that we get the status of all files, including new files.
# We ignore npm-shrinkwrap.json to make the tasks immune to npm changes.
run: |
git add .
git reset -- npm-shrinkwrap.json
git diff --cached --exit-code
PHPUnit:
runs-on: ${{ matrix.os }}
services:
exttests:
image: moodlehq/moodle-exttests
ports:
- 8080:80
redis:
image: redis
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-18.04
php: 7.2
# Need to disable both redis and memcached (both are optional) in order to keep igbinary installed.
# (there are dependencies that become broken if we just switch the igbinary version).
# Need to do this for php 7.2 because of a bug with current default igbinary
# versions used by GHA being >= 3.2.2 and <= 3.2.4 (buggy ones).
# TODO: MDL-72399 - Revert this patch once igbinary 3.2.5 or up is the default @ GHA.
extensions: :redis, :memcached, igbinary-3.2.6
db: mysqli
- os: ubuntu-18.04
php: 7.4
extensions:
db: pgsql
steps:
- name: Setting up DB mysql
if: ${{ matrix.db == 'mysqli' }}
uses: johanmeiring/mysql-action@tmpfs-patch
with:
collation server: utf8mb4_bin
mysql version: 5.7
mysql database: test
mysql user: test
mysql password: test
use tmpfs: true
- name: Setting up DB pgsql
if: ${{ matrix.db == 'pgsql' }}
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 9.6
postgresql db: test
postgresql user: test
postgresql password: test
- name: Configuring git vars
uses: rlespinasse/github-slug-action@v3.x
- name: Setting up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
coverage: none
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v2
- name: Setting up PHPUnit
env:
dbtype: ${{ matrix.db }}
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV # Inject installed pathtophp to env. The template config needs it.
cp .github/workflows/config-template.php config.php
mkdir ../moodledata
sudo locale-gen en_AU.UTF-8
php admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Running PHPUnit tests
env:
dbtype: ${{ matrix.db }}
run: vendor/bin/phpunit -v
+5
View File
@@ -26,6 +26,7 @@
/cscope.*
/.patches/
/.idea/
.phpstorm.*
/nbproject/
CVS
.DS_Store
@@ -46,3 +47,7 @@ composer.phar
atlassian-ide-plugin.xml
/node_modules/
/.vscode/
moodle-plugin-ci.phar
.eslintignore
.stylelintignore
/jsdoc
+19
View File
@@ -0,0 +1,19 @@
# Moodle JavaScript Documentation
```
.-..-.
_____ | || |
/____/-.---_ .---. .---. .-.| || | .---.
| | _ _ |/ _ \/ _ \/ _ || |/ __ \
* | | | | | || |_| || |_| || |_| || || |___/
|_| |_| |_|\_____/\_____/\_____||_|\_____)
Moodle - the world's open source learning platform
```
## About
This generated documentation includes API documentation for JavaScript written in the AMD and ES2015 module formats within Moodle.
## Related information
See [https://docs.moodle.org/dev](https://docs.moodle.org/dev) for other related Developer Documentation.
+131
View File
@@ -0,0 +1,131 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Helper functions for working with Moodle component names, directories, and sources.
*
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
"use strict";
/* eslint-env node */
// Do not include any plugins as stanard.
const plugins = [];
plugins.push('plugins/markdown');
/**
* Get the source configuration.
*
* @return {Object}
*/
const getSource = () => {
const glob = require('glob');
const path = require('path');
const ComponentList = require(path.resolve('GruntfileComponents.js'));
const thirdPartyPaths = ComponentList.getThirdPartyPaths();
const source = {
include: [],
includePattern: ".+\\.js$",
};
let includeList = [];
ComponentList.getAmdSrcGlobList().forEach(async pattern => {
includeList.push(...glob.sync(pattern));
});
const cwdLength = process.cwd().length + 1;
includeList.forEach(path => {
if (source.include.indexOf(path) !== -1) {
// Ensure no duplicates.
return;
}
const relPath = path.substring(cwdLength);
if (thirdPartyPaths.indexOf(relPath) !== -1) {
return;
}
source.include.push(path);
});
source.include.push('.grunt/jsdoc/README.md');
return source;
};
const tags = {
// Allow the use of unknown tags.
// We have a lot of legacy uses of these.
allowUnknownTags: true,
// We make use of jsdoc and closure dictionaries as standard.
dictionaries: [
'jsdoc',
'closure',
],
};
// Template configuraiton.
const templates = {
cleverLinks: false,
monospaceLinks: false,
};
module.exports = {
opts: {
destination: "./jsdoc/",
template: "node_modules/docdash",
},
plugins,
recurseDepth: 10,
source: getSource(),
sourceType: 'module',
tags,
templates,
docdash: {
collapse: true,
search: true,
sort: true,
sectionOrder: [
"Namespaces",
"Modules",
"Events",
"Classes",
"Externals",
"Mixins",
"Tutorials",
"Interfaces"
],
"menu": {
"Developer Docs": {
href: "https://docs.moodle.org/dev",
target: "_blank",
"class": "menu-item",
id: "devdocs"
},
"MDN Docs": {
href: "https://developer.mozilla.org/en-US/docs/Web/JavaScript",
target: "_blank",
"class": "menu-item",
id: "mdndocs",
},
},
typedefs: true,
},
};
-96
View File
@@ -1,96 +0,0 @@
# Generated by "grunt ignorefiles"
**/yui/build/*
theme/boost/style/moodle.css
theme/classic/style/moodle.css
node_modules/
vendor/
admin/tool/policy/amd/src/jquery-eu-cookie-law-popup.js
auth/cas/CAS/
cache/stores/mongodb/MongoDB/
enrol/lti/ims-blti/
filter/algebra/AlgParser.pm
filter/tex/mimetex.*
h5p/h5plib/v124/joubel/core/
h5p/h5plib/v124/joubel/editor/
lib/editor/atto/plugins/html/yui/src/codemirror/
lib/editor/atto/plugins/html/yui/src/beautify/
lib/editor/atto/yui/src/rangy/js/*.*
lib/editor/tinymce/plugins/pdw/tinymce/
lib/editor/tinymce/plugins/spellchecker/rpc.php
lib/editor/tinymce/tiny_mce/
lib/mlbackend/php/phpml/
lib/adodb/
lib/behat/axe/
lib/bennu/
lib/evalmath/
lib/phpspreadsheet/
lib/google/
lib/htmlpurifier/
lib/jabber/
lib/minify/matthiasmullie-minify/
lib/minify/matthiasmullie-pathconverter/
lib/pear/HTML/Common.php
lib/pear/HTML/QuickForm.php
lib/pear/HTML/QuickForm/
lib/pear/PEAR.php
lib/phpmailer/
lib/simplepie/
lib/tcpdf/
lib/typo3/
lib/yuilib/
lib/yuilib/gallery/
lib/jquery/
lib/html2text/
lib/markdown/
lib/xhprof/
lib/horde/
lib/requirejs/
lib/amd/src/loglevel.js
lib/mustache/
lib/amd/src/mustache.js
lib/graphlib.php
lib/php-css-parser/
lib/rtlcss/
lib/scssphp/
lib/spout/
lib/amd/src/chartjs-lazy.js
lib/maxmind/GeoIp2/
lib/maxmind/MaxMind/
lib/ltiprovider/
lib/amd/src/truncate.js
lib/fonts/
lib/amd/src/adapter.js
lib/validateurlsyntax.php
lib/amd/src/popper.js
lib/geopattern-php/
lib/php-jwt/
lib/babel-polyfill/
lib/polyfills/
lib/emoji-data/
lib/plist/
lib/zipstream/
lib/php-enum/
lib/http-message/
media/player/videojs/amd/src/video-lazy.js
media/player/videojs/amd/src/Youtube-lazy.js
media/player/videojs/videojs/
media/player/videojs/amd/src/videojs-flash-lazy.js
media/player/videojs/videojs/video-js.swf
mod/assign/feedback/editpdf/fpdi/
repository/s3/S3.php
theme/boost/scss/bootstrap/
theme/boost/amd/src/bootstrap/alert.js
theme/boost/amd/src/bootstrap/button.js
theme/boost/amd/src/bootstrap/carousel.js
theme/boost/amd/src/bootstrap/collapse.js
theme/boost/amd/src/bootstrap/dropdown.js
theme/boost/amd/src/bootstrap/index.js
theme/boost/amd/src/bootstrap/modal.js
theme/boost/amd/src/bootstrap/popover.js
theme/boost/amd/src/bootstrap/tools/sanitizer.js
theme/boost/amd/src/bootstrap/scrollspy.js
theme/boost/amd/src/bootstrap/tab.js
theme/boost/amd/src/bootstrap/toast.js
theme/boost/amd/src/bootstrap/tooltip.js
theme/boost/amd/src/bootstrap/util.js
theme/boost/scss/fontawesome/
+35 -71
View File
@@ -10,36 +10,20 @@ language: php
os: linux
dist: xenial
dist: bionic
services:
- mysql
- docker
php:
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
- 7.4
- 7.2
addons:
postgresql: "9.6"
env:
# Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to
# start first so that the total run time is not too high.
#
# We only run MySQL on PHP 7.2, so run that first.
# CI Tests should be second-highest in priority as these only take <= 60 seconds to run under normal circumstances.
# Postgres is significantly is pretty reasonable in its run-time.
# Run CI Tests without running PHPUnit.
- DB=none TASK=CITEST
# Run unit tests on Postgres
- DB=pgsql TASK=PHPUNIT
# Perform an upgrade test too.
- DB=pgsql TASK=UPGRADE
branches:
except:
- master
- /MOODLE_[0-9]+_STABLE/
- /^v[0-9]+\.[0-9]+\.[0-9]+.*/
jobs:
# Enable fast finish.
@@ -48,12 +32,35 @@ jobs:
fast_finish: true
include:
# Run mysql only on highest - it's just too slow
- php: 7.4
# First all the lowest php ones (7.2)
- php: 7.2
env: DB=none TASK=CITEST
- php: 7.2
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
- if: env(MOODLE_DATABASE) = "pgsql" OR env(MOODLE_DATABASE) = "all" OR env(MOODLE_DATABASE) IS NOT present
php: 7.2
env: DB=pgsql TASK=PHPUNIT
- if: env(MOODLE_DATABASE) = "mysqli" OR env(MOODLE_DATABASE) = "all"
php: 7.2
env: DB=mysqli TASK=PHPUNIT
# Then, conditionally, all the highest php ones (7.4)
- if: env(MOODLE_PHP) = "all"
php: 7.4
env: DB=none TASK=CITEST
- if: env(MOODLE_PHP) = "all"
php: 7.4
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
- if: env(MOODLE_PHP) = "all" AND (env(MOODLE_DATABASE) = "pgsql" OR env(MOODLE_DATABASE) = "all" OR env(MOODLE_DATABASE) IS NOT present)
php: 7.4
env: DB=pgsql TASK=PHPUNIT
- if: env(MOODLE_PHP) = "all" AND (env(MOODLE_DATABASE) = "mysqli" OR env(MOODLE_DATABASE) = "all")
php: 7.4
env: DB=mysqli TASK=PHPUNIT
# Run grunt/npm install on highest version too ('node' is an alias for the latest node.js version.)
- php: 7.4
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
cache:
directories:
@@ -113,7 +120,7 @@ install:
before_script:
- phpenv config-rm xdebug.ini
- >
if [ "$TASK" = 'PHPUNIT' -o "$TASK" = 'UPGRADE' ];
if [ "$TASK" = 'PHPUNIT' ];
then
# Copy generic configuration in place.
cp config-dist.php config.php ;
@@ -224,32 +231,6 @@ before_script:
export phpcmd=`which php`;
fi
########################################################################
# Upgrade test
########################################################################
- >
if [ "$TASK" = 'UPGRADE' ];
then
# We need the official upstream.
git remote add upstream https://github.com/moodle/moodle.git;
# Checkout 30 STABLE branch (the first version compatible with PHP 7.x)
git fetch upstream MOODLE_30_STABLE;
git checkout MOODLE_30_STABLE;
# Perform the upgrade
php admin/cli/install_database.php --agree-license --adminpass=Password --adminemail=admin@example.com --fullname="Upgrade test" --shortname=Upgrade;
# Return to the previous commit
git checkout -;
# Perform the upgrade
php admin/cli/upgrade.php --non-interactive --allow-unstable ;
# The local_ci repository can be used to check upgrade savepoints.
git clone https://github.com/moodlehq/moodle-local_ci.git local/ci ;
fi
script:
- >
if [ "$TASK" = 'PHPUNIT' ];
@@ -275,23 +256,6 @@ script:
git diff --cached --exit-code ;
fi
########################################################################
# Upgrade test
########################################################################
- >
if [ "$TASK" = 'UPGRADE' ];
then
cp local/ci/check_upgrade_savepoints/check_upgrade_savepoints.php ./check_upgrade_savepoints.php
result=`php check_upgrade_savepoints.php`;
# Check if there are problems
count=`echo "$result" | grep -P "ERROR|WARN" | wc -l` ;
if (($count > 0));
then
echo "$result"
exit 1 ;
fi
fi
after_script:
- >
if [ "$TASK" = 'PHPUNIT' ];
+13 -4
View File
@@ -122,9 +122,10 @@ const registerStyleLintTasks = (grunt, files, fullRunDir) => {
if (hasScss) {
scssTasks.unshift('stylelint:scss');
}
scssTasks.unshift('ignorefiles');
grunt.registerTask('scss', scssTasks);
const cssTasks = [];
const cssTasks = ['ignorefiles'];
if (hasCss) {
cssTasks.push('stylelint:css');
}
@@ -351,6 +352,13 @@ module.exports = function(grunt) {
}]
}
},
jsdoc: {
dist: {
options: {
configure: ".grunt/jsdoc/jsdoc.conf.js",
},
},
},
sass: {
dist: {
files: {
@@ -424,7 +432,7 @@ module.exports = function(grunt) {
'*/**/yui/src/*/meta/',
'*/**/build/',
].concat(thirdPartyPaths);
grunt.file.write('.eslintignore', eslintIgnores.join('\n'));
grunt.file.write('.eslintignore', eslintIgnores.join('\n') + '\n');
// Generate .stylelintignore.
const stylelintIgnores = [
@@ -433,7 +441,7 @@ module.exports = function(grunt) {
'theme/boost/style/moodle.css',
'theme/classic/style/moodle.css',
].concat(thirdPartyPaths);
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n'));
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n') + '\n');
};
/**
@@ -835,6 +843,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-stylelint');
grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-jsdoc');
// Rename the grunt-contrib-watch "watch" task because we're going to wrap it.
grunt.renameTask('watch', 'watch-grunt');
@@ -845,7 +854,7 @@ module.exports = function(grunt) {
grunt.registerTask('ignorefiles', 'Generate ignore files for linters', tasks.ignorefiles);
grunt.registerTask('watch', 'Run tasks on file changes', tasks.watch);
grunt.registerTask('yui', ['eslint:yui', 'shifter']);
grunt.registerTask('amd', ['eslint:amd', 'babel']);
grunt.registerTask('amd', ['ignorefiles', 'eslint:amd', 'babel']);
grunt.registerTask('js', ['amd', 'yui']);
// Register CSS tasks.
+45
View File
@@ -140,6 +140,50 @@ const getThirdPartyLibsList = relativeTo => {
.sort();
};
/**
* Get the list of thirdparty library paths.
*
* @returns {array}
*/
const getThirdPartyPaths = () => {
const DOMParser = require('xmldom').DOMParser;
const fs = require('fs');
const path = require('path');
const xpath = require('xpath');
const thirdpartyfiles = getThirdPartyLibsList(fs.realpathSync('./'));
const libs = ['node_modules/', 'vendor/'];
const addLibToList = lib => {
if (!lib.match('\\*') && fs.statSync(lib).isDirectory()) {
// Ensure trailing slash on dirs.
lib = lib.replace(/\/?$/, '/');
}
// Look for duplicate paths before adding to array.
if (libs.indexOf(lib) === -1) {
libs.push(lib);
}
};
thirdpartyfiles.forEach(function(file) {
const dirname = path.dirname(file);
const xmlContent = fs.readFileSync(file, 'utf8');
const doc = new DOMParser().parseFromString(xmlContent);
const nodes = xpath.select("/libraries/library/location/text()", doc);
nodes.forEach(function(node) {
let lib = path.posix.join(dirname, node.toString());
addLibToList(lib);
});
});
return libs;
};
/**
* Find the name of the component matching the specified path.
*
@@ -185,4 +229,5 @@ module.exports = {
getOwningComponentDirectory,
getYuiSrcGlobList,
getThirdPartyLibsList,
getThirdPartyPaths,
};
+1 -1
View File
@@ -2,7 +2,7 @@ MOODLE TRADEMARKS POLICY
========================
The word "Moodle" is trademarked in many countries around the world. The word
was originally an acronym: Modular Object-Oriented Dynamic Learning
was originally coined as an acronym: Modular Object-Oriented Dynamic Learning
Environment. The trademark is owned by Martin Dougiamas, Founder and Director
of Moodle.
+5
View File
@@ -158,4 +158,9 @@ echo $outputhtml;
echo html_writer::end_tag('fieldset');
echo html_writer::end_tag('form');
$PAGE->requires->yui_module('moodle-core-formchangechecker', 'M.core_formchangechecker.init', [[
'formid' => 'adminsettings'
]]);
$PAGE->requires->string_for_js('changesmadereallygoaway', 'moodle');
echo $OUTPUT->footer();
+3 -1
View File
@@ -126,6 +126,7 @@ class filesize extends \admin_setting {
if (is_null($bytes)) {
return null;
}
$bytes = intval($bytes);
return self::parse_bytes($bytes);
}
@@ -145,9 +146,10 @@ class filesize extends \admin_setting {
return get_string('errorsetting', 'admin');
}
// Calculate size in bytes, ensuring we don't overflow PHP_INT_MAX.
$bytes = $data['v'] * $data['u'];
$result = (is_int($bytes) && $this->config_write($this->name, $bytes));
$result = $this->config_write($this->name, $bytes);
return ($result ? '' : get_string('errorsetting', 'admin'));
}
+8 -1
View File
@@ -120,7 +120,14 @@ if ($options['unset'] || $options['set'] !== null) {
}
// Check that the variable is not hard-set in the main config.php already.
if (array_key_exists($options['name'], $CFG->config_php_settings)) {
$component = $options['component'];
if (!empty($component)) {
$componentsettings = $CFG->forced_plugin_settings[$component] ?? [];
$settinginconfig = array_key_exists($options['name'], $componentsettings);
} else {
$settinginconfig = array_key_exists($options['name'], $CFG->config_php_settings);
}
if ($settinginconfig) {
cli_error('The configuration variable is hard-set in the config.php, unable to change.', 4);
}
+138
View File
@@ -0,0 +1,138 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Fix orphaned calendar events that were broken by MDL-67494.
*
* This script will look for all the calendar events which userids
* where broken by a wrong upgrade step, affecting to Moodle 3.9.5
* and up.
*
* It performs checks to both:
* a) Detect if the site was affected (ran the wrong upgrade step).
* b) Look for orphaned calendar events, categorising them as:
* - standard: site / category / course / group / user events
* - subscription: events created via subscriptions.
* - action: normal action events, created to show common important dates.
* - override: user and group override events, particular, that some activities support.
* - custom: other events, not being any of the above, common or particular.
* By specifying it (--fix) try to recover as many broken events (missing userid) as
* possible. Standard, subscription, action, override events in core are fully supported but
* override or custom events should be fixed by each plugin as far as there isn't any standard
* API (plugin-wise) to launch a rebuild of the calendar events.
*
* @package core
* @copyright 2021 onwards Simey Lameze <simey@moodle.com>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require_once(__DIR__ . '/../../config.php');
require_once($CFG->libdir . "/clilib.php");
require_once($CFG->libdir . '/db/upgradelib.php');
// Supported options.
$long = ['fix' => false, 'help' => false];
$short = ['f' => 'fix', 'h' => 'help'];
// CLI options.
[$options, $unrecognized] = cli_get_params($long, $short);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help']) {
$help = <<<EOT
Fix orphaned calendar events.
This script detects calendar events that have had their
userid lost. By default it will perform various checks
and report them, showing the site status in an easy way.
Also, optionally (--fix), it wil try to recover as many
lost userids as possible from different sources. Note that
this script aims to process well-know events in core,
leaving custom events in 3rd part plugins mostly unmodified
because there isn't any consistent way to regenerate them.
For more details: https://tracker.moodle.org/browse/MDL-71156
Options:
-h, --help Print out this help.
-f, --fix Fix the orphaned calendar events in the DB.
If not specified only check and report problems to STDERR.
Usage:
- Only report: \$ sudo -u www-data /usr/bin/php admin/cli/fix_orphaned_calendar_events.php
- Report and fix: \$ sudo -u www-data /usr/bin/php admin/cli/fix_orphaned_calendar_events.php -f
EOT;
cli_writeln($help);
die;
}
// Check various usual pre-requisites.
if (empty($CFG->version)) {
cli_error('Database is not yet installed.');
}
$admin = get_admin();
if (!$admin) {
cli_error('Error: No admin account was found.');
}
if (moodle_needs_upgrading()) {
cli_error('Moodle upgrade pending, script execution suspended.');
}
// Do everything as admin by default.
\core\session\manager::set_user($admin);
// Report current site status.
cli_heading('Checking the site status');
$needsfix = upgrade_calendar_site_status();
// Report current calendar events status.
cli_heading('Checking the calendar events status');
$info = upgrade_calendar_events_status();
$hasbadevents = $info['total']->bad > 0 || $info['total']->bad != $info['other']->bad;
$needsfix = $needsfix || $hasbadevents;
// If, selected, fix as many calendar events as possible.
if ($options['fix']) {
// If the report has told us that the fix was not needed... ask for confirmation!
if (!$needsfix) {
cli_writeln("This site DOES NOT NEED to run the calendar events fix.");
$input = cli_input('Are you completely sure that you want to run the fix? (y/N)', 'N', ['y', 'Y', 'n', 'N']);
if (strtolower($input) != 'y') {
exit(0);
}
cli_writeln("");
}
cli_heading('Fixing as many as possible calendar events');
upgrade_calendar_events_fix_remaining($info);
// Report current (after fix) calendar events status.
cli_heading('Checking the calendar events status (after fix)');
upgrade_calendar_events_status();
} else if ($needsfix) {
// Fix option was not provided but problem events have been found. Notify the user and provide info how to fix these events.
cli_writeln("This site NEEDS to run the calendar events fix!");
cli_writeln("To fix the calendar events, re-run this script with the --fix option.");
}
+8 -8
View File
@@ -119,7 +119,7 @@ if (!empty($options['collation'])) {
if ($dbcollation->value !== $collation || $dbcharset->value !== $charset) {
// Try to convert the DB.
echo "Converting database to '$collation' for $CFG->wwwroot:\n";
$sql = "ALTER DATABASE $CFG->dbname DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation";
$sql = "ALTER DATABASE `$CFG->dbname` DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation";
try {
$DB->change_database_structure($sql);
} catch (exception $e) {
@@ -146,7 +146,7 @@ if (!empty($options['collation'])) {
} else {
try {
$DB->change_database_structure("ALTER TABLE $table->name CONVERT TO CHARACTER SET $charset COLLATE $collation");
$DB->change_database_structure("ALTER TABLE `$table->name` CONVERT TO CHARACTER SET $charset COLLATE $collation");
echo "CONVERTED\n";
$converted++;
} catch (ddl_exception $e) {
@@ -163,7 +163,7 @@ if (!empty($options['collation'])) {
}
}
$sql = "SHOW FULL COLUMNS FROM $table->name WHERE collation IS NOT NULL";
$sql = "SHOW FULL COLUMNS FROM `$table->name` WHERE collation IS NOT NULL";
$rs2 = $DB->get_recordset_sql($sql);
foreach ($rs2 as $column) {
$column = (object)array_change_key_case((array)$column, CASE_LOWER);
@@ -181,7 +181,7 @@ if (!empty($options['collation'])) {
$notnull = ($column->null === 'NO') ? 'NOT NULL' : 'NULL';
$default = (!is_null($column->default) and $column->default !== '') ? "DEFAULT '$column->default'" : '';
// primary, unique and inc are not supported for texts
$sql = "ALTER TABLE $table->name
$sql = "ALTER TABLE `$table->name`
MODIFY COLUMN $column->field $column->type
CHARACTER SET $charset
COLLATE $collation $notnull $default";
@@ -192,11 +192,11 @@ if (!empty($options['collation'])) {
$default = !is_null($column->default) ? "DEFAULT '$column->default'" : '';
if ($rowformat != '') {
$sql = "ALTER TABLE $table->name $rowformat";
$sql = "ALTER TABLE `$table->name` $rowformat";
$DB->change_database_structure($sql);
}
$sql = "ALTER TABLE $table->name
$sql = "ALTER TABLE `$table->name`
MODIFY COLUMN $column->field $column->type
CHARACTER SET $charset
COLLATE $collation $notnull $default";
@@ -315,8 +315,8 @@ function mysql_set_row_format($tablename, $charset, $collation, $engine) {
if ($rs->row_format == 'Compact' || $rs->row_format == 'Redundant') {
$rowformat = $DB->get_row_format_sql($engine, $collation);
// Try to convert to compressed format and then try updating the collation again.
$DB->change_database_structure("ALTER TABLE $tablename $rowformat");
$DB->change_database_structure("ALTER TABLE $tablename CONVERT TO CHARACTER SET $charset COLLATE $collation");
$DB->change_database_structure("ALTER TABLE `$tablename` $rowformat");
$DB->change_database_structure("ALTER TABLE `$tablename` CONVERT TO CHARACTER SET $charset COLLATE $collation");
} else {
// Row format may not be the problem. Can not diagnose problem. Send fail reply.
return false;
+2 -2
View File
@@ -158,7 +158,7 @@ if (!empty($options['info'])) {
}
foreach ($fixtables as $table) {
$DB->change_database_structure("ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed");
$DB->change_database_structure("ALTER TABLE `{$prefix}$table` ROW_FORMAT=Compressed");
echo str_pad($prefix . $table, 32, ' ', STR_PAD_RIGHT) . " ... Compressed\n";
}
@@ -189,7 +189,7 @@ if (!empty($options['info'])) {
echo "SET GLOBAL innodb_file_per_table=1;\n";
echo "SET GLOBAL innodb_file_format=Barracuda;\n";
foreach ($fixtables as $table) {
echo "ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed;\n";
echo "ALTER TABLE `{$prefix}$table` ROW_FORMAT=Compressed;\n";
}
echo "\n";
exit(0);
+382
View File
@@ -2815,6 +2815,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.1.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -2996,6 +2997,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.2.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -3161,6 +3163,11 @@
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_igbinary322_version" level="optional">
<FEEDBACK>
<ON_CHECK message="igbinary322buggyversion" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.10" requires="3.5">
@@ -3177,6 +3184,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.2.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -3342,6 +3350,380 @@
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_igbinary322_version" level="optional">
<FEEDBACK>
<ON_CHECK message="igbinary322buggyversion" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.11" requires="3.6">
<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="14.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.3.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_EXTENSION name="sodium" level="optional"/>
</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_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="4.0" requires="3.6">
<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="10" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.3.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_EXTENSION name="sodium" level="optional"/>
<PHP_EXTENSION name="exif" level="optional"/>
</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_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+10 -2
View File
@@ -2127,8 +2127,16 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->container_start('upgradekeyreq');
$output .= $this->heading(get_string('upgradekeyreq', 'core_admin'));
$output .= html_writer::start_tag('form', array('method' => 'POST', 'action' => $url));
$output .= html_writer::empty_tag('input', array('name' => 'upgradekey', 'type' => 'password'));
$output .= html_writer::empty_tag('input', array('value' => get_string('submit'), 'type' => 'submit'));
$output .= html_writer::empty_tag('input', [
'name' => 'upgradekey',
'type' => 'password',
'class' => 'form-control w-auto',
]);
$output .= html_writer::empty_tag('input', [
'type' => 'submit',
'value' => get_string('submit'),
'class' => 'btn btn-primary mt-3',
]);
$output .= html_writer::end_tag('form');
$output .= $this->container_end();
$output .= $this->footer();
+2 -1
View File
@@ -38,7 +38,8 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
// "debugging" settingpage
$temp = new admin_settingpage('debugging', new lang_string('debugging', 'admin'));
$temp->add(new admin_setting_special_debug());
$temp->add(new admin_setting_configcheckbox('debugdisplay', new lang_string('debugdisplay', 'admin'), new lang_string('configdebugdisplay', 'admin'), ini_get_bool('display_errors')));
$temp->add(new admin_setting_configcheckbox('debugdisplay', new lang_string('debugdisplay', 'admin'),
new lang_string('configdebugdisplay', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('perfdebug', new lang_string('perfdebug', 'admin'), new lang_string('configperfdebug', 'admin'), '7', '15', '7'));
$temp->add(new admin_setting_configcheckbox('debugstringids', new lang_string('debugstringids', 'admin'), new lang_string('debugstringids_desc', 'admin'), 0));
$temp->add(new admin_setting_configselect('debugsqltrace',
+1
View File
@@ -32,6 +32,7 @@ $result = optional_param('result', null, PARAM_INT);
$pageurl = new \moodle_url('/admin/tasklogs.php');
$pageurl->param('filter', $filter);
$pageurl->param('result', $result);
$PAGE->set_url($pageurl);
$PAGE->set_context(context_system::instance());
+2 -5
View File
@@ -53,11 +53,8 @@ class behat_admin extends behat_base {
}
foreach ($data as $label => $value) {
$this->execute('behat_navigation::i_select_from_flat_navigation_drawer', [get_string('administrationsite')]);
// Search by label.
$this->execute('behat_forms::i_set_the_field_to', [get_string('search'), $label]);
$this->execute("behat_forms::press_button", get_string('search', 'admin'));
// Navigate straight to the search results fo rthis label.
$this->execute('behat_general::i_visit', ["/admin/search.php?query=" . urlencode($label)]);
// Admin settings does not use the same DOM structure than other moodle forms
// but we also need to use lib/behat/form_field/* to deal with the different moodle form elements.
@@ -1 +1 @@
{"version":3,"sources":["../src/log_info.js"],"names":["define","$","str","ModalFactory","Notification","loadInfo","id","info","link","get_string","then","langString","bodyInfo","forEach","item","append","create","title","body","html","large","catch","exception"],"mappings":"AAwBAA,OAAM,2BAAC,CAAC,QAAD,CAAW,UAAX,CAAuB,oBAAvB,CAA6C,mBAA7C,CAAD,CAAoE,SAASC,CAAT,CAAYC,CAAZ,CAAiBC,CAAjB,CAA+BC,CAA/B,CAA6C,CAEnH,MAAoD,CAShDC,QAAQ,CAAE,kBAASC,CAAT,CAAaC,CAAb,CAAmB,CAEzB,GAAIC,CAAAA,CAAI,CAAGP,CAAC,CAAC,wBAAyBK,CAAzB,CAA8B,KAA/B,CAAZ,CACAJ,CAAG,CAACO,UAAJ,CAAe,SAAf,CAA0B,gBAA1B,EAA4CC,IAA5C,CAAiD,SAASC,CAAT,CAAqB,CAElE,GAAIC,CAAAA,CAAQ,CAAGX,CAAC,CAAC,MAAD,CAAhB,CACAM,CAAI,CAACM,OAAL,CAAa,SAASC,CAAT,CAAe,CACxBF,CAAQ,CAACG,MAAT,CAAgB,OAASD,CAAT,CAAgB,OAAhC,CACH,CAFD,EAGAF,CAAQ,CAACG,MAAT,CAAgB,OAAhB,EAEA,MAAOZ,CAAAA,CAAY,CAACa,MAAb,CAAoB,CACvBC,KAAK,CAAEN,CADgB,CAEvBO,IAAI,CAAEN,CAAQ,CAACO,IAAT,EAFiB,CAGvBC,KAAK,GAHkB,CAApB,CAIJZ,CAJI,CAMV,CAdD,EAcGa,KAdH,CAcSjB,CAAY,CAACkB,SAdtB,CAeH,CA3B+C,CA6BvD,CA/BK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Shows a dialogue with info about this logs.\n *\n * @module tool_analytics/log_info\n * @class log_info\n * @package tool_analytics\n * @copyright 2017 David Monllao {@link http://www.davidmonllao.com}\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/str', 'core/modal_factory', 'core/notification'], function($, str, ModalFactory, Notification) {\n\n return /** @alias module:tool_analytics/log_info */ {\n\n /**\n * Prepares a modal info for a log's results.\n *\n * @method loadInfo\n * @param {int} id\n * @param {string[]} info\n */\n loadInfo: function(id, info) {\n\n var link = $('[data-model-log-id=\"' + id + '\"]');\n str.get_string('loginfo', 'tool_analytics').then(function(langString) {\n\n var bodyInfo = $(\"<ul>\");\n info.forEach(function(item) {\n bodyInfo.append('<li>' + item + '</li>');\n });\n bodyInfo.append(\"</ul>\");\n\n return ModalFactory.create({\n title: langString,\n body: bodyInfo.html(),\n large: true,\n }, link);\n\n }).catch(Notification.exception);\n }\n };\n});\n"],"file":"log_info.min.js"}
{"version":3,"sources":["../src/log_info.js"],"names":["define","$","str","ModalFactory","Notification","loadInfo","id","info","link","get_string","then","langString","bodyInfo","forEach","item","append","create","title","body","html","large","catch","exception"],"mappings":"AAsBAA,OAAM,2BAAC,CAAC,QAAD,CAAW,UAAX,CAAuB,oBAAvB,CAA6C,mBAA7C,CAAD,CAAoE,SAASC,CAAT,CAAYC,CAAZ,CAAiBC,CAAjB,CAA+BC,CAA/B,CAA6C,CAEnH,MAAoD,CAShDC,QAAQ,CAAE,kBAASC,CAAT,CAAaC,CAAb,CAAmB,CAEzB,GAAIC,CAAAA,CAAI,CAAGP,CAAC,CAAC,wBAAyBK,CAAzB,CAA8B,KAA/B,CAAZ,CACAJ,CAAG,CAACO,UAAJ,CAAe,SAAf,CAA0B,gBAA1B,EAA4CC,IAA5C,CAAiD,SAASC,CAAT,CAAqB,CAElE,GAAIC,CAAAA,CAAQ,CAAGX,CAAC,CAAC,MAAD,CAAhB,CACAM,CAAI,CAACM,OAAL,CAAa,SAASC,CAAT,CAAe,CACxBF,CAAQ,CAACG,MAAT,CAAgB,OAASD,CAAT,CAAgB,OAAhC,CACH,CAFD,EAGAF,CAAQ,CAACG,MAAT,CAAgB,OAAhB,EAEA,MAAOZ,CAAAA,CAAY,CAACa,MAAb,CAAoB,CACvBC,KAAK,CAAEN,CADgB,CAEvBO,IAAI,CAAEN,CAAQ,CAACO,IAAT,EAFiB,CAGvBC,KAAK,GAHkB,CAApB,CAIJZ,CAJI,CAMV,CAdD,EAcGa,KAdH,CAcSjB,CAAY,CAACkB,SAdtB,CAeH,CA3B+C,CA6BvD,CA/BK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Shows a dialogue with info about this logs.\n *\n * @module tool_analytics/log_info\n * @copyright 2017 David Monllao {@link http://www.davidmonllao.com}\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/str', 'core/modal_factory', 'core/notification'], function($, str, ModalFactory, Notification) {\n\n return /** @alias module:tool_analytics/log_info */ {\n\n /**\n * Prepares a modal info for a log's results.\n *\n * @method loadInfo\n * @param {int} id\n * @param {string[]} info\n */\n loadInfo: function(id, info) {\n\n var link = $('[data-model-log-id=\"' + id + '\"]');\n str.get_string('loginfo', 'tool_analytics').then(function(langString) {\n\n var bodyInfo = $(\"<ul>\");\n info.forEach(function(item) {\n bodyInfo.append('<li>' + item + '</li>');\n });\n bodyInfo.append(\"</ul>\");\n\n return ModalFactory.create({\n title: langString,\n body: bodyInfo.html(),\n large: true,\n }, link);\n\n }).catch(Notification.exception);\n }\n };\n});\n"],"file":"log_info.min.js"}
@@ -1 +1 @@
{"version":3,"sources":["../src/potential-contexts.js"],"names":["define","$","Ajax","processResults","selector","results","contexts","isArray","each","index","context","push","value","id","label","name","transport","query","success","failure","promise","modelid","attr","call","methodname","args","then","fail"],"mappings":"AAyBAA,OAAM,qCAAC,CAAC,QAAD,CAAW,WAAX,CAAD,CAA0B,SAASC,CAAT,CAAYC,CAAZ,CAAkB,CAE9C,MAA8D,CAE1DC,cAAc,CAAE,wBAASC,CAAT,CAAmBC,CAAnB,CAA4B,CACxC,GAAIC,CAAAA,CAAQ,CAAG,EAAf,CACA,GAAIL,CAAC,CAACM,OAAF,CAAUF,CAAV,CAAJ,CAAwB,CACpBJ,CAAC,CAACO,IAAF,CAAOH,CAAP,CAAgB,SAASI,CAAT,CAAgBC,CAAhB,CAAyB,CACrCJ,CAAQ,CAACK,IAAT,CAAc,CACVC,KAAK,CAAEF,CAAO,CAACG,EADL,CAEVC,KAAK,CAAEJ,CAAO,CAACK,IAFL,CAAd,CAIH,CALD,EAMA,MAAOT,CAAAA,CAEV,CATD,IASO,CACH,MAAOD,CAAAA,CACV,CACJ,CAhByD,CAkB1DW,SAAS,CAAE,mBAASZ,CAAT,CAAmBa,CAAnB,CAA0BC,CAA1B,CAAmCC,CAAnC,CAA4C,IAC/CC,CAAAA,CAD+C,CAG/CC,CAAO,CAAGpB,CAAC,CAACG,CAAD,CAAD,CAAYkB,IAAZ,CAAiB,SAAjB,GAA+B,IAHM,CAInDF,CAAO,CAAGlB,CAAI,CAACqB,IAAL,CAAU,CAAC,CACjBC,UAAU,CAAE,mCADK,CAEjBC,IAAI,CAAE,CACFR,KAAK,CAAEA,CADL,CAEFI,OAAO,CAAEA,CAFP,CAFW,CAAD,CAAV,CAAV,CAQAD,CAAO,CAAC,CAAD,CAAP,CAAWM,IAAX,CAAgBR,CAAhB,EAAyBS,IAAzB,CAA8BR,CAA9B,CACH,CA/ByD,CAmCjE,CArCK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Potential contexts selector module.\n *\n * @module tool_analytics/potential-contexts\n * @class potential-contexts\n * @package tool_analytics\n * @copyright 2019 David Monllao\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/ajax'], function($, Ajax) {\n\n return /** @alias module:tool_analytics/potential-contexts */ {\n\n processResults: function(selector, results) {\n var contexts = [];\n if ($.isArray(results)) {\n $.each(results, function(index, context) {\n contexts.push({\n value: context.id,\n label: context.name\n });\n });\n return contexts;\n\n } else {\n return results;\n }\n },\n\n transport: function(selector, query, success, failure) {\n var promise;\n\n let modelid = $(selector).attr('modelid') || null;\n promise = Ajax.call([{\n methodname: 'tool_analytics_potential_contexts',\n args: {\n query: query,\n modelid: modelid\n }\n }]);\n\n promise[0].then(success).fail(failure);\n }\n\n };\n\n});\n"],"file":"potential-contexts.min.js"}
{"version":3,"sources":["../src/potential-contexts.js"],"names":["define","$","Ajax","processResults","selector","results","contexts","isArray","each","index","context","push","value","id","label","name","transport","query","success","failure","promise","modelid","attr","call","methodname","args","then","fail"],"mappings":"AAuBAA,OAAM,qCAAC,CAAC,QAAD,CAAW,WAAX,CAAD,CAA0B,SAASC,CAAT,CAAYC,CAAZ,CAAkB,CAE9C,MAA8D,CAE1DC,cAAc,CAAE,wBAASC,CAAT,CAAmBC,CAAnB,CAA4B,CACxC,GAAIC,CAAAA,CAAQ,CAAG,EAAf,CACA,GAAIL,CAAC,CAACM,OAAF,CAAUF,CAAV,CAAJ,CAAwB,CACpBJ,CAAC,CAACO,IAAF,CAAOH,CAAP,CAAgB,SAASI,CAAT,CAAgBC,CAAhB,CAAyB,CACrCJ,CAAQ,CAACK,IAAT,CAAc,CACVC,KAAK,CAAEF,CAAO,CAACG,EADL,CAEVC,KAAK,CAAEJ,CAAO,CAACK,IAFL,CAAd,CAIH,CALD,EAMA,MAAOT,CAAAA,CAEV,CATD,IASO,CACH,MAAOD,CAAAA,CACV,CACJ,CAhByD,CAkB1DW,SAAS,CAAE,mBAASZ,CAAT,CAAmBa,CAAnB,CAA0BC,CAA1B,CAAmCC,CAAnC,CAA4C,IAC/CC,CAAAA,CAD+C,CAG/CC,CAAO,CAAGpB,CAAC,CAACG,CAAD,CAAD,CAAYkB,IAAZ,CAAiB,SAAjB,GAA+B,IAHM,CAInDF,CAAO,CAAGlB,CAAI,CAACqB,IAAL,CAAU,CAAC,CACjBC,UAAU,CAAE,mCADK,CAEjBC,IAAI,CAAE,CACFR,KAAK,CAAEA,CADL,CAEFI,OAAO,CAAEA,CAFP,CAFW,CAAD,CAAV,CAAV,CAQAD,CAAO,CAAC,CAAD,CAAP,CAAWM,IAAX,CAAgBR,CAAhB,EAAyBS,IAAzB,CAA8BR,CAA9B,CACH,CA/ByD,CAmCjE,CArCK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Potential contexts selector module.\n *\n * @module tool_analytics/potential-contexts\n * @copyright 2019 David Monllao\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/ajax'], function($, Ajax) {\n\n return /** @alias module:tool_analytics/potential-contexts */ {\n\n processResults: function(selector, results) {\n var contexts = [];\n if ($.isArray(results)) {\n $.each(results, function(index, context) {\n contexts.push({\n value: context.id,\n label: context.name\n });\n });\n return contexts;\n\n } else {\n return results;\n }\n },\n\n transport: function(selector, query, success, failure) {\n var promise;\n\n let modelid = $(selector).attr('modelid') || null;\n promise = Ajax.call([{\n methodname: 'tool_analytics_potential_contexts',\n args: {\n query: query,\n modelid: modelid\n }\n }]);\n\n promise[0].then(success).fail(failure);\n }\n\n };\n\n});\n"],"file":"potential-contexts.min.js"}
-2
View File
@@ -17,8 +17,6 @@
* Shows a dialogue with info about this logs.
*
* @module tool_analytics/log_info
* @class log_info
* @package tool_analytics
* @copyright 2017 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,8 +17,6 @@
* Potential contexts selector module.
*
* @module tool_analytics/potential-contexts
* @class potential-contexts
* @package tool_analytics
* @copyright 2019 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+1 -1
View File
@@ -137,7 +137,7 @@ if (!empty($validdatasets) && !$model->is_enabled() && $options['non-interactive
}
// Refresh the instance to prevent unexpected issues.
$model = new \core_analytics\model($modelobj);
$model = new \core_analytics\model($options['modelid']);
// Set the time splitting method file and enable it.
$model->enable($input);
+5 -4
View File
@@ -45,7 +45,7 @@ list($options, $unrecognised) = cli_get_params(
array(
'stop-on-failure' => 0,
'verbose' => false,
'replace' => false,
'replace' => '',
'help' => false,
'tags' => '',
'profile' => '',
@@ -70,7 +70,7 @@ $help = "
Behat utilities to run behat tests in parallel
Usage:
php run.php [--BEHAT_OPTION=\"value\"] [--feature=\"value\"] [--replace] [--fromrun=value --torun=value] [--help]
php run.php [--BEHAT_OPTION=\"value\"] [--feature=\"value\"] [--replace=\"{run}\"] [--fromrun=value --torun=value] [--help]
Options:
--BEHAT_OPTION Any combination of behat option specified in http://behat.readthedocs.org/en/v2.5/guides/6.cli.html
@@ -144,9 +144,10 @@ $extraopts = $unrecognised;
if ($options['profile']) {
$profile = $options['profile'];
// If profile passed is not set, then exit.
// If profile passed is not set, then exit (note we skip if the 'replace' option is found within the 'profile' value).
if (!isset($CFG->behat_config[$profile]) && !isset($CFG->behat_profiles[$profile]) &&
!(isset($options['replace']) && (strpos($options['profile'], $options['replace']) >= 0 ))) {
!($options['replace'] && (strpos($profile, (string) $options['replace']) !== false))) {
echo "Invalid profile passed: " . $profile . PHP_EOL;
exit(1);
}
+1
View File
@@ -46,6 +46,7 @@ $string['stepsdefinitionstype'] = 'Type';
$string['theninfo'] = 'Then. Checkings to ensure the outcomes are the expected ones';
$string['unknownexceptioninfo'] = 'There was a problem with Selenium or your browser. Please ensure you are using the latest version of Selenium. Error:';
$string['viewsteps'] = 'Filter';
$string['warndirrootconfigfound'] = 'A configuration file was found at {$a}. This file is not automatically updated and may become stale. We recommend removing this file.';
$string['wheninfo'] = 'When. Action that provokes an event';
$string['wrongbehatsetup'] = 'Something is wrong with the behat setup and so step definitions cannot be listed: <b>{$a->errormsg}</b><br/><br/>Please check:<ul>
<li>$CFG->behat_dataroot, $CFG->behat_prefix and $CFG->behat_wwwroot are set in config.php with different values from $CFG->dataroot, $CFG->prefix and $CFG->wwwroot.</li>
@@ -156,7 +156,7 @@ Feature: Set up contextual data for tests
And I log in as "user5"
And I should see "You are logged in as"
And I am on "Course 1" course homepage
And I should see "You can not enrol yourself in this course."
And I should see "You cannot enrol yourself in this course."
Scenario: Add modules
Given the following "courses" exist:
@@ -21,5 +21,5 @@ Feature: Transform date time string arguments
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I should see "##yesterday##l, j F Y##"
And I should see "##yesterday##%A, %d %B %Y##"
And I log out
@@ -6,14 +6,18 @@ Feature: Edit capabilities
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| username | firstname | lastname |
| teacher1 | Teacher | 1 |
| tutor | Teaching | Assistant |
| student | Student | One |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| user | course | role |
| teacher1 | C1 | editingteacher |
| tutor | C1 | teacher |
| student | C1 | student |
Scenario: Default system capabilities modification
Given I log in as "admin"
@@ -60,3 +64,25 @@ Feature: Edit capabilities
Then "mod/forum:deleteanypost" capability has "Prohibit" permission
And "mod/forum:editanypost" capability has "Prevent" permission
And "mod/forum:addquestion" capability has "Allow" permission
@javascript
Scenario: Edit permissions escapes role names correctly
When I am on the "C1" "Course" page logged in as "admin"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Your word for 'Teacher' | Teacher >= editing |
| Your word for 'Non-editing teacher' | Teacher < "editing" |
| Your word for 'Student' | Studier & 'learner' |
And I press "Save and display"
And I navigate to course participants
Then I should see "Teacher >= editing (Teacher)" in the "Teacher 1" "table_row"
And I should see "Teacher < \"editing\" (Non-editing teacher)" in the "Teaching Assistant" "table_row"
And I should see "Studier & 'learner' (Student)" in the "Student One" "table_row"
And I navigate to "Users > Permissions" in current page administration
And I should see "Teacher >= editing" in the "mod/forum:replypost" "table_row"
And I should see "Teacher < \"editing\"" in the "mod/forum:replypost" "table_row"
And I should see "Studier & 'learner'" in the "mod/forum:replypost" "table_row"
And I follow "Prohibit"
And "Teacher >= editing" "button" in the "Prohibit role" "dialogue" should be visible
And "Teacher < \"editing\"" "button" in the "Prohibit role" "dialogue" should be visible
And "Studier & 'learner'" "button" in the "Prohibit role" "dialogue" should be visible
@@ -48,7 +48,7 @@ Feature: Verify that all form fields values can be get and set
And the "Unenrol users" select box should not contain "Baker"
And the "Unenrol users" select box should not contain "President, Baker"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I press "Create page"
# Text (textarea & editor) & Select (multi-select) - Checking "I set the following fields to these values".
When I set the following fields to these values:
@@ -61,8 +61,7 @@ Feature: Verify that all form fields values can be get and set
# Checkbox - Checking "I set the field" and "The field matches value" ticked.
And I set the field "Force format" to "1"
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the field "Force format" matches value "1"
@@ -70,8 +69,7 @@ Feature: Verify that all form fields values can be get and set
# Checkbox - Checking "I set the field" and "The field matches value" unticked.
And I set the field "Force format" to ""
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the field "Force format" matches value ""
@@ -80,8 +78,7 @@ Feature: Verify that all form fields values can be get and set
And I set the following fields to these values:
| Force format | 1 |
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the following fields match these values:
@@ -92,8 +89,7 @@ Feature: Verify that all form fields values can be get and set
And I set the following fields to these values:
| Force format | |
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the following fields match these values:
@@ -115,20 +111,21 @@ Feature: Verify that all form fields values can be get and set
| Wiki name | Test this one baby |
| Default format | HTML |
And I press "Cancel"
And I am on "Course 1" course homepage
# Radio - Checking "I set the field" and "the field matches value".
And I add a "Choice" to section "1" and I fill the form with:
| Choice name | Test choice name |
| Description | Test choice description |
| Allow choice to be updated | Yes |
| Option 1 | one |
| Option 2 | two |
| Option 3 | three |
And I follow "Test choice name"
And I set the field "one" to "1"
And the following "activity" exists:
| activity | choice |
| course | C1 |
| idnumber | choice1 |
| intro | Test choice description |
| name | Test choice name |
| option | Option 1, Option 2, Option 3 |
| section | 1 |
| allowupdate | 1 |
And I am on the "Test choice name" "choice activity" page
And I set the field "Option 1" to "1"
And I press "Save my choice"
And the field "one" matches value "1"
And the field "two" matches value ""
And the field "Option 1" matches value "1"
And the field "Option 2" matches value ""
# Check if field xpath set/match works.
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
@@ -174,31 +171,23 @@ Feature: Verify that all form fields values can be get and set
And I press "Cancel"
# Advanced checkbox requires real browser to allow uncheck to work. MDL-58681. MDL-55386.
# Advanced checkbox - Checking "I set the field" and "The field matches value" ticked.
And I am on "Course 1" course homepage
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And I set the field "Display description on course page" to "1"
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And the field "Display description on course page" matches value "1"
And the field "Display description on course page" does not match value ""
# Advanced checkbox - Checking "I set the field" and "The field matches value" unticked.
And I set the field "Display description on course page" to ""
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And the field "Display description on course page" matches value ""
And the field "Display description on course page" does not match value "1"
# Advanced checkbox - Checking "I set the following fields to these values:" and "The following fields match these values" ticked.
And I set the following fields to these values:
| Display description on course page | 1 |
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And the following fields match these values:
| Display description on course page | 1 |
And the following fields do not match these values:
@@ -207,9 +196,7 @@ Feature: Verify that all form fields values can be get and set
And I set the following fields to these values:
| Display description on course page | |
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And the following fields match these values:
| Display description on course page | |
And the following fields do not match these values:
@@ -0,0 +1,85 @@
@tool @tool_behat
Feature: Use core page resolvers for the I am on the page steps
In order to write tests correctly
As a developer
I need to have steps which take me straight to a page
Scenario Outline: When I am on an instance
Given the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "course" exists:
| fullname | Economics 101 |
| shortname | ECON101 |
| idnumber | 2021-econ101 |
And the following "activity" exists:
| course | ECON101 |
| activity | forum |
| name | Fundamentals of Economics |
| idnumber | fundamentalsofeconomics |
And I log in as "admin"
When I am on the <identifier> <type> page
Then I should see "<shouldsee>"
Examples:
| description | identifier | type | shouldsee |
| Course Category idnumber | CAT1 | category | Add a new course |
| Course Category name | "Cat 1" | Category | Add a new course |
| Course Full name | "Economics 101" | course | Fundamentals of Economics |
| Course Short name | ECON101 | COURSE | Fundamentals of Economics |
| Course idnumber | "2021-econ101" | Course | Fundamentals of Economics |
| Forum idnumber | fundamentalsofeconomics | Activity | Add a new discussion |
| Generic activity editing | fundamentalsofeconomics | "Activity editing" | Updating: Forum |
| Forum name | "Fundamentals of Economics" | "Forum activity" | Add a new discussion |
| Forum name editing | "Fundamentals of Economics" | "Forum activity editing" | Updating: Forum |
| Forum name permissions | "Fundamentals of Economics" | "Forum activity permissions" | Permissions in Forum: Fun |
| Forum name roles | "Fundamentals of Economics" | "Forum activity roles" | Assign roles in Forum: Fun |
Scenario Outline: When I am on an instance logged in as
Given the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "course" exists:
| fullname | Economics 101 |
| shortname | ECON101 |
| idnumber | 2021-econ101 |
And the following "activity" exists:
| course | ECON101 |
| activity | forum |
| name | Fundamentals of Economics |
| idnumber | fundamentalsofeconomics |
When I am on the <identifier> <type> page logged in as admin
Then I should see "<shouldsee>"
Examples:
| description | identifier | type | shouldsee |
| Course Category idnumber | CAT1 | category | Add a new course |
| Course Category name | "Cat 1" | Category | Add a new course |
| Course Full name | "Economics 101" | course | Fundamentals of Economics |
| Course Short name | ECON101 | COURSE | Fundamentals of Economics |
| Course idnumber | "2021-econ101" | Course | Fundamentals of Economics |
| Forum idnumber | fundamentalsofeconomics | Activity | Add a new discussion |
| Generic activity editing | fundamentalsofeconomics | "Activity editing" | Updating: Forum |
| Forum name | "Fundamentals of Economics" | "Forum activity" | Add a new discussion |
| Forum name editing | "Fundamentals of Economics" | "Forum activity editing" | Updating: Forum |
| Forum name permissions | "Fundamentals of Economics" | "Forum activity permissions" | Permissions in Forum: Fun |
| Forum name roles | "Fundamentals of Economics" | "Forum activity roles" | Assign roles in Forum: Fun |
Scenario Outline: When I am on a named page
Given I log in as "admin"
When I am on the <identifier> page
Then I should see "<shouldsee>"
Examples:
| description | identifier | shouldsee |
| Admin page | "Admin notifications" | Check for available updates |
| Home page | Homepage | Recently accessed courses |
Scenario Outline: When I am on a named page logged in as
When I am on the <identifier> page logged in as admin
Then I should see "<shouldsee>"
Examples:
| description | identifier | shouldsee |
| Admin page | "Admin notifications" | Check for available updates |
| Home page | Homepage | Recently accessed courses |
@@ -0,0 +1,30 @@
@tool_behat
Feature: Verify that the inplace editable field works as expected
In order to use behat step definitions
As a test write
I need to ensure that the inplace editable works in forms
Background:
Given the following "course" exists:
| fullname | Course 1 |
| shortname | C1 |
And the following "activities" exist:
| activity | course | name | idnumber |
| forum | C1 | My first forum | forum1 |
| assign | C1 | My first assignment | assign1 |
| quiz | C1 | My first quiz | quiz1 |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
@javascript
Scenario: Using an inplace editable updates the name of an activity
When I set the field "Edit title" in the "My first assignment" "activity" to "Coursework submission"
Then I should see "Coursework submission"
And I should not see "My first assignment"
But I should see "My first forum"
And I should see "My first quiz"
And I set the field "Edit title" in the "Coursework submission" "activity" to "My first assignment"
And I should not see "Coursework submission"
But I should see "My first assignment"
And I should see "My first forum"
And I should see "My first quiz"
@@ -0,0 +1,52 @@
@tool_behat
Feature: Verify that keyboard steps work as expected
In order to use behat step definitions
As a test writer
I need to verify that the keyboard steps work as expected
@javascript
Scenario: Typing keys into a field causes them to be input
Given the following "users" exist:
| username | email | firstname | lastname | password |
| saffronr | saffron.rutledge@example.com | Saffron | Rutledge | flowerpower |
Given I click on "Log in" "link"
And I click on "Username" "field"
When I type "saffronr"
And I press the tab key
And I type "flowerpower"
And I press enter
Then I should see "You are logged in as Saffron Rutledge"
@javascript
Scenario: Using tab changes focus to the next or previous field
Given I click on "Log in" "link"
And I click on "Username" "field"
And the focused element is "Username" "field"
When I press the tab key
Then the focused element is "Password" "field"
And I press the shift tab key
And the focused element is "Username" "field"
@javascript
Scenario: Using the arrow keys allows me to navigate through menus
Given the following "users" exist:
| username | email | firstname | lastname |
| saffronr | saffron.rutledge@example.com | Saffron | Rutledge |
And I log in as "saffronr"
And I click on "Saffron Rutledge" "link" in the ".usermenu" "css_element"
When I press the up key
Then the focused element is "Log out" "link"
@javascript
Scenario: The escape key can be used to close a dialogue
Given the following "course" exists:
| fullname | C1|
| shortname | C1 |
And I log in as "admin"
And I am on "C1" course homepage
And I navigate to course participants
And I press "Enrol users"
And "Enrol users" "dialogue" should be visible
When I press the escape key
Then "Enrol users" "dialogue" should not be visible
@@ -14,8 +14,6 @@ Feature: Forms manipulation
Then the field "First name" matches value "Field value"
And the "Select a country" select box should contain "Japan"
And the field "New password" matches value "TestPass"
And I take focus off "Update profile" "button"
And I press "Update profile"
@javascript
Scenario: Expand all fieldsets and advanced elements
@@ -60,12 +60,12 @@ class tool_capability_settings_form extends moodleform {
$form->addElement('select', 'roles', get_string('roleslabel', 'tool_capability'), $roles, $attributes);
$form->setType('roles', PARAM_TEXT);
$form->addElement('checkbox', 'onlydiff',
get_string('filters', 'tool_capability'),
get_string('onlydiff', 'tool_capability'));
$filters = [];
$filters[] = $form->createElement('checkbox', 'onlydiff', get_string('onlydiff', 'tool_capability'));
$form->setType('onlydiff', PARAM_BOOL);
$form->addGroup($filters, 'filters', get_string('filters', 'tool_capability'), array('<br>'), false);
$form->addElement('submit', 'submitbutton', get_string('getreport', 'tool_capability'));
}
}
}
+11 -2
View File
@@ -53,7 +53,12 @@ function tool_capability_calculate_role_data($capability, array $roles) {
$sql = 'SELECT DISTINCT con.path, 1
FROM {context} con
JOIN {role_capabilities} rc ON rc.contextid = con.id
WHERE capability = ? '.$sqlroletest;
WHERE capability = ? ' .
$sqlroletest .
// Context path should never be null, but can happen in old database with
// bad data (e.g. a course_module where the corresponding course no longer exists).
// We need to leave these out of the report to prevent errors.
' AND con.path IS NOT NULL';
$relevantpaths = $DB->get_records_sql_menu($sql, $params);
$requiredcontexts = array($systemcontext->id);
foreach ($relevantpaths as $path => $notused) {
@@ -88,6 +93,10 @@ function tool_capability_calculate_role_data($capability, array $roles) {
// Put the role capabilities into the context tree.
foreach ($rolecaps as $rolecap) {
if (!isset($contexts[$rolecap->contextid])) {
// Skip capabilities in orphaned contexts that are not in the tree.
continue;
}
$contexts[$rolecap->contextid]->rolecapabilities[$rolecap->roleid] = $rolecap->permission;
}
@@ -99,4 +108,4 @@ function tool_capability_calculate_role_data($capability, array $roles) {
}
return $contexts;
}
}
@@ -0,0 +1,88 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Tests for the capability overview helper functions.
*
* @package tool_capability
* @copyright 2021 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/capability/locallib.php');
/**
* Tests for the capability overview helper functions.
*/
class tool_capability_locallib_testcase extends advanced_testcase {
/**
* Test the function that gets the data - simple case.
*/
public function test_tool_capability_calculate_role_data() {
global $DB;
$data = tool_capability_calculate_role_data('mod/quiz:attempt', get_all_roles());
$systcontext = context_system::instance();
$studentroleid = $DB->get_field('role', 'id', ['shortname' => 'student']);
$this->assertArrayHasKey($systcontext->id, $data);
$this->assertCount(1, $data);
foreach ($data[$systcontext->id]->rolecapabilities as $roleid => $permission) {
if ($roleid == $studentroleid) {
$this->assertEquals(CAP_ALLOW, $permission);
} else {
$this->assertEquals(CAP_INHERIT, $permission);
}
}
}
/**
* Test the function that gets the data - simple case.
*/
public function test_tool_capability_calculate_role_data_orphan_contexts() {
global $DB;
$this->resetAfterTest();
// This simulates a situation that seems to happen sometimes, where
// we end up with contexts with path = NULL in the database.
$systcontext = context_system::instance();
$generator = $this->getDataGenerator();
$course = $generator->create_course();
$coursecontext = context_course::instance($course->id);
$studentroleid = $DB->get_field('role', 'id', ['shortname' => 'student']);
role_change_permission($studentroleid, $coursecontext, 'mod/quiz:attempt', CAP_PREVENT);
// This is where we simulate the breakage.
$DB->set_field('context', 'path', null, ['id' => $coursecontext->id]);
// Now call the function. We mainly just want to know there is no exception.
$data = tool_capability_calculate_role_data('mod/quiz:attempt', get_all_roles());
$this->assertArrayHasKey($systcontext->id, $data);
$this->assertCount(1, $data);
foreach ($data[$systcontext->id]->rolecapabilities as $roleid => $permission) {
if ($roleid == $studentroleid) {
$this->assertEquals(CAP_ALLOW, $permission);
} else {
$this->assertEquals(CAP_INHERIT, $permission);
}
}
}
}
@@ -189,7 +189,12 @@ class cohort_role_assignments_table extends table_sql {
FROM {tool_cohortroles} uca
JOIN {user} u ON u.id = uca.userid
JOIN {cohort} c ON c.id = uca.cohortid";
$params = array();
// Check if any additional filtering is required.
[$sqlwhere, $params] = $this->get_sql_where();
if ($sqlwhere) {
$sql .= " WHERE {$sqlwhere}";
}
// Add order by if needed.
if (!$count && $sqlsort = $this->get_sql_sort()) {
+2 -2
View File
@@ -86,8 +86,8 @@ if ($removeid) {
$title = get_string('existingcohortroles', 'tool_cohortroles');
echo $output->heading($title);
$url = new moodle_url('/admin/tool/cohortroles/index.php');
$table = new tool_cohortroles\output\cohort_role_assignments_table(uniqid(), $url);
$table = new tool_cohortroles\output\cohort_role_assignments_table('cohort-role-assignments', $pageurl);
echo $table->out(50, true);
echo $output->spacer();
+28 -24
View File
@@ -39,7 +39,7 @@ class tool_customlang_utils {
const ROUGH_NUMBER_OF_STRINGS = 16500;
/** @var array cache of {@link self::list_components()} results */
protected static $components = null;
private static $components = null;
/**
* This class can not be instantiated
@@ -54,28 +54,30 @@ class tool_customlang_utils {
*/
public static function list_components() {
$list['moodle'] = 'core';
if (self::$components === null) {
$list['moodle'] = 'core';
$coresubsystems = core_component::get_core_subsystems();
ksort($coresubsystems); // should be but just in case
foreach ($coresubsystems as $name => $location) {
$list[$name] = 'core_'.$name;
}
$coresubsystems = core_component::get_core_subsystems();
ksort($coresubsystems); // Should be but just in case.
foreach ($coresubsystems as $name => $location) {
$list[$name] = 'core_' . $name;
}
$plugintypes = core_component::get_plugin_types();
foreach ($plugintypes as $type => $location) {
$pluginlist = core_component::get_plugin_list($type);
foreach ($pluginlist as $name => $ununsed) {
if ($type == 'mod') {
// Plugin names are now automatically validated.
$list[$name] = $type.'_'.$name;
} else {
$list[$type.'_'.$name] = $type.'_'.$name;
$plugintypes = core_component::get_plugin_types();
foreach ($plugintypes as $type => $location) {
$pluginlist = core_component::get_plugin_list($type);
foreach ($pluginlist as $name => $ununsed) {
if ($type == 'mod') {
// Plugin names are now automatically validated.
$list[$name] = $type . '_' . $name;
} else {
$list[$type . '_' . $name] = $type . '_' . $name;
}
}
}
self::$components = $list;
}
return $list;
return self::$components;
}
/**
@@ -211,14 +213,18 @@ class tool_customlang_utils {
return false;
}
// get all customized strings from updated components
list($insql, $inparams) = $DB->get_in_or_equal(self::list_components());
// Get all customized strings from updated valid components.
$sql = "SELECT s.*, c.name AS component
FROM {tool_customlang} s
JOIN {tool_customlang_components} c ON s.componentid = c.id
WHERE s.lang = ?
AND (s.local IS NOT NULL OR s.modified = 1)
AND c.name $insql
ORDER BY componentid, stringid";
$strings = $DB->get_records_sql($sql, array($lang));
array_unshift($inparams, $lang);
$strings = $DB->get_records_sql($sql, $inparams);
$files = array();
foreach ($strings as $string) {
@@ -336,11 +342,9 @@ EOF
* @return string|boolean filename eg 'moodle.php' or 'workshop.php', false if not found
*/
protected static function get_component_filename($component) {
if (is_null(self::$components)) {
self::$components = self::list_components();
}
$return = false;
foreach (self::$components as $legacy => $normalized) {
foreach (self::list_components() as $legacy => $normalized) {
if ($component === $normalized) {
$return = $legacy.'.php';
break;
@@ -97,7 +97,7 @@
{{#modified}}list-group-item-info{{/modified}}"
>
<div class="row">
<div class="col-sm-4 col-md-2">
<div class="col-sm-4 col-md-2 text-break">
<div class="d-md-none">
<strong>{{#str}}headingcomponent, tool_customlang{{/str}}</strong>
</div>
@@ -5,7 +5,10 @@ Feature: Within a moodle instance, an administrator should be able to modify lan
I need to be able to access and change values in the the language customisation of the language pack.
Background:
Given I log in as "admin"
# This is a very slow running test and on slow databases can take minutes to complete.
Given I mark this test as slow setting a timeout factor of 4
And I log in as "admin"
And I navigate to "Language > Language customisation" in site administration
And I set the field "lng" to "en"
And I press "Open language pack for editing"
@@ -4,6 +4,10 @@ Feature: Within a moodle instance, an administrator should be able to export mod
As an admin
I need to be able to export the php-files of the language customisation of a language.
Background:
# This is a very slow running feature and on slow databases can take minutes to complete.
Given I mark this test as slow setting a timeout factor of 4
@javascript
Scenario: Export button should not appear if no customization is made
Given I log in as "admin"
@@ -5,7 +5,10 @@ Feature: Within a moodle instance, an administrator should be able to import mod
I need to be able to import the zips and php files of the language customisation of a language.
Background:
Given I log in as "admin"
# This is a very slow running test and on slow databases can take minutes to complete.
Given I mark this test as slow setting a timeout factor of 4
And I log in as "admin"
And I navigate to "Language > Language customisation" in site administration
And I set the field "lng" to "en"
And I click on "Import custom strings" "button"
@@ -5,8 +5,11 @@ Feature: Within a moodle instance, an administrator should be able to import lan
I need to be able to import only some language customisation strings depending on some conditions.
Background:
# This is a very slow running feature and on slow databases can take minutes to complete.
Given I mark this test as slow setting a timeout factor of 4
# Add one customization.
Given I log in as "admin"
And I log in as "admin"
And I navigate to "Language > Language customisation" in site administration
And I set the field "lng" to "en"
And I press "Open language pack for editing"
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
{"version":3,"sources":["../src/effective_retention_period.js"],"names":["define","$","SELECTORS","PURPOSE_SELECT","RETENTION_FIELD","EffectiveRetentionPeriod","purposeRetentionPeriods","registerEventListeners","removeListeners","off","prototype","on","ev","selected","currentTarget","val","selectedPurpose","text","bind","init"],"mappings":"AAuBAA,OAAM,+CAAC,CAAC,QAAD,CAAD,CACF,SAASC,CAAT,CAAY,IAEJC,CAAAA,CAAS,CAAG,CACZC,cAAc,CAAE,eADJ,CAEZC,eAAe,CAAE,qDAFL,CAFR,CAYJC,CAAwB,CAAG,SAASC,CAAT,CAAkC,CAC7D,KAAKA,uBAAL,CAA+BA,CAA/B,CACA,KAAKC,sBAAL,EACH,CAfO,CAsBJC,CAAe,CAAG,UAAW,CAC7BP,CAAC,CAACC,CAAS,CAACC,cAAX,CAAD,CAA4BM,GAA5B,CAAgC,QAAhC,CACH,CAxBO,CA8BRJ,CAAwB,CAACK,SAAzB,CAAmCJ,uBAAnC,CAA6D,EAA7D,CAOAD,CAAwB,CAACK,SAAzB,CAAmCH,sBAAnC,CAA4D,UAAW,CAEnEN,CAAC,CAACC,CAAS,CAACC,cAAX,CAAD,CAA4BQ,EAA5B,CAA+B,QAA/B,CAAyC,SAASC,CAAT,CAAa,IAC9CC,CAAAA,CAAQ,CAAGZ,CAAC,CAACW,CAAE,CAACE,aAAJ,CAAD,CAAoBC,GAApB,EADmC,CAE9CC,CAAe,CAAG,KAAKV,uBAAL,CAA6BO,CAA7B,CAF4B,CAGlDZ,CAAC,CAACC,CAAS,CAACE,eAAX,CAAD,CAA6Ba,IAA7B,CAAkCD,CAAlC,CACH,CAJwC,CAIvCE,IAJuC,CAIlC,IAJkC,CAAzC,CAKH,CAPD,CASA,MAAwE,CACpEC,IAAI,CAAE,cAASb,CAAT,CAAkC,CAEpCE,CAAe,GACf,MAAO,IAAIH,CAAAA,CAAJ,CAA6BC,CAA7B,CACV,CALmE,CAO3E,CAtDC,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Module to update the displayed retention period.\n *\n * @module tool_dataprivacy/effective_retention_period\n * @package tool_dataprivacy\n * @copyright 2018 David Monllao\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery'],\n function($) {\n\n var SELECTORS = {\n PURPOSE_SELECT: '#id_purposeid',\n RETENTION_FIELD: '#fitem_id_retention_current [data-fieldtype=static]',\n };\n\n /**\n * Constructor for the retention period display.\n *\n * @param {Array} purposeRetentionPeriods Associative array of purposeids with effective retention period at this context\n */\n var EffectiveRetentionPeriod = function(purposeRetentionPeriods) {\n this.purposeRetentionPeriods = purposeRetentionPeriods;\n this.registerEventListeners();\n };\n\n /**\n * Removes the current 'change' listeners.\n *\n * Useful when a new form is loaded.\n */\n var removeListeners = function() {\n $(SELECTORS.PURPOSE_SELECT).off('change');\n };\n\n /**\n * @var {Array} purposeRetentionPeriods\n * @private\n */\n EffectiveRetentionPeriod.prototype.purposeRetentionPeriods = [];\n\n /**\n * Add purpose change listeners.\n *\n * @method registerEventListeners\n */\n EffectiveRetentionPeriod.prototype.registerEventListeners = function() {\n\n $(SELECTORS.PURPOSE_SELECT).on('change', function(ev) {\n var selected = $(ev.currentTarget).val();\n var selectedPurpose = this.purposeRetentionPeriods[selected];\n $(SELECTORS.RETENTION_FIELD).text(selectedPurpose);\n }.bind(this));\n };\n\n return /** @alias module:tool_dataprivacy/effective_retention_period */ {\n init: function(purposeRetentionPeriods) {\n // Remove previously attached listeners.\n removeListeners();\n return new EffectiveRetentionPeriod(purposeRetentionPeriods);\n }\n };\n }\n);\n\n"],"file":"effective_retention_period.min.js"}
{"version":3,"sources":["../src/effective_retention_period.js"],"names":["define","$","SELECTORS","PURPOSE_SELECT","RETENTION_FIELD","EffectiveRetentionPeriod","purposeRetentionPeriods","registerEventListeners","removeListeners","off","prototype","on","ev","selected","currentTarget","val","selectedPurpose","text","bind","init"],"mappings":"AAsBAA,OAAM,+CAAC,CAAC,QAAD,CAAD,CACF,SAASC,CAAT,CAAY,IAEJC,CAAAA,CAAS,CAAG,CACZC,cAAc,CAAE,eADJ,CAEZC,eAAe,CAAE,qDAFL,CAFR,CAYJC,CAAwB,CAAG,SAASC,CAAT,CAAkC,CAC7D,KAAKA,uBAAL,CAA+BA,CAA/B,CACA,KAAKC,sBAAL,EACH,CAfO,CAsBJC,CAAe,CAAG,UAAW,CAC7BP,CAAC,CAACC,CAAS,CAACC,cAAX,CAAD,CAA4BM,GAA5B,CAAgC,QAAhC,CACH,CAxBO,CA8BRJ,CAAwB,CAACK,SAAzB,CAAmCJ,uBAAnC,CAA6D,EAA7D,CAOAD,CAAwB,CAACK,SAAzB,CAAmCH,sBAAnC,CAA4D,UAAW,CAEnEN,CAAC,CAACC,CAAS,CAACC,cAAX,CAAD,CAA4BQ,EAA5B,CAA+B,QAA/B,CAAyC,SAASC,CAAT,CAAa,IAC9CC,CAAAA,CAAQ,CAAGZ,CAAC,CAACW,CAAE,CAACE,aAAJ,CAAD,CAAoBC,GAApB,EADmC,CAE9CC,CAAe,CAAG,KAAKV,uBAAL,CAA6BO,CAA7B,CAF4B,CAGlDZ,CAAC,CAACC,CAAS,CAACE,eAAX,CAAD,CAA6Ba,IAA7B,CAAkCD,CAAlC,CACH,CAJwC,CAIvCE,IAJuC,CAIlC,IAJkC,CAAzC,CAKH,CAPD,CASA,MAAwE,CACpEC,IAAI,CAAE,cAASb,CAAT,CAAkC,CAEpCE,CAAe,GACf,MAAO,IAAIH,CAAAA,CAAJ,CAA6BC,CAA7B,CACV,CALmE,CAO3E,CAtDC,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Module to update the displayed retention period.\n *\n * @module tool_dataprivacy/effective_retention_period\n * @copyright 2018 David Monllao\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery'],\n function($) {\n\n var SELECTORS = {\n PURPOSE_SELECT: '#id_purposeid',\n RETENTION_FIELD: '#fitem_id_retention_current [data-fieldtype=static]',\n };\n\n /**\n * Constructor for the retention period display.\n *\n * @param {Array} purposeRetentionPeriods Associative array of purposeids with effective retention period at this context\n */\n var EffectiveRetentionPeriod = function(purposeRetentionPeriods) {\n this.purposeRetentionPeriods = purposeRetentionPeriods;\n this.registerEventListeners();\n };\n\n /**\n * Removes the current 'change' listeners.\n *\n * Useful when a new form is loaded.\n */\n var removeListeners = function() {\n $(SELECTORS.PURPOSE_SELECT).off('change');\n };\n\n /**\n * @var {Array} purposeRetentionPeriods\n * @private\n */\n EffectiveRetentionPeriod.prototype.purposeRetentionPeriods = [];\n\n /**\n * Add purpose change listeners.\n *\n * @method registerEventListeners\n */\n EffectiveRetentionPeriod.prototype.registerEventListeners = function() {\n\n $(SELECTORS.PURPOSE_SELECT).on('change', function(ev) {\n var selected = $(ev.currentTarget).val();\n var selectedPurpose = this.purposeRetentionPeriods[selected];\n $(SELECTORS.RETENTION_FIELD).text(selectedPurpose);\n }.bind(this));\n };\n\n return /** @alias module:tool_dataprivacy/effective_retention_period */ {\n init: function(purposeRetentionPeriods) {\n // Remove previously attached listeners.\n removeListeners();\n return new EffectiveRetentionPeriod(purposeRetentionPeriods);\n }\n };\n }\n);\n\n"],"file":"effective_retention_period.min.js"}
@@ -1 +1 @@
{"version":3,"sources":["../src/events.js"],"names":["define","approve","bulkApprove","deny","bulkDeny","complete"],"mappings":"AAwBAA,OAAM,2BAAC,EAAD,CAAK,UAAW,CAClB,MAAO,CACHC,OAAO,CAAE,uCADN,CAEHC,WAAW,CAAE,4CAFV,CAGHC,IAAI,CAAE,oCAHH,CAIHC,QAAQ,CAAE,yCAJP,CAKHC,QAAQ,CAAE,wCALP,CAOV,CARK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Contain the events the data privacy tool can fire.\n *\n * @module tool_dataprivacy/events\n * @class events\n * @package tool_dataprivacy\n * @copyright 2018 Jun Pataleta\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine([], function() {\n return {\n approve: 'tool_dataprivacy-data_request:approve',\n bulkApprove: 'tool_dataprivacy-data_request:bulk_approve',\n deny: 'tool_dataprivacy-data_request:deny',\n bulkDeny: 'tool_dataprivacy-data_request:bulk_deny',\n complete: 'tool_dataprivacy-data_request:complete'\n };\n});\n"],"file":"events.min.js"}
{"version":3,"sources":["../src/events.js"],"names":["define","approve","bulkApprove","deny","bulkDeny","complete"],"mappings":"AAsBAA,OAAM,2BAAC,EAAD,CAAK,UAAW,CAClB,MAAO,CACHC,OAAO,CAAE,uCADN,CAEHC,WAAW,CAAE,4CAFV,CAGHC,IAAI,CAAE,oCAHH,CAIHC,QAAQ,CAAE,yCAJP,CAKHC,QAAQ,CAAE,wCALP,CAOV,CARK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Contain the events the data privacy tool can fire.\n *\n * @module tool_dataprivacy/events\n * @copyright 2018 Jun Pataleta\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine([], function() {\n return {\n approve: 'tool_dataprivacy-data_request:approve',\n bulkApprove: 'tool_dataprivacy-data_request:bulk_approve',\n deny: 'tool_dataprivacy-data_request:deny',\n bulkDeny: 'tool_dataprivacy-data_request:bulk_deny',\n complete: 'tool_dataprivacy-data_request:complete'\n };\n});\n"],"file":"events.min.js"}
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
{"version":3,"sources":["../src/form-user-selector.js"],"names":["define","$","Ajax","Templates","processResults","selector","results","users","each","index","user","push","value","id","label","_label","transport","query","success","failure","promise","call","methodname","args","then","promises","i","render","when","apply","arguments","fail"],"mappings":"AAyBAA,OAAM,uCAAC,CAAC,QAAD,CAAW,WAAX,CAAwB,gBAAxB,CAAD,CAA4C,SAASC,CAAT,CAAYC,CAAZ,CAAkBC,CAAlB,CAA6B,CAE3E,MAAgE,CAE5DC,cAAc,CAAE,wBAASC,CAAT,CAAmBC,CAAnB,CAA4B,CACxC,GAAIC,CAAAA,CAAK,CAAG,EAAZ,CACAN,CAAC,CAACO,IAAF,CAAOF,CAAP,CAAgB,SAASG,CAAT,CAAgBC,CAAhB,CAAsB,CAClCH,CAAK,CAACI,IAAN,CAAW,CACPC,KAAK,CAAEF,CAAI,CAACG,EADL,CAEPC,KAAK,CAAEJ,CAAI,CAACK,MAFL,CAAX,CAIH,CALD,EAMA,MAAOR,CAAAA,CACV,CAX2D,CAa5DS,SAAS,CAAE,mBAASX,CAAT,CAAmBY,CAAnB,CAA0BC,CAA1B,CAAmCC,CAAnC,CAA4C,CACnD,GAAIC,CAAAA,CAAO,CAEDlB,CAAI,CAACmB,IAAL,CAAU,CAAC,CACjBC,UAAU,CAAE,4BADK,CAEjBC,IAAI,CAAE,CACFN,KAAK,CAAEA,CADL,CAFW,CAAD,CAAV,CAFV,CASAG,CAAO,CAAC,CAAD,CAAP,CAAWI,IAAX,CAAgB,SAASlB,CAAT,CAAkB,CAC9B,GAAImB,CAAAA,CAAQ,CAAG,EAAf,CACIC,CAAC,CAAG,CADR,CAIAzB,CAAC,CAACO,IAAF,CAAOF,CAAP,CAAgB,SAASG,CAAT,CAAgBC,CAAhB,CAAsB,CAClCe,CAAQ,CAACd,IAAT,CAAcR,CAAS,CAACwB,MAAV,CAAiB,gDAAjB,CAAmEjB,CAAnE,CAAd,CACH,CAFD,EAKA,MAAOT,CAAAA,CAAC,CAAC2B,IAAF,CAAOC,KAAP,CAAa5B,CAAC,CAAC2B,IAAf,CAAqBH,CAArB,EAA+BD,IAA/B,CAAoC,UAAW,CAClD,GAAID,CAAAA,CAAI,CAAGO,SAAX,CACA7B,CAAC,CAACO,IAAF,CAAOF,CAAP,CAAgB,SAASG,CAAT,CAAgBC,CAAhB,CAAsB,CAClCA,CAAI,CAACK,MAAL,CAAcQ,CAAI,CAACG,CAAD,CAAlB,CACAA,CAAC,EACJ,CAHD,EAIAR,CAAO,CAACZ,CAAD,CAEV,CARM,CAUV,CApBD,EAoBGyB,IApBH,CAoBQZ,CApBR,CAqBH,CA5C2D,CAgDnE,CAlDK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Potential user selector module.\n *\n * @module tool_dataprivacy/form-user-selector\n * @class form-user-selector\n * @package tool_dataprivacy\n * @copyright 2018 Jun Pataleta\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/ajax', 'core/templates'], function($, Ajax, Templates) {\n\n return /** @alias module:tool_dataprivacy/form-user-selector */ {\n\n processResults: function(selector, results) {\n var users = [];\n $.each(results, function(index, user) {\n users.push({\n value: user.id,\n label: user._label\n });\n });\n return users;\n },\n\n transport: function(selector, query, success, failure) {\n var promise;\n\n promise = Ajax.call([{\n methodname: 'tool_dataprivacy_get_users',\n args: {\n query: query\n }\n }]);\n\n promise[0].then(function(results) {\n var promises = [],\n i = 0;\n\n // Render the label.\n $.each(results, function(index, user) {\n promises.push(Templates.render('tool_dataprivacy/form-user-selector-suggestion', user));\n });\n\n // Apply the label to the results.\n return $.when.apply($.when, promises).then(function() {\n var args = arguments;\n $.each(results, function(index, user) {\n user._label = args[i];\n i++;\n });\n success(results);\n return;\n });\n\n }).fail(failure);\n }\n\n };\n\n});\n"],"file":"form-user-selector.min.js"}
{"version":3,"sources":["../src/form-user-selector.js"],"names":["define","$","Ajax","Templates","processResults","selector","results","users","each","index","user","push","value","id","label","_label","transport","query","success","failure","promise","call","methodname","args","then","promises","i","render","when","apply","arguments","fail"],"mappings":"AAuBAA,OAAM,uCAAC,CAAC,QAAD,CAAW,WAAX,CAAwB,gBAAxB,CAAD,CAA4C,SAASC,CAAT,CAAYC,CAAZ,CAAkBC,CAAlB,CAA6B,CAE3E,MAAgE,CAE5DC,cAAc,CAAE,wBAASC,CAAT,CAAmBC,CAAnB,CAA4B,CACxC,GAAIC,CAAAA,CAAK,CAAG,EAAZ,CACAN,CAAC,CAACO,IAAF,CAAOF,CAAP,CAAgB,SAASG,CAAT,CAAgBC,CAAhB,CAAsB,CAClCH,CAAK,CAACI,IAAN,CAAW,CACPC,KAAK,CAAEF,CAAI,CAACG,EADL,CAEPC,KAAK,CAAEJ,CAAI,CAACK,MAFL,CAAX,CAIH,CALD,EAMA,MAAOR,CAAAA,CACV,CAX2D,CAa5DS,SAAS,CAAE,mBAASX,CAAT,CAAmBY,CAAnB,CAA0BC,CAA1B,CAAmCC,CAAnC,CAA4C,CACnD,GAAIC,CAAAA,CAAO,CAEDlB,CAAI,CAACmB,IAAL,CAAU,CAAC,CACjBC,UAAU,CAAE,4BADK,CAEjBC,IAAI,CAAE,CACFN,KAAK,CAAEA,CADL,CAFW,CAAD,CAAV,CAFV,CASAG,CAAO,CAAC,CAAD,CAAP,CAAWI,IAAX,CAAgB,SAASlB,CAAT,CAAkB,CAC9B,GAAImB,CAAAA,CAAQ,CAAG,EAAf,CACIC,CAAC,CAAG,CADR,CAIAzB,CAAC,CAACO,IAAF,CAAOF,CAAP,CAAgB,SAASG,CAAT,CAAgBC,CAAhB,CAAsB,CAClCe,CAAQ,CAACd,IAAT,CAAcR,CAAS,CAACwB,MAAV,CAAiB,gDAAjB,CAAmEjB,CAAnE,CAAd,CACH,CAFD,EAKA,MAAOT,CAAAA,CAAC,CAAC2B,IAAF,CAAOC,KAAP,CAAa5B,CAAC,CAAC2B,IAAf,CAAqBH,CAArB,EAA+BD,IAA/B,CAAoC,UAAW,CAClD,GAAID,CAAAA,CAAI,CAAGO,SAAX,CACA7B,CAAC,CAACO,IAAF,CAAOF,CAAP,CAAgB,SAASG,CAAT,CAAgBC,CAAhB,CAAsB,CAClCA,CAAI,CAACK,MAAL,CAAcQ,CAAI,CAACG,CAAD,CAAlB,CACAA,CAAC,EACJ,CAHD,EAIAR,CAAO,CAACZ,CAAD,CAEV,CARM,CAUV,CApBD,EAoBGyB,IApBH,CAoBQZ,CApBR,CAqBH,CA5C2D,CAgDnE,CAlDK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Potential user selector module.\n *\n * @module tool_dataprivacy/form-user-selector\n * @copyright 2018 Jun Pataleta\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/ajax', 'core/templates'], function($, Ajax, Templates) {\n\n return /** @alias module:tool_dataprivacy/form-user-selector */ {\n\n processResults: function(selector, results) {\n var users = [];\n $.each(results, function(index, user) {\n users.push({\n value: user.id,\n label: user._label\n });\n });\n return users;\n },\n\n transport: function(selector, query, success, failure) {\n var promise;\n\n promise = Ajax.call([{\n methodname: 'tool_dataprivacy_get_users',\n args: {\n query: query\n }\n }]);\n\n promise[0].then(function(results) {\n var promises = [],\n i = 0;\n\n // Render the label.\n $.each(results, function(index, user) {\n promises.push(Templates.render('tool_dataprivacy/form-user-selector-suggestion', user));\n });\n\n // Apply the label to the results.\n return $.when.apply($.when, promises).then(function() {\n var args = arguments;\n $.each(results, function(index, user) {\n user._label = args[i];\n i++;\n });\n success(results);\n return;\n });\n\n }).fail(failure);\n }\n\n };\n\n});\n"],"file":"form-user-selector.min.js"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
{"version":3,"sources":["../src/request_filter.js"],"names":["define","$","Autocomplete","Str","Notification","SELECTORS","REQUEST_FILTERS","init","get_strings","key","component","then","langstrings","placeholder","noSelectionString","enhance","fail","exception","last","val","on","current","join","length","form","submit"],"mappings":"AAuBAA,OAAM,mCAAC,CAAC,QAAD,CAAW,wBAAX,CAAqC,UAArC,CAAiD,mBAAjD,CAAD,CAAwE,SAASC,CAAT,CAAYC,CAAZ,CAA0BC,CAA1B,CAA+BC,CAA/B,CAA6C,IAQnHC,CAAAA,CAAS,CAAG,CACZC,eAAe,CAAE,kBADL,CARuG,CAkBnHC,CAAI,CAAG,QAAPA,CAAAA,IAAO,EAAW,CAYlBJ,CAAG,CAACK,WAAJ,CAXiB,CACb,CACIC,GAAG,CAAE,QADT,CAEIC,SAAS,CAAE,QAFf,CADa,CAKb,CACID,GAAG,CAAE,kBADT,CAEIC,SAAS,CAAE,QAFf,CALa,CAWjB,EAA4BC,IAA5B,CAAiC,SAASC,CAAT,CAAsB,IAC/CC,CAAAA,CAAW,CAAGD,CAAW,CAAC,CAAD,CADsB,CAE/CE,CAAiB,CAAGF,CAAW,CAAC,CAAD,CAFgB,CAGnD,MAAOV,CAAAA,CAAY,CAACa,OAAb,CAAqBV,CAAS,CAACC,eAA/B,IAAuD,EAAvD,CAA2DO,CAA3D,OAAqFC,CAArF,IACV,CAJD,EAIGE,IAJH,CAIQZ,CAAY,CAACa,SAJrB,EAMA,GAAIC,CAAAA,CAAI,CAAGjB,CAAC,CAACI,CAAS,CAACC,eAAX,CAAD,CAA6Ba,GAA7B,EAAX,CACAlB,CAAC,CAACI,CAAS,CAACC,eAAX,CAAD,CAA6Bc,EAA7B,CAAgC,QAAhC,CAA0C,UAAW,CACjD,GAAIC,CAAAA,CAAO,CAAGpB,CAAC,CAAC,IAAD,CAAD,CAAQkB,GAAR,EAAd,CAEA,GAAID,CAAI,CAACI,IAAL,CAAU,GAAV,IAAmBD,CAAO,CAACC,IAAR,CAAa,GAAb,CAAvB,CAA0C,CAEtC,GAAuB,CAAnB,GAAAD,CAAO,CAACE,MAAZ,CAA0B,CACtBtB,CAAC,CAAC,kBAAD,CAAD,CAAsBkB,GAAtB,CAA0B,CAA1B,CACH,CACDlB,CAAC,CAAC,KAAKuB,IAAN,CAAD,CAAaC,MAAb,EACH,CACJ,CAVD,CAWH,CAhDsH,CAkDvH,MAAmD,CAM/ClB,IAAI,CAAE,eAAW,CACbA,CAAI,EACP,CAR8C,CAUtD,CA5DK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * JS module for the data requests filter.\n *\n * @module tool_dataprivacy/request_filter\n * @package tool_dataprivacy\n * @copyright 2018 Jun Pataleta\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/form-autocomplete', 'core/str', 'core/notification'], function($, Autocomplete, Str, Notification) {\n\n /**\n * Selectors.\n *\n * @access private\n * @type {{REQUEST_FILTERS: string}}\n */\n var SELECTORS = {\n REQUEST_FILTERS: '#request-filters'\n };\n\n /**\n * Init function.\n *\n * @method init\n * @private\n */\n var init = function() {\n var stringkeys = [\n {\n key: 'filter',\n component: 'moodle'\n },\n {\n key: 'nofiltersapplied',\n component: 'moodle'\n }\n ];\n\n Str.get_strings(stringkeys).then(function(langstrings) {\n var placeholder = langstrings[0];\n var noSelectionString = langstrings[1];\n return Autocomplete.enhance(SELECTORS.REQUEST_FILTERS, false, '', placeholder, false, true, noSelectionString, true);\n }).fail(Notification.exception);\n\n var last = $(SELECTORS.REQUEST_FILTERS).val();\n $(SELECTORS.REQUEST_FILTERS).on('change', function() {\n var current = $(this).val();\n // Prevent form from submitting unnecessarily, eg. on blur when no filter is selected.\n if (last.join(',') !== current.join(',')) {\n // If we're submitting without filters, set the hidden input 'filters-cleared' to 1.\n if (current.length === 0) {\n $('#filters-cleared').val(1);\n }\n $(this.form).submit();\n }\n });\n };\n\n return /** @alias module:core/form-autocomplete */ {\n /**\n * Initialise the unified user filter.\n *\n * @method init\n */\n init: function() {\n init();\n }\n };\n});\n"],"file":"request_filter.min.js"}
{"version":3,"sources":["../src/request_filter.js"],"names":["define","$","Autocomplete","Str","Notification","SELECTORS","REQUEST_FILTERS","init","get_strings","key","component","then","langstrings","placeholder","noSelectionString","enhance","fail","exception","last","val","on","current","join","length","form","submit"],"mappings":"AAsBAA,OAAM,mCAAC,CAAC,QAAD,CAAW,wBAAX,CAAqC,UAArC,CAAiD,mBAAjD,CAAD,CAAwE,SAASC,CAAT,CAAYC,CAAZ,CAA0BC,CAA1B,CAA+BC,CAA/B,CAA6C,IAQnHC,CAAAA,CAAS,CAAG,CACZC,eAAe,CAAE,kBADL,CARuG,CAkBnHC,CAAI,CAAG,QAAPA,CAAAA,IAAO,EAAW,CAYlBJ,CAAG,CAACK,WAAJ,CAXiB,CACb,CACIC,GAAG,CAAE,QADT,CAEIC,SAAS,CAAE,QAFf,CADa,CAKb,CACID,GAAG,CAAE,kBADT,CAEIC,SAAS,CAAE,QAFf,CALa,CAWjB,EAA4BC,IAA5B,CAAiC,SAASC,CAAT,CAAsB,IAC/CC,CAAAA,CAAW,CAAGD,CAAW,CAAC,CAAD,CADsB,CAE/CE,CAAiB,CAAGF,CAAW,CAAC,CAAD,CAFgB,CAGnD,MAAOV,CAAAA,CAAY,CAACa,OAAb,CAAqBV,CAAS,CAACC,eAA/B,IAAuD,EAAvD,CAA2DO,CAA3D,OAAqFC,CAArF,IACV,CAJD,EAIGE,IAJH,CAIQZ,CAAY,CAACa,SAJrB,EAMA,GAAIC,CAAAA,CAAI,CAAGjB,CAAC,CAACI,CAAS,CAACC,eAAX,CAAD,CAA6Ba,GAA7B,EAAX,CACAlB,CAAC,CAACI,CAAS,CAACC,eAAX,CAAD,CAA6Bc,EAA7B,CAAgC,QAAhC,CAA0C,UAAW,CACjD,GAAIC,CAAAA,CAAO,CAAGpB,CAAC,CAAC,IAAD,CAAD,CAAQkB,GAAR,EAAd,CAEA,GAAID,CAAI,CAACI,IAAL,CAAU,GAAV,IAAmBD,CAAO,CAACC,IAAR,CAAa,GAAb,CAAvB,CAA0C,CAEtC,GAAuB,CAAnB,GAAAD,CAAO,CAACE,MAAZ,CAA0B,CACtBtB,CAAC,CAAC,kBAAD,CAAD,CAAsBkB,GAAtB,CAA0B,CAA1B,CACH,CACDlB,CAAC,CAAC,KAAKuB,IAAN,CAAD,CAAaC,MAAb,EACH,CACJ,CAVD,CAWH,CAhDsH,CAkDvH,MAAmD,CAM/ClB,IAAI,CAAE,eAAW,CACbA,CAAI,EACP,CAR8C,CAUtD,CA5DK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * JS module for the data requests filter.\n *\n * @module tool_dataprivacy/request_filter\n * @copyright 2018 Jun Pataleta\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/form-autocomplete', 'core/str', 'core/notification'], function($, Autocomplete, Str, Notification) {\n\n /**\n * Selectors.\n *\n * @access private\n * @type {{REQUEST_FILTERS: string}}\n */\n var SELECTORS = {\n REQUEST_FILTERS: '#request-filters'\n };\n\n /**\n * Init function.\n *\n * @method init\n * @private\n */\n var init = function() {\n var stringkeys = [\n {\n key: 'filter',\n component: 'moodle'\n },\n {\n key: 'nofiltersapplied',\n component: 'moodle'\n }\n ];\n\n Str.get_strings(stringkeys).then(function(langstrings) {\n var placeholder = langstrings[0];\n var noSelectionString = langstrings[1];\n return Autocomplete.enhance(SELECTORS.REQUEST_FILTERS, false, '', placeholder, false, true, noSelectionString, true);\n }).fail(Notification.exception);\n\n var last = $(SELECTORS.REQUEST_FILTERS).val();\n $(SELECTORS.REQUEST_FILTERS).on('change', function() {\n var current = $(this).val();\n // Prevent form from submitting unnecessarily, eg. on blur when no filter is selected.\n if (last.join(',') !== current.join(',')) {\n // If we're submitting without filters, set the hidden input 'filters-cleared' to 1.\n if (current.length === 0) {\n $('#filters-cleared').val(1);\n }\n $(this.form).submit();\n }\n });\n };\n\n return /** @alias module:core/form-autocomplete */ {\n /**\n * Initialise the unified user filter.\n *\n * @method init\n */\n init: function() {\n init();\n }\n };\n});\n"],"file":"request_filter.min.js"}
File diff suppressed because one or more lines are too long
@@ -17,7 +17,6 @@
* Module to add categories.
*
* @module tool_dataprivacy/add_category
* @package tool_dataprivacy
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* Module to add purposes.
*
* @module tool_dataprivacy/add_purpose
* @package tool_dataprivacy
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* AMD module for categories actions.
*
* @module tool_dataprivacy/categoriesactions
* @package tool_dataprivacy
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* Request actions.
*
* @module tool_dataprivacy/data_deletion
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* Request actions.
*
* @module tool_dataprivacy/data_registry
* @package tool_dataprivacy
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* Request actions.
*
* @module tool_dataprivacy/data_request_modal
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* AMD module for data registry defaults actions.
*
* @module tool_dataprivacy/defaultsactions
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* Module to update the displayed retention period.
*
* @module tool_dataprivacy/effective_retention_period
* @package tool_dataprivacy
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-2
View File
@@ -17,8 +17,6 @@
* Contain the events the data privacy tool can fire.
*
* @module tool_dataprivacy/events
* @class events
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,8 +17,6 @@
* Potential user selector module.
*
* @module tool_dataprivacy/expand_contract
* @class page-expand-contract
* @package tool_dataprivacy
* @copyright 2018 Adrian Greeve
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,8 +17,6 @@
* Potential user selector module.
*
* @module tool_dataprivacy/form-user-selector
* @class form-user-selector
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* AMD module to enable users to manage their own data requests.
*
* @module tool_dataprivacy/myrequestactions
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* AMD module for purposes actions.
*
* @module tool_dataprivacy/purposesactions
* @package tool_dataprivacy
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* JS module for the data requests filter.
*
* @module tool_dataprivacy/request_filter
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* Request actions.
*
* @module tool_dataprivacy/requestactions
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -9,10 +9,8 @@ Feature: Manage data requests
| username | firstname | lastname | email |
| student1 | John | Doe | s1@example.com |
| student2 | Jane | Doe | s2@example.com |
And I log in as "admin"
And I set the following administration settings values:
| contactdataprotectionofficer | 1 |
And I log out
And the following config values are set as admin:
| contactdataprotectionofficer | 1 | tool_dataprivacy |
@javascript
Scenario: Marking general enquiries as complete
@@ -46,7 +44,7 @@ Feature: Manage data requests
And I open the action menu in "John Doe" "table_row"
And I should see "View the request"
But I should not see "Mark as complete"
And I press key "27" in ".moodle-actionmenu" "css_element"
And I press the escape key
And I open the action menu in "Jane Doe" "table_row"
And I choose "Mark as complete" in the open action menu
And I should see "Do you really want to mark this user enquiry as complete?"
@@ -10,16 +10,12 @@ Feature: Manage data storage purposes
And I open the action menu in "region-main" "region"
And I choose "Purposes" in the open action menu
And I press "Add purpose"
And I set the field "Name" to "Purpose 1"
And I set the field "Description" to "Purpose 1 description"
And I click on ".form-autocomplete-downarrow" "css_element" in the "Lawful bases" "form_row"
And I click on "Contract (GDPR Art. 6.1(b))" "list_item"
And I click on "Legal obligation (GDPR Art 6.1(c))" "list_item"
And I press key "27" in the field "Lawful bases"
And I click on ".form-autocomplete-downarrow" "css_element" in the "Sensitive personal data processing reasons" "form_row"
And I click on "Explicit consent (GDPR Art. 9.2(a))" "list_item"
And I press key "27" in the field "Sensitive personal data processing reasons"
And I set the field "retentionperiodnumber" to "2"
And I set the following fields to these values:
| Name | Purpose 1 |
| Description | Purpose 1 description |
| Lawful bases | Contract (GDPR Art. 6.1(b)),Legal obligation (GDPR Art 6.1(c)) |
| Sensitive personal data processing reasons | Explicit consent (GDPR Art. 9.2(a)) |
| retentionperiodnumber | 2 |
When I press "Save"
Then I should see "Purpose 1" in the "List of data purposes" "table"
And I should see "Contract (GDPR Art. 6.1(b))" in the "Purpose 1" "table_row"
@@ -31,14 +27,13 @@ Feature: Manage data storage purposes
Scenario: Update a data storage purpose
Given I open the action menu in "Purpose 1" "table_row"
And I choose "Edit" in the open action menu
And I set the field "Name" to "Purpose 1 edited"
And I set the field "Description" to "Purpose 1 description edited"
And I click on "Legal obligation (GDPR Art 6.1(c))" "text" in the ".form-autocomplete-selection" "css_element"
And I click on ".form-autocomplete-downarrow" "css_element" in the "Lawful bases" "form_row"
And I click on "Vital interests (GDPR Art. 6.1(d))" "list_item"
And I press key "27" in the field "Lawful bases"
And I set the field "retentionperiodnumber" to "3"
And I click on "protected" "checkbox"
And I set the following fields to these values:
| Name | Purpose 1 edited |
| Description | Purpose 1 description edited |
| Lawful bases | Contract (GDPR Art. 6.1(b)), Vital interests (GDPR Art. 6.1(d)) |
| Sensitive personal data processing reasons | Explicit consent (GDPR Art. 9.2(a)) |
| retentionperiodnumber | 3 |
| protected | 1 |
When I press "Save changes"
Then I should see "Purpose 1 edited" in the "List of data purposes" "table"
And I should see "Purpose 1 description edited" in the "Purpose 1 edited" "table_row"
@@ -5,7 +5,10 @@ Feature: View the httpsreplace report
I need to be able to automatically replace http links
Background: Create some http links
Given I am on site homepage
# This is a slow running feature and on slow databases can take over 30 seconds to complete.
Given I mark this test as slow setting a timeout factor of 2
And I am on site homepage
And the following "courses" exist:
| fullname | shortname | category | summary |
| Course 1 | C1 | 0 | <img src="http://intentionally.unavailable/test.png"> <img src="http://download.moodle.org/unittest/test.jpg"> |
@@ -22,8 +22,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_langimport\output;
defined('MOODLE_INTERNAL') || die();
use core_collator;
use moodle_url;
use renderable;
use renderer_base;
@@ -95,6 +95,8 @@ class langimport_page implements renderable, templatable {
if (!empty($this->availablelanguages)) {
$data->toinstalloptions = [];
core_collator::asort($this->availablelanguages);
foreach ($this->availablelanguages as $code => $language) {
$option = new stdClass();
$option->value = $code;
@@ -1 +1 @@
{"version":3,"sources":["../src/delete_license.js"],"names":["define","$","ModalFactory","ModalEvents","Url","String","trigger","create","type","types","SAVE_CANCEL","title","get_string","body","preShowCallback","triggerElement","modal","params","data","deleteURL","relativeUrl","large","done","getRoot","on","save","e","preventDefault","window","location","href"],"mappings":"AAwBAA,OAAM,sCAAC,CAAC,QAAD,CAAW,oBAAX,CAAiC,mBAAjC,CAAsD,UAAtD,CAAkE,UAAlE,CAAD,CACF,SAASC,CAAT,CAAYC,CAAZ,CAA0BC,CAA1B,CAAuCC,CAAvC,CAA4CC,CAA5C,CAAoD,CAEhD,GAAIC,CAAAA,CAAO,CAAGL,CAAC,CAAC,iBAAD,CAAf,CACAC,CAAY,CAACK,MAAb,CAAoB,CAChBC,IAAI,CAAEN,CAAY,CAACO,KAAb,CAAmBC,WADT,CAEhBC,KAAK,CAAEN,CAAM,CAACO,UAAP,CAAkB,eAAlB,CAAmC,qBAAnC,CAFS,CAGhBC,IAAI,CAAER,CAAM,CAACO,UAAP,CAAkB,6BAAlB,CAAiD,qBAAjD,CAHU,CAIhBE,eAAe,CAAE,yBAASC,CAAT,CAAyBC,CAAzB,CAAgC,CAC7CD,CAAc,CAAGd,CAAC,CAACc,CAAD,CAAlB,CACA,GAAIE,CAAAA,CAAM,CAAG,CACT,OAAU,QADD,CAET,QAAWF,CAAc,CAACG,IAAf,CAAoB,SAApB,CAFF,CAAb,CAIAF,CAAK,CAACG,SAAN,CAAkBf,CAAG,CAACgB,WAAJ,CAAgB,sCAAhB,CAAwDH,CAAxD,IACrB,CAXe,CAYhBI,KAAK,GAZW,CAApB,CAaGf,CAbH,EAcKgB,IAdL,CAcU,SAASN,CAAT,CAAgB,CAClBA,CAAK,CAACO,OAAN,GAAgBC,EAAhB,CAAmBrB,CAAW,CAACsB,IAA/B,CAAqC,SAASC,CAAT,CAAY,CAE7CA,CAAC,CAACC,cAAF,GAEAC,MAAM,CAACC,QAAP,CAAgBC,IAAhB,CAAuBd,CAAK,CAACG,SAChC,CALD,CAMH,CArBL,CAsBH,CA1BC,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Modal for confirming deletion of a custom license.\n *\n * @module tool_licensemanager/delete_license\n * @class delete_license\n * @package tool_licensemanager\n * @copyright 2019 Tom Dickman <tomdickman@catalyst-au.net>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/modal_factory', 'core/modal_events', 'core/url', 'core/str'],\n function($, ModalFactory, ModalEvents, Url, String) {\n\n var trigger = $('.delete-license');\n ModalFactory.create({\n type: ModalFactory.types.SAVE_CANCEL,\n title: String.get_string('deletelicense', 'tool_licensemanager'),\n body: String.get_string('deletelicenseconfirmmessage', 'tool_licensemanager'),\n preShowCallback: function(triggerElement, modal) {\n triggerElement = $(triggerElement);\n let params = {\n 'action': 'delete',\n 'license': triggerElement.data('license')\n };\n modal.deleteURL = Url.relativeUrl('/admin/tool/licensemanager/index.php', params, true);\n },\n large: true,\n }, trigger)\n .done(function(modal) {\n modal.getRoot().on(ModalEvents.save, function(e) {\n // Stop the default save button behaviour which is to close the modal.\n e.preventDefault();\n // Redirect to delete url.\n window.location.href = modal.deleteURL;\n });\n });\n });\n"],"file":"delete_license.min.js"}
{"version":3,"sources":["../src/delete_license.js"],"names":["define","$","ModalFactory","ModalEvents","Url","String","trigger","create","type","types","SAVE_CANCEL","title","get_string","body","preShowCallback","triggerElement","modal","params","data","deleteURL","relativeUrl","large","done","getRoot","on","save","e","preventDefault","window","location","href"],"mappings":"AAsBAA,OAAM,sCAAC,CAAC,QAAD,CAAW,oBAAX,CAAiC,mBAAjC,CAAsD,UAAtD,CAAkE,UAAlE,CAAD,CACF,SAASC,CAAT,CAAYC,CAAZ,CAA0BC,CAA1B,CAAuCC,CAAvC,CAA4CC,CAA5C,CAAoD,CAEhD,GAAIC,CAAAA,CAAO,CAAGL,CAAC,CAAC,iBAAD,CAAf,CACAC,CAAY,CAACK,MAAb,CAAoB,CAChBC,IAAI,CAAEN,CAAY,CAACO,KAAb,CAAmBC,WADT,CAEhBC,KAAK,CAAEN,CAAM,CAACO,UAAP,CAAkB,eAAlB,CAAmC,qBAAnC,CAFS,CAGhBC,IAAI,CAAER,CAAM,CAACO,UAAP,CAAkB,6BAAlB,CAAiD,qBAAjD,CAHU,CAIhBE,eAAe,CAAE,yBAASC,CAAT,CAAyBC,CAAzB,CAAgC,CAC7CD,CAAc,CAAGd,CAAC,CAACc,CAAD,CAAlB,CACA,GAAIE,CAAAA,CAAM,CAAG,CACT,OAAU,QADD,CAET,QAAWF,CAAc,CAACG,IAAf,CAAoB,SAApB,CAFF,CAAb,CAIAF,CAAK,CAACG,SAAN,CAAkBf,CAAG,CAACgB,WAAJ,CAAgB,sCAAhB,CAAwDH,CAAxD,IACrB,CAXe,CAYhBI,KAAK,GAZW,CAApB,CAaGf,CAbH,EAcKgB,IAdL,CAcU,SAASN,CAAT,CAAgB,CAClBA,CAAK,CAACO,OAAN,GAAgBC,EAAhB,CAAmBrB,CAAW,CAACsB,IAA/B,CAAqC,SAASC,CAAT,CAAY,CAE7CA,CAAC,CAACC,cAAF,GAEAC,MAAM,CAACC,QAAP,CAAgBC,IAAhB,CAAuBd,CAAK,CAACG,SAChC,CALD,CAMH,CArBL,CAsBH,CA1BC,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Modal for confirming deletion of a custom license.\n *\n * @module tool_licensemanager/delete_license\n * @copyright 2019 Tom Dickman <tomdickman@catalyst-au.net>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/modal_factory', 'core/modal_events', 'core/url', 'core/str'],\n function($, ModalFactory, ModalEvents, Url, String) {\n\n var trigger = $('.delete-license');\n ModalFactory.create({\n type: ModalFactory.types.SAVE_CANCEL,\n title: String.get_string('deletelicense', 'tool_licensemanager'),\n body: String.get_string('deletelicenseconfirmmessage', 'tool_licensemanager'),\n preShowCallback: function(triggerElement, modal) {\n triggerElement = $(triggerElement);\n let params = {\n 'action': 'delete',\n 'license': triggerElement.data('license')\n };\n modal.deleteURL = Url.relativeUrl('/admin/tool/licensemanager/index.php', params, true);\n },\n large: true,\n }, trigger)\n .done(function(modal) {\n modal.getRoot().on(ModalEvents.save, function(e) {\n // Stop the default save button behaviour which is to close the modal.\n e.preventDefault();\n // Redirect to delete url.\n window.location.href = modal.deleteURL;\n });\n });\n });\n"],"file":"delete_license.min.js"}
@@ -17,8 +17,6 @@
* Modal for confirming deletion of a custom license.
*
* @module tool_licensemanager/delete_license
* @class delete_license
* @package tool_licensemanager
* @copyright 2019 Tom Dickman <tomdickman@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -10,12 +10,10 @@ Feature: Delete custom licenses
And I navigate to "Licence > Licence manager" in site administration
And I click on "Create licence" "link"
And I set the following fields to these values:
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| version[day] | 1 |
| version[month] | March |
| version[year] | 2019 |
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| Licence version | ##1 March 2019## |
And I press "Save changes"
And I click on "Delete" "icon" in the "MIT" "table_row"
When I click on "Save changes" "button" in the "Delete licence" "dialogue"
@@ -9,12 +9,10 @@ Feature: Custom licences
And I navigate to "Licence > Licence manager" in site administration
And I click on "Create licence" "link"
And I set the following fields to these values:
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| version[day] | 1 |
| version[month] | January |
| version[year] | 2020 |
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| Licence version | ##first day of January 2020## |
When I press "Save changes"
Then I should see "Licence manager"
And I should see "MIT Licence" in the "MIT" "table_row"
@@ -25,12 +23,10 @@ Feature: Custom licences
And I navigate to "Licence > Licence manager" in site administration
And I click on "Create licence" "link"
And I set the following fields to these values:
| shortname | MIT |
| fullname | MIT Licence |
| source | opensource.org/licenses/MIT |
| version[day] | 1 |
| version[month] | January |
| version[year] | 2020 |
| shortname | MIT |
| fullname | MIT Licence |
| source | opensource.org/licenses/MIT |
| Licence version | ##2020-01-01## |
When I press "Save changes"
Then I should see "Invalid source URL"
And I set the following fields to these values:
@@ -49,12 +45,10 @@ Feature: Custom licences
And I navigate to "Licence > Licence manager" in site administration
And I click on "Create licence" "link"
And I set the following fields to these values:
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| version[day] | 1 |
| version[month] | March |
| version[year] | 2019 |
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| Licence version | ##1 March 2019## |
When I press "Save changes"
Then I should see "Licence manager"
And I should see "2019030100" in the "MIT" "table_row"
@@ -65,12 +59,10 @@ Feature: Custom licences
And I navigate to "Licence > Licence manager" in site administration
And I click on "Create licence" "link"
And I set the following fields to these values:
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| version[day] | 1 |
| version[month] | March |
| version[year] | 2019 |
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| Licence version | ##1 Mar 2019## |
And I press "Save changes"
And I should see "Licence manager"
And I should see "MIT Licence" in the "MIT" "table_row"
+2
View File
@@ -50,6 +50,7 @@ switch ($action) {
case 'disable':
unset($enabled[$enrol]);
set_config('enabled_stores', implode(',', array_keys($enabled)), 'tool_log');
add_to_config_log('tool_logstore_visibility', '1', '0', $enrol);
break;
case 'enable':
@@ -59,6 +60,7 @@ switch ($action) {
$enabled = array_keys($enabled);
$enabled[] = $enrol;
set_config('enabled_stores', implode(',', $enabled), 'tool_log');
add_to_config_log('tool_logstore_visibility', '0', '1', $enrol);
break;
case 'up':
@@ -0,0 +1,19 @@
@tool_log @report @report_configlog
Feature: In a report, admin can see logstore visibility changes
# Change log stores visibility so the report contains known data.
Background:
Given I log in as "admin"
And the following config values are set as admin:
| enabled_stores | logstore_standard | tool_log |
@javascript
Scenario: Display configuration changes report
When I navigate to "Plugins > Logging > Manage log stores" in site administration
And I click on "Disable" "icon" in the "Standard log" "table_row"
And I click on "Enable" "icon" in the "External database log" "table_row"
And I navigate to "Reports > Config changes" in site administration
Then the following should exist in the "report-configlog-report-table" table:
| User | Plugin | Setting | New value | Original value |
| Admin User | logstore_standard | tool_logstore_visibility | 0 | 1 |
| Admin User | logstore_database | tool_logstore_visibility | 1 | 0 |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
{"version":3,"sources":["../src/competency_outcomes.js"],"names":["define","$","Str","NONE","EVIDENCE","COMPLETE","RECOMMEND","getAll","self","get_strings","key","component","then","strings","outcomes","code","name","getString","id","all","Deferred","reject","promise"],"mappings":"AAuBAA,OAAM,+BAAC,CAAC,QAAD,CACC,UADD,CAAD,CAEE,SAASC,CAAT,CAAYC,CAAZ,CAAiB,CAOrB,MAAwD,CAEpDC,IAAI,EAFgD,CAGpDC,QAAQ,EAH4C,CAIpDC,QAAQ,EAJ4C,CAKpDC,SAAS,EAL2C,CAapDC,MAAM,CAAE,iBAAW,CACf,GAAIC,CAAAA,CAAI,CAAG,IAAX,CACA,MAAON,CAAAA,CAAG,CAACO,WAAJ,CAAgB,CACnB,CAACC,GAAG,CAAE,wBAAN,CAAgCC,SAAS,CAAE,SAA3C,CADmB,CAEnB,CAACD,GAAG,CAAE,4BAAN,CAAoCC,SAAS,CAAE,SAA/C,CAFmB,CAGnB,CAACD,GAAG,CAAE,6BAAN,CAAqCC,SAAS,CAAE,SAAhD,CAHmB,CAInB,CAACD,GAAG,CAAE,4BAAN,CAAoCC,SAAS,CAAE,SAA/C,CAJmB,CAAhB,EAKJC,IALI,CAKC,SAASC,CAAT,CAAkB,CACtB,GAAIC,CAAAA,CAAQ,CAAG,EAAf,CACAA,CAAQ,CAACN,CAAI,CAACL,IAAN,CAAR,CAAsB,CAACY,IAAI,CAAEP,CAAI,CAACL,IAAZ,CAAkBa,IAAI,CAAEH,CAAO,CAAC,CAAD,CAA/B,CAAtB,CACAC,CAAQ,CAACN,CAAI,CAACJ,QAAN,CAAR,CAA0B,CAACW,IAAI,CAAEP,CAAI,CAACJ,QAAZ,CAAsBY,IAAI,CAAEH,CAAO,CAAC,CAAD,CAAnC,CAA1B,CACAC,CAAQ,CAACN,CAAI,CAACF,SAAN,CAAR,CAA2B,CAACS,IAAI,CAAEP,CAAI,CAACF,SAAZ,CAAuBU,IAAI,CAAEH,CAAO,CAAC,CAAD,CAApC,CAA3B,CACAC,CAAQ,CAACN,CAAI,CAACH,QAAN,CAAR,CAA0B,CAACU,IAAI,CAAEP,CAAI,CAACH,QAAZ,CAAsBW,IAAI,CAAEH,CAAO,CAAC,CAAD,CAAnC,CAA1B,CACA,MAAOC,CAAAA,CACV,CAZM,CAaV,CA5BmD,CAqCpDG,SAAS,CAAE,mBAASC,CAAT,CAAa,CACpB,GAAIV,CAAAA,CAAI,CAAG,IAAX,CACIW,CAAG,CAAGX,CAAI,CAACD,MAAL,EADV,CAGA,MAAOY,CAAAA,CAAG,CAACP,IAAJ,CAAS,SAASE,CAAT,CAAmB,CAC/B,GAA4B,WAAxB,QAAOA,CAAAA,CAAQ,CAACI,CAAD,CAAnB,CAAyC,CACrC,MAAOjB,CAAAA,CAAC,CAACmB,QAAF,GAAaC,MAAb,GAAsBC,OAAtB,EACV,CACD,MAAOR,CAAAA,CAAQ,CAACI,CAAD,CAAR,CAAaF,IACvB,CALM,CAMV,CA/CmD,CAkD3D,CA3DK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Competency rule config.\n *\n * @package tool_lp\n * @copyright 2015 Frédéric Massart - FMCorz.net\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery',\n 'core/str'],\n function($, Str) {\n\n var OUTCOME_NONE = 0,\n OUTCOME_EVIDENCE = 1,\n OUTCOME_COMPLETE = 2,\n OUTCOME_RECOMMEND = 3;\n\n return /** @alias module:tool_lp/competency_outcomes */ {\n\n NONE: OUTCOME_NONE,\n EVIDENCE: OUTCOME_EVIDENCE,\n COMPLETE: OUTCOME_COMPLETE,\n RECOMMEND: OUTCOME_RECOMMEND,\n\n /**\n * Get all the outcomes.\n *\n * @return {Object} Indexed by outcome code, contains code and name.\n * @method getAll\n */\n getAll: function() {\n var self = this;\n return Str.get_strings([\n {key: 'competencyoutcome_none', component: 'tool_lp'},\n {key: 'competencyoutcome_evidence', component: 'tool_lp'},\n {key: 'competencyoutcome_recommend', component: 'tool_lp'},\n {key: 'competencyoutcome_complete', component: 'tool_lp'},\n ]).then(function(strings) {\n var outcomes = {};\n outcomes[self.NONE] = {code: self.NONE, name: strings[0]};\n outcomes[self.EVIDENCE] = {code: self.EVIDENCE, name: strings[1]};\n outcomes[self.RECOMMEND] = {code: self.RECOMMEND, name: strings[2]};\n outcomes[self.COMPLETE] = {code: self.COMPLETE, name: strings[3]};\n return outcomes;\n });\n },\n\n /**\n * Get the string for an outcome.\n *\n * @param {Number} id The outcome code.\n * @return {Promise} Resolved with the string.\n * @method getString\n */\n getString: function(id) {\n var self = this,\n all = self.getAll();\n\n return all.then(function(outcomes) {\n if (typeof outcomes[id] === 'undefined') {\n return $.Deferred().reject().promise();\n }\n return outcomes[id].name;\n });\n }\n };\n\n});\n"],"file":"competency_outcomes.min.js"}
{"version":3,"sources":["../src/competency_outcomes.js"],"names":["define","$","Str","NONE","EVIDENCE","COMPLETE","RECOMMEND","getAll","self","get_strings","key","component","then","strings","outcomes","code","name","getString","id","all","Deferred","reject","promise"],"mappings":"AAuBAA,OAAM,+BAAC,CAAC,QAAD,CACC,UADD,CAAD,CAEE,SAASC,CAAT,CAAYC,CAAZ,CAAiB,CAOrB,MAAO,CAEHC,IAAI,EAFD,CAGHC,QAAQ,EAHL,CAIHC,QAAQ,EAJL,CAKHC,SAAS,EALN,CAaHC,MAAM,CAAE,iBAAW,CACf,GAAIC,CAAAA,CAAI,CAAG,IAAX,CACA,MAAON,CAAAA,CAAG,CAACO,WAAJ,CAAgB,CACnB,CAACC,GAAG,CAAE,wBAAN,CAAgCC,SAAS,CAAE,SAA3C,CADmB,CAEnB,CAACD,GAAG,CAAE,4BAAN,CAAoCC,SAAS,CAAE,SAA/C,CAFmB,CAGnB,CAACD,GAAG,CAAE,6BAAN,CAAqCC,SAAS,CAAE,SAAhD,CAHmB,CAInB,CAACD,GAAG,CAAE,4BAAN,CAAoCC,SAAS,CAAE,SAA/C,CAJmB,CAAhB,EAKJC,IALI,CAKC,SAASC,CAAT,CAAkB,CACtB,GAAIC,CAAAA,CAAQ,CAAG,EAAf,CACAA,CAAQ,CAACN,CAAI,CAACL,IAAN,CAAR,CAAsB,CAACY,IAAI,CAAEP,CAAI,CAACL,IAAZ,CAAkBa,IAAI,CAAEH,CAAO,CAAC,CAAD,CAA/B,CAAtB,CACAC,CAAQ,CAACN,CAAI,CAACJ,QAAN,CAAR,CAA0B,CAACW,IAAI,CAAEP,CAAI,CAACJ,QAAZ,CAAsBY,IAAI,CAAEH,CAAO,CAAC,CAAD,CAAnC,CAA1B,CACAC,CAAQ,CAACN,CAAI,CAACF,SAAN,CAAR,CAA2B,CAACS,IAAI,CAAEP,CAAI,CAACF,SAAZ,CAAuBU,IAAI,CAAEH,CAAO,CAAC,CAAD,CAApC,CAA3B,CACAC,CAAQ,CAACN,CAAI,CAACH,QAAN,CAAR,CAA0B,CAACU,IAAI,CAAEP,CAAI,CAACH,QAAZ,CAAsBW,IAAI,CAAEH,CAAO,CAAC,CAAD,CAAnC,CAA1B,CACA,MAAOC,CAAAA,CACV,CAZM,CAaV,CA5BE,CAqCHG,SAAS,CAAE,mBAASC,CAAT,CAAa,CACpB,GAAIV,CAAAA,CAAI,CAAG,IAAX,CACIW,CAAG,CAAGX,CAAI,CAACD,MAAL,EADV,CAGA,MAAOY,CAAAA,CAAG,CAACP,IAAJ,CAAS,SAASE,CAAT,CAAmB,CAC/B,GAA4B,WAAxB,QAAOA,CAAAA,CAAQ,CAACI,CAAD,CAAnB,CAAyC,CACrC,MAAOjB,CAAAA,CAAC,CAACmB,QAAF,GAAaC,MAAb,GAAsBC,OAAtB,EACV,CACD,MAAOR,CAAAA,CAAQ,CAACI,CAAD,CAAR,CAAaF,IACvB,CALM,CAMV,CA/CE,CAiDV,CA1DK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Competency rule config.\n *\n * @module tool_lp/competency_outcomes\n * @copyright 2015 Frédéric Massart - FMCorz.net\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery',\n 'core/str'],\n function($, Str) {\n\n var OUTCOME_NONE = 0,\n OUTCOME_EVIDENCE = 1,\n OUTCOME_COMPLETE = 2,\n OUTCOME_RECOMMEND = 3;\n\n return {\n\n NONE: OUTCOME_NONE,\n EVIDENCE: OUTCOME_EVIDENCE,\n COMPLETE: OUTCOME_COMPLETE,\n RECOMMEND: OUTCOME_RECOMMEND,\n\n /**\n * Get all the outcomes.\n *\n * @return {Object} Indexed by outcome code, contains code and name.\n * @method getAll\n */\n getAll: function() {\n var self = this;\n return Str.get_strings([\n {key: 'competencyoutcome_none', component: 'tool_lp'},\n {key: 'competencyoutcome_evidence', component: 'tool_lp'},\n {key: 'competencyoutcome_recommend', component: 'tool_lp'},\n {key: 'competencyoutcome_complete', component: 'tool_lp'},\n ]).then(function(strings) {\n var outcomes = {};\n outcomes[self.NONE] = {code: self.NONE, name: strings[0]};\n outcomes[self.EVIDENCE] = {code: self.EVIDENCE, name: strings[1]};\n outcomes[self.RECOMMEND] = {code: self.RECOMMEND, name: strings[2]};\n outcomes[self.COMPLETE] = {code: self.COMPLETE, name: strings[3]};\n return outcomes;\n });\n },\n\n /**\n * Get the string for an outcome.\n *\n * @param {Number} id The outcome code.\n * @return {Promise} Resolved with the string.\n * @method getString\n */\n getString: function(id) {\n var self = this,\n all = self.getAll();\n\n return all.then(function(outcomes) {\n if (typeof outcomes[id] === 'undefined') {\n return $.Deferred().reject().promise();\n }\n return outcomes[id].name;\n });\n }\n };\n});\n"],"file":"competency_outcomes.min.js"}
@@ -1 +1 @@
{"version":3,"sources":["../src/competency_plan_navigation.js"],"names":["define","$","CompetencyPlanNavigation","competencySelector","baseUrl","userId","competencyId","planId","_baseUrl","_userId","_competencyId","_planId","_ignoreFirstCompetency","on","_competencyChanged","bind","prototype","e","newCompetencyId","target","val","queryStr","document","location"],"mappings":"AAuBAA,OAAM,sCAAC,CAAC,QAAD,CAAD,CAAa,SAASC,CAAT,CAAY,CAW3B,GAAIC,CAAAA,CAAwB,CAAG,SAASC,CAAT,CAA6BC,CAA7B,CAAsCC,CAAtC,CAA8CC,CAA9C,CAA4DC,CAA5D,CAAoE,CAC/F,KAAKC,QAAL,CAAgBJ,CAAhB,CACA,KAAKK,OAAL,CAAeJ,CAAM,CAAG,EAAxB,CACA,KAAKK,aAAL,CAAqBJ,CAAY,CAAG,EAApC,CACA,KAAKK,OAAL,CAAeJ,CAAf,CACA,KAAKK,sBAAL,IAEAX,CAAC,CAACE,CAAD,CAAD,CAAsBU,EAAtB,CAAyB,QAAzB,CAAmC,KAAKC,kBAAL,CAAwBC,IAAxB,CAA6B,IAA7B,CAAnC,CACH,CARD,CAgBAb,CAAwB,CAACc,SAAzB,CAAmCF,kBAAnC,CAAwD,SAASG,CAAT,CAAY,CAChE,GAAI,KAAKL,sBAAT,CAAiC,CAC7B,KAAKA,sBAAL,IACA,MACH,CAJ+D,GAK5DM,CAAAA,CAAe,CAAGjB,CAAC,CAACgB,CAAC,CAACE,MAAH,CAAD,CAAYC,GAAZ,EAL0C,CAM5DC,CAAQ,CAAG,WAAa,KAAKZ,OAAlB,CAA4B,UAA5B,CAAyC,KAAKE,OAA9C,CAAwD,gBAAxD,CAA2EO,CAN1B,CAOhEI,QAAQ,CAACC,QAAT,CAAoB,KAAKf,QAAL,CAAgBa,CACvC,CARD,CAWAnB,CAAwB,CAACc,SAAzB,CAAmCN,aAAnC,CAAmD,IAAnD,CAEAR,CAAwB,CAACc,SAAzB,CAAmCP,OAAnC,CAA6C,IAA7C,CAEAP,CAAwB,CAACc,SAAzB,CAAmCL,OAAnC,CAA6C,IAA7C,CAEAT,CAAwB,CAACc,SAAzB,CAAmCR,QAAnC,CAA8C,IAA9C,CAEAN,CAAwB,CAACc,SAAzB,CAAmCJ,sBAAnC,CAA4D,IAA5D,CAEA,MAA+DV,CAAAA,CAElE,CAlDK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Event click on selecting competency in the competency autocomplete.\n *\n * @package tool_lp\n * @copyright 2016 Issam Taboubi <issam.taboubi@umontreal.ca>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery'], function($) {\n\n /**\n * CompetencyPlanNavigation\n *\n * @param {String} competencySelector The selector of the competency element.\n * @param {String} baseUrl The base url for the page (no params).\n * @param {Number} userId The user id\n * @param {Number} competencyId The competency id\n * @param {Number} planId The plan id\n */\n var CompetencyPlanNavigation = function(competencySelector, baseUrl, userId, competencyId, planId) {\n this._baseUrl = baseUrl;\n this._userId = userId + '';\n this._competencyId = competencyId + '';\n this._planId = planId;\n this._ignoreFirstCompetency = true;\n\n $(competencySelector).on('change', this._competencyChanged.bind(this));\n };\n\n /**\n * The competency was changed in the select list.\n *\n * @method _competencyChanged\n * @param {Event} e\n */\n CompetencyPlanNavigation.prototype._competencyChanged = function(e) {\n if (this._ignoreFirstCompetency) {\n this._ignoreFirstCompetency = false;\n return;\n }\n var newCompetencyId = $(e.target).val();\n var queryStr = '?userid=' + this._userId + '&planid=' + this._planId + '&competencyid=' + newCompetencyId;\n document.location = this._baseUrl + queryStr;\n };\n\n /** @type {Number} The id of the competency. */\n CompetencyPlanNavigation.prototype._competencyId = null;\n /** @type {Number} The id of the user. */\n CompetencyPlanNavigation.prototype._userId = null;\n /** @type {Number} The id of the plan. */\n CompetencyPlanNavigation.prototype._planId = null;\n /** @type {String} Plugin base url. */\n CompetencyPlanNavigation.prototype._baseUrl = null;\n /** @type {Boolean} Ignore the first change event for competencies. */\n CompetencyPlanNavigation.prototype._ignoreFirstCompetency = null;\n\n return /** @alias module:tool_lp/competency_plan_navigation */ CompetencyPlanNavigation;\n\n});\n"],"file":"competency_plan_navigation.min.js"}
{"version":3,"sources":["../src/competency_plan_navigation.js"],"names":["define","$","CompetencyPlanNavigation","competencySelector","baseUrl","userId","competencyId","planId","_baseUrl","_userId","_competencyId","_planId","_ignoreFirstCompetency","on","_competencyChanged","bind","prototype","e","newCompetencyId","target","val","queryStr","document","location"],"mappings":"AAuBAA,OAAM,sCAAC,CAAC,QAAD,CAAD,CAAa,SAASC,CAAT,CAAY,CAY3B,GAAIC,CAAAA,CAAwB,CAAG,SAASC,CAAT,CAA6BC,CAA7B,CAAsCC,CAAtC,CAA8CC,CAA9C,CAA4DC,CAA5D,CAAoE,CAC/F,KAAKC,QAAL,CAAgBJ,CAAhB,CACA,KAAKK,OAAL,CAAeJ,CAAM,CAAG,EAAxB,CACA,KAAKK,aAAL,CAAqBJ,CAAY,CAAG,EAApC,CACA,KAAKK,OAAL,CAAeJ,CAAf,CACA,KAAKK,sBAAL,IAEAX,CAAC,CAACE,CAAD,CAAD,CAAsBU,EAAtB,CAAyB,QAAzB,CAAmC,KAAKC,kBAAL,CAAwBC,IAAxB,CAA6B,IAA7B,CAAnC,CACH,CARD,CAgBAb,CAAwB,CAACc,SAAzB,CAAmCF,kBAAnC,CAAwD,SAASG,CAAT,CAAY,CAChE,GAAI,KAAKL,sBAAT,CAAiC,CAC7B,KAAKA,sBAAL,IACA,MACH,CAJ+D,GAK5DM,CAAAA,CAAe,CAAGjB,CAAC,CAACgB,CAAC,CAACE,MAAH,CAAD,CAAYC,GAAZ,EAL0C,CAM5DC,CAAQ,CAAG,WAAa,KAAKZ,OAAlB,CAA4B,UAA5B,CAAyC,KAAKE,OAA9C,CAAwD,gBAAxD,CAA2EO,CAN1B,CAOhEI,QAAQ,CAACC,QAAT,CAAoB,KAAKf,QAAL,CAAgBa,CACvC,CARD,CAWAnB,CAAwB,CAACc,SAAzB,CAAmCN,aAAnC,CAAmD,IAAnD,CAEAR,CAAwB,CAACc,SAAzB,CAAmCP,OAAnC,CAA6C,IAA7C,CAEAP,CAAwB,CAACc,SAAzB,CAAmCL,OAAnC,CAA6C,IAA7C,CAEAT,CAAwB,CAACc,SAAzB,CAAmCR,QAAnC,CAA8C,IAA9C,CAEAN,CAAwB,CAACc,SAAzB,CAAmCJ,sBAAnC,CAA4D,IAA5D,CAEA,MAAOV,CAAAA,CACV,CAlDK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Event click on selecting competency in the competency autocomplete.\n *\n * @module tool_lp/competency_plan_navigation\n * @copyright 2016 Issam Taboubi <issam.taboubi@umontreal.ca>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery'], function($) {\n\n /**\n * CompetencyPlanNavigation\n *\n * @class\n * @param {String} competencySelector The selector of the competency element.\n * @param {String} baseUrl The base url for the page (no params).\n * @param {Number} userId The user id\n * @param {Number} competencyId The competency id\n * @param {Number} planId The plan id\n */\n var CompetencyPlanNavigation = function(competencySelector, baseUrl, userId, competencyId, planId) {\n this._baseUrl = baseUrl;\n this._userId = userId + '';\n this._competencyId = competencyId + '';\n this._planId = planId;\n this._ignoreFirstCompetency = true;\n\n $(competencySelector).on('change', this._competencyChanged.bind(this));\n };\n\n /**\n * The competency was changed in the select list.\n *\n * @method _competencyChanged\n * @param {Event} e\n */\n CompetencyPlanNavigation.prototype._competencyChanged = function(e) {\n if (this._ignoreFirstCompetency) {\n this._ignoreFirstCompetency = false;\n return;\n }\n var newCompetencyId = $(e.target).val();\n var queryStr = '?userid=' + this._userId + '&planid=' + this._planId + '&competencyid=' + newCompetencyId;\n document.location = this._baseUrl + queryStr;\n };\n\n /** @property {Number} The id of the competency. */\n CompetencyPlanNavigation.prototype._competencyId = null;\n /** @property {Number} The id of the user. */\n CompetencyPlanNavigation.prototype._userId = null;\n /** @property {Number} The id of the plan. */\n CompetencyPlanNavigation.prototype._planId = null;\n /** @property {String} Plugin base url. */\n CompetencyPlanNavigation.prototype._baseUrl = null;\n /** @property {Boolean} Ignore the first change event for competencies. */\n CompetencyPlanNavigation.prototype._ignoreFirstCompetency = null;\n\n return CompetencyPlanNavigation;\n});\n"],"file":"competency_plan_navigation.min.js"}
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
{"version":3,"sources":["../src/competency_rule_all.js"],"names":["define","$","Str","RuleBase","Rule","apply","arguments","prototype","Object","create","getType","isValid"],"mappings":"AAuBAA,OAAM,+BAAC,CAAC,QAAD,CACC,UADD,CAEC,yBAFD,CAAD,CAIE,SAASC,CAAT,CAAYC,CAAZ,CAAiBC,CAAjB,CAA2B,CAK/B,GAAIC,CAAAA,CAAI,CAAG,UAAW,CAClBD,CAAQ,CAACE,KAAT,CAAe,IAAf,CAAqBC,SAArB,CACH,CAFD,CAGAF,CAAI,CAACG,SAAL,CAAiBC,MAAM,CAACC,MAAP,CAAcN,CAAQ,CAACI,SAAvB,CAAjB,CAQAH,CAAI,CAACG,SAAL,CAAeG,OAAf,CAAyB,UAAW,CAChC,MAAO,sCACV,CAFD,CAUAN,CAAI,CAACG,SAAL,CAAeI,OAAf,CAAyB,UAAW,CAChC,QACH,CAFD,CAIA,MAAwDP,CAAAA,CAE3D,CApCK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Competency rule all module.\n *\n * @package tool_lp\n * @copyright 2015 Frédéric Massart - FMCorz.net\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery',\n 'core/str',\n 'tool_lp/competency_rule',\n ],\n function($, Str, RuleBase) {\n\n /**\n * Competency rule all class.\n */\n var Rule = function() {\n RuleBase.apply(this, arguments);\n };\n Rule.prototype = Object.create(RuleBase.prototype);\n\n /**\n * Return the type of the module.\n *\n * @return {String}\n * @method getType\n */\n Rule.prototype.getType = function() {\n return 'core_competency\\\\competency_rule_all';\n };\n\n /**\n * Whether or not the current config is valid.\n *\n * @return {Boolean}\n * @method isValid\n */\n Rule.prototype.isValid = function() {\n return true;\n };\n\n return /** @alias module:tool_lp/competency_rule_all */ Rule;\n\n});\n"],"file":"competency_rule_all.min.js"}
{"version":3,"sources":["../src/competency_rule_all.js"],"names":["define","$","Str","RuleBase","Rule","apply","arguments","prototype","Object","create","getType","isValid"],"mappings":"AAuBAA,OAAM,+BAAC,CAAC,QAAD,CACC,UADD,CAEC,yBAFD,CAAD,CAIE,SAASC,CAAT,CAAYC,CAAZ,CAAiBC,CAAjB,CAA2B,CAO/B,GAAIC,CAAAA,CAAI,CAAG,UAAW,CAClBD,CAAQ,CAACE,KAAT,CAAe,IAAf,CAAqBC,SAArB,CACH,CAFD,CAGAF,CAAI,CAACG,SAAL,CAAiBC,MAAM,CAACC,MAAP,CAAcN,CAAQ,CAACI,SAAvB,CAAjB,CAQAH,CAAI,CAACG,SAAL,CAAeG,OAAf,CAAyB,UAAW,CAChC,MAAO,sCACV,CAFD,CAUAN,CAAI,CAACG,SAAL,CAAeI,OAAf,CAAyB,UAAW,CAChC,QACH,CAFD,CAIA,MAAOP,CAAAA,CACV,CArCK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Competency rule all module.\n *\n * @module tool_lp/competency_rule_all\n * @copyright 2015 Frédéric Massart - FMCorz.net\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery',\n 'core/str',\n 'tool_lp/competency_rule',\n ],\n function($, Str, RuleBase) {\n\n /**\n * Competency rule all class.\n *\n * @class tool_lp/competency_rule_all\n */\n var Rule = function() {\n RuleBase.apply(this, arguments);\n };\n Rule.prototype = Object.create(RuleBase.prototype);\n\n /**\n * Return the type of the module.\n *\n * @return {String}\n * @method getType\n */\n Rule.prototype.getType = function() {\n return 'core_competency\\\\competency_rule_all';\n };\n\n /**\n * Whether or not the current config is valid.\n *\n * @return {Boolean}\n * @method isValid\n */\n Rule.prototype.isValid = function() {\n return true;\n };\n\n return Rule;\n});\n"],"file":"competency_rule_all.min.js"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

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