Skip to content

Commit

Permalink
MDL-74812 gradingform_rubric: Fix text overlap in rubric levels
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Jun 21, 2022
1 parent 40e58f8 commit 5ceafdc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 29 deletions.
2 changes: 1 addition & 1 deletion grade/grading/form/rubric/lang/en/gradingform_rubric.php
Expand Up @@ -86,7 +86,7 @@
$string['saverubric'] = 'Save rubric and make it ready';
$string['saverubricdraft'] = 'Save as draft';
$string['scoreinputforlevel'] = 'Score input for level {$a}';
$string['scorepostfix'] = '{$a}points';
$string['scorepostfix'] = '{$a} points';
$string['showdescriptionstudent'] = 'Display rubric description to those being graded';
$string['showdescriptionteacher'] = 'Display rubric description during evaluation';
$string['showremarksstudent'] = 'Show remarks to those being graded';
Expand Down
4 changes: 2 additions & 2 deletions grade/grading/form/rubric/renderer.php
Expand Up @@ -225,7 +225,7 @@ public function level_template($mode, $options, $elementname = '{NAME}', $criter
// Template for one level within one criterion
$tdattributes = array(
'id' => '{NAME}-criteria-{CRITERION-id}-levels-{LEVEL-id}',
'class' => 'level' . $level['class']
'class' => 'text-break level' . $level['class']
);
if (isset($level['tdwidth'])) {
$tdattributes['style'] = "width: " . round($level['tdwidth']).'%;';
Expand Down Expand Up @@ -319,7 +319,7 @@ public function level_template($mode, $options, $elementname = '{NAME}', $criter
$displayscore = false;
}
if ($displayscore) {
$scoreclass = 'score';
$scoreclass = 'score d-inline';
if (isset($level['error_score'])) {
$scoreclass .= ' error';
}
Expand Down
4 changes: 0 additions & 4 deletions theme/boost/scss/moodle/grade.scss
Expand Up @@ -141,14 +141,11 @@
}

.score {
position: relative;
float: left;
margin-top: 5px;
margin-right: 28px;
font-style: italic;
font-weight: bold;
color: #{theme-color-level('success', 2)};
white-space: nowrap;

input {
margin-bottom: 0;
Expand Down Expand Up @@ -193,7 +190,6 @@
}

.scorevalue {
padding-right: 5px;
input {
// Should handle at least three chars with room to spare.
float: none;
Expand Down
17 changes: 6 additions & 11 deletions theme/boost/style/moodle.css
Expand Up @@ -19387,14 +19387,11 @@ p.arrow_button {
width: 80%;
margin-bottom: 0; }
.gradingform_rubric .criterion .score {
position: relative;
float: left;
margin-top: 5px;
margin-right: 28px;
font-style: italic;
font-weight: bold;
color: #2d662a;
white-space: nowrap; }
color: #2d662a; }
.gradingform_rubric .criterion .score input {
margin-bottom: 0; }
.gradingform_rubric .criterion .level {
Expand Down Expand Up @@ -19422,13 +19419,11 @@ p.arrow_button {
margin: 0; }
.gradingform_rubric .criterion .level .delete input:hover {
background-color: #ddd; }
.gradingform_rubric .criterion .scorevalue {
padding-right: 5px; }
.gradingform_rubric .criterion .scorevalue input {
float: none;
width: 2em; }
.gradingform_rubric .criterion .scorevalue input.hiddenelement, .gradingform_rubric .criterion .scorevalue input.pseudotablink {
width: 0; }
.gradingform_rubric .criterion .scorevalue input {
float: none;
width: 2em; }
.gradingform_rubric .criterion .scorevalue input.hiddenelement, .gradingform_rubric .criterion .scorevalue input.pseudotablink {
width: 0; }
.gradingform_rubric .criterion .addlevel {
vertical-align: top;
padding-top: 6px; }
Expand Down
17 changes: 6 additions & 11 deletions theme/classic/style/moodle.css
Expand Up @@ -19387,14 +19387,11 @@ p.arrow_button {
width: 80%;
margin-bottom: 0; }
.gradingform_rubric .criterion .score {
position: relative;
float: left;
margin-top: 5px;
margin-right: 28px;
font-style: italic;
font-weight: bold;
color: #2d662a;
white-space: nowrap; }
color: #2d662a; }
.gradingform_rubric .criterion .score input {
margin-bottom: 0; }
.gradingform_rubric .criterion .level {
Expand Down Expand Up @@ -19422,13 +19419,11 @@ p.arrow_button {
margin: 0; }
.gradingform_rubric .criterion .level .delete input:hover {
background-color: #ddd; }
.gradingform_rubric .criterion .scorevalue {
padding-right: 5px; }
.gradingform_rubric .criterion .scorevalue input {
float: none;
width: 2em; }
.gradingform_rubric .criterion .scorevalue input.hiddenelement, .gradingform_rubric .criterion .scorevalue input.pseudotablink {
width: 0; }
.gradingform_rubric .criterion .scorevalue input {
float: none;
width: 2em; }
.gradingform_rubric .criterion .scorevalue input.hiddenelement, .gradingform_rubric .criterion .scorevalue input.pseudotablink {
width: 0; }
.gradingform_rubric .criterion .addlevel {
vertical-align: top;
padding-top: 6px; }
Expand Down

0 comments on commit 5ceafdc

Please sign in to comment.