867 Commits

Author SHA1 Message Date
Paul Holden
87f865ea24
MDL-80768 output: stricter progress bar component percentage type.
Avoid mixing float/string types, where the decimal separator could
vary according to current locale.
2024-01-30 23:11:13 +00:00
Ilya Tregubov
d3b8694114 Merge branch 'MDL-79076-master-2' of https://github.com/marinaglancy/moodle 2024-01-16 09:48:02 +08:00
Marina Glancy
e9abb3a5de MDL-79076 output: convert callback before_standard_html_head 2024-01-15 15:33:42 +00:00
Andrew Nicols
0a7c58fd8f
MDL-59467 core: Use hasHelper instead of catching exception
When xdebug is set to break on exceptions it stops on all exceptions,
including _caught_ exceptions.

As a result we regularly hit this uniqid helper issue if debugging with
xdebug.

The solution is to check if the helper exists using the hasHelper method
instead of catching an exception when it does not exist.
2023-12-19 09:13:53 +08:00
Ilya Tregubov
abf2c568be
Merge branch 'mdl67898-check-setting-admintree' of https://github.com/matthewhilton/moodle 2023-11-23 10:25:20 +08:00
Matthew Hilton
9b8acd44d1
MDL-67898 check: Add check admin setting
This admin setting allows you to display a check anywhere in the admin
tree. It uses a webservice to execute the check, so the impact on the
admin tree performance is as low as possible.

Checks do not necessarily need to be registered in the plugins callback
to be shown here, allowing customisation of what is shown in the
settings versus the reports.
2023-11-21 12:04:42 +10:00
David Woloszyn
cbbcacdd8f MDL-78426 core_theme: Move theme's settings to theme card
Theme selector and theme settings have been renamed. Theme admin
section has been removed and contents merged into Appearance category.
2023-11-20 17:05:35 +11:00
Laurent David
bef0cb7a34 MDL-77274 core_renderer: Respect full name format in letter avatars
* Make sure that we respect the fullnamedisplay and alternativefullnameformat
parameters to decide on the initials for a given user
* Add further tests

Co-authored-by: Tatsunori Uchino <tats.u@live.jp>
2023-10-30 06:14:18 +01:00
Huong Nguyen
0d6204d29c
Merge branch 'MDL-79581-master' of https://github.com/andrewnicols/moodle 2023-10-05 11:37:09 +07:00
Andrew Nicols
99c1543aa8
MDL-79581 communication: Context is a mandatory field
The API was incorrectly assuming that all uses of the API were for a
course, and that the instanceid of the communication instance was a
course id. These assumptions are both entirely wrong.

The API is intended to support a range of uses including use at the
site, user, and activity levels.

Furthermore, if a group were to be used, then the instanceid should be
of that group's id, and therefore the contextid would need to be fetched
or that group's course instead.

The only solution here is to add a new contextid field to the table, and
implement it all parts of the API.
2023-10-04 20:37:57 +08:00
Brendan Heywood
08780b449f MDL-79276 core: Auto close streaming elements in shutdown handler 2023-10-02 21:11:44 +10:00
Brendan Heywood
21b5ad1555 MDL-79276 core: Fix perfdebug footer bug in non html pages 2023-10-02 21:11:44 +10:00
Brendan Heywood
79c2e4bdae MDL-79276 core: Fix html validation with streaming api 2023-10-02 21:11:44 +10:00
Matt Porritt
f140a0dff9 MDL-78534 Authentication: MFA Core login page style changes
Core login page and style changes to support mfa login workflow.
These are minor adjustments to core CSS and a core renderer
change to allow login workflow to better support MFA.
2023-09-14 11:49:04 +10:00
Ilya Tregubov
cbe667fe66
Merge branch 'MDL-78744-master' of https://github.com/roland04/moodle 2023-09-05 10:54:52 +08:00
Andrew Nicols
c550194bce
Merge branch 'MDL-73734-streaming-output-api' of https://github.com/brendanheywood/moodle 2023-09-04 22:21:17 +08:00
Mikel Martín
bd7cc81be6 MDL-78744 completion: Split activity_information in completion and dates
Deprecate core_course\output\activity_information class and move its code to two
new classes: core_course\output\activity_completion and core_course\output\activity_dates.
In this process refactor activity_completion improving readability and and also deprecate
renderer_base::activity_information() and core_course_renderer::render_activity_information().
2023-09-04 11:37:20 +02:00
Andrew Nicols
5349b8aecf
Merge branch 'MDL-79059-master-2' of https://github.com/junpataleta/moodle 2023-08-29 11:36:16 +08:00
Brendan Heywood
20b8f8f9c9 MDL-73734 core: Use streaming output for perfdebug 2023-08-28 22:48:59 +10:00
Brendan Heywood
b18c503241 MDL-73734 output: Add streaming output api
This adds a new output method which enables a page to fully render a complete
html page and then keep the connection open and stream additional content into
an element anywhere in the document. This enables pages which take some time to
render cleanly without layout bugs and reduces layout shift issues and was
inspired by Facebook BigPipe.
2023-08-28 22:08:08 +10:00
Jun Pataleta
896d5fd05a
MDL-79059 core: Use full name as alt text for user picture links
When the user picture is being rendered as a link but the user's full
name is not being included in the link and the alt text turns out to be
empty, we could end up with a link without a discernible text. This is
an accessibility issue that will affect screen reader users. If this is
the case, use the full name as the user picture's alt text.
2023-08-26 10:39:05 +08:00
Peter Burnett
f2e0c35f52
MDL-79169 admin: Fix implicit int cast in maintenance warning 2023-08-25 10:35:46 +10:00
Amaia Anabitarte
36b865b3d9 MDL-78746 formslib: add variables to addHelpButton()
addHelpButton() function should allow to get variables to pass to get_string
to improve help button text.
2023-08-11 11:13:29 +02:00
Ferran Recio
a586e952ff MDL-78282 output: new sr_text renderer method
Some output classes require pre-rendered elements. In some cases, those
elements require some screen reader extra texts (especially in buttons).
The st_text method allow the outputs to create those inline tags without
using html_writer. Furthermore, the current screen reader classes are
based on bootstrap, having them isolated in renderer methods allow
themes to implement alternatives accessibility HTML structures.
2023-07-26 15:44:28 +02:00
Shamim Rezaie
316d79d038 MDL-77375 core: Cleanup redundant set_constraint() calls
Also removed the 10rem bottom margin form the quiz editing page. It was
there to make sure that there is enough room for the 'add new question'
dropdown. But it's not needed anymore (hasn't been since long time ago).
2023-07-02 00:41:22 +10:00
Petr Skoda
3c25ccdcd1 MDL-78552 core: tidy up MDL_PERF constants
* all constans usable in ABORT_AFTER_CONFIG should be always defined
* MDL_PERFDB and $PERF->logwrites not used after legacy log removal
* MDL_PERF_TEST should be documented in codebase
* deprecated warnings in shutdowb manager
2023-06-25 08:39:09 +02:00
Jake Dallimore
cff9ba572e
Merge branch 'MDL-78475' of https://github.com/paulholden/moodle 2023-06-15 11:48:58 +08:00
Paul Holden
a45f9d5076
MDL-78475 communication: earlier install check for rendering links. 2023-06-14 12:34:21 +01:00
Ferran Recio
0eaaf40f10 MDL-78175 output: new paragraph renderer method
Many main php files still uses html_writer('p...) to render a simple
paragraphs below or under other elements like forms. In many cases those
texts could be part of a template but there are may scenarios were
creating a full template for a simple paragraph is too much. However,
the html_writer is too limiting as plugins cannot provide their own
implementation. This new method in the renderer is a good in between
solution.
2023-05-29 09:26:04 +02:00
Jun Pataleta
fe69b61828 Merge branch 'MDL-78169-master' of https://github.com/andrewnicols/moodle 2023-05-25 11:50:22 +08:00
Andrew Nicols
53577b678c
MDL-78169 core: Immediate deprecation of htmllize_file_tree
This should have been done back in 2010 as part of MDL-22950. It has not
been called in that time, and is entirely untested and untestable.
2023-05-12 15:17:47 +08:00
Safat
ad5c10016a MDL-77576 core_course: Implement communication api
This commit implements the core communication api in the
core course to create or update matrix roomand its members
according to course settings. This commit will add the
communicaiton room in the course so that users can access
communication room from course.

Originally implemented as MDL-76702, MDL-76705 and MDL-76703.

Co-Authored-By: David Woloszyn <david.woloszyn@moodle.com>
Co-Authored-By: Safat Shahin <safat.shahin@moodle.com>
2023-05-11 13:35:16 +10:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Marina Glancy
a507a9e68a MDL-74465 blocks: changes for backward-compatibility 2023-03-30 12:15:55 +01:00
Marina Glancy
6b081d2e9f MDL-74465 blocks: allow configuration in modal
Introduce 'pagehash' - an identifier that uniquely identifies a page for the user session
2023-03-30 12:15:54 +01:00
Juan Leyva
27be439eb7 MDL-73708 course: Return geo pattern generated course images via WS 2023-03-22 17:39:07 -03:00
Roberto Bravo
25c2d17157 MDL-77370 admin: Add a new setting for Support contact 2023-03-02 12:58:07 +01:00
Ilya Tregubov
2e9025e90d MDL-75379 core: Code style changes. 2023-02-16 10:49:24 +08:00
Lars Bonczek
0a704a6b03 MDL-75379 core: Use non-static template cache 2023-02-13 12:33:33 +01:00
Laurent David
fc72a1d7b1 MDL-75337 core: Single button - core changes
* Change all core calls toward single_button to use single_button::BUTTON_PRIMARY
    when needed
2023-01-24 06:01:35 +01:00
Mathew May
d83fcf1976 MDL-76134 core: Provide a option to render initials bars smaller 2023-01-09 09:22:20 +08:00
Michael Hawkins
e3b3ba90c8 MDL-74643 core_user: New admin setting for site support availability
This allows admins to configure whether contact site support is
available to everyone, authenticated users, or nobody.

The behat testing checks linked and direct access for each setting,
as well as adding testing that the support page override works as
expected.
2022-10-31 18:58:06 +08:00
Jun Pataleta
cd1b2e5eaf MDL-75841 core: Don't fetch favicon setting on install 2022-09-28 12:41:45 +08:00
Sara Arjona
33277f99f1 Merge branch 'MDL-74010' of https://github.com/paulholden/moodle 2022-09-14 11:41:42 +02:00
Michael Hawkins
c43123adde MDL-68066 output: Apply disable lambda rendering to Mustache renderer 2022-09-07 23:54:24 +08:00
Daniel Neis Araujo
7adac1fefb MDL-75218 theme: Add a Favicon setting 2022-08-29 09:35:54 -03:00
Paul Holden
a65476d590 MDL-74010 core: check defined MDL_PERF* values in conditionals. 2022-08-05 11:02:54 +01:00
Paul Holden
a65549d0b3 MDL-75031 output: swap order of buttons in confirmation prompts.
As per ff6e5cc7, the primary button "Continue" should be displayed
on the right hand site of the confirmation prompt.
2022-07-25 11:56:29 +01:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Mihail Geshoski
ca1fe2afa3 MDL-74813 filepicker: Replace the dnd gif animation with a static icon 2022-07-06 10:17:04 +08:00