Commit d380bec3 authored by Shamim Rezaie's avatar Shamim Rezaie
Browse files

Merge branch 'MDL-74812-master' of https://github.com/junpataleta/moodle

parents 028cbda0 767a1e74
......@@ -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';
......
......@@ -120,7 +120,14 @@ class gradingform_rubric_renderer extends plugin_renderer_base {
// Levels table.
$levelsrowparams = array('id' => '{NAME}-criteria-{CRITERION-id}-levels');
if ($mode != gradingform_rubric_controller::DISPLAY_EDIT_FULL) {
// Add radiogroup role only when not previewing or editing.
$isradiogroup = !in_array($mode, [
gradingform_rubric_controller::DISPLAY_EDIT_FULL,
gradingform_rubric_controller::DISPLAY_EDIT_FROZEN,
gradingform_rubric_controller::DISPLAY_PREVIEW,
gradingform_rubric_controller::DISPLAY_PREVIEW_GRADED,
]);
if ($isradiogroup) {
$levelsrowparams['role'] = 'radiogroup';
}
$levelsrow = html_writer::tag('tr', $levelsstr, $levelsrowparams);
......@@ -225,10 +232,10 @@ 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['width'] = round($level['tdwidth']).'%';
$tdattributes['style'] = "width: " . round($level['tdwidth']).'%;';
}
$leveltemplate = html_writer::start_tag('div', array('class' => 'level-wrapper'));
......@@ -319,7 +326,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';
}
......
......@@ -135,23 +135,6 @@
color: #aaa;
}
.gradingform_rubric.editor .criterion .levels .level .delete {
position: absolute;
right: 0;
}
.gradingform_rubric .criterion .levels .level .score {
font-style: italic;
color: #575;
font-weight: bold;
margin-top: 5px;
white-space: nowrap;
}
.gradingform_rubric .criterion .levels .level .score .scorevalue {
padding-right: 5px;
}
/* Make invisible the buttons 'Move up' for the first criterion and
'Move down' for the last, because those buttons will make no change */
.gradingform_rubric.editor .criterion.first .controls .moveup input,
......@@ -159,20 +142,6 @@
display: none;
}
/* evaluation */
.gradingform_rubric .criterion .levels .level.currentchecked {
background: #fff0f0;
}
.gradingform_rubric .criterion .levels .level.checked {
background: #d0ffd0;
border: 1px solid #555;
}
.gradingform_rubric.evaluate .criterion .levels .level:hover {
background: #30ff30;
}
/* replace buttons with images */
.gradingform_rubric.editor .delete input,
.gradingform_rubric.editor .duplicate input,
......
......@@ -246,7 +246,7 @@ class renderer extends \plugin_renderer_base {
$description = $header->preface;
if ($header->showintro || $header->activity) {
$description = $this->output->box_start('generalbox boxaligncenter', 'intro');
$description = $this->output->box_start('generalbox boxaligncenter');
if ($header->showintro) {
$description .= format_module_intro('assign', $header->assign, $header->coursemoduleid);
}
......
......@@ -782,23 +782,6 @@
background-color: transparent;
}
.path-mod-assign [data-region="grade-panel"] .gradingform_rubric.evaluate .criterion .levels .level:hover {
background-color: #dff0d8;
}
.path-mod-assign [data-region="grade-panel"] .gradingform_rubric .criterion .levels .level.checked {
background-color: #dff0d8;
border: none;
border-left: 1px solid #ddd;
}
.path-mod-assign [data-region="grade-panel"] .gradingform_rubric .criterion .levels .level .score {
color: #468847;
font-weight: 500;
font-style: normal;
margin-top: 20px;
}
.path-mod-assign [data-region="grade-panel"] .gradingform_rubric .criterion .remark textarea {
margin-bottom: 0;
}
......
......@@ -106,12 +106,22 @@
}
}
#rubric-rubric {
&.gradingform_rubric {
#rubric-criteria {
.gradingform_rubric {
margin-bottom: 1em;
$rubricPadding: 6px;
// When doing evaluation on the rubrics table.
&.evaluate .criterion .levels .level {
&:hover,
&.checked {
background: #dff0d8;
}
&.checked {
border: none;
border-left: 1px solid $border-color;
}
}
.criterion {
.description {
vertical-align: top;
......@@ -131,9 +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)};
input {
margin-bottom: 0;
......@@ -144,6 +156,15 @@
vertical-align: top;
padding: $rubricPadding;
&.currentchecked {
background: #fff0f0;
}
&.checked {
background: #d0ffd0;
border: 1px solid #555;
}
.delete {
position: relative;
width: 32px;
......@@ -193,7 +214,6 @@
}
}
}
}
.addcriterion {
margin-left: 5px;
......@@ -232,8 +252,8 @@
}
}
}
}
}
.grade-display {
.description {
font-size: 1rem;
......
......@@ -19402,34 +19402,46 @@ p.arrow_button {
#page-grade-grading-form-rubric-edit .gradingform_rubric_editform .status {
font-size: 70%; }
 
#rubric-rubric.gradingform_rubric #rubric-criteria {
.gradingform_rubric {
margin-bottom: 1em; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .description {
.gradingform_rubric.evaluate .criterion .levels .level:hover, .gradingform_rubric.evaluate .criterion .levels .level.checked {
background: #dff0d8; }
.gradingform_rubric.evaluate .criterion .levels .level.checked {
border: none;
border-left: 1px solid #dee2e6; }
.gradingform_rubric .criterion .description {
vertical-align: top;
padding: 6px; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .description textarea {
.gradingform_rubric .criterion .description textarea {
margin-bottom: 0;
height: 115px; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .definition textarea {
.gradingform_rubric .criterion .definition textarea {
width: 80%;
margin-bottom: 0; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .score {
position: relative;
float: left;
margin-right: 28px; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .score input {
.gradingform_rubric .criterion .score {
margin-top: 5px;
margin-right: 28px;
font-style: italic;
font-weight: bold;
color: #2d662a; }
.gradingform_rubric .criterion .score input {
margin-bottom: 0; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .level {
.gradingform_rubric .criterion .level {
vertical-align: top;
padding: 6px; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .level .delete {
.gradingform_rubric .criterion .level.currentchecked {
background: #fff0f0; }
.gradingform_rubric .criterion .level.checked {
background: #d0ffd0;
border: 1px solid #555; }
.gradingform_rubric .criterion .level .delete {
position: relative;
width: 32px;
height: 32px;
margin-top: -32px;
clear: both;
float: right; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .level .delete input {
.gradingform_rubric .criterion .level .delete input {
display: block;
position: absolute;
right: 0;
......@@ -19437,25 +19449,24 @@ p.arrow_button {
height: 24px;
width: 24px;
margin: 0; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .level .delete input:hover {
.gradingform_rubric .criterion .level .delete input:hover {
background-color: #ddd; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .scorevalue input {
.gradingform_rubric .criterion .scorevalue input {
float: none;
width: 2em; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .scorevalue input.hiddenelement, #rubric-rubric.gradingform_rubric #rubric-criteria .criterion .scorevalue input.pseudotablink {
.gradingform_rubric .criterion .scorevalue input.hiddenelement, .gradingform_rubric .criterion .scorevalue input.pseudotablink {
width: 0; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .addlevel {
.gradingform_rubric .criterion .addlevel {
vertical-align: top;
padding-top: 6px; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .addlevel input {
.gradingform_rubric .criterion .addlevel input {
height: 30px;
line-height: 1rem; }
#rubric-rubric.gradingform_rubric .addcriterion {
.gradingform_rubric .addcriterion {
margin-left: 5px;
padding: 0;
margin-bottom: 1em; }
#rubric-rubric.gradingform_rubric .addcriterion input {
.gradingform_rubric .addcriterion input {
margin: 0;
color: inherit;
text-shadow: inherit;
......@@ -19463,10 +19474,9 @@ p.arrow_button {
line-height: inherit;
background: transparent url([[pix:t/add]]) no-repeat 7px 8px;
padding-left: 26px; }
#rubric-rubric.gradingform_rubric .options {
.gradingform_rubric .options {
clear: both; }
#rubric-rubric.gradingform_rubric .options .option label {
.gradingform_rubric .options .option label {
margin: 0;
padding: 0;
font-size: inherit;
......@@ -19475,7 +19485,7 @@ p.arrow_button {
color: inherit;
text-shadow: none;
background-color: transparent; }
#rubric-rubric.gradingform_rubric .options .option input {
.gradingform_rubric .options .option input {
margin-left: 5px;
margin-right: 12px; }
 
......
......@@ -19402,34 +19402,46 @@ p.arrow_button {
#page-grade-grading-form-rubric-edit .gradingform_rubric_editform .status {
font-size: 70%; }
 
#rubric-rubric.gradingform_rubric #rubric-criteria {
.gradingform_rubric {
margin-bottom: 1em; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .description {
.gradingform_rubric.evaluate .criterion .levels .level:hover, .gradingform_rubric.evaluate .criterion .levels .level.checked {
background: #dff0d8; }
.gradingform_rubric.evaluate .criterion .levels .level.checked {
border: none;
border-left: 1px solid #dee2e6; }
.gradingform_rubric .criterion .description {
vertical-align: top;
padding: 6px; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .description textarea {
.gradingform_rubric .criterion .description textarea {
margin-bottom: 0;
height: 115px; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .definition textarea {
.gradingform_rubric .criterion .definition textarea {
width: 80%;
margin-bottom: 0; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .score {
position: relative;
float: left;
margin-right: 28px; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .score input {
.gradingform_rubric .criterion .score {
margin-top: 5px;
margin-right: 28px;
font-style: italic;
font-weight: bold;
color: #2d662a; }
.gradingform_rubric .criterion .score input {
margin-bottom: 0; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .level {
.gradingform_rubric .criterion .level {
vertical-align: top;
padding: 6px; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .level .delete {
.gradingform_rubric .criterion .level.currentchecked {
background: #fff0f0; }
.gradingform_rubric .criterion .level.checked {
background: #d0ffd0;
border: 1px solid #555; }
.gradingform_rubric .criterion .level .delete {
position: relative;
width: 32px;
height: 32px;
margin-top: -32px;
clear: both;
float: right; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .level .delete input {
.gradingform_rubric .criterion .level .delete input {
display: block;
position: absolute;
right: 0;
......@@ -19437,25 +19449,24 @@ p.arrow_button {
height: 24px;
width: 24px;
margin: 0; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .level .delete input:hover {
.gradingform_rubric .criterion .level .delete input:hover {
background-color: #ddd; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .scorevalue input {
.gradingform_rubric .criterion .scorevalue input {
float: none;
width: 2em; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .scorevalue input.hiddenelement, #rubric-rubric.gradingform_rubric #rubric-criteria .criterion .scorevalue input.pseudotablink {
.gradingform_rubric .criterion .scorevalue input.hiddenelement, .gradingform_rubric .criterion .scorevalue input.pseudotablink {
width: 0; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .addlevel {
.gradingform_rubric .criterion .addlevel {
vertical-align: top;
padding-top: 6px; }
#rubric-rubric.gradingform_rubric #rubric-criteria .criterion .addlevel input {
.gradingform_rubric .criterion .addlevel input {
height: 30px;
line-height: 1rem; }
#rubric-rubric.gradingform_rubric .addcriterion {
.gradingform_rubric .addcriterion {
margin-left: 5px;
padding: 0;
margin-bottom: 1em; }
#rubric-rubric.gradingform_rubric .addcriterion input {
.gradingform_rubric .addcriterion input {
margin: 0;
color: inherit;
text-shadow: inherit;
......@@ -19463,10 +19474,9 @@ p.arrow_button {
line-height: inherit;
background: transparent url([[pix:t/add]]) no-repeat 7px 8px;
padding-left: 26px; }
#rubric-rubric.gradingform_rubric .options {
.gradingform_rubric .options {
clear: both; }
#rubric-rubric.gradingform_rubric .options .option label {
.gradingform_rubric .options .option label {
margin: 0;
padding: 0;
font-size: inherit;
......@@ -19475,7 +19485,7 @@ p.arrow_button {
color: inherit;
text-shadow: none;
background-color: transparent; }
#rubric-rubric.gradingform_rubric .options .option input {
.gradingform_rubric .options .option input {
margin-left: 5px;
margin-right: 12px; }
 
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment