themes lib MDL-24895 Multiple fixes to better handle overflow.

Major tasks undertaken in this patch:
* New format_text argument, overflowdiv.
* New page layout Report.
* Review of all format_text calls.
* Added support for the report layout to all themes.
* Changed forum post display from tables to divs.
This commit is contained in:
Sam Hemelryk 2010-11-05 02:53:47 +00:00
parent 2412f8b882
commit 367a75fae4
125 changed files with 3366 additions and 2062 deletions

View file

@ -44,6 +44,7 @@
require_login($course, false, $cm);
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
$PAGE->set_pagelayout('report');
$reportlist = quiz_report_list($context);
if (count($reportlist)==0){

View file

@ -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="graph flexible-wrap"><img src="'.$imageurl.'" alt="'.$graphname.'" /></div>';
echo '<div class="graph"><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="graph flexible-wrap"><img src="'.$imageurl.'" alt="'.$graphname.'" /></div>';
echo '<div class="graph"><img src="'.$imageurl.'" alt="'.$graphname.'" /></div>';
}
}
return true;

View file

@ -230,7 +230,7 @@ class quiz_statistics_report extends quiz_default_report {
echo $OUTPUT->heading(get_string('questioninformation', 'quiz_statistics'));
echo html_writer::table($questioninfotable);
echo $OUTPUT->box(format_text($question->questiontext, $question->questiontextformat).$actions, 'boxaligncenter generalbox boxwidthnormal mdl-align');
echo $OUTPUT->box(format_text($question->questiontext, $question->questiontextformat, array('overflowdiv'=>true)).$actions, 'boxaligncenter generalbox boxwidthnormal mdl-align');
echo $OUTPUT->heading(get_string('questionstatistics', 'quiz_statistics'));
echo html_writer::table($questionstatstable);
@ -356,7 +356,7 @@ class quiz_statistics_report extends quiz_default_report {
$quizinformationtable = new html_table();
$quizinformationtable->align = array('center', 'center');
$quizinformationtable->width = '60%';
$quizinformationtable->class = 'generaltable titlesleft';
$quizinformationtable->attributes['class'] = 'generaltable titlesleft boxaligncenter';
$quizinformationtable->data = array();
$quizinformationtable->data[] = array(get_string('quizname', 'quiz_statistics'), $quiz->name);
$quizinformationtable->data[] = array(get_string('coursename', 'quiz_statistics'), $course->fullname);

View file

@ -1,4 +1,3 @@
.path-mod-quiz #tablecontainer .flexible-wrap {overflow:auto;}
.path-mod-quiz .graph.flexible-wrap {text-align:center;overflow:auto;}
#page-mod-quiz-comment #manualgradingform,