Skip to content

Commit

Permalink
MDL-20636 fix broken links in the statistics report.
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed May 19, 2011
1 parent 2178cd3 commit 3915323
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mod/quiz/report/statistics/statistics_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,20 +185,20 @@ protected function col_name($question) {
return $name;
}

$extraurlparam = '';
$url = null;
if ($question->_stats->subquestion) {
$extraurlparam = 'qid=' . $question->id;
$url = new moodle_url($this->baseurl, array('qid' => $question->id));
} else if ($question->_stats->slot && $question->qtype != 'random') {
$extraurlparam = 'slot=' . $question->_stats->slot;
$url = new moodle_url($this->baseurl, array('slot' => $question->_stats->slot));
}

if ($extraurlparam) {
$name = '<a title="' . get_string('detailedanalysis', 'quiz_statistics') .
'" href="' . $this->baseurl . $extraurlparam . '">' . $name . '</a>';
if ($url) {
$name = html_writer::link($url, $name,
array('title' => get_string('detailedanalysis', 'quiz_statistics')));
}

if ($this->is_dubious_question($question)) {
$name = '<div class="dubious">' . $name . '</div>';
$name = html_writer::tag('div', $name, array('class' => 'dubious'));
}

return $name;
Expand Down

0 comments on commit 3915323

Please sign in to comment.