MDL-74812 gradingform_rubric: Fix text overlap in rubric levels

This commit is contained in:
Jun Pataleta 2022-06-20 18:46:54 +08:00
parent b912f84d5f
commit cf77cd6665
5 changed files with 15 additions and 29 deletions

View file

@ -225,7 +225,7 @@ class gradingform_rubric_renderer extends plugin_renderer_base {
// 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']).'%;';
@ -319,7 +319,7 @@ class gradingform_rubric_renderer extends plugin_renderer_base {
$displayscore = false;
}
if ($displayscore) {
$scoreclass = 'score';
$scoreclass = 'score d-inline';
if (isset($level['error_score'])) {
$scoreclass .= ' error';
}

View file

@ -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;
@ -193,7 +190,6 @@
}
.scorevalue {
padding-right: 5px;
input {
// Should handle at least three chars with room to spare.
float: none;

View file

@ -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 {
@ -19422,8 +19419,6 @@ 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; }

View file

@ -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 {
@ -19422,8 +19419,6 @@ 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; }