Merge branch 'MDL-78550-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE

This commit is contained in:
Ilya Tregubov 2023-08-07 11:34:49 +08:00
commit 52b234d69a
No known key found for this signature in database
GPG Key ID: 0F58186F748E55C1
3 changed files with 11 additions and 14 deletions

View File

@ -312,8 +312,8 @@ class grade_edit_tree {
$headercell = new html_table_cell();
$headercell->header = true;
$headercell->scope = 'row';
$headercell->attributes['title'] = $object->stripped_name;
$headercell->attributes['class'] = 'cell column-rowspan rowspan ' . $levelclass;
$headercell->attributes['aria-hidden'] = 'true';
$headercell->rowspan = $row_count + 1;
$row->cells[] = $headercell;
@ -338,6 +338,7 @@ class grade_edit_tree {
$endcell = new html_table_cell();
$endcell->colspan = (19 - $level);
$endcell->attributes['class'] = 'emptyrow colspan ' . $levelclass;
$endcell->attributes['aria-hidden'] = 'true';
$returnrows[] = new html_table_row(array($endcell));
@ -749,13 +750,11 @@ abstract class grade_edit_tree_column {
public function get_category_cell($category, $levelclass, $params) {
$cell = clone($this->categorycell);
$cell->attributes['class'] .= ' ' . $levelclass;
$cell->attributes['text'] = '';
return $cell;
}
public function get_item_cell($item, $params) {
$cell = clone($this->itemcell);
$cell->attributes['text'] = '';
if (isset($params['level'])) {
$level = $params['level'] + (($item->itemtype == 'category' || $item->itemtype == 'course') ? 0 : 1);
$cell->attributes['class'] .= ' level' . $level;
@ -1029,7 +1028,7 @@ class grade_edit_tree_column_select extends grade_edit_tree_column {
}
// Build the master checkbox.
$mastercheckbox = new \core\output\checkbox_toggleall($togglegroup, true, [
'id' => $togglegroup,
'id' => 'select_category_' . $category->id,
'name' => $togglegroup,
'value' => 1,
'classes' => 'itemselect ignoredirty',

View File

@ -970,15 +970,13 @@ function print_grade_page_head(int $courseid, string $active_type, ?string $acti
$output = '';
// Add a help dialogue box if provided.
if (isset($headerhelpidentifier)) {
if (isset($headerhelpidentifier) && !empty($heading)) {
$output = $OUTPUT->heading_with_help($heading, $headerhelpidentifier, $headerhelpcomponent);
} else {
if (isset($user)) {
$renderer = $PAGE->get_renderer('core_grades');
$output = $OUTPUT->heading($renderer->user_heading($user, $courseid));
} else {
$output = $OUTPUT->heading($heading);
}
} else if (isset($user)) {
$renderer = $PAGE->get_renderer('core_grades');
$output = $OUTPUT->heading($renderer->user_heading($user, $courseid));
} else if (!empty($heading)) {
$output = $OUTPUT->heading($heading);
}
if ($return) {

View File

@ -43,7 +43,7 @@
{{#children}}
{{^divider}}
{{#is_action_link}}
<a class="dropdown-item" role="menuitem" {{#actionattributes}}{{name}}="{{value}}"{{/actionattributes}} href="{{{url}}}{{{action}}}"
<a class="dropdown-item" role="menuitem" {{#actionattributes}}{{name}}="{{value}}" {{/actionattributes}} href="{{{url}}}{{{action}}}"
data-disableactive="true" tabindex="-1"
>
{{{text}}}
@ -86,7 +86,7 @@
{{/istablist}}
{{^istablist}}
{{#is_action_link}}
<a role="menuitem" class="nav-link {{#classes}}{{.}} {{/classes}}" {{#actionattributes}}{{name}}="{{value}}"{{/actionattributes}} href="{{{url}}}{{{action}}}" data-disableactive="true" tabindex="-1">
<a role="menuitem" class="nav-link {{#classes}}{{.}} {{/classes}}" {{#actionattributes}}{{name}}="{{value}}" {{/actionattributes}} href="{{{url}}}{{{action}}}" data-disableactive="true" tabindex="-1">
{{{text}}}
</a>
{{#action_link_actions}}