$qclass = 'partialcorrect';
}
$response->credit = '<span class="'.$qclass.'">('.format_float($q['credits'][$aid],2).') </span>';
- $response->text = '<span class="'.$qclass.'">'.format_text("$resp", FORMAT_MOODLE, $format_options, $quiz->course).' </span>';
+ $response->text = '<span class="'.$qclass.'">'.format_text($resp, FORMAT_MOODLE, $format_options, $quiz->course).' </span>';
$count = $q['rcounts'][$aid].'/'.$q['count'];
$response->rcount = $count;
$response->rpercent = '('.format_float($q['rcounts'][$aid]/$q['count']*100,0).'%)';
}
if (empty($question->name)) {
- $question->name = substr(strip_tags($question->questiontext), 0, 15);
+ $question->name = shorten_text($question->questiontext, 15);
if (empty($question->name)) {
$question->name = '-';
}
// change length to truncate responses here if you want
$lmax = 40;
if (!empty($state->responses)) {
- $responses[] = (strlen($state->responses['']) > $lmax) ?
- substr($state->responses[''], 0, $lmax).'...' : $state->responses[''];
+ $responses[] = shorten_text(stripslashes($state->responses['']), 45);
} else {
$responses[] = '';
}