Commit Graph

341 Commits

Author SHA1 Message Date
Paul Holden 3afbd2a0ad MDL-75077 output: prevent duplicate ID errors in custom menus.
Following on from 8e4a7c6b, we should apply a similar change to
custom menus to account for being collapsed into the "More" menu.
2022-10-05 18:30:08 +01:00
Tim Hunt 9a0c490680 MDL-75548 misc: final Required parameter follows optional notices 2022-08-22 15:19:34 +01:00
Jun Pataleta 1a7939778b MDL-74800 core: action menu role fix
The action menu could have a role button or menubar depending on the
number of options available.
2022-08-08 14:51:28 +02:00
Jun Pataleta af1936faf4 MDL-72885 output: Allow additional attributes for custom menu items
* Plus don't render the link title if it's the same as the link text.
2022-05-27 19:42:21 +08:00
Andrew Nicols 649705874d Merge branch 'MDL-70792-master-2' of https://github.com/junpataleta/moodle 2022-02-25 11:39:55 +08:00
Jun Pataleta 13cdef5dc4 MDL-70792 output: Menu items should have -1 tab index
* As per WAI ARIA Authoring Practices 1.1 guidelines for menus,
menu items should have a tab index of -1. Navigation between menu items
is done via arrow keys.

See https://www.w3.org/TR/wai-aria-practices-1.1/#menu
2022-02-24 18:21:12 +08:00
Mihail Geshoski 57125bd86a MDL-73355 output: Set the id when initializing the action_link object 2022-02-23 21:44:08 +08:00
Bas Brands 7c76e1c349 MDL-72466 core_output: dropdown menu alignment 2022-01-27 17:24:20 +01:00
Sara Arjona 81b80edf40 MDL-73584 lib: Remove role menubar from Actions menu
The menubar role defined in the "menubar d-flex" element is not
required and it's causing the following error "Required ARIA children
role not present: group, menuitemradio, menuitem, menuitemcheckbox".
2022-01-17 12:50:53 +01: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
Paul Holden 02680f59d9 MDL-72639 admin: consistent primary buttons during site upgrade. 2021-10-10 20:42:44 +01:00
Paul Holden dcc130c7cf MDL-72289 output: allow customised inplace editable icon for editing.
Add optional argument to allow it to be defined by caller, and set
the default icon for `select` type as appropriate.
2021-08-31 11:37:02 +01:00
abgreeve 42e191cc4d MDL-72005 navigation: Change context header to switch breadcrumbs
- Part of: MDL-69588
This changes the context header to switch the breadcrumbs to the
top in boost. It also changes the context header in the modules
to have the activity name instead of the course name, and adds
an icon for the activity.
2021-08-23 17:46:40 +08:00
Luca Bösch 7dd58aac64 MDL-60331 questions: prevent double escaping question categories. 2021-04-28 17:30:46 +02: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
sam marshall 60a1b159aa MDL-45242 Lib: Deprecate field-related library functions 2021-03-08 09:20:18 +00:00
Brendan Heywood ded82b7f5b MDL-70583 cli: Allow progress bars to be rendered in cli scripts 2021-02-02 22:07:14 +11:00
Mikhail Golenkov 8325c83b20 MDL-68792 theme_boost: Show the fake blocks on embedded layout. 2020-12-18 12:06:03 +11:00
Jun Pataleta 7ef7aaecac MDL-69262 core: Make instance count variable as a static class variable
With the static function variable $instance, calls to
\action_menu_link::export_for_template() from its subclasses are stored
in different variables. This causes duplicate IDs when different
implementations of action menu links are rendered on the action menu
trigger/link template. (e.g. action_menu_link and
action_menu_link_secondary both rendered on the same page).
To make the incrementing uniform for the action_menu_link class and its
implementations, the $instance variable is moved out of the
export_to_template() method and is now made to a static class variable.
2020-08-27 13:24:42 +08:00
Andrew Nicols 9777b0fa19 Merge branch 'MDL-68312-master-2' of git://github.com/rezaies/moodle 2020-06-03 08:00:57 +08:00
Shamim Rezaie 96896e0dd7 MDL-68312 gradereport_grader: Use caption instead of summary in table
The summary attribute on the table element is obsolete.
2020-05-28 19:18:38 +10:00
Sara Arjona 8e1b43f0d5 Merge branch 'MDL-68343-master' of git://github.com/rezaies/moodle 2020-05-27 15:09:39 +02:00
Eloy Lafuente (stronk7) 9b0a1e2a98 Merge branch 'MDL-68427-master' of git://github.com/andrewnicols/moodle 2020-04-30 23:35:09 +02:00
Shamim Rezaie d28b4ec326 MDL-68343 output: fix html table structure
A <th> that contains no text may result in cells with missing or
incorrect header information. WAVE advises that we should make a cell
a <td> rather than a <th> if the cell must remain empty (such as the
top-left cell in a data table).

Also note that the scope attribute is only valid for <th>
2020-04-22 04:30:53 +10:00
Andrew Nicols 3e5a8acc85 MDL-68427 core: Correct previous/next page in paging bar 2020-04-16 14:40:01 +08:00
Eloy Lafuente (stronk7) d26a13b407 Merge branch 'MDL-66849-master' of https://github.com/ised-isde-canada/moodle 2020-04-16 01:01:32 +02:00
Michael Milette 8056397b7e MDL-66849 output: Remove custom menu title when not specified 2020-04-14 22:27:06 -04:00
Simey Lameze f7b84afe15 MDL-68288 core_table: support pagination bar for dynamic tables 2020-04-09 07:06:35 +08:00
Shamim Rezaie 1a94ddd31b MDL-68148 output: type attribute is unnecessary for javascript resources 2020-04-08 11:22:34 +10:00
Eloy Lafuente (stronk7) 88d88bd92e MDL-67307 core: Fix onject creation from empty value cases
The "creating default object from empty value" warning is now consistently
thrown if a falsy value is promoted into an stdClass object. Previously some
cases like `$null->prop[0] = $val` missed this warning.
2019-11-22 01:40:42 +01:00
Jun Pataleta c23313f6e8 Merge branch 'MDL-66968' of https://github.com/stronk7/moodle 2019-10-25 10:20:05 +08:00
Eloy Lafuente (stronk7) f4feabb83f MDL-66968 php74: array_key_exists() for objects is deprecated
Replace it for correct property_exists() when the element
being inspected is a property of object/class.

Amended and squased changes:
- keep mongo unmodified. The information is array, hence correct.
- fix a couple of messaging phpdocs that were incorrect.

Amended take#2:
- As far as mongo resturns BSONDocument that is ArrayObject, aka
implements ArrayAccess, we have decided to explicitly cast results
to array so existing array_key_exists() and other accesses will
continue working the same.
2019-10-25 00:49:04 +02:00
Tim Hunt 701ae1eb4b MDL-66816 question bank: replace row of edit icons with an Edit menu 2019-10-18 14:27:50 +01:00
David Monllaó ca81e906e0 MDL-62191 output: New extra attributes for single_button
Useful for data- attributes.
2019-09-27 14:12:48 +08:00
Tim Hunt 9a3af544ff MDL-65915 quiz regrading: better progress information
This makes it easier to diagnose problems if the regrade fails in the
middle.

Along the way, I added one un-declared field to the class, and
converted some SQL-construction code to $DB->get_in_or_equal().

I also added the ability to set attributes on the label in
html_writer::checkbox.
2019-06-18 11:37:12 +01:00
Juan Leyva 26e778d1b7 MDL-60680 file: Support any user id when creating tokens for files.
$includetoken parameter type has been changed. Now supports:
   boolean: False indicates to not include the token, true indicates to generate a token for the current user ($USER).
   integer: Indicates to generate a token for the user whose id is the integer value.
2019-04-23 13:16:15 +02:00
Jun Pataleta 5f30600f43 MDL-65081 core_output: Set single_select and url_select attributes 2019-03-22 11:12:21 +08:00
Eloy Lafuente (stronk7) fc414a2577 Merge branch 'MDL-62680-master' of git://github.com/damyon/moodle 2019-02-07 10:23:39 +01:00
Damyon Wiese ef96eb02fb MDL-62680 output: Only hide icons with no label
For accessibility we don't want to read an icon with a label immediately next to the label,
but in this case it's clearer for the icon to have no alt text / title for both
screen readers and non-screen readers. Worse is not reading important information just
because it's displayed as an icon.
2019-02-07 10:08:19 +08:00
Luca Bösch 1bfed23bf5 MDL-62439 output: Debugstringids in overlay windows. 2019-01-10 22:18:50 +01:00
Damyon Wiese a986cb4ba1 MDL-62144 user menu: Accessibility
Ensure user menu passes the accessibility tests.
2018-10-22 10:42:28 +08:00
Damyon Wiese 191a1c7c23 MDL-62139 output: Accessible action menus
Add label on the "gear" menu and default keyboard and focus controls.
2018-10-22 10:35:21 +08:00
Jake Dallimore 215ecb017a Merge branch 'MDL-62884-master' of git://github.com/damyon/moodle 2018-08-17 16:02:05 +08:00
Andrew Nicols 88d89512e4 MDL-36754 output: Support token pluginfiles in userpic 2018-08-14 07:08:29 +08:00
Damyon Wiese 459c2d909d MDL-62884 privacy: Fix styles
An action menu displayed inside a table needs to be tested on every theme. It is
required to ensure that the menu displays correctly, even when it would display outside
the scrollable region for the table.
2018-07-25 12:09:11 +08:00
David Monllao 6dca3ddc71 MDL-61620 output: New action_menu options 2018-03-14 11:38:08 +01:00
Shamim Rezaie 38b1d6cdd9 MDL-61377 Core: Fixed faulty warning when using progress_bar 2018-02-07 14:47:18 +11:00
Ryan Wyllie 05df02a0ec MDL-58887 core: fix default title for action menu
Thanks to Michelle Melton <meltonml@appstate.edu> for the original
version of this patch.
2017-11-22 01:36:31 +00:00