Skip to content

Commit

Permalink
MDL-63186 quiz_statistics: Remove q number from the summary row
Browse files Browse the repository at this point in the history
Part of MDL-62610
  • Loading branch information
rezaies authored and lameze committed Sep 28, 2018
1 parent 29cc550 commit 6ee2b97
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion mod/quiz/report/statistics/lang/en/quiz_statistics.php
Expand Up @@ -115,5 +115,6 @@
$string['statistics:view'] = 'View statistics report';
$string['statsfor'] = 'Quiz statistics (for {$a})';
$string['variant'] = 'Variant';
$string['viewdisplayedquestions'] = 'View displayed questions';
$string['viewanalysis'] = 'View analysis of these questions';
$string['viewanalysishint'] = 'View analysis of the random question(s) above';
$string['whichtries'] = 'Analyze responses for';
7 changes: 5 additions & 2 deletions mod/quiz/report/statistics/statistics_table.php
Expand Up @@ -139,6 +139,9 @@ public function statistics_setup($quiz, $cmid, $reporturl, $s) {
* @return string contents of this table cell.
*/
protected function col_number($questionstat) {
if ($this->is_random_question_summary($questionstat)) {
return '';
}
if (!isset($questionstat->question->number)) {
return '';
}
Expand Down Expand Up @@ -245,8 +248,8 @@ protected function col_name($questionstat) {
// Random question rows will render the name without a link to improve clarity
// in the UI.
$name = html_writer::link($url,
get_string('viewdisplayedquestions', 'quiz_statistics'),
array('title' => get_string('slotstructureanalysis', 'quiz_statistics', $number)));
get_string('viewanalysis', 'quiz_statistics'),
array('title' => get_string('viewanalysishint', 'quiz_statistics', $number)));
}
} else if ($questionstat->get_variants() || $questionstat->get_sub_question_ids()) {
// Question can be broken down into sub-questions or variants. Link will show structural analysis page.
Expand Down
Expand Up @@ -430,7 +430,7 @@ protected function all_subq_and_variant_stats_for_slot($slot, $limited) {
}

foreach ($toreturn as $index => $calculated) {
$calculated->subqdisplayorder = $index + 1;
$calculated->subqdisplayorder = $index;
}
} else {
$displaynumber = 1;
Expand Down

0 comments on commit 6ee2b97

Please sign in to comment.