diff --git a/grade/grading/form/guide/templates/grades/grader/gradingpanel.mustache b/grade/grading/form/guide/templates/grades/grader/gradingpanel.mustache index 7d816e66af19f..8b5fc97235312 100644 --- a/grade/grading/form/guide/templates/grades/grader/gradingpanel.mustache +++ b/grade/grading/form/guide/templates/grades/grader/gradingpanel.mustache @@ -61,19 +61,35 @@
{{#criterion}} -
-
- {{name}} -
+ + +
{{{description}}} @@ -83,52 +99,59 @@ {{/descriptionmarkers}}
-
- - - {{#str}}grade_help, gradingform_guide{{/str}} -
-
- -
- - {{#hascomments}} - - {{/hascomments}} +
+
+ + + {{#str}}grade_help, gradingform_guide{{/str}}
- {{#hascomments}} -
-
-
- {{#comments}} - - {{/comments}} +
+ +
+ + {{#hascomments}} + + {{/hascomments}} +
+ {{#hascomments}} +
+
+
{{#str}}comments, gradingform_guide{{/str}}
+
+ {{#comments}} + + {{/comments}} +
-
- {{/hascomments}} - {{#str}}grade_help, gradingform_guide{{/str}} + {{/hascomments}} + {{#str}}grade_help, gradingform_guide{{/str}} +
{{/criterion}} {{#js}} -require(['gradingform_guide/grades/grader/gradingpanel/comments'], function(Comments) { +require(['gradingform_guide/grades/grader/gradingpanel/comments', 'core/auto_rows'], function(Comments, AutoRows) { Comments.init('gradingform_guide-{{uniqid}}'); + AutoRows.init(document.getElementById('gradingform_guide-{{uniqid}}')); }); {{/js}} diff --git a/lang/en/grades.php b/lang/en/grades.php index 8afc3ed4bc7d2..7a8ecb7637588 100644 --- a/lang/en/grades.php +++ b/lang/en/grades.php @@ -118,6 +118,7 @@ $string['categorytotal'] = 'Category total'; $string['categorytotalname'] = 'Category total name'; $string['categorytotalfull'] = '{$a->category} total'; +$string['collapsecriterion'] = 'Collapse criterion'; $string['combo'] = 'Tabs and drop-down menu'; $string['compact'] = 'Compact'; $string['componentcontrolsvisibility'] = 'Whether this grade item is hidden is controlled by the activity settings.'; @@ -207,6 +208,7 @@ $string['excluded'] = 'Excluded'; $string['excluded_help'] = 'If ticked, the grade will not be included in any aggregation.'; $string['expand'] = 'Expand category'; +$string['expandcriterion'] = 'Expand criterion'; $string['export'] = 'Export'; $string['exportalloutcomes'] = 'Export all outcomes'; $string['exportfeedback'] = 'Include feedback in export'; diff --git a/theme/boost/scss/moodle/forms.scss b/theme/boost/scss/moodle/forms.scss index 78724df6cfaf1..d6ddd5435684b 100644 --- a/theme/boost/scss/moodle/forms.scss +++ b/theme/boost/scss/moodle/forms.scss @@ -366,6 +366,7 @@ select[size="1"] { textarea[data-auto-rows] { overflow-x: hidden; + resize: none; } /** Display elements under labels in vertical forms regardless of the screen size. */ diff --git a/theme/boost/scss/moodle/grade.scss b/theme/boost/scss/moodle/grade.scss index 8f5b35f35d23e..a29c0d8c382eb 100644 --- a/theme/boost/scss/moodle/grade.scss +++ b/theme/boost/scss/moodle/grade.scss @@ -240,20 +240,30 @@ } } -.criterion button.collapse[aria-expanded="true"]:before { - content: $fa-var-angle-down; - margin-right: 0; - @include fa-icon(); - font-size: 16px; - width: 16px; -} +.criterion { + .description { + font-size: 1rem; + } + + .criterion-toggle { + .expanded-icon { + display: block; + } + + .collapsed-icon { + display: none; + } -.criterion button.collapse[aria-expanded="false"]:before { - content: $fa-var-angle-up; - margin-right: 0; - @include fa-icon(); - font-size: 16px; - width: 16px; + &.collapsed { + .expanded-icon { + display: none; + } + + .collapsed-icon { + display: block; + } + } + } } // Set up grades layout. diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index f2d445837997e..88d73e6489483 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -16067,7 +16067,8 @@ select[size="1"] { overflow: visible; } textarea[data-auto-rows] { - overflow-x: hidden; } + overflow-x: hidden; + resize: none; } /** Display elements under labels in vertical forms regardless of the screen size. */ .mform.full-width-labels .fitem.row { @@ -17407,29 +17408,20 @@ p.arrow_button { margin-left: 5px; margin-right: 12px; } -.criterion button.collapse[aria-expanded="true"]:before { - content: ""; - margin-right: 0; - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-size: 16px; - width: 16px; } +.criterion .description { + font-size: 1rem; } -.criterion button.collapse[aria-expanded="false"]:before { - content: ""; - margin-right: 0; - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-size: 16px; - width: 16px; } +.criterion .criterion-toggle .expanded-icon { + display: block; } + +.criterion .criterion-toggle .collapsed-icon { + display: none; } + +.criterion .criterion-toggle.collapsed .expanded-icon { + display: none; } + +.criterion .criterion-toggle.collapsed .collapsed-icon { + display: block; } .path-grade-edit-tree .setup-grades h4 { margin: 0; } diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 0cc729a5706b1..2e5f965326427 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -16338,7 +16338,8 @@ select[size="1"] { overflow: visible; } textarea[data-auto-rows] { - overflow-x: hidden; } + overflow-x: hidden; + resize: none; } /** Display elements under labels in vertical forms regardless of the screen size. */ .mform.full-width-labels .fitem.row { @@ -17683,29 +17684,20 @@ p.arrow_button { margin-left: 5px; margin-right: 12px; } -.criterion button.collapse[aria-expanded="true"]:before { - content: ""; - margin-right: 0; - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-size: 16px; - width: 16px; } +.criterion .description { + font-size: 1rem; } -.criterion button.collapse[aria-expanded="false"]:before { - content: ""; - margin-right: 0; - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-size: 16px; - width: 16px; } +.criterion .criterion-toggle .expanded-icon { + display: block; } + +.criterion .criterion-toggle .collapsed-icon { + display: none; } + +.criterion .criterion-toggle.collapsed .expanded-icon { + display: none; } + +.criterion .criterion-toggle.collapsed .collapsed-icon { + display: block; } .path-grade-edit-tree .setup-grades h4 { margin: 0; }