Permalink
Browse files

MDL-30816 Choice module: add format_string() for choice name.

  • Loading branch information...
1 parent e626145 commit eace33059c64d3285462962d9e1126f901cd76de Rossiani Wijaya committed Jul 5, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 mod/choice/renderer.php
View
@@ -141,7 +141,7 @@ public function display_publish_name_vertical($choices) {
$table->cellspacing = 0;
$table->attributes['class'] = 'results names ';
$table->tablealign = 'center';
- $table->summary = get_string('responsesto', 'choice', $choices->name);
+ $table->summary = get_string('responsesto', 'choice', format_string($choices->name));
$table->data = array();
$count = 0;
@@ -206,6 +206,7 @@ public function display_publish_name_vertical($choices) {
if ($choices->showunanswered || $optionid > 0) {
if (!empty($options->user)) {
+ $optionusers = '';
foreach ($options->user as $user) {
$data = '';
if (empty($user->imagealt)){
@@ -223,8 +224,9 @@ public function display_publish_name_vertical($choices) {
$name = html_writer::tag('a', fullname($user, $choices->fullnamecapability), array('href'=>$userlink, 'class'=>'username'));
$data .= html_writer::tag('div', $name, array('class'=>'fullname'));
$data .= html_writer::tag('div','', array('class'=>'clearfloat'));
- $cell->text = html_writer::tag('div', $data, array('class'=>'user'));
+ $optionusers .= html_writer::tag('div', $data, array('class'=>'user'));
}
+ $cell->text = $optionusers;
}
}
$columns[] = $cell;
@@ -277,7 +279,7 @@ public function display_publish_anonymous_vertical($choices) {
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->attributes['class'] = 'results anonymous ';
- $table->summary = get_string('responsesto', 'choice', $choices->name);
+ $table->summary = get_string('responsesto', 'choice', format_string($choices->name));
$table->data = array();
$count = 0;
@@ -380,7 +382,7 @@ public function display_publish_anonymous_horizontal($choices) {
$table->cellpadding = 5;
$table->cellspacing = 0;
$table->attributes['class'] = 'results anonymous ';
- $table->summary = get_string('responsesto', 'choice', $choices->name);
+ $table->summary = get_string('responsesto', 'choice', format_string($choices->name));
$table->data = array();
$columnheaderdefault = new html_table_cell();

0 comments on commit eace330

Please sign in to comment.