diff --git a/mod/choice/lib.php b/mod/choice/lib.php index fd9b01de142..c27604bd75c 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -148,7 +148,7 @@ function choice_show_form($choice, $user, $cm) { //$cdisplay is an array of the display info for a choice $cdisplay[$optionid]->text - text name of option. // ->maxanswers -maxanswers for this option // ->full - whether this option is full or not. 0=not full, 1=full -$cdisplay = array(); + $cdisplay = array(); $aid = 0; foreach ($choice->option as $optionid => $text) { @@ -189,142 +189,141 @@ $cdisplay = array(); } } - switch ($choice->display) { - case CHOICE_DISPLAY_HORIZONTAL: - echo "
| ";
- echo "optionid."\" alt=\"".strip_tags(format_text($cd->text))."\"". $cd->checked.$cd->disabled." />";
- if (!empty($cd->disabled)) {
- echo format_text($cd->text." ".get_string('full', 'choice').""); - } else { - echo format_text($cd->text); - } - echo " | ";
+ foreach ($cdisplay as $cd) {
+ echo "";
+ echo "optionid."\" alt=\"".strip_tags(format_text($cd->text))."\"". $cd->checked.$cd->disabled." />";
+ if (!empty($cd->disabled)) {
+ echo format_text($cd->text." ".get_string('full', 'choice').""); + } else { + echo format_text($cd->text); } - echo " |
";
- echo "optionid."\" alt=\"".strip_tags(format_text($cd->text))."\"". $cd->checked.$cd->disabled." />";
+ case CHOICE_DISPLAY_VERTICAL:
+ $displayoptions->para = false;
+ echo "
| ";
+ echo "
| '; } echo " | "; print_user_picture($user->id, $course->id, $user->picture); echo " | "; echo "wwwroot/user/view.php?id=$user->id&course=$course->id\">"; - echo fullname($user, $isteacher); + echo fullname($user, has_capability('moodle/site:viewfullnames', $context)); echo ""; echo " |
'; - echo ' | ||
| '; - echo ''.get_string('selectall', 'quiz').' / '; - echo ''.get_string('selectnone', 'quiz').' '; - echo ' '; - $options = array('delete' => get_string('delete')); - echo choose_from_menu($options, 'action', '', get_string('withselected', 'quiz'), 'if(this.selectedIndex > 0) submitFormById(\'attemptsform\');', '', true); - echo ''; - echo ''; - echo ' | ||
'; + echo ' | ||
| '; + echo ''.get_string('selectall', 'quiz').' / '; + echo ''.get_string('selectnone', 'quiz').' '; + echo ' '; + $options = array('delete' => get_string('delete')); + echo choose_from_menu($options, 'action', '', get_string('withselected', 'quiz'), 'if(this.selectedIndex > 0) submitFormById(\'attemptsform\');', '', true); + echo ''; + echo ''; + echo ' |