From 370ee378f329772359c21d4bd9dd020df25a3f81 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Fri, 2 Aug 2013 12:03:37 +0100 Subject: [PATCH] MDL-40996 quiz show user pic should also show name. This was a regression introduced by MDL-20636 two years ago! --- mod/quiz/renderer.php | 6 +++++- mod/quiz/styles.css | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mod/quiz/renderer.php b/mod/quiz/renderer.php index 80202e2d9f4..4d7cc9b8a85 100644 --- a/mod/quiz/renderer.php +++ b/mod/quiz/renderer.php @@ -302,7 +302,11 @@ class mod_quiz_renderer extends plugin_renderer_base { $output = ''; $userpicture = $panel->user_picture(); if ($userpicture) { - $output .= html_writer::tag('div', $this->render($userpicture), + $fullname = fullname($userpicture->user); + if ($userpicture->size === true) { + $fullname = html_writer::div($fullname); + } + $output .= html_writer::tag('div', $this->render($userpicture) . $fullname, array('id' => 'user-picture', 'class' => 'clearfix')); } $output .= $panel->render_before_button_bits($this); diff --git a/mod/quiz/styles.css b/mod/quiz/styles.css index 54a09145213..428203c0e2d 100644 --- a/mod/quiz/styles.css +++ b/mod/quiz/styles.css @@ -57,7 +57,7 @@ body.jsenabled .questionflagcheckbox { .path-mod-quiz #user-picture img { width: auto; height: auto; - float: left; + vertical-align: bottom; } .path-mod-quiz .qnbutton {