Skip to content

Commit

Permalink
MDL-75423 gradereport_singleview: Move action col to the right
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaies authored and Mihail Geshoski committed Nov 10, 2022
1 parent bdb16ee commit 6d3872d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
8 changes: 4 additions & 4 deletions grade/report/singleview/classes/local/screen/grade.php
Expand Up @@ -172,8 +172,8 @@ public function init($selfitemisempty = false) {
*/
public function original_headers() {
return [
'', // For filter icon.
get_string('fullnameuser', 'core'),
'', // For filter icon.
get_string('grade', 'grades'),
get_string('range', 'grades'),
get_string('feedback', 'grades'),
Expand Down Expand Up @@ -222,26 +222,26 @@ public function format_line($item): array {
$formatteddefinition = $this->format_definition($grade);

$line = [
html_writer::link($url, $userpic . $fullname),
$OUTPUT->action_icon($this->format_link('user', $item->id), new pix_icon('t/editstring', ''), null,
['title' => $iconstring, 'aria-label' => $iconstring]),
html_writer::link($url, $userpic . $fullname),
$formatteddefinition['finalgrade'],
$this->item_range(),
$formatteddefinition['feedback'],
$formatteddefinition['override'],
$formatteddefinition['exclude'],
];
$lineclasses = [
'action',
'user',
'action',
'grade',
'range',
];
$outputline = [];
$i = 0;
foreach ($line as $key => $value) {
$cell = new \html_table_cell($value);
if ($isheader = $i == 1) {
if ($isheader = $i == 0) {
$cell->header = $isheader;
$cell->scope = "row";
}
Expand Down
8 changes: 4 additions & 4 deletions grade/report/singleview/classes/local/screen/user.php
Expand Up @@ -135,8 +135,8 @@ public function init($selfitemisempty = false) {
*/
public function original_headers(): array {
return [
'', // For filter icon.
get_string('assessmentname', 'gradereport_singleview'),
'', // For filter icon.
get_string('gradecategory', 'grades'),
get_string('grade', 'grades'),
get_string('range', 'grades'),
Expand Down Expand Up @@ -189,9 +189,9 @@ public function format_line($item): array {
$formatteddefinition = $this->format_definition($grade);

$line = [
$this->format_icon($item) . $lockicon . $itemlabel,
$OUTPUT->action_icon($this->format_link('grade', $item->id), new pix_icon('t/editstring', ''), null,
['title' => $iconstring, 'aria-label' => $iconstring]),
$this->format_icon($item) . $lockicon . $itemlabel,
$this->category($item),
$formatteddefinition['finalgrade'],
new range($item),
Expand All @@ -200,8 +200,8 @@ public function format_line($item): array {
$formatteddefinition['exclude'],
];
$lineclasses = [
'action',
'gradeitem',
'action',
'category',
'grade',
'range',
Expand All @@ -211,7 +211,7 @@ public function format_line($item): array {
$i = 0;
foreach ($line as $key => $value) {
$cell = new \html_table_cell($value);
if ($isheader = $i == 1) {
if ($isheader = $i == 0) {
$cell->header = $isheader;
$cell->scope = "row";
}
Expand Down
3 changes: 2 additions & 1 deletion theme/boost/scss/moodle/tables.scss
Expand Up @@ -11,7 +11,8 @@
border-top: $table-border-width solid $table-border-color;
}

thead th {
thead th,
thead td {
vertical-align: bottom;
border-bottom: (2 * $table-border-width) solid $table-border-color;
}
Expand Down
3 changes: 2 additions & 1 deletion theme/boost/style/moodle.css
Expand Up @@ -19166,7 +19166,8 @@ img.userpicture {
padding: 0.75rem;
vertical-align: top;
border-top: 1px solid #dee2e6; }
.generaltable thead th {
.generaltable thead th,
.generaltable thead td {
vertical-align: bottom;
border-bottom: 2px solid #dee2e6; }
.generaltable tbody + tbody {
Expand Down
3 changes: 2 additions & 1 deletion theme/classic/style/moodle.css
Expand Up @@ -19166,7 +19166,8 @@ img.userpicture {
padding: 0.75rem;
vertical-align: top;
border-top: 1px solid #dee2e6; }
.generaltable thead th {
.generaltable thead th,
.generaltable thead td {
vertical-align: bottom;
border-bottom: 2px solid #dee2e6; }
.generaltable tbody + tbody {
Expand Down

0 comments on commit 6d3872d

Please sign in to comment.