From 1662fa085ea908cb6cf2f46ef2822011be906f52 Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Wed, 3 Nov 2021 08:29:42 +0800 Subject: [PATCH] MDL-72672 lesson: remove unnecessary nowrap This commit also remove some deprecated table properties as well. --- mod/lesson/locallib.php | 3 --- mod/lesson/renderer.php | 5 ----- mod/lesson/report.php | 2 -- 3 files changed, 10 deletions(-) diff --git a/mod/lesson/locallib.php b/mod/lesson/locallib.php index fec6308a1db..b5be46224be 100644 --- a/mod/lesson/locallib.php +++ b/mod/lesson/locallib.php @@ -947,9 +947,6 @@ function lesson_get_overview_report_table_and_data(lesson $lesson, $currentgroup $table->align[$colcount - 2] = 'left'; } - $table->wrap = []; - $table->wrap = array_pad($table->wrap, $colcount, 'nowrap'); - $table->attributes['class'] = 'table table-striped'; // print out the $studentdata array diff --git a/mod/lesson/renderer.php b/mod/lesson/renderer.php index da5eac76cae..37d9f24fd11 100644 --- a/mod/lesson/renderer.php +++ b/mod/lesson/renderer.php @@ -229,11 +229,6 @@ class mod_lesson_renderer extends plugin_renderer_base { $table = new html_table(); $table->head = array(get_string('pagetitle', 'lesson'), get_string('qtype', 'lesson'), get_string('jumps', 'lesson'), get_string('actions', 'lesson')); $table->align = array('left', 'left', 'left', 'center'); - $table->wrap = array('', 'nowrap', '', 'nowrap'); - $table->tablealign = 'center'; - $table->cellspacing = 0; - $table->cellpadding = '2px'; - $table->width = '80%'; $table->data = array(); $canedit = has_capability('mod/lesson:edit', context_module::instance($this->page->cm->id)); diff --git a/mod/lesson/report.php b/mod/lesson/report.php index 4fd027a8a4a..692ff4fa083 100644 --- a/mod/lesson/report.php +++ b/mod/lesson/report.php @@ -227,7 +227,6 @@ if ($action === 'delete') { get_string('highscore', 'lesson'), get_string('lowscore', 'lesson'), get_string('hightime', 'lesson'), get_string('lowtime', 'lesson')); $stattable->align = array('center', 'center', 'center', 'center', 'center', 'center'); - $stattable->wrap = array('nowrap', 'nowrap', 'nowrap', 'nowrap', 'nowrap', 'nowrap'); $stattable->attributes['class'] = 'standardtable generaltable'; $stattable->data[] = array($data->avescore, $data->avetime, $data->highscore, $data->lowscore, $data->hightime, $data->lowtime); @@ -238,7 +237,6 @@ if ($action === 'delete') { $stattable->head = array(get_string('averagetime', 'lesson'), get_string('hightime', 'lesson'), get_string('lowtime', 'lesson')); $stattable->align = array('center', 'center', 'center'); - $stattable->wrap = array('nowrap', 'nowrap', 'nowrap'); $stattable->attributes['class'] = 'standardtable generaltable'; $stattable->data[] = array($data->avetime, $data->hightime, $data->lowtime); }