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 // Template for one level within one criterion
$tdattributes = array( $tdattributes = array(
'id' => '{NAME}-criteria-{CRITERION-id}-levels-{LEVEL-id}', 'id' => '{NAME}-criteria-{CRITERION-id}-levels-{LEVEL-id}',
'class' => 'level' . $level['class'] 'class' => 'text-break level' . $level['class']
); );
if (isset($level['tdwidth'])) { if (isset($level['tdwidth'])) {
$tdattributes['style'] = "width: " . round($level['tdwidth']).'%;'; $tdattributes['style'] = "width: " . round($level['tdwidth']).'%;';
@ -319,7 +319,7 @@ class gradingform_rubric_renderer extends plugin_renderer_base {
$displayscore = false; $displayscore = false;
} }
if ($displayscore) { if ($displayscore) {
$scoreclass = 'score'; $scoreclass = 'score d-inline';
if (isset($level['error_score'])) { if (isset($level['error_score'])) {
$scoreclass .= ' error'; $scoreclass .= ' error';
} }

View file

@ -141,14 +141,11 @@
} }
.score { .score {
position: relative;
float: left;
margin-top: 5px; margin-top: 5px;
margin-right: 28px; margin-right: 28px;
font-style: italic; font-style: italic;
font-weight: bold; font-weight: bold;
color: #{theme-color-level('success', 2)}; color: #{theme-color-level('success', 2)};
white-space: nowrap;
input { input {
margin-bottom: 0; margin-bottom: 0;
@ -193,7 +190,6 @@
} }
.scorevalue { .scorevalue {
padding-right: 5px;
input { input {
// Should handle at least three chars with room to spare. // Should handle at least three chars with room to spare.
float: none; float: none;

View file

@ -19387,14 +19387,11 @@ p.arrow_button {
width: 80%; width: 80%;
margin-bottom: 0; } margin-bottom: 0; }
.gradingform_rubric .criterion .score { .gradingform_rubric .criterion .score {
position: relative;
float: left;
margin-top: 5px; margin-top: 5px;
margin-right: 28px; margin-right: 28px;
font-style: italic; font-style: italic;
font-weight: bold; font-weight: bold;
color: #2d662a; color: #2d662a; }
white-space: nowrap; }
.gradingform_rubric .criterion .score input { .gradingform_rubric .criterion .score input {
margin-bottom: 0; } margin-bottom: 0; }
.gradingform_rubric .criterion .level { .gradingform_rubric .criterion .level {
@ -19422,8 +19419,6 @@ p.arrow_button {
margin: 0; } margin: 0; }
.gradingform_rubric .criterion .level .delete input:hover { .gradingform_rubric .criterion .level .delete input:hover {
background-color: #ddd; } background-color: #ddd; }
.gradingform_rubric .criterion .scorevalue {
padding-right: 5px; }
.gradingform_rubric .criterion .scorevalue input { .gradingform_rubric .criterion .scorevalue input {
float: none; float: none;
width: 2em; } width: 2em; }

View file

@ -19387,14 +19387,11 @@ p.arrow_button {
width: 80%; width: 80%;
margin-bottom: 0; } margin-bottom: 0; }
.gradingform_rubric .criterion .score { .gradingform_rubric .criterion .score {
position: relative;
float: left;
margin-top: 5px; margin-top: 5px;
margin-right: 28px; margin-right: 28px;
font-style: italic; font-style: italic;
font-weight: bold; font-weight: bold;
color: #2d662a; color: #2d662a; }
white-space: nowrap; }
.gradingform_rubric .criterion .score input { .gradingform_rubric .criterion .score input {
margin-bottom: 0; } margin-bottom: 0; }
.gradingform_rubric .criterion .level { .gradingform_rubric .criterion .level {
@ -19422,8 +19419,6 @@ p.arrow_button {
margin: 0; } margin: 0; }
.gradingform_rubric .criterion .level .delete input:hover { .gradingform_rubric .criterion .level .delete input:hover {
background-color: #ddd; } background-color: #ddd; }
.gradingform_rubric .criterion .scorevalue {
padding-right: 5px; }
.gradingform_rubric .criterion .scorevalue input { .gradingform_rubric .criterion .scorevalue input {
float: none; float: none;
width: 2em; } width: 2em; }