Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling latest moodle changes. #3

Merged
merged 80 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
d3557d9
MDL-80843 reportbuilder: consistent user auth report entity data.
paulholden Feb 6, 2024
a1f0643
MDL-80245 reportbuilder: define custom report tags area.
paulholden Nov 17, 2023
47790ea
MDL-80245 tag: allow for tags filter to operate in component mode.
paulholden Nov 20, 2023
a5a2598
MDL-79007 calendar: Expose block month link names to screen readers
marxjohnson Jan 24, 2024
ca8f197
MDL-81132 mod_forum: Perforance improvements for app
jleyva Mar 7, 2024
39813b1
MDL-79668 lib: Update Font Awesome to v6.5.1
kevpercy Mar 11, 2024
7e7da9f
MDL-79913 grade: respect messaging config for user heading buttons.
paulholden Jan 5, 2024
42edaba
MDL-80949 mod_data: Remove unused Allow autolink param for text field
sarjona Feb 26, 2024
f419983
MDL-79007 calendar: Make screen readers read out calendar day popovers
marxjohnson Jan 24, 2024
a64446c
MDL-79007 calendar: Make screen readers read the new month name
marxjohnson Jan 24, 2024
0079ba3
MDL-80636 lib: Upgrade HTML purifier to 4.17.0
laurentdavid Mar 18, 2024
2292a50
MDL-80636 lib: Upgrade HTML purifier moodle files
laurentdavid Mar 18, 2024
40b8c75
MDL-80290 task: Task autolink urls and emails in mtrace
brendanheywood Feb 8, 2024
51a752f
MDL-80290 task: Refactor styles to be consistent
brendanheywood Feb 8, 2024
b73a685
MDL-81050 output: Add new 'attributes' parameter to container
roland04 Mar 1, 2024
34ab158
MDL-81050 course: Fix section renaming in section page
roland04 Mar 4, 2024
de9c239
MDL-81050 course: Propagate section name change in the content
roland04 Mar 4, 2024
dba1efa
MDL-81050 navigation: Add data attributes to sections in breadcrumbs
roland04 Mar 5, 2024
60a4bf5
MDL-81110 theme_boost: Fix scroll-margin-top in #maincontent
roland04 Mar 8, 2024
c3db339
MDL-80560 admin: user list - show picture, download, fix identity fields
marinaglancy Jan 9, 2024
10f378a
MDL-81050 course: Add behat scenarios for inline section renaming
roland04 Mar 6, 2024
19af72f
MDL-81289 core_courseformat: fix get_format_string params
ferranrecio Mar 19, 2024
0cf88da
MDL-81276 mod_scorm: Fix minimum score validation
Mar 19, 2024
9573a6f
Merge branch 'MDL-79007_main' of https://github.com/marxjohnson/moodle
junpataleta Mar 20, 2024
20a7f5a
Merge branch 'MDL-81110-main' of https://github.com/roland04/moodle
junpataleta Mar 20, 2024
1248fa7
MDL-81294 core: Fix sticky footer height
roland04 Mar 20, 2024
5e5f06b
MDL-80923 course: Replace custom element with placeholder
sarjona Feb 26, 2024
788556f
MDL-80099 hooks: Add mechanism to deprecate class callbacks
marxjohnson Dec 5, 2023
9a2f82a
MDL-80099 quiz: Replace quiz_structure_modified callback with hook
marxjohnson Dec 5, 2023
ee952d6
MDL-80099 quiz: Add attempt_state_changed hook
marxjohnson Dec 5, 2023
9d3bbe6
MDL-80715 core_courseformat: new section update action
ferranrecio Feb 2, 2024
c74a543
MDL-80715 core_courseformat: new cm rename action
ferranrecio Feb 2, 2024
fbbb86a
MDL-80715 core_courseformat: delegate section and cm rename
ferranrecio Feb 6, 2024
9d7ab10
MDL-81163 course: Use component_callback for is_branded
sarjona Mar 7, 2024
92cceb7
Merge branch 'MDL-80560' of https://github.com/marinaglancy/moodle
sarjona Mar 20, 2024
be1bb3d
Merge branch 'MDL-80290-task-ui' of https://github.com/brendanheywood…
sarjona Mar 20, 2024
33636dc
MDL-72376 mod_book: final removal of deprecated navigation method.
paulholden Jan 8, 2024
2aba5e0
MDL-81112 gradereport_grader: show user country value correctly.
paulholden Mar 4, 2024
16b73bf
MDL-80488 mod_lesson: avoid overflowing length of page titles.
paulholden Jan 4, 2024
45750b4
Merge branch 'MDL-81050-main' of https://github.com/roland04/moodle
ilyatregubov Mar 21, 2024
0255500
MDL-81313 core: Revert "Merge branch 'MDL-80338'
snake Mar 21, 2024
c8d78c8
Merge branch 'MDL-80949-main' of https://github.com/sarjona/moodle
HuongNV13 Mar 21, 2024
6b09a61
Merge branch 'MDL-80923-main' of https://github.com/sarjona/moodle
HuongNV13 Mar 21, 2024
cd2fb2f
Merge branch 'MDL-79668-main' of https://github.com/kevpercy/moodle
ilyatregubov Mar 21, 2024
b0220f2
MDL-80850 Javascript: Add new core/dropzone module
HuongNV13 Feb 13, 2024
1e13aa2
Merge branch 'MDL-80850-main' of https://github.com/HuongNV13/moodle
ilyatregubov Mar 21, 2024
0f37750
MDL-69688 phpunit: Improve test_context_not_used
stronk7 Mar 20, 2024
a92f780
MDL-80835 auth_lti: add cookie helper facilitating CHIPS opt-in
snake Jan 30, 2024
b293cb5
MDL-80835 enrol_lti: add partitioning support to MoodleSession cookie
snake Jan 30, 2024
aea624f
MDL-80835 enrol_lti: add cookies required notice to auth login endpoint
snake Feb 14, 2024
18e26b5
MDL-80835 auth_lti: add partitioning to post-auth MoodleSession cookie
snake Jan 30, 2024
35e82b9
MDL-80835 enrol_lti: add partitioning support for OIDC state cookie
snake Feb 15, 2024
7e56b46
MDL-80835 auth_lti: fix bad cast breaking samesite LTI usage
snake Feb 15, 2024
d1b1d9d
Merge branch 'MDL-80835-main' of https://github.com/snake/moodle
HuongNV13 Mar 21, 2024
ccefde0
Merge branch 'MDL-81289-main' of https://github.com/ferranrecio/moodle
HuongNV13 Mar 21, 2024
0342c13
Merge branch 'MDL-81276-main' of https://github.com/aanabit/moodle
HuongNV13 Mar 21, 2024
011619d
MDL-71734 lang: final removal of deprecated 400 strings.
paulholden Oct 9, 2023
7013339
MDL-81319 install: update the list of stale files for 4.4
stronk7 Mar 21, 2024
e0a482e
MDL-81023 core_course: Move deprecated behat steps to course directory
aanabit Feb 23, 2024
2291df7
Merge branch 'MDL-81294-main' of https://github.com/roland04/moodle
sarjona Mar 21, 2024
fbfcb67
MDL-80245 reportbuilder: implement interface elements for report tags.
paulholden Nov 23, 2023
484e52f
Merge branch 'MDL-80245' of https://github.com/paulholden/moodle
sarjona Mar 21, 2024
f54c1b9
Merge branch 'MDL-69688' of https://github.com/stronk7/moodle
sarjona Mar 21, 2024
3e2b8ee
Merge branch 'MDL-80636-main' of https://github.com/laurentdavid/moodle
sarjona Mar 21, 2024
97a5b89
Merge branch 'MDL-81163-main' of https://github.com/sarjona/moodle in…
paulholden Mar 21, 2024
1e1d6d8
Merge branch 'MDL-71734' of https://github.com/paulholden/moodle
sarjona Mar 21, 2024
578226b
Merge branch 'MDL-72376' of https://github.com/paulholden/moodle
sarjona Mar 21, 2024
235c902
Merge branch 'MDL-81112' of https://github.com/paulholden/moodle
sarjona Mar 21, 2024
1b90202
Merge branch 'MDL-79913' of https://github.com/paulholden/moodle
sarjona Mar 21, 2024
f3f514a
Merge branch 'MDL-80488' of https://github.com/paulholden/moodle
sarjona Mar 21, 2024
59d44c3
Merge branch 'MDL-80715-main' of https://github.com/ferranrecio/moodle
ilyatregubov Mar 22, 2024
df7167a
Merge branch 'MDL-81023-main' of https://github.com/aanabit/moodle
ilyatregubov Mar 22, 2024
7e9a206
Merge branch 'MDL-81319' of https://github.com/stronk7/moodle
ilyatregubov Mar 22, 2024
9f10899
Merge branch 'MDL-80099_main' of https://github.com/marxjohnson/moodle
ilyatregubov Mar 22, 2024
e366db6
Merge branch 'MDL-80843' of https://github.com/paulholden/moodle
junpataleta Mar 22, 2024
b690ef2
Merge branch 'MDL-81313-main' of https://github.com/snake/moodle
junpataleta Mar 22, 2024
f150d50
Merge branch 'MDL-81132-master' of https://github.com/jleyva/moodle
junpataleta Mar 22, 2024
fa8213c
NOBUG: Fixed SVG browser compatibility
sarjona Mar 22, 2024
d0c545d
NOBUG: Fixed file access permissions
sarjona Mar 22, 2024
3423193
on-demand release 4.4dev+
sarjona Mar 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions admin/classes/reportbuilder/local/systemreports/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected function initialise(): void {
$this->add_actions();

// Set if report can be downloaded.
$this->set_downloadable(false);
$this->set_downloadable(true);
}

/**
Expand All @@ -135,17 +135,15 @@ public function add_columns(): void {
$entityuser = $this->get_entity('user');
$entityuseralias = $entityuser->get_table_alias('user');

$this->add_column($entityuser->get_column('fullnamewithlink'));
$this->add_column($entityuser->get_column('fullnamewithpicturelink'));

// Include identity field columns.
$identitycolumns = $entityuser->get_identity_columns($this->get_context(), ['city', 'country', 'lastaccesstime']);
$identitycolumns = $entityuser->get_identity_columns($this->get_context());
foreach ($identitycolumns as $identitycolumn) {
$this->add_column($identitycolumn);
}

// These columns are always shown in the users list.
$this->add_column($entityuser->get_column('city'));
$this->add_column($entityuser->get_column('country'));
// Add "Last access" column.
$this->add_column(($entityuser->get_column('lastaccess'))
->set_callback(static function ($value, \stdClass $row): string {
if ($row->lastaccess) {
Expand All @@ -155,7 +153,7 @@ public function add_columns(): void {
})
);

if ($column = $this->get_column('user:fullnamewithlink')) {
if ($column = $this->get_column('user:fullnamewithpicturelink')) {
$column
->add_fields("{$entityuseralias}.suspended, {$entityuseralias}.confirmed")
->add_callback(static function(string $fullname, \stdClass $row): string {
Expand All @@ -171,7 +169,7 @@ public function add_columns(): void {
});
}

$this->set_initial_sort_column('user:fullnamewithlink', SORT_ASC);
$this->set_initial_sort_column('user:fullnamewithpicturelink', SORT_ASC);
$this->set_default_no_results_notice(new lang_string('nousersfound', 'moodle'));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tags:

## Description

Most Moodle icons are rendered using the 6.4 versions of [Fontawesome](https://fontawesome.com/v6/search). Iconnames are mapped from the Moodle icon name to the Font Awesome icon names in `/lib/classes/output/icon_system_fontawesome.php`
Most Moodle icons are rendered using the 6.5.1 versions of [Fontawesome](https://fontawesome.com/v6/search). Iconnames are mapped from the Moodle icon name to the Font Awesome icon names in `/lib/classes/output/icon_system_fontawesome.php`

If needed a theme can override this map and provide its own mapping.

Expand Down
15 changes: 15 additions & 0 deletions admin/tool/task/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,20 @@ function tool_task_status_checks(): array {
*/
function tool_task_mtrace_wrapper(string $message, string $eol): void {
$message = s($message);

// We autolink urls and emails here but can't use format_text as it does
// more than we need and has side effects which are not useful in this context.
$urlpattern = '/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/';
$message = preg_replace_callback($urlpattern, function($matches) {
$url = $matches[0];
return html_writer::link($url, $url, ['target' => '_blank']);
}, $message);

$emailpattern = '/[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}/';
$message = preg_replace_callback($emailpattern, function($matches) {
$email = $matches[0];
return html_writer::link('mailto:' . $email, $email);
}, $message);

echo $message . $eol;
}
9 changes: 5 additions & 4 deletions admin/tool/task/run_adhoctasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ function ($t) use ($now) {
require_sesskey();

\core\session\manager::write_close();
echo $OUTPUT->footer();
echo $OUTPUT->select_element_for_append();

// Prepare to handle output via mtrace.
require_once("{$CFG->dirroot}/{$CFG->admin}/tool/task/lib.php");
Expand All @@ -124,7 +126,7 @@ function ($t) use ($now) {
if ($taskid) {
$repeat = $DB->get_record('task_adhoc', ['id' => $taskid]);

echo html_writer::start_tag('pre');
echo html_writer::start_tag('pre', ['class' => 'task-output']);
\core\task\manager::run_adhoc_from_cli($taskid);
echo html_writer::end_tag('pre');
} else {
Expand All @@ -133,13 +135,13 @@ function ($t) use ($now) {
// Run failed first (if any). We have to run them separately anyway,
// because faildelay is observed if failed flag is not true.
echo html_writer::tag('p', get_string('runningfailedtasks', 'tool_task'), ['class' => 'lead']);
echo html_writer::start_tag('pre');
echo html_writer::start_tag('pre', ['class' => 'task-output']);
\core\task\manager::run_all_adhoc_from_cli(true, $classname);
echo html_writer::end_tag('pre');

if (!$failedonly) {
echo html_writer::tag('p', get_string('runningalltasks', 'tool_task'), ['class' => 'lead']);
echo html_writer::start_tag('pre');
echo html_writer::start_tag('pre', ['class' => 'task-output']);
\core\task\manager::run_all_adhoc_from_cli(false, $classname);
echo html_writer::end_tag('pre');
}
Expand All @@ -161,4 +163,3 @@ function ($t) use ($now) {
)
);

echo $OUTPUT->footer();
3 changes: 1 addition & 2 deletions admin/tool/task/schedule_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@
echo $OUTPUT->select_element_for_append();

// Prepare to handle output via mtrace.
echo html_writer::start_tag('pre', ['style' => 'color: #fff; background: #333; padding: 1em; min-height: 24lh']);

require_once("{$CFG->dirroot}/{$CFG->admin}/tool/task/lib.php");
echo html_writer::start_tag('pre', ['class' => 'task-output', 'style' => 'min-height: 24lh']);
$CFG->mtrace_wrapper = 'tool_task_mtrace_wrapper';

// Run the specified task (this will output an error if it doesn't exist).
Expand Down
11 changes: 11 additions & 0 deletions admin/tool/task/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,14 @@
#page-admin-tool-task-scheduledtasks .task-clearfaildelay {
font-size: 0.75em;
}

.path-admin-tool-task .task-output {
color: #fff;
background: #333;
padding: 1em;

a {
color: #fff;
text-decoration: underline;
}
}
1 change: 0 additions & 1 deletion admin/tool/usertours/lang/en/deprecated.txt

This file was deleted.

3 changes: 0 additions & 3 deletions admin/tool/usertours/lang/en/tool_usertours.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,3 @@
$string['tour_gradebook_tour_name'] = 'Gradebook Grader Report';
$string['tour_final_step_title'] = 'End of tour';
$string['tour_final_step_content'] = 'This is the end of your user tour. It won\'t show again unless you reset it using the link in the footer.';

// Deprecated since Moodle 4.0.
$string['previousstep'] = 'Previous';
2 changes: 1 addition & 1 deletion admin/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
echo html_writer::start_div('', ['data-region' => 'report-user-list-wrapper']);

$bulkactions = new user_bulk_action_form(new moodle_url('/admin/user/user_bulk.php'),
['excludeactions' => ['displayonpage'], 'passuserids' => true, 'hidesubmit' => true],
['excludeactions' => ['displayonpage', 'download'], 'passuserids' => true, 'hidesubmit' => true],
'post', '',
['id' => 'user-bulk-action-form']);
$bulkactions->set_data(['returnurl' => $PAGE->url->out_as_local_url(false)]);
Expand Down
2 changes: 1 addition & 1 deletion auth/lti/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function complete_login(array $launchdata, moodle_url $returnurl, int $pr
if (isloggedin()) {
// If a different user is currently logged in, authenticate the linked user instead.
global $USER;
if ((int) $USER->id !== $user->id) {
if ($USER->id !== $user->id) {
complete_user_login($user);
}
// If the linked user is already logged in, skip the call to complete_user_login() because this affects deep linking
Expand Down
50 changes: 50 additions & 0 deletions auth/lti/classes/local/ltiadvantage/event/event_handler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace auth_lti\local\ltiadvantage\event;

use auth_lti\local\ltiadvantage\utility\cookie_helper;
use core\event\user_loggedin;

/**
* Event handler for auth_lti.
*
* @package auth_lti
* @copyright 2024 Jake Dallimore <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class event_handler {

/**
* Allows the plugin to augment Set-Cookie headers when the user_loggedin event is fired as part of complete_user_login() calls.
*
* @param user_loggedin $event the event
* @return void
*/
public static function handle_user_loggedin(user_loggedin $event): void {
// The event data isn't important here. The intent of this listener is to ensure that the MoodleSession cookie gets the
// 'Partitioned' attribute, when required - an opt-in flag needed to use Chrome's partitioning mechanism, CHIPS. During LTI
// auth, the auth class (auth/lti/auth.php) calls complete_user_login(), which generates a new session cookie as part of its
// login process. This handler makes sure that this new cookie is intercepted and partitioned, if needed.
if (cookie_helper::cookies_supported()) {
if (cookie_helper::get_cookies_supported_method() == cookie_helper::COOKIE_METHOD_EXPLICIT_PARTITIONING) {
global $CFG;
cookie_helper::add_attributes_to_cookie_response_header('MoodleSession' . $CFG->sessioncookie,
['Partitioned', 'Secure']);
}
}
}
}
Loading