559 Commits

Author SHA1 Message Date
Sara Arjona
1cedbd1e19 MDL-74784 core_badges: Fix exception with related badges
System badges with related badges were displaying an error before this patch,
because the is_guest($context) function expects a context_course.
2022-05-18 08:18:33 +02:00
Víctor Déniz
9746b8a6e2 Merge branch 'MDL-74612' of https://github.com/paulholden/moodle 2022-05-05 13:20:20 +01:00
Michael Hawkins
a0f47c8bc4 MDL-74333 badges: Check profile criteria valid when reviewing 2022-05-04 12:57:38 +08:00
Paul Holden
2fede32518 MDL-74612 cohort: use data generator for populating cohort members. 2022-04-29 16:09:35 +01:00
Peter Dias
d27e7e1950 MDL-74478 badges: Check completion_fail when awarding badge
Bring the award_criteria_activity checks in line with the observer checks
2022-04-28 12:14:45 +08:00
Mihail Geshoski
8d0ca00e95 MDL-74386 navigation: Remove redundant set_secondary_navigation() calls
Removes $PAGE->set_secondary_navigation(false) calls which certain pages
were using to prevent displaying secondary navigation menu in the system
context. This logic is now generally handled within the secondary
navigation class.
2022-04-08 15:11:31 +08:00
Peter Dias
62c086ee72 MDL-74313 badge: Disable secondary navigation in badges 2022-03-30 09:17:53 +08:00
Amaia Anabitarte
c36ab09b66 MDL-74075 core_badges: Check accepted criterias 2022-03-09 12:31:29 +01:00
Michael Hawkins
c2794752ea MDL-74074 badges: Ensure profile criteria exists before completion check 2022-03-08 11:59:25 +00:00
Sara Arjona
bc7dec8c2b MDL-66940 badges: Create page to display badges info
The OBv2.0 specification includes a field "Criteria" for
BadgeClass. Until now, this field was filled using the
URL of the badge assertion, but that is causing some issues
in Badgr because it linked to the badge assertion of the
first user sending this badge to the Badgr backpack (so then,
the following users linked to the first user assertion page
too).

This patch adds a new page, badgeclass.php which will be
used from now to display any badge information which is
not related to any assertion (like happens with the criteria
in BadgeClass).
2022-03-04 12:18:59 +01:00
Jake Dallimore
c08caf57c5 Merge branch 'MDL-73645-master-1' of git://github.com/mihailges/moodle 2022-03-02 14:10:19 +08:00
Mihail Geshoski
1b2c0e6faf MDL-73645 badges: Update breadcrumb nodes 2022-03-02 13:00:25 +08:00
Bas Brands
dd95845bf1 MDL-73595 theme_boost: make tertiary nav more distinct 2022-02-28 13:07:52 +01:00
Jun Pataleta
baf360a7ba Merge branch 'MDL-73915-master-terser' of https://github.com/andrewnicols/moodle 2022-02-24 17:29:17 +08:00
Ilya Tregubov
be7a576994 Merge branch 'MDL-73335-tim' of https://github.com/ilyatregubov/moodle 2022-02-24 09:43:59 +02:00
Sujith Haridasan
b610055bbd MDL-73335 question: Add the tertiary nav for question bank
The tertiary navigation has been added to the question bank.
- Url selector has been added for the pages:
  Questions, Categories, Import and Export
- A separate page to "Add category" has been added.
  The "Add category" is available as a tertiary nav button.
- Updated the tests for the changes made.

This commit is mostly Sujith's work, with further changes by
Tim Hunt <T.J.Hunt@open.ac.uk> so we share the blame/credit.

AMOS BEGIN
 CPY [questioncats,mod_quiz],[questioncategories,core_question]
AMOS END
2022-02-24 09:26:29 +02:00
Andrew Nicols
e1b9d5f3cd MDL-73915 js: Drop support for IE and android
Moodle announced that support for IE would be dropped back in August
2020 with Moodle 3.9 but not active steps were taken at that time. That
decision was made in MDLSITE-6109 and this particular step was meant to
be taken in Moodle 3.10.

This is the first step taken to actively drop support for IE.

This commit also bumps the browser support pattern from 0.25% to 0.3%.
The percentage here includes any browser where at least this percentage
of users worldwide may be using a browser. In this case it causes
support for Android 4.3-4.4 to be dropped, which relate to Android
KitKat (released 2013).

This combination of changes means that all of the supported browsers in
our compatibility list support modern features including async,
for...of, classes, native Promises, and more which has a huge impact on
the ease of debugging code, and drastically reduces the minified file
size because a number of native Polyfills included by Babel are no
longer included.
2022-02-23 08:55:20 +08:00
Andrew Nicols
0a4047ab31 MDL-73915 js: Switch amd minification to terser
Unfortunately the babel minify-mangle plugin seems to be abandoned and
in certain circumstances can be very buggy. The only safe options are to
disable it, or to switch to a different minification library.

Not minifying our javascript is not ideal, so this commit updates the
javascript tasks to use a rollup, combined with babel, and terser.

Babel still converts code from ES/UMD/AMD to AMD modules with the
relevant browser support, whilst terser minifies the code.

The rollup bundler handles tracking and creation of sourcemaps, and
supports better parallelisation of the tasks.

Since the upgrade to Node LTS/Gallium requires an upgrade to @babel/core
and eslint, which change the built files anyway, this seems like the
ideal time to make this change.
2022-02-23 08:55:09 +08:00
Andrew Nicols
aa7f7957ea MDL-73915 js: Upgrade babel and eslint 2022-02-23 08:53:54 +08:00
Víctor Déniz
efdd77a157 MDL-73812 lang: Replace modified strings in tests 2022-02-18 16:14:02 +00:00
Ilya Tregubov
57fe1a3099 Merge branch 'MDL-67853-master' of https://github.com/crazyserver/moodle 2022-01-27 16:41:19 +02:00
Pau Ferrer Ocaña
b4c75986ad MDL-67853 message: Adapt tests removing online/offline settings 2022-01-27 15:22:15 +01:00
Shamim Rezaie
090fd3f8ae Merge branch 'MDL-72852-master' of https://github.com/sarjona/moodle 2022-01-25 13:34:01 +11:00
Sara Arjona
7c1d536b0d MDL-72852 navigation: Do not display badges when empty
If there are no course badges, students shouldn't have a link to a
page saying there are no badges available.

This patch is for displaying the Badges in the secondary navigation
only if the user can manage badges or there is, at least, one
badge available to the current user.
2022-01-24 15:31:23 +01:00
Jake Dallimore
041b1beb46 Merge branch 'MDL-73347-master' of https://github.com/sarjona/moodle 2022-01-24 13:40:57 +08:00
Andrew Nicols
6670c04c23 Merge branch 'MDL-73476' of https://github.com/stronk7/moodle 2022-01-18 09:31:44 +08:00
Jun Pataleta
596dbc7492 Merge branch 'MDL-73416-master' of https://github.com/bmbrands/moodle 2022-01-17 18:36:31 +08:00
Adrian Greeve
4870b363b0 MDL-73366 navigation: Changed the first tab of site administration.
It now reads "General" instead of "Site administration"
2022-01-17 11:52:13 +08:00
Eloy Lafuente (stronk7)
0c53a3dec8 MDL-73476 phpunit: events, external and search tescase names
All events_test, external_test and search_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to lib/external/tests/external_test.php:
- external is not a valid component
- hence, its only valid namespace is "core"
- also, it's testing lib/external/externallib.php
- hence, the file (and class) have been renamed to external_externallib_test.php
  (to avoid conflicts with other external_test that may exist in core)
2022-01-14 16:18:39 +01:00
Sara Arjona
53fe23d8b5 MDL-73347 behat: Add blocks hidden by default for boost
For the boost them, a few themes have been hidden by default.
The unaddable setting should be set to let admins add them again,
because some behat tests need them.
2022-01-14 13:08:48 +01:00
Bas Brands
38d0498c0f MDL-73416 core_badges: limit page width on most badge pages 2022-01-13 14:36:13 +01:00
Sara Arjona
d5fbdb5ab0 Merge branch 'MDL-73359-master' of https://github.com/aanabit/moodle 2022-01-12 11:05:24 +01:00
Shamim Rezaie
5c600ac6b8 Merge branch 'MDL-72880' of https://github.com/paulholden/moodle 2022-01-12 19:21:22 +11:00
Amaia Anabitarte
4f190127b5 MDL-73359 core_badges: Badge pages polish 2022-01-11 16:22:07 +01:00
Paul Holden
d40cc61eba MDL-72367 badges: require sesskey to remove badge alignment. 2022-01-11 14:34:16 +01:00
Paul Holden
a7b940ba7d MDL-72880 badges: change badge exporter issuername field to text.
This matches it's type in the settings pages, and also the type
of the site name used as the default for the setting. It's content
will now be automatically filtered by the external exporter class.
2022-01-07 09:11:35 +00:00
abgreeve
f1d22c9830 MDL-72930 navigation: Update to badges navigation.
This allows navigation nodes injected into the badges section
to be displayed as either a button or a dropdown url_select.
2022-01-04 15:58:52 +08:00
Sara Arjona
0fc33251bf Merge branch 'MDL-72904-master-dec21' of https://github.com/peterRd/moodle 2021-12-27 08:47:50 +01:00
Peter Dias
6d5ab2233a MDL-72904 core_badges: Update behat tests 2021-12-23 21:25:36 +08:00
Peter Dias
96dd6c9c94 MDL-72904 core_badges: Introduce tertiary navigation for badges 2021-12-23 21:02:01 +08:00
Jun Pataleta
80c17cd2a0 Merge branch 'MDL-72701-master' of https://github.com/andrewnicols/moodle 2021-12-23 12:10:46 +08:00
Andrew Nicols
bb9741d472 MDL-72701 unit tests: Fix broken @covers annotations 2021-12-21 09:24:00 +08:00
Eloy Lafuente (stronk7)
e4a2d9c1d4 MDL-73348 phpunit: normalize all privacy provider tests
As far as now all them have correct privacy level2 namespace:
- Move them to "privacy" subdir.
- Rename the files to "provider_test.php", this includes old
  privacy_test.php and privacy_provider_test.php files
- Rename the testcase to provider_test too (to match file name)

Also, change some relative paths and comments to point to new
locations.
2021-12-17 14:21:02 +01:00
Eloy Lafuente (stronk7)
57e6fb7ad9 MDL-73348 phpunit: privacy and privacy_provider testcase names
All privacy_test and privacy_provider_test classes:

- Namespaced with component\privacy.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Renamed a few files to make all be privacy_test or privacy_provider_test.php
- All them passing individually.
- Complete runs passing too.
2021-12-17 14:21:02 +01:00
Eloy Lafuente (stronk7)
71746122a5 Merge branch 'MDL-72287-master' of https://github.com/mihailges/moodle 2021-12-09 23:14:32 +01:00
Mihail Geshoski
e00da7e884 MDL-72287 behat: Update behat tests 2021-12-09 23:47:57 +08:00
abgreeve
fcd4de8639 MDL-72090 navigation: Update to behat feature files for navigation.
This updates feature files to use the new steps to navigate to certain
pages.
2021-12-09 11:13:35 +08:00
Jun Pataleta
80bdd33b6b Merge branch 'MDL-73153-master' of https://github.com/sarjona/moodle 2021-12-06 17:43:29 +08:00
Sujith Haridasan
671012e709 MDL-71915 badges: Update the behat tests
Update the behat tests to accommodate the changes
made for the tertiary navigation.
2021-12-06 10:26:40 +05:30
Eloy Lafuente (stronk7)
91a76566c9 Merge branch 'MDL-72141-master' of https://github.com/sarjona/moodle 2021-12-01 18:59:04 +01:00