mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
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:
parent
2412f8b882
commit
367a75fae4
125 changed files with 3366 additions and 2062 deletions
|
@ -41,6 +41,7 @@ if (!$course = $DB->get_record('course', array('id' => $courseid))) {
|
|||
print_error('nocourseid');
|
||||
}
|
||||
|
||||
$PAGE->set_pagelayout('incourse');
|
||||
require_login($course);
|
||||
$context = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
if (!has_capability('moodle/grade:manage', $context)) {
|
||||
|
|
|
@ -628,7 +628,11 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null,
|
|||
$title = $PAGE->course->fullname.': ' . $stractive_plugin;
|
||||
}
|
||||
|
||||
$PAGE->set_pagelayout('admin');
|
||||
if ($active_type == 'report') {
|
||||
$PAGE->set_pagelayout('report');
|
||||
} else {
|
||||
$PAGE->set_pagelayout('admin');
|
||||
}
|
||||
$PAGE->set_title(get_string('grades') . ': ' . $stractive_type);
|
||||
$PAGE->set_heading($title);
|
||||
if ($buttons instanceof single_button) {
|
||||
|
|
|
@ -106,13 +106,15 @@ if (!empty($target) && !empty($action) && confirm_sesskey()) {
|
|||
|
||||
$reportname = get_string('pluginname', 'gradereport_grader');
|
||||
|
||||
/// Print header
|
||||
print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, $buttons);
|
||||
|
||||
//Initialise the grader report object that produces the table
|
||||
//the class grade_report_grader_ajax was removed as part of MDL-21562
|
||||
$report = new grade_report_grader($courseid, $gpr, $context, $page, $sortitemid);
|
||||
|
||||
// make sure separate group does not prevent view
|
||||
if ($report->currentgroup == -2) {
|
||||
print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, $buttons);
|
||||
echo $OUTPUT->heading(get_string("notingroup"));
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
|
@ -136,9 +138,6 @@ $report->load_users();
|
|||
$numusers = $report->get_numusers();
|
||||
$report->load_final_grades();
|
||||
|
||||
/// Print header
|
||||
print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, $buttons);
|
||||
|
||||
echo $report->group_selector;
|
||||
echo '<div class="clearer"></div>';
|
||||
// echo $report->get_toggles_html();
|
||||
|
|
|
@ -30,6 +30,7 @@ if (!$course = $DB->get_record('course', array('id' => $courseid))) {
|
|||
print_error('nocourseid');
|
||||
}
|
||||
require_login($course);
|
||||
$PAGE->set_pagelayout('report');
|
||||
|
||||
$context = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
require_capability('gradereport/user:view', $context);
|
||||
|
@ -148,6 +149,4 @@ if (has_capability('moodle/grade:viewall', $context)) { //Teachers will see all
|
|||
}
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
|
||||
echo $OUTPUT->footer();
|
|
@ -324,7 +324,7 @@ class grade_report_user extends grade_report {
|
|||
|
||||
} else {
|
||||
$data['feedback']['class'] = $class.' feedbacktext';
|
||||
$data['feedback']['content'] = format_text($grade_grade->feedback, $grade_grade->feedbackformat);
|
||||
$data['feedback']['content'] = format_text($grade_grade->feedback, $grade_grade->feedbackformat, array('overflowdiv'=>true));
|
||||
}
|
||||
|
||||
/// Range
|
||||
|
|
|
@ -1,36 +1,37 @@
|
|||
.path-grade-report-user table.user-grade .datesubmitted {font-size: 0.7em;}
|
||||
.path-grade-report-user table.user-grade .courseitem,
|
||||
.path-grade-report-user table.user-grade .categoryitem {font-weight: bold;}
|
||||
.path-grade-report-user table.user-grade td.cell {padding-left: 5px;padding-right: 5px;}
|
||||
.path-grade-report-user .user-grade .datesubmitted {font-size: 0.7em;}
|
||||
.path-grade-report-user .user-grade .courseitem,
|
||||
.path-grade-report-user .user-grade .categoryitem {font-weight: bold;}
|
||||
.path-grade-report-user .user-grade td.cell {padding-left: 5px;padding-right: 5px;}
|
||||
#graded_users_selector {float: right;text-align: right;}
|
||||
|
||||
/* this must be last if we want to override other category and course item colors */
|
||||
.path-grade-report-user table.user-grade .hidden,
|
||||
.path-grade-report-user table.user-grade .hidden a {color:#aaaaaa;}
|
||||
table.user-grade {border: 1px solid black;margin: auto;padding: 0.25em;font-size: 0.8em;}
|
||||
table.user-grade td {margin: 1px;padding: 0.25em;}
|
||||
table.user-grade thead {border-bottom: 3px double black;}
|
||||
table.user-grade thead th {padding: 0.25em 0.75em;}
|
||||
table.user-grade td.oddd1 {background-color: #f3dfd0;}
|
||||
table.user-grade td.oddd2 {background-color: #d0dbf3;}
|
||||
table.user-grade td.oddd3 {background-color: #d0f3d6;}
|
||||
table.user-grade td.oddd4 {background-color: #f0f0aa;}
|
||||
table.user-grade td.evend2 {background-color: #b0bbd3;}
|
||||
table.user-grade td.evend3 {background-color: #b0dfb6;}
|
||||
table.user-grade td.evend4 {background-color: #cac8be;}
|
||||
table.user-grade td.b1t,
|
||||
table.user-grade td.b2t {border-top: 2px solid black;}
|
||||
table.user-grade td.b1r,
|
||||
table.user-grade td.b2r {border-right: 2px solid black;}
|
||||
table.user-grade td.b1b,
|
||||
table.user-grade td.b2b {border-bottom: 2px solid black;}
|
||||
table.user-grade td.b1l,
|
||||
table.user-grade td.b2l {border-left: 2px solid black;}
|
||||
table.user-grade td.baggt,
|
||||
table.user-grade td.baggb {font-style: italic;font-weight: bold;}
|
||||
table.user-grade td.baggt {border-top: 3px double black;}
|
||||
table.user-grade td.baggb {border-bottom: 3px double black;}
|
||||
table.user-grade td.item {border-left: 1px solid gray;border-right: 1px solid gray;}
|
||||
table.user-grade td.excluded {background-color: #666;}
|
||||
table.user-grade td.hidden {color: #aaa;}
|
||||
table.user-grade td {min-width: 0.5em;vertical-align: top;}
|
||||
.path-grade-report-user .user-grade .hidden,
|
||||
.path-grade-report-user .user-grade .hidden a {color:#aaaaaa;}
|
||||
.user-grade {border: 1px solid black;margin: auto;padding: 0.25em;font-size: 0.8em;}
|
||||
.user-grade td {margin: 1px;padding: 0.25em;min-width: 2em;vertical-align: top;}
|
||||
.user-grade thead {border-bottom: 3px double black;}
|
||||
.user-grade thead th {padding: 0.25em 0.75em;}
|
||||
.user-grade td.oddd1 {background-color: #f3dfd0;}
|
||||
.user-grade td.oddd2 {background-color: #d0dbf3;}
|
||||
.user-grade td.oddd3 {background-color: #d0f3d6;}
|
||||
.user-grade td.oddd4 {background-color: #f0f0aa;}
|
||||
.user-grade td.evend2 {background-color: #b0bbd3;}
|
||||
.user-grade td.evend3 {background-color: #b0dfb6;}
|
||||
.user-grade td.evend4 {background-color: #cac8be;}
|
||||
.user-grade td.b1t,
|
||||
.user-grade td.b2t {border-top: 2px solid black;}
|
||||
.user-grade td.b1r,
|
||||
.user-grade td.b2r {border-right: 2px solid black;}
|
||||
.user-grade td.b1b,
|
||||
.user-grade td.b2b {border-bottom: 2px solid black;}
|
||||
.user-grade td.b1l,
|
||||
.user-grade td.b2l {border-left: 2px solid black;}
|
||||
.user-grade td.baggt,
|
||||
.user-grade td.baggb {font-style: italic;font-weight: bold;}
|
||||
.user-grade td.baggt {border-top: 3px double black;}
|
||||
.user-grade td.baggb {border-bottom: 3px double black;}
|
||||
.user-grade td.item {border-left: 1px solid gray;border-right: 1px solid gray;}
|
||||
.user-grade td.excluded {background-color: #666;}
|
||||
.user-grade td.hidden {color: #aaa;}
|
||||
.user-grade td.feedbacktext {max-width:600px;padding:0;}
|
||||
.pagelayout-report .user-grade .feedbacktext .no-overflow {overflow:auto;padding:0.25em;}
|
Loading…
Add table
Add a link
Reference in a new issue