78 Commits

Author SHA1 Message Date
Andrew Nicols
a6acb015a3
MDL-81521 core: Update all possibly data providers to be static
Note: Some data providers could not be automatically be converted to
being static. These will be handled in a separate issue.
2024-11-15 12:50:55 +08:00
Jun Pataleta
5b421c6db6
NOBUG: Add upgrade notes 2024-10-05 15:08:28 +08:00
Huong Nguyen
3a6640c461
NOBUG: Add upgrade notes 2024-10-04 21:06:11 +07:00
Huong Nguyen
4d1c0cb04b
NOBUG: Add upgrade notes 2024-10-01 19:37:15 +07:00
Huong Nguyen
282421ce6c
NOBUG: Change upgrade notes version 2024-09-27 19:16:56 +07:00
Huong Nguyen
7b4ed9096f
NOBUG: Add upgrade notes 2024-09-27 18:45:07 +07:00
Shamim Rezaie
5f6fe3e02f MDL-80750 mod_assign: gradingtable should not print paging bar 2024-09-18 15:48:09 +08:00
Huong Nguyen
7aef6e21cb
NOBUG: Add upgrade notes 2024-08-29 18:09:49 +07:00
Marina Glancy
bb466df202 MDL-82567 core: Add has_capability method
Co-authored-by: David Woloszyn <david.woloszyn@moodle.com>
Co-authored-by: Jun Pataleta <jun@moodle.com>
2024-08-28 03:34:17 +00:00
Huong Nguyen
e2708aeacf
NOBUG: Add upgrade notes 2024-08-16 08:37:50 +07:00
Huong Nguyen
abcac5bc8f
NOBUG: Add upgrade notes 2024-07-12 08:41:57 +07:00
Ilya Tregubov
c7af8d8afa NOBUG: Add upgrade notes 2024-07-05 09:01:53 +08:00
Shamim Rezaie
e44d630be2 MDL-80748 core: flexible_table can be optionally responsive 2024-07-01 15:58:20 +10:00
Shamim Rezaie
3452278283 MDL-80748 core: organizes the properties of the flexible_table class
Public properties are now defined first, followed by protected
properties and finally private properties. Previously, they were
scattered.
2024-07-01 15:58:16 +10:00
Jun Pataleta
e84daab7dd
Merge branch 'MDL-82183-main-squashed' of https://github.com/andrewnicols/moodle 2024-06-27 08:49:13 +08:00
Andrew Nicols
9043dc75bf
MDL-82183 core: Coding style fixes for core\output 2024-06-26 23:00:33 +08:00
Andrew Nicols
ff0fd2764a
MDL-82183 core: Update namespace of moved output classes 2024-06-26 23:00:33 +08:00
Andrew Nicols
6c61700d0e
MDL-82183 core_table: Move tablelib classes to core_table 2024-06-26 23:00:32 +08:00
Andrew Nicols
2fff48b07c
MDL-82183 core: Migrate all output classes to autoloaded 2024-06-26 23:00:31 +08:00
Mark Johnson
1d64f468d1 MDL-72321 core: Allow custom filteroptions to be passed by datafilters
This allows datafilters to include additional fields other than the standard list of selected values.
For example they may wish to include an additional select or checkbox to change how the values are used in the resulting query.
2023-08-24 11:09:34 +01:00
Marina Glancy
04f8fdd021 MDL-77164 various: fix javascript AMD module name 2023-04-13 09:43:15 +01:00
Andrew Nicols
f4a48a517b MDL-76867 core_table: Allow dynamic table filterset to be specified
The previous behaviour guessed the table filterset based on the table's
class name, but this is not very flexible if you wish to create an
abstract table class and use a generic filter for all implementations.

This change adds the ability to specify the filterset class, with the
default behaviour using the table class name as a prefix.
2023-03-14 08:44:15 +08:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Eloy Lafuente (stronk7)
d590b08dfa MDL-75880 phpunit: fix all @coversDefaultClass missing @covers
Because @coversDefaultClass doesn't indicate any coverage (it's
just an alias to avoid having to write the class name in @covers),
this commit fixes all the files that were using that annotation
and missing any @covers.

Basically, replacing one by the other and done.
2022-11-04 16:51:20 +01:00
Marina Glancy
41b93bd7e5 MDL-73424 general: Internal methods must have same type as parent
Otherwise the error is thrown in PHP8.1
2022-10-10 16:46:13 +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
Andrew Nicols
3a70983d53 MDL-72701 unit tests: Generate default coverage 2021-12-21 09:24:00 +08:00
Andrew Nicols
4f422785c6 MDL-71113 javascript: Improve basic JS Documentation 2021-06-18 09:38:05 +08:00
Andrew Nicols
92179b7057 MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
Mikel Martín
2471e6ec8d MDL-70871 table: Add 'Show all X' functionality to dynamic_table 2021-03-23 09:55:16 +01:00
Eloy Lafuente (stronk7)
9fd6ac7c9d MDL-71036 phpunit: xml config - switch coverage info to new includes
This applies the "whitelist" => "include" changes to all the core
phpunit_coverage_info occurrences, so core won't emit any deprecation
warning (see previous commit).

At the same time, modified a bunch of comments in coverage files
to be more readable/understandable.
2021-03-11 23:04:32 +01:00
Eloy Lafuente (stronk7)
81407f18ec MDL-71036 phpunit: Mock->setMethods() silently deprecated
The current ->setMethods() has been silently (won't emit any
warning) in PHPUnit 9. And will stop working (current plans)
in PHPUnit 10.

Basically the now deprecated method has been split into:

- onlyMethods(): To point to existing methods in the mocked artifact.
- addMethods(): To point to non existing (yet) methods in the mocked
  artifact.

In practice that means that all our current setMethods() calls can be
converted to onlyMethods() (existing) and done. The addMethods() is
mostly useful on development phases, not final testing.

Finally note that <null> isn't accepted anymore as parameter to
double all the methods. Instead empty array [] must be used.

Link: https://github.com/sebastianbergmann/phpunit/issues/3770
2021-03-11 23:04:31 +01:00
Eloy Lafuente (stronk7)
857f6385a4 MDL-71036 phpunit: Fix param check, must be array
With stricter typed param checks in php73, the 7th param of the
getMockForAbstractClass() must be array, so previous code defaulting
to null now throws a TypeError.
2021-03-11 19:22:24 +01:00
Jun Pataleta
a489f20f17 MDL-69145 core: Set the default filterset join type to ALL
* Plus minor PHPDoc type fix for the JOINTYPE_DEFAULT constants
2020-12-09 10:51:06 +08:00
Michael Hawkins
bb32174261 MDL-69241 lib: Reset dynamic tables to page 1 when filtering or sorting
This ensures consistency and that the page will always exist, which may
not be true for later pages if applying filters returns fewer results.
2020-08-07 12:51:49 +08:00
Michael Hawkins
bd40419f2f MDL-69336 lib: Correctly return promises when table show/hide columns
Previously showColumn and HideColumn were returning nothing, so
attempts to catch exceptions were themselves throwing errors in the
browser console.
2020-08-04 15:18:39 +08:00
Andrew Nicols
efc3dfff47 MDL-68977 core_table: Do not update dynamic tables on nullop
When a setting is added/removed (i.e. an empty filter is removed) and
there is no change, then we should treat this is a null-op and not
refresh the table unnecessarily.
2020-06-09 11:21:04 +08:00
Andrew Nicols
efa490c61f MDL-68951 table: Page numbers are 1-indexed, not 0 2020-06-08 09:35:39 +08:00
Andrew Nicols
eb087fc5de MDL-68951 user: Add appropriate exceptions for table/participants 2020-06-08 09:35:39 +08:00
Sara Arjona
6ddab9d6d3 Merge branch 'MDL-68745-master-2' of git://github.com/mickhawkins/moodle 2020-06-05 21:30:07 +02:00
Michael Hawkins
f32f25b89d MDL-68745 lib: Updated table filters to support non-English characters
Added support for non-English first/last name filtering.
2020-06-04 12:48:03 +08:00
Andrew Nicols
444ae8c8f0 MDL-68612 core_table: Pending checks for dyanmic updates 2020-06-04 10:47:27 +08:00
Jun Pataleta
7fcdd9d983 Merge branch 'MDL-68612-master-integration' of git://github.com/mickhawkins/moodle 2020-06-03 15:39:36 +08:00
Andrew Nicols
084c955e49 MDL-68612 user: Set the initial filter on page load 2020-06-03 14:29:22 +08:00
Simey Lameze
1179f07d3c MDL-68793 core_table: fix WS name to comply with guidelines 2020-06-02 11:49:04 +08:00
Michael Hawkins
9e791ff7f5 MDL-68612 lib: Reverting filter/filterset default join types to match UI
These had temporarily been set to ALL for consistency while the unified
filter remained in use. Now that is being replaced with the new UI, it
can be returned to its intended default.
2020-05-29 10:10:33 +08:00