From 3759b4fe53d4239072b9c0072ca457576f24b3d0 Mon Sep 17 00:00:00 2001 From: NicoDucou Date: Fri, 26 May 2023 09:04:34 +0200 Subject: [PATCH] Gradebook: fix size of column for nice presentation in PDF export to recover changed in commit #3387e66134a155634fed1c2393cd12aaa64403be - refs BT#20733 --- main/gradebook/lib/fe/gradebooktable.class.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/main/gradebook/lib/fe/gradebooktable.class.php b/main/gradebook/lib/fe/gradebooktable.class.php index f4f9cbbe8e..74ef85b81d 100755 --- a/main/gradebook/lib/fe/gradebooktable.class.php +++ b/main/gradebook/lib/fe/gradebooktable.class.php @@ -99,6 +99,8 @@ class GradebookTable extends SortableTable } $styleTextRight = ['style' => 'text-align: right;']; + $styleTextRight100 = ['style' => 'text-align: right; width: 100px;']; + $styleTextRight120 = ['style' => 'text-align: right; width: 120px;']; $styleCenterRight = ['style' => 'text-align: center;']; $this->set_header($column++, get_lang('Type'), '', 'width="20px"'); @@ -114,8 +116,8 @@ class GradebookTable extends SortableTable $showWeight = false; } if ($showWeight) { - $this->set_header($column++, get_lang('Weight'), false, $styleTextRight, $styleTextRight); - } + $this->set_header($column++, get_lang('Weight'), false, $styleTextRight100, $styleTextRight100); + } if (!$this->teacherView) { $this->set_header($column++, get_lang('Result'), false, $styleTextRight, $styleTextRight); @@ -123,14 +125,14 @@ class GradebookTable extends SortableTable if (empty($model)) { if (in_array(1, $this->loadStats)) { - $this->set_header($column++, get_lang('Ranking'), false, $styleTextRight, $styleTextRight); - } + $this->set_header($column++, get_lang('Ranking'), false, $styleTextRight100, $styleTextRight100); + } if (in_array(2, $this->loadStats)) { - $this->set_header($column++, get_lang('BestScore'), false, $styleTextRight, $styleTextRight); - } + $this->set_header($column++, get_lang('BestScore'), false, $styleTextRight120, $styleTextRight120); + } if (in_array(3, $this->loadStats)) { - $this->set_header($column++, get_lang('Average'), false, $styleTextRight, $styleTextRight); - } + $this->set_header($column++, get_lang('Average'), false, $styleTextRight100, $styleTextRight100); + } } if ($this->teacherView) {