MDL-27942 Use picture not displayed during quiz attempts.
This commit is contained in:
@@ -1213,6 +1213,11 @@ abstract class quiz_nav_panel_base {
|
||||
|
||||
public function user_picture() {
|
||||
global $DB;
|
||||
|
||||
if (!$this->attemptobj->get_quiz()->showuserpicture) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$user = $DB->get_record('user', array('id' => $this->attemptobj->get_userid()));
|
||||
$userpicture = new user_picture($user);
|
||||
$userpicture->courseid = $this->attemptobj->get_courseid();
|
||||
|
||||
@@ -247,7 +247,7 @@ class mod_quiz_renderer extends plugin_renderer_base {
|
||||
}
|
||||
$output .= $panel->render_before_button_bits($this);
|
||||
|
||||
$output = html_writer::start_tag('div', array('class' => 'qn_buttons'));
|
||||
$output .= html_writer::start_tag('div', array('class' => 'qn_buttons'));
|
||||
foreach ($panel->get_question_buttons() as $button) {
|
||||
$output .= $this->render($button);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user