From 5f59c0fcf5b1a6c3a7ccb019fa0e37a0211b7dd0 Mon Sep 17 00:00:00 2001 From: Adrian Fish Date: Fri, 20 Oct 2023 09:07:19 +0100 Subject: [PATCH] SAK-47848 grader. Added curly brace instruction to grader feedback (#12018) (cherry picked from commit 2dd26d49154877b29c34dde807c8cba58b1b6ad9) Conflicts: webcomponents/bundle/src/main/bundle/grader.properties --- webcomponents/bundle/src/main/bundle/grader.properties | 8 ++++++-- .../tool/src/main/frontend/js/grader/sakai-grader.js | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/webcomponents/bundle/src/main/bundle/grader.properties b/webcomponents/bundle/src/main/bundle/grader.properties index ffb6195ef698..85d6f56afc1a 100644 --- a/webcomponents/bundle/src/main/bundle/grader.properties +++ b/webcomponents/bundle/src/main/bundle/grader.properties @@ -32,8 +32,12 @@ notes_present=There are private notes on this submission unsaved_notes_present=The private notes on this submission is not saved unsaved_text_warning=Changes are not going to be saved. Click on 'Cancel' again to confirm. profile_image='s profile image -inline_feedback_instruction=This is the submitted text, with your feedback. To add more feedback, click 'Add Feedback' at the bottom of the submission, then click 'Done' when you're finished. Your changes won't be saved until you click one of the save buttons in the grader. -confirm_exceed_max_grade=The grade you entered is greater than the max of {}. Is that okay?` +inline_feedback_instruction=Below is the submission from a student. You can insert comments in this \ +text by clicking 'Add Feedback' at the bottom of the submission - comments surrounded by double \ +curly braces {{like this}} will appear red to the student. Click \ +'Done' when you're finished. Your changes won't be saved until you click one of the save \ +buttons in the grader. +confirm_exceed_max_grade=The grade you entered is greater than the max of {}. Is that okay? unlimited=Unlimited hide_history=Hide History show_history=Show History diff --git a/webcomponents/tool/src/main/frontend/js/grader/sakai-grader.js b/webcomponents/tool/src/main/frontend/js/grader/sakai-grader.js index f8fb534847cd..48475be469e7 100644 --- a/webcomponents/tool/src/main/frontend/js/grader/sakai-grader.js +++ b/webcomponents/tool/src/main/frontend/js/grader/sakai-grader.js @@ -881,6 +881,7 @@ export class SakaiGrader extends gradableDataMixin(SakaiElement) { } else { if (!cancelling) { this.submission.feedbackText = this.feedbackTextEditor.getData(); + bootstrap.Offcanvas.getOrCreateInstance(document.getElementById("grader")).show(); this.requestUpdate(); } else { this.feedbackTextEditor.setData(this.submission.feedbackText, () => this.modified = false);