mod-quiz MDL-24418 Overflow fix allow horizontal scrolling of quiz results.
This commit is contained in:
@@ -75,7 +75,7 @@ class quiz_report_overview_table extends table_sql {
|
||||
if ($this->candelete) {
|
||||
// Start form
|
||||
$url = new moodle_url($this->reporturl, $this->displayoptions);
|
||||
echo '<div id="tablecontainer">';
|
||||
echo '<div id="tablecontainer" class="overview-tablecontainer">';
|
||||
echo '<form id="attemptsform" method="post" action="' . $this->reporturl->out_omit_querystring() .'">';
|
||||
echo '<div style="display: none;">';
|
||||
echo html_writer::input_hidden_params($url);
|
||||
|
||||
@@ -402,14 +402,14 @@ class quiz_overview_report extends quiz_default_report {
|
||||
$imageurl = "{$CFG->wwwroot}/mod/quiz/report/overview/overviewgraph.php?id={$quiz->id}&groupid=$currentgroup";
|
||||
$graphname = get_string('overviewreportgraphgroup', 'quiz_overview', groups_get_group_name($currentgroup));
|
||||
echo $OUTPUT->heading($graphname);
|
||||
echo '<div class="mdl-align"><img src="'.$imageurl.'" alt="'.$graphname.'" /></div>';
|
||||
echo '<div class="graph flexible-wrap"><img src="'.$imageurl.'" alt="'.$graphname.'" /></div>';
|
||||
}
|
||||
}
|
||||
if ($DB->record_exists('quiz_grades', array('quiz'=> $quiz->id))) {
|
||||
$graphname = get_string('overviewreportgraph', 'quiz_overview');
|
||||
$imageurl = $CFG->wwwroot.'/mod/quiz/report/overview/overviewgraph.php?id='.$quiz->id;
|
||||
echo $OUTPUT->heading($graphname);
|
||||
echo '<div class="mdl-align"><img src="'.$imageurl.'" alt="'.$graphname.'" /></div>';
|
||||
echo '<div class="graph flexible-wrap"><img src="'.$imageurl.'" alt="'.$graphname.'" /></div>';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -129,7 +129,7 @@ class quiz_statistics_report extends quiz_default_report {
|
||||
if ($s > 1){
|
||||
$imageurl = $CFG->wwwroot.'/mod/quiz/report/statistics/statistics_graph.php?id='.$quizstats->id;
|
||||
echo $OUTPUT->heading(get_string('statisticsreportgraph', 'quiz_statistics'));
|
||||
echo '<div class="mdl-align"><img src="'.$imageurl.'" alt="'.get_string('statisticsreportgraph', 'quiz_statistics').'" /></div>';
|
||||
echo '<div class="graph flexible-wrap"><img src="'.$imageurl.'" alt="'.get_string('statisticsreportgraph', 'quiz_statistics').'" /></div>';
|
||||
}
|
||||
}
|
||||
if ($this->table->is_downloading()){
|
||||
|
||||
@@ -202,6 +202,15 @@ class quiz_report_statistics_table extends flexible_table {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
public function wrap_html_start() {
|
||||
if (!$this->is_downloading()) {
|
||||
echo html_writer::start_tag('div', array('id'=>'tablecontainer', 'class'=>'statistics-tablecontainer'));
|
||||
}
|
||||
}
|
||||
public function wrap_html_finish() {
|
||||
if (!$this->is_downloading()) {
|
||||
echo html_writer::end_tag('div'); // Opened in this::wrap_html_start
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
.path-mod-quiz #tablecontainer .flexible-wrap {overflow:auto;}
|
||||
.path-mod-quiz .graph.flexible-wrap {text-align:center;overflow:auto;}
|
||||
|
||||
#page-mod-quiz-comment #manualgradingform,
|
||||
#page-mod-quiz-report #manualgradingform {width: 100%;}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user