mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'MDL-63468-master-v1' of git://github.com/lameze/moodle
This commit is contained in:
commit
de79a81f5b
@ -449,13 +449,32 @@ class quiz_statistics_report extends quiz_default_report {
|
||||
* variants.
|
||||
*/
|
||||
protected function output_quiz_structure_analysis_table($questionstats) {
|
||||
$tooutput = array();
|
||||
$limitvariants = !$this->table->is_downloading();
|
||||
foreach ($questionstats->get_all_slots() as $slot) {
|
||||
// Output the data for these question statistics.
|
||||
$tooutput = array_merge($tooutput, $questionstats->structure_analysis_for_one_slot($slot, $limitvariants));
|
||||
$structureanalysis = $questionstats->structure_analysis_for_one_slot($slot, $limitvariants);
|
||||
if (is_null($structureanalysis)) {
|
||||
$this->table->add_separator();
|
||||
} else {
|
||||
foreach ($structureanalysis as $row) {
|
||||
$bgcssclass = '';
|
||||
// The only way to identify in this point of the report if a row is a summary row
|
||||
// is checking if it's a instance of calculated_question_summary class.
|
||||
if ($row instanceof \core_question\statistics\questions\calculated_question_summary) {
|
||||
// Apply a custom css class to summary row to remove border and reduce paddings.
|
||||
$bgcssclass = 'quiz_statistics-summaryrow';
|
||||
|
||||
// For question that contain a summary row, we add a "hidden" row in between so the report
|
||||
// display both rows with same background color.
|
||||
$this->table->add_data_keyed([], 'd-none hidden');
|
||||
}
|
||||
|
||||
$this->table->add_data_keyed($this->table->format_row($row), $bgcssclass);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->table->format_and_add_array_of_rows($tooutput);
|
||||
|
||||
$this->table->finish_output(!$this->table->is_downloading());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -614,6 +614,12 @@ table.quizreviewsummary td.cell {
|
||||
border-bottom: lightgrey solid 0.2em;
|
||||
}
|
||||
|
||||
#page-mod-quiz-report tr.quiz_statistics-summaryrow td.cell {
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
/** Mod quiz edit **/
|
||||
#page-mod-quiz-edit .statusbar {
|
||||
margin: 0.6em 0.4em;
|
||||
|
Loading…
x
Reference in New Issue
Block a user