Skip to content

Commit

Permalink
MDL-63390 quiz_statistics: Make the summary row more distinguishable
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaies authored and lameze committed Sep 30, 2018
1 parent 24c28f3 commit 422d786
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion mod/quiz/report/statistics/lang/en/quiz_statistics.php
Expand Up @@ -100,6 +100,7 @@
$string['quizoverallstatistics'] = 'Quiz overall statistics';
$string['quizstructureanalysis'] = 'Quiz structure analysis';
$string['random_guess_score'] = 'Random guess score';
$string['rangeofvalues'] = 'Range of statistics for these questions';
$string['rangebetween'] = '{$a->min} − {$a->max}';
$string['recalculatenow'] = 'Recalculate now';
$string['reportsettings'] = 'Statistics calculation settings';
Expand All @@ -116,5 +117,5 @@
$string['statistics:view'] = 'View statistics report';
$string['statsfor'] = 'Quiz statistics (for {$a})';
$string['variant'] = 'Variant';
$string['viewanalysis'] = 'View analysis of these questions';
$string['viewanalysis'] = 'View details';
$string['whichtries'] = 'Analyze responses for';
6 changes: 4 additions & 2 deletions mod/quiz/report/statistics/statistics_table.php
Expand Up @@ -262,7 +262,7 @@ protected function col_name($questionstat) {
// analysis page with specific text to clearly indicate the link to the user.
// Random and variant question rows will render the name without a link to improve clarity
// in the UI.
$name = html_writer::link($url, get_string('viewanalysis', 'quiz_statistics'));
$name = html_writer::div(get_string('rangeofvalues', 'quiz_statistics'));
} else if (!$israndomquestion && !$questionstat->get_variants() && !$questionstat->get_sub_question_ids()) {
// Question cannot be broken down into sub-questions or variants. Link will show response analysis page.
$name = html_writer::link($url,
Expand All @@ -277,7 +277,9 @@ protected function col_name($questionstat) {
$name = html_writer::tag('div', $name, array('class' => 'dubious'));
}

if (!empty($questionstat->minmedianmaxnotice)) {
if ($this->is_calculated_question_summary($questionstat)) {
$name .= html_writer::link($url, get_string('viewanalysis', 'quiz_statistics'));
} else if (!empty($questionstat->minmedianmaxnotice)) {
$name = get_string($questionstat->minmedianmaxnotice, 'quiz_statistics') . '<br />' . $name;
}

Expand Down

0 comments on commit 422d786

Please sign in to comment.