Skip to content

Commit

Permalink
mod-quiz MDL-24418 Overflow fix allow horizontal scrolling of quiz re…
Browse files Browse the repository at this point in the history
…sults.
  • Loading branch information
Sam Hemelryk committed Sep 29, 2010
1 parent d1c7c2e commit 9db1789
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mod/quiz/report/overview/overview_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function wrap_html_start(){
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);
Expand Down
4 changes: 2 additions & 2 deletions mod/quiz/report/overview/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,14 +402,14 @@ function display($quiz, $cm, $course) {
$imageurl = "{$CFG->wwwroot}/mod/quiz/report/overview/overviewgraph.php?id={$quiz->id}&amp;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;
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/report/statistics/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function display($quiz, $cm, $course) {
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()){
Expand Down
11 changes: 10 additions & 1 deletion mod/quiz/report/statistics/statistics_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,15 @@ function col_facility($question){
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
}
}
}

3 changes: 3 additions & 0 deletions mod/quiz/styles.css
Original file line number Diff line number Diff line change
@@ -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%;}

Expand Down

0 comments on commit 9db1789

Please sign in to comment.