772 Commits

Author SHA1 Message Date
Mihail Geshoski
3001995be8 MDL-75153 grade: Update behat tests 2022-09-20 00:17:56 +08:00
Paul Holden
ab89e3caae MDL-74770 gradereport_grader: allow sorting by all user fields. 2022-08-18 15:58:11 +01:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Andrew Nicols
6d46332a94 Merge branch 'MDL-74613-master' of https://github.com/NoelDeMartin/moodle 2022-06-30 11:02:41 +08:00
Paul Holden
f70fc89217 MDL-74565 gradereport_grader: define capability required for editing. 2022-06-12 20:04:28 +01:00
Noel De Martin
bbaf83322f MDL-74613 grade: Add missing generators 2022-05-31 17:59:52 +02:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Sara Arjona
e2d435ca93 Merge branch 'MDL-74286-master' of https://github.com/ferranrecio/moodle 2022-04-01 17:34:30 +02:00
Eloy Lafuente (stronk7)
4e2b4a138d MDL-74231 grader report: Fix case where old settings are empty / null
There is an edge case in the conversion from old collapse/expand
settings (stored as user preference) to the new ones that can lead
to notices / warnings / errors.

Before PHP 8, they weren't being detected, but now they are.

Basically, if some of the expected components of the preferences
are missing, then some array (array_diff(), array_intersect()..)
operations now are failing, because now those parameter functions
do require to be arrays (so empty strings or nulls aren't allowed).

Also, there were some cases where the old preference was not being
removed ever, so its removal has been moved to a common place at
the end of the function, where it's always evaluated in case
the preference still exists but is empty of contents.

I've tried to cover all the cases I've been able to imagine with
unit tests (empty information, some component not set, all components
not set...), have moved it to a new unit test because the one
already performing some tests with those old preferences was
already too long to add more cases.
2022-03-29 23:46:45 +02:00
Ferran Recio
fb3fb34b09 MDL-74286 gradereport_grader: fix overlap scale selector 2022-03-24 14:07:54 +01: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
Bas Brands
a74c715627 MDL-73612 gradereport_grader: drawer layout issues 2022-01-31 10:09:33 +01:00
Sara Arjona
65b10e3dc7 MDL-72911 behat: Unrelated, remove the @skip_interim tag
This commit is UNRELATED to the MDL-72911, but we need the
@skip_interim tag removed to one scenario that was causing lots
of noise and failures @ CI infrastructure. This tag can now be
removed because these failures were fixed a days ago.

So we are using MDL-72911 (this extra commit) to remove that tag
(sorry for the noise).
2021-12-29 11:13:10 +01: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
Mihail Geshoski
4f403bfdca MDL-72873 core_grades: Add tertiary nav in grader report preferences 2021-12-16 00:10:13 +08:00
Sujith Haridasan
1cdab24b3a MDL-71915 gradereport_grader: Fix ajax_grader failure
Fix ajax_grader behat failure.
2021-12-06 10:26:41 +05:30
Eloy Lafuente (stronk7)
2f1936be67 MDL-72791 behat: Unrelated, add the @skip_interim tag
This commit is UNRELATED to the MDL-72791, but we need the
@skip_interim tag added to one scenario that is causing lots
of noise and failures @ CI infrastructure.

So we are using MDL-72791 (this extra commit) to add that tag ASAP.
(sorry for the noise, the tag will be removed once the scenario
or its causes are fixed).
2021-12-01 17:15:56 +01:00
Mathew May
6ca9c2154a MDL-70801 core_my: Add a new courses page 2021-11-15 11:49:35 +08:00
Huong Nguyen
ffca35b805 MDL-72896 Accessibility: Make html_table responsive
The tables are generated by html_table will responsive across viewports
2021-11-09 09:41:27 +07:00
Angelia Dela Cruz
89c4c803e8 MDL-72655 behat: Use assign generators
Replace steps that manually add assignment instances via the UI
and use Behat generators. This improves the speed of Behat test
runs.
2021-11-03 11:34:26 +08:00
Andrew Nicols
4562ea0bd4 MDL-71610 gradereport_grader: Specify the pagelayout for grader report 2021-10-01 15:15:40 +08:00
Bas Brands
16c726cde7 MDL-71610 core_behat: use new edit mode step in feature files 2021-09-29 09:25:36 +02:00
Bas Brands
6ece030948 MDL-71610 theme_boost: switch to standard editing mode for gradebook
the gradebook need to use the standard $USER->editing to check if editing mode is turned on
2021-09-29 09:25:36 +02:00
Ilya Tregubov
3de9a4db4c Merge branch 'MDL-66549-master' of git://github.com/ilyatregubov/moodle 2021-09-22 19:47:28 +02:00
arjun-kallapur
a5ab9e466e MDL-66549 grades: Double arrow sort order should be ascending first 2021-09-22 14:13:14 +02:00
Luca Bösch
1f7fbed812 MDL-71352 gradereport_grader: Add icons for pass/fail. 2021-09-17 13:54:41 +02:00
Eloy Lafuente (stronk7)
9f9fe79c26 MDL-72589 behat: Add @skip_chrome_zerosize to failing scenarios
All the scenarios failing with Chrome zero-size errors are
getting the @skip_chrome_zerosize to be able to keep them apart from
regular runs. See MDL-71108 for more information about
that error.

They will be run by another job, specifically using that tag to
keep them failing and under control.
2021-09-15 20:25:11 +02:00
Luca Bösch
aa9a591ecd MDL-70433 grades: prevent double escaping in titles 2021-08-27 10:56:20 +02:00
Andrew Nicols
530322e2ce MDL-69918 core: Update uses of legacy form change checker 2021-08-10 23:54:01 +08:00
Andrew Nicols
776f4bd80c MDL-72179 behat: Make use of page resolvers 2021-07-26 15:14:28 +08:00
Ilya Tregubov
4819625349 MDL-32103 completion: Allow instant completion updates.
For activity based course completion criteria allow instant
course completion updates if the activity completion state was changed
for a single user.
2021-07-13 12:07:53 +02:00
Mahmoud Kassaei
c259a065b0 MDL-71697 Custom user field support: Grade report grader 2021-06-16 15:06:10 +01:00
Mihail Geshoski
9d80686630 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:33:07 +08:00
Eloy Lafuente (stronk7)
9d6aa39985 MDL-71583 versions: Add all the missing full-stops to version/requires
It seems that the new phpcs3 checker is now controlling those
line comments that previously were ignored.

This commit just looks for all the cases and bulk-add
them when needed. The bash script (mac) used to add all them is:

while read -r line; do
    arr=(${line//:/ })
    if [[ -n ${arr[0]} ]] && [[ -n ${arr[1]} ]]; then
        echo "  file ${arr[0]}, line ${arr[1]}"
        sed -i "${arr[1]}s/\$/\./" ${arr[0]}
    fi
done < <(find . -name version.php | xargs ag --nomultiline '>(version|requires) *=.*//.*[^;\.]$')
2021-05-11 20:11:07 +02:00
Sara Arjona
92cfa71cd0 Merge branch 'MDL-70763' of git://github.com/paulholden/moodle 2021-04-28 12:36:23 +02:00
Luca Bösch
aee27d0a9b MDL-71118 core: Add grade (verb) string.
AMOS BEGIN
 CPY [grade,core],[gradenoun,core]
 CPY [grade,core],[gradeverb,core]
AMOS END
2021-04-17 11:46:09 +02:00
Paul Holden
c32192957f MDL-70763 gradereport_grader: export preferences for correct user. 2021-04-04 23:15:23 +01:00
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
sam marshall
987e55452f MDL-45242 Course: Enrol feature supports custom profile fields 2021-03-10 10:57:11 +00:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Andrew Nicols
da3b304ab5 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:11 +08:00
Andrew Nicols
5b1f83ef3f Merge branch 'MDL-67702' of https://github.com/paulholden/moodle 2020-11-19 10:34:02 +08:00
Andrew Nicols
3959958372 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
ba34d6e225 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Paul Holden
3521d50c13 MDL-67702 gradereport_grader: user filters per report instance. 2020-11-09 23:21:24 +00:00
Eloy Lafuente (stronk7)
f6711bb394 MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.

At the same time, fix a few wrong function names,
provider data and param types, return statements...
2020-10-21 12:45:59 +02:00
Mikhail Golenkov
9e23f5d7b8 MDL-69791 gradereport: Fix error message when invalid grade is entered 2020-10-05 14:56:58 +11:00
Andrew Nicols
b4b4e7ff7b Merge branch 'master_MDL-69190' of https://github.com/danmarsden/moodle 2020-09-02 09:30:43 +08:00