1681 Commits

Author SHA1 Message Date
Simey Lameze
8cc79b1c87 MDL-62959 calendar: fix event data mapping for group id 2022-07-26 17:09:38 +08:00
Jun Pataleta
3c6fdb1993 Merge branch 'MDL-71062-master' of https://github.com/sharidas/moodle 2022-07-13 11:39:08 +08:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Jun Pataleta
1ee5ef3271 Merge branch 'MDL-74595' of https://github.com/paulholden/moodle 2022-07-12 11:44:00 +08:00
Paul Holden
1dba7152d0 MDL-74595 calendar: consistent breadcrumbs navigating site calendar.
Take #3, see also 7a529cc8 and 81b0d053.
2022-06-24 10:14:49 +01:00
Simey Lameze
24cd968683 MDL-68867 calendar: remove dependency on USER->groupmember hack 2022-06-22 07:56:41 +08:00
Paul Holden
432fbbc81a MDL-74327 calendar: format event location property if it's a URL. 2022-06-08 10:44:39 +01:00
Huong Nguyen
4342e774d8 MDL-73654 timeline: Improve search for course name and activity name 2022-05-31 11:05:44 +07:00
Eloy Lafuente (stronk7)
9f53b0e965 MDL-73971 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- 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:

- Some fixtures, initially defined in the test files have been
  moved to new files in fixtures subdirectory, leaving the unit
  test files clearer:
  - moodle2_course_format_test.php
- Rename wrong named test:
  - baseoptiogroup_test = baseoptigroup_test
2022-05-06 18:29:11 +02:00
Paul Holden
2255c598a5 MDL-74436 calendar: validate course/category field during import. 2022-04-25 18:01:13 +01:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +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
Andrew Nicols
4b388fc239 MDL-74235 core: Update core uses of activity icons to monologo 2022-04-07 12:56:14 +08:00
Sara Arjona
8893ba5236 MDL-74154 calendar: has_secondary_navigation_setter has been renamed
In MDL-72481, method has_secondary_navigation_setter has been renamed
to set_secondary_navigation.
2022-03-16 16:10:23 +01:00
Sara Arjona
ff402712a3 Merge branch 'MDL-74154-master' of https://github.com/peterRd/moodle 2022-03-16 12:29:07 +01:00
Peter Dias
8802254c8e MDL-74154 calendar: Disable secondary nav in calendar 2022-03-16 09:24:07 +08:00
Eloy Lafuente (stronk7)
820cdbc9e1 Merge branch 'MDL-74100' of https://github.com/paulholden/moodle 2022-03-15 15:07:02 +01:00
Paul Holden
598698bc10 MDL-74100 course: relax initial parameter types of external methods.
These methods can be called via UI, and would throw confusing exceptions
if a user entered "unsafe" characters in a search input (e.g. "<").

Defer cleaning of supplied text to inside the methods.
2022-03-08 21:13:02 +00:00
Bas Brands
322f13207a MDL-73908 block_calendar_upcoming: new mod icons 2022-03-08 11:07:38 +01:00
Eloy Lafuente (stronk7)
4003e31983 MDL-73785 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- 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:

- When belonging to other components and being valid api:
  - analytics related tests have been moved to tests/analytics subdir.
  - backup & restore related tests have been moved to tests/backup subdir.
  - events related tests have been moved to tests/event subdir.
  - privacy related tests have been moved to tests/privacy.
  - task related tests have been moved to tests/task subdir.
- Some simple renames, not including the component part anymore (not
  needed now that they are namespaced):
  - some xxxlib_test.php have been renamed lib_test.php
    (when they where testing the corresponding lib.php).
  - cache stores tests have been all renamed store_test, originally
    each one had its own name (file_test, apcu_test, redis_test...)
  - assign feedback tests have been all renamed feedback_test, originally
    each one had its own name (file_test, editpdf_test...)
2022-03-03 12:19:30 +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
Andrew Nicols
aa7f7957ea MDL-73915 js: Upgrade babel and eslint 2022-02-23 08:53:54 +08:00
Huong Nguyen
46bbf6e74b MDL-73854 Calendar: Fix calendar controls cannot be translated
Fix the issue that calendar page and block are showing only English names
of next and previous months despite switching the language
2022-02-15 12:16:32 +07:00
Eloy Lafuente (stronk7)
83497580cb Merge branch 'MDL-73669-master' of https://github.com/marinaglancy/moodle 2022-02-10 16:39:06 +01:00
Marina Glancy
c5c33d8eba MDL-73669 core_calendar: move deprecated behat steps to own file
Steps were initially deprecated in  MDL-72810
2022-02-04 17:17:08 +01:00
Jun Pataleta
33208c84f3 Merge branch 'MDL-73651-master' of git://github.com/rezaies/moodle 2022-02-04 10:36:50 +08:00
Shamim Rezaie
a159527748 MDL-73651 calendar: search in localised module type names as well 2022-02-04 10:06:05 +11:00
Paul Holden
85f2c044c0 MDL-73730 calendar: more precise matching of calendar day partial. 2022-02-02 10:19:26 +00:00
Eloy Lafuente (stronk7)
100bc51f1d MDL-73485 phpunit: externallib, generator and filter tescase names
All externallib_test, generator_test and filter_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 tests under testing/tests:

1) The core_testing component doesn't exist.
2) But testing/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have testing_xxxx as prefix.

Finally, also modified calendar/tests/events/events_test.php because it uses
some renamed (core_calendar_externallib_testcase => \core_calendar\externallib_test)
classes.
2022-01-21 19:48:23 +01: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
Dongsheng Cai
2ee27313ce MDL-71239 calendar: disallow manager role users edit user events 2022-01-11 14:34:16 +01:00
Huong Nguyen
db56452269 MDL-73297 Calendar: Display improvement in small screen
- Changed the breakpoint for responsiveness from 1200px to 768px
 - Added "dots" to indicate days with events for the large block and main calendar page
 - Added popovers for the main calendar page
 - Added new Behat scenarios to test the responsiveness
2022-01-07 14:41:32 +07:00
Eloy Lafuente (stronk7)
511801cb46 MDL-73352 phpunit: lib_test and locallib_test testcase names
All lib_test and locallib_test classes:

- Namespaced with component (and API whenever makes sense).
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed or add new uses.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under login/tests:

1) The core_login component doesn't exist.
2) But login/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have login_xxxx as prefix.
2021-12-30 16:21:42 +01:00
Sara Arjona
995ed32cf5 Merge branch 'MDL-71818-master-test4' of git://github.com/rezaies/moodle 2021-12-29 09:13:12 +01:00
Shamim Rezaie
379f15f3b4 MDL-71818 calendar: Fix detection of a click on day link 2021-12-29 19:02:55 +11:00
Shamim Rezaie
ffe65c9a2b Merge branch 'MDL-71818-master' of https://github.com/dcai/moodle into MDL-71818-master-test4 2021-12-29 18:59:46 +11:00
Sara Arjona
d870aae9c7 Merge branch 'MDL-71818-master' of https://github.com/dcai/moodle 2021-12-28 17:32:18 +01:00
Sara Arjona
7e559628dc Merge branch 'MDL-72581-master' of https://github.com/junpataleta/moodle 2021-12-28 09:23:11 +01:00
Jun Pataleta
be2ff9eea0 MDL-72581 calendar: Add purpose template context data
* Add a purpose template context data for activity events that
support the FEATURE_MOD_PURPOSE feature. This can be used to determine
the style to be used when rendering the activity icon for a calendar
event.
2021-12-21 17:56:35 +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
Dongsheng Cai
41587ffb43 MDL-71818 core_calendar: fix accessibility issues 2021-12-13 00:19:05 +11:00
Sara Arjona
23dea97a6c Merge branch 'MDL-61554-40' of https://github.com/nwp90/moodle 2021-12-09 17:50:58 +01:00
Nick Phillips
e252390284 MDL-61554 calendar: Set $PAGE context in calendar export. 2021-12-07 12:30:23 +13:00
Ilya Tregubov
7548cbfcf6 Merge branch 'MDL-72237-master' of https://github.com/dcai/moodle 2021-12-06 14:22:12 +02:00
Dongsheng Cai
cffefca11c MDL-72237 core_calendar: limit number of day events on calenar view 2021-12-03 16:21:30 +11:00
Sara Arjona
40818b5212 Merge branch 'MDL-72834-master' of https://github.com/HuongNV13/moodle 2021-12-01 08:59:47 +01:00
Jun Pataleta
a119f8e09c MDL-73066 calendar: Behat test fixes
* Specify which close button is being clicked
* Fill out course field when creating a group event
2021-11-30 17:18:42 +08:00
Huong Nguyen
7de559fa2f MDL-72834 Calendar: Move the calendar into the user menu 2021-11-30 10:22:07 +07:00