From 24c3db91a46018949bfd7f39c33944458b864b0d Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Tue, 3 Nov 2015 10:51:49 +0000 Subject: [PATCH] MDL-50781 user: do not print useless table cell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to MaurĂ­cio Severo da Silva for the patch --- user/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/user/index.php b/user/index.php index 65f6b45625c..bb6e79501b0 100644 --- a/user/index.php +++ b/user/index.php @@ -224,7 +224,9 @@ if ($mycourses = enrol_get_my_courses()) { $controlstable->data[0]->cells[] = $OUTPUT->render($select); } -$controlstable->data[0]->cells[] = groups_print_course_menu($course, $baseurl->out(), true); +if ($groupmenu = groups_print_course_menu($course, $baseurl->out(), true)) { + $controlstable->data[0]->cells[] = $groupmenu; +} if (!isset($hiddenfields['lastaccess'])) { // Get minimum lastaccess for this course and display a dropbox to filter by lastaccess going back this far.