Skip to content
Browse files

MDL-33575 choice module: add label to checkbox element when privacy o…

…f results is set to publish full results
  • Loading branch information...
1 parent df40666 commit ccef0a8b0aa9e02ee67362dc9e6d0fed29a1089b Sam Hemelryk committed Jul 9, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 mod/choice/renderer.php
View
3 mod/choice/renderer.php
@@ -214,14 +214,15 @@ public function display_publish_name_vertical($choices) {
}
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));
$data .= html_writer::tag('div', $userimage, array('class'=>'image'));
$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'));

0 comments on commit ccef0a8

Please sign in to comment.
Something went wrong with that request. Please try again.