From f19cd427091d57a03fe072bf8a1ccc27f01b4e61 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Mon, 9 Jul 2012 10:56:14 +1200 Subject: [PATCH] MDL-33575 choice module: add label to checkbox element when privacy of results is set to publish full results --- mod/choice/renderer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/choice/renderer.php b/mod/choice/renderer.php index 07bbd19d84c..dc89877256d 100644 --- a/mod/choice/renderer.php +++ b/mod/choice/renderer.php @@ -214,7 +214,7 @@ class mod_choice_renderer extends plugin_renderer_base { } if ($choices->viewresponsecapability && $choices->deleterepsonsecapability && $optionid > 0) { - $attemptaction = html_writer::checkbox('attemptid[]', $user->id,''); + $attemptaction = html_writer::checkbox('attemptid[]', $user->id,'', null, array('id' => 'attempt-user'.$user->id)); $data .= html_writer::tag('div', $attemptaction, array('class'=>'attemptaction')); } $userimage = $this->output->user_picture($user, array('courseid'=>$choices->courseid)); @@ -222,6 +222,7 @@ class mod_choice_renderer extends plugin_renderer_base { $userlink = new moodle_url('/user/view.php', array('id'=>$user->id,'course'=>$choices->courseid)); $name = html_writer::tag('a', fullname($user, $choices->fullnamecapability), array('href'=>$userlink, 'class'=>'username')); + $name = html_writer::label($name, 'attempt-user'.$user->id); $data .= html_writer::tag('div', $name, array('class'=>'fullname')); $data .= html_writer::tag('div','', array('class'=>'clearfloat')); $optionusers .= html_writer::tag('div', $data, array('class'=>'user')); -- 2.43.0