Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-31841_feedback_align_22' of git://github.com/andyjd…

…avis/moodle into MOODLE_22_STABLE
  • Loading branch information...
commit 7ac10ac609a1978d10b5481d5ec8aaafe4fce2ce 2 parents 113b864 + 9d75f3a
@samhemelryk samhemelryk authored
Showing with 10 additions and 5 deletions.
  1. +8 −3 grade/report/user/lib.php
  2. +2 −2 grade/report/user/styles.css
View
11 grade/report/user/lib.php
@@ -310,6 +310,7 @@ private function fill_table_recursive(&$element) {
$hidden = '';
$excluded = '';
$class = '';
+ $classfeedback = '';
// If this is a hidden grade category, hide it completely from the user
if ($type == 'category' && $grade_object->is_hidden() && !$this->canviewhidden && (
@@ -366,6 +367,10 @@ private function fill_table_recursive(&$element) {
/// Actual Grade
$gradeval = $grade_grade->finalgrade;
+ if ($this->showfeedback) {
+ // Copy $class before appending itemcenter as feedback should not be centered
+ $classfeedback = $class;
+ }
$class .= " itemcenter ";
if ($this->showweight) {
$data['weight']['class'] = $class;
@@ -475,13 +480,13 @@ private function fill_table_recursive(&$element) {
// Feedback
if ($this->showfeedback) {
if ($grade_grade->overridden > 0 AND ($type == 'categoryitem' OR $type == 'courseitem')) {
- $data['feedback']['class'] = $class.' feedbacktext';
+ $data['feedback']['class'] = $classfeedback.' feedbacktext';
$data['feedback']['content'] = get_string('overridden', 'grades').': ' . format_text($grade_grade->feedback, $grade_grade->feedbackformat);
} else if (empty($grade_grade->feedback) or (!$this->canviewhidden and $grade_grade->is_hidden())) {
- $data['feedback']['class'] = $class.' feedbacktext';
+ $data['feedback']['class'] = $classfeedback.' feedbacktext';
$data['feedback']['content'] = ' ';
} else {
- $data['feedback']['class'] = $class.' feedbacktext';
+ $data['feedback']['class'] = $classfeedback.' feedbacktext';
$data['feedback']['content'] = format_text($grade_grade->feedback, $grade_grade->feedbackformat);
}
}
View
4 grade/report/user/styles.css
@@ -33,8 +33,8 @@
.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;}
+.user-grade td.feedbacktext {max-width:600px;padding:2px 2px;}
.pagelayout-report .user-grade .feedbacktext .no-overflow {overflow:auto;padding:0.25em;}
table.user-grade td.feedbacktext {text-align:left;width: 40%;font-size: 0.8em;white-space:normal;}
-table.user-grade td.itemcenter {text-align:center;}
+table.user-grade td.itemcenter {text-align:center;}
Please sign in to comment.
Something went wrong with that request. Please try again.