29830 Commits

Author SHA1 Message Date
Brendan Heywood
34efb9a19e MDL-59681 file: Stop recursive file serving 2022-03-21 17:50:20 +11:00
Andrew Nicols
424143b2e6 Merge branch 'MDL-74229-master' of https://github.com/bmbrands/moodle 2022-03-21 13:07:48 +08:00
Andrew Nicols
6d8bb892ec Merge branch 'MDL-74269-master' of https://github.com/ericmerrill/moodle 2022-03-21 12:51:24 +08:00
Paul Holden
ec89abc5bf MDL-74110 forms: disable calendar link when date selector disabled. 2022-03-19 14:24:23 +00:00
Andrew Nicols
322395f29c Merge branch 'MDL-74199-master' of https://github.com/aanabit/moodle 2022-03-19 22:00:16 +08:00
Tim Hunt
d76a072636 MDL-74270 format_float: fix bug with $decimalpoints=0, $stripzeros=true 2022-03-18 22:12:38 +00:00
Eric Merrill
dd5406527a MDL-74269 course: Make sure category exists before updating 2022-03-18 15:30:19 -04:00
Ferran Recio
bf642fb6fc MDL-73556 core_courseformat: fix course index click toggle
When the user clicks on a course index chevron the section is toggled.
However, when clicks on the section name the section is expanded but
never collapsed.
2022-03-18 14:39:32 +01:00
Sara Arjona
30b75b7190 MDL-73233 navigation: Breadcrumbs removed from user preferences
In MDL-74087 breadcrumbs were removed from the User preferences page.
This patch re-introduces a piece of code that was removed originally
in MDL-73233 while reviewing all the places where the Dashboard was
displayed by default (to avoid inconsistencies). New item in primary
navigation has been changed to "Home" but we still need the code
re-added to hide breadcrumbs when its content matches the primary
navigation.
2022-03-18 07:44:55 +01:00
Jun Pataleta
cd2225a71b Merge branch 'MDL-73383-master' of https://github.com/rezaies/moodle 2022-03-18 12:00:23 +08:00
Shamim Rezaie
bdccf3eb3b Merge branch 'MDL-73593-master' of https://github.com/bmbrands/moodle 2022-03-18 11:30:27 +11:00
Eloy Lafuente (stronk7)
05c07f2656 Merge branch 'MDL-74159-master' of https://github.com/sarjona/moodle 2022-03-17 18:08:25 +01:00
Jun Pataleta
1e533995dd Merge branch 'MDL-73233-master' of https://github.com/sarjona/moodle 2022-03-18 00:35:11 +08:00
Sara Arjona
12252ebec0 Merge branch 'MDL-74172-master' of https://github.com/bmbrands/moodle 2022-03-17 15:48:14 +01:00
Andrew Nicols
27bed0b928 Merge branch 'MDL-72991-master-4' of https://github.com/HuongNV13/moodle 2022-03-17 22:25:10 +08:00
Sara Arjona
08bae4cce8 Merge branch 'MDL-74214' of https://github.com/paulholden/moodle 2022-03-17 13:11:47 +01:00
Jun Pataleta
cb9480841c Merge branch 'MDL-74216-master' of https://github.com/mihailges/moodle 2022-03-17 19:47:46 +08:00
Huong Nguyen
bfe14e2312 MDL-72991 Course: Partial course cache rebuild with cache versioning 2022-03-17 15:34:26 +07:00
Huong Nguyen
273fbac739 MDL-72991 Course: Create PHPUnit for course_modinfo and move_section_to
Newly PHPUnit tests were created to verify the below methods
 - course_modinfo::purge_section_cache_by_id()
 - course_modinfo::purge_section_cache_by_number()
 - move_section_to()
2022-03-17 15:34:26 +07:00
Huong Nguyen
4bc2b24a51 MDL-72991 Course: Modify the courseminfo cacheid to force a rebuild
Co-authored-by: Andrew Lyons <andrew@nicols.co.uk>
2022-03-17 15:34:26 +07:00
Dongsheng Cai
f97b86e841 MDL-72991 Course: Partial course cache rebuild
When updating/deleting a section/module, the system now only
invalidate of the element (section/module), not the whole course cache
Also, the system now only recalculate the cache for element (section/module)
if necessary, not the whole course cache

Move module/section purging to course_modinfo:
  + course_modinfo::purge_course_section_cache_by_id was created to purge section by id
  + course_modinfo::purge_course_section_cache_by_number was created to purge section by number
  + course_modinfo::purge_course_module_cache was created to purge module
2022-03-17 15:34:01 +07:00
Simey Lameze
177c5cbd7f MDL-74109 lib: replace deprecated compile call 2022-03-17 12:10:18 +08:00
Eloy Lafuente (stronk7)
5b98ad241a Merge branch 'MDL-74116-master' of https://github.com/andrewnicols/moodle 2022-03-16 22:18:40 +01:00
Andrew Nicols
c3404942e4 MDL-74116 behat: Fix browser instantiation for Selenium 4 2022-03-16 22:29:20 +08:00
Bas Brands
f0e32f99b4 MDL-74229 navigation: add data-key to navtabs 2022-03-16 13:30:35 +01:00
Sara Arjona
dd7d03a50e Merge branch 'MDL-74073-master-2' of https://github.com/junpataleta/moodle 2022-03-16 12:17:08 +01:00
Sara Arjona
42c96d1708 MDL-73233 navigation: Remove dashboard when it is disabled
- Only add Dashboard to 'home' the root node if the $CFG->enabledashboard
setting is enabled.
- The "More..." link displayed in the "My courses" section from the
navigation block was pointing to the dashboard. However, now that we have
the "My courses" page, it makes more sense to change it and link to it.
- For the User preferences, I've changed breadcrumbs from "Dashboard" to
"Home" because they are more generic (and don't strictly belong to the
dashboard).
2022-03-16 11:35:09 +01:00
Sara Arjona
c612f121a0 MDL-73233 navigation: Hide Dashboard from primary nav
When the $CFG->enabledashboard is disabled, the "Dashboard"
menu option won't be displayed in the primary navigation.
2022-03-16 11:35:07 +01:00
Sara Arjona
e3d2fa41d0 MDL-73233 user: Review Start page user preferences
The "Start page" user preferences page has been reviewed to
consider the new $CFG->enabledashboard setting.
The "Dashboard" won't be displayed in the list if it's disabled.
Besides, the default value is now calculated calling the new
get_default_home_page() method.
2022-03-16 11:22:22 +01:00
Sara Arjona
5349861e69 MDL-73233 admin: Add enabledashboard setting
The $CFG->enabledashboard setting has been added to Appearance >
Navigation, to let admins disable the "Dashboard" option from the
primary navigation.

This commit also changes the behaviour of get_home_page(), to take
into account this setting and adds a new method, get_default_home_page(),
to return the expected default home page (that wil be used when current
default page is not defined or valid).
2022-03-16 11:22:22 +01:00
Mihail Geshoski
7066c7618c MDL-74216 navigation: Do not show 'My courses' in primary nav to guests 2022-03-16 18:16:58 +08:00
Bas Brands
e71f567f28 MDL-74172 theme_boost: printer friendly drawers layout 2022-03-16 10:24:29 +01:00
Ilya Tregubov
a5ef320720 Merge branch 'MDL-74071' of https://github.com/paulholden/moodle 2022-03-16 13:57:59 +06:00
Jun Pataleta
7dfb64c7cb MDL-74073 core: Fix collapsesections accessibility
* Fix focus outline
* Set aria-expanded state accordingly
* Set aria-expanded in the template to false by default as the default
mode of the link is to expand all the sections.

Reference:
https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure
2022-03-16 14:09:14 +08:00
Ilya Tregubov
4e90732ebe Merge branch 'MDL-73344-master' of https://github.com/peterRd/moodle 2022-03-16 10:05:03 +06:00
Jun Pataleta
8c07f33d80 Merge branch 'MDL-72481-master' of https://github.com/rezaies/moodle 2022-03-16 11:45:40 +08:00
Eloy Lafuente (stronk7)
337e740568 Merge branch 'MDL-74141-master' of https://github.com/sarjona/moodle 2022-03-15 23:38:14 +01:00
Amaia Anabitarte
c28b5ad8c0 MDL-74199 core_user: Remove breadcrumbs on private files 2022-03-15 18:01:17 +01:00
Eloy Lafuente (stronk7)
103365191c Merge branch 'MDL-74131-master' of https://github.com/aanabit/moodle 2022-03-15 16:46:07 +01:00
Eloy Lafuente (stronk7)
040d005dc5 Merge branch 'MDL-74156-master' of https://github.com/junpataleta/moodle 2022-03-15 15:38:01 +01:00
Paul Holden
29c00fc100 MDL-74214 forms: re-calculate calendar panel zIndex each time.
The previous iteration only calculated it's zIndex value on
initial load. This meant that any nodes added subsequent to this
would not be taken into account (e.g. modal forms).
2022-03-15 13:41:42 +00:00
Eric Merrill
f3ea6862aa MDL-74183 completion: Protect against index conflict in cron 2022-03-14 22:56:20 -04:00
Shamim Rezaie
ef84c1607d MDL-72481 core: prevent loosing the tick next to selected dropdown itme
prevent loosing the tick when user clicks on the toggle button
or when they Press Esc to close the dropdown.
2022-03-15 12:48:22 +11:00
Shamim Rezaie
50c8bf68a8 MDL-72481 core: Make more menu tabbable when the active tab moves inside 2022-03-15 12:48:22 +11:00
Sujith Haridasan
1168e5fff1 MDL-72481 core: Fix the keyboard navigation in RTL
Also updated e.keyCode to e.key because keyCode is deprecated.

Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2022-03-15 12:48:22 +11:00
Shamim Rezaie
4489132505 MDL-72481 core: only move through visible tabs 2022-03-15 12:48:22 +11:00
Sujith Haridasan
af496f2c85 MDL-72481 admin: Update behat selector
The more menu can be a tablist or a manubar

Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2022-03-15 12:48:22 +11:00
Jun Pataleta
6937d87ddd MDL-72481 admin: Render the site admin navigation menu as tablist
only render the secondary nav as tablist if it is for the site admin tabs

Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2022-03-15 12:48:21 +11:00
Jun Pataleta
1f21daf8b3 MDL-72481 core: Fix more menu keyboard navigation
* Allow the more menu to be rendered as a tablist when needed.
* Let menu_navigation handle keyboard navigation only when
menu items are not rendered as dropdowns. Otherwise, leave
the keyboard navigation handling via the default handlers
(e.g. dropdown.js/aria.js/tab.js).
* When the more menu is rendered as a tablist, use aria-selected
for the selected tab. When it's rendered as a menu, use aria-current
for the selected menu item. (The menuitem role supports aria-current and
not aria-selected)
* Make sure that the active tab is tabbable by default.
* Submenu items should always have tabindex=-1
* Update behat to use css_element instead of xpath. Also, improved it
to consider that it is the active element that should be tabbable.

Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2022-03-15 12:48:21 +11:00
Víctor Déniz
e95d99ebf1 Merge branch 'MDL-74030' of https://github.com/roland04/moodle 2022-03-14 21:39:40 +00:00