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

This commit is contained in:
Ilya Tregubov
2023-08-07 11:34:27 +08:00
3 changed files with 12 additions and 13 deletions
+4 -3
View File
@@ -300,11 +300,13 @@ class grade_edit_tree {
$parentcategories = array_merge($rowclasses, [$eid]);
$emptyrow->attributes['class'] = 'spacer ' . implode(' ', $parentcategories);
$emptyrow->attributes['data-hidden'] = 'false';
$emptyrow->attributes['aria-hidden'] = 'true';
$headercell = new html_table_cell();
$headercell->header = true;
$headercell->scope = 'row';
$headercell->attributes['class'] = 'cell column-rowspan rowspan';
$headercell->attributes['aria-hidden'] = 'true';
$headercell->rowspan = $row_count;
$emptyrow->cells[] = $headercell;
@@ -314,6 +316,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));
@@ -744,13 +747,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;
@@ -1121,7 +1122,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',
+6 -8
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) {
+2 -2
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}}