Skip to content

Commit

Permalink
MDL-30816 Choice module: add format_string() for choice name.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rossiani Wijaya committed Jul 5, 2012
1 parent 0ed9c74 commit a50f89e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mod/choice/renderer.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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)){
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit a50f89e

Please sign in to comment.