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

@ -86,7 +86,7 @@ $string['save'] = 'Save';
$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';

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';
}