From 960abf69a3ae40224a7a99245f06a4aac279e086 Mon Sep 17 00:00:00 2001 From: Aaron Detre Date: Tue, 25 Mar 2025 12:32:07 -0700 Subject: [PATCH 1/8] refactor(EditOpenResponseAdvancedComponent): Replaced ngIf and ngFor statements --- ...edit-open-response-advanced.component.html | 736 +++++++++--------- .../edit-open-response-advanced.component.ts | 20 +- 2 files changed, 392 insertions(+), 364 deletions(-) diff --git a/src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html b/src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html index aee56f2420b..c239dfbd2da 100644 --- a/src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html +++ b/src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html @@ -27,7 +27,7 @@ Enable CRater -
+@if (componentContent.enableCRater) {
Item Id @@ -47,9 +47,14 @@ Verify
- Verifying... - Valid - Invalid + @if (isVerifyingCRaterItemId) { + Verifying... + } + @if (cRaterItemIdIsValid) { + Valid + } @else { + Invalid + }
@@ -94,97 +99,97 @@ > Enable Feedback Rules - - + @if (componentContent.cRater.feedback?.enabled) { + + }
-
- -
- - Score - - - -
- - + @if ( + !componentContent.cRater.feedback?.enabled && componentContent.cRater.scoringRules.length > 0 + ) { +
+ + @for ( + scoringRule of componentContent.cRater.scoringRules; + track $index; + let scoringRuleIndex = $index; + let isFirst = $first; + let isLast = $last + ) { +
+ + Score + + + +
+ + + +
+
+ }
-
+ } +
-
+ @if (componentContent.cRater.enableMultipleAttemptScoringRules) { -
- - Previous Score - - - - Current Score - - - -
- - - -
-
-
-
-
-
- - Enable Notifications - -
-
- -
-
- + Previous Score - + Current Score -
+
-
- - Enable Ambient Display Dismiss Mode - - - Dismiss Code - - -
-
- - Notify Student - - -
-
- - Notify Teacher - - -
-
+ } + } +
+
+
+ + Enable Notifications +
+ @if (componentContent.enableNotifications) { + + @for ( + notification of componentContent.notificationSettings.notifications; + track $index; + let notificationIndex = $index; + let isFirst = $first; + let isLast = $last + ) { +
+
+ + Previous Score + + + + Current Score + + +
+
+ + + +
+
+
+ + Enable Ambient Display Dismiss Mode + + @if (notification.isAmbient) { + + Dismiss Code + + + } +
+
+ + Notify Student + + @if (notification.isNotifyStudent) { + + } +
+
+ + Notify Teacher + + @if (notification.isNotifyTeacher) { + + } +
+
+ } + }
Use Custom Completion Criteria -
+ @if (useCustomCompletionCriteria && componentContent.completionCriteria != null) { -
- - Step - - - - {{ getNodePositionAndTitle(nodeId) }} - - - - - - Component - - + + Step + + @for (nodeId of nodeIds; track $index) { + @if (isApplicationNode(nodeId)) { + + {{ getNodePositionAndTitle(nodeId) }} + + } + } + + + + Component + + @for ( + component of getComponents(criteria.nodeId); + let componentIndex = $index; + track component.id + ) { + + {{ componentIndex + 1 }}. {{ component.type }} + @if (component.id === componentId) { + (This Component) + } + + } + + + + Action + + Submit + Save + + +
+
+ - - + arrow_upward + + + +
-
-
+ } + }
-
-
+} +@if (isNotebookEnabled) { -
+} Date: Wed, 26 Mar 2025 09:46:45 -0700 Subject: [PATCH 2/8] feat(OpenResponse): Allow authors to specify student-friendly text for ideas --- ...it-crater-idea-descriptions.component.html | 6 ++-- ...edit-crater-idea-descriptions.component.ts | 9 +++--- ...edit-dialog-guidance-advanced.component.ts | 6 ++-- ...edit-open-response-advanced.component.html | 17 +++++++++++ .../edit-open-response-advanced.component.ts | 30 +++++++++++++++---- 5 files changed, 52 insertions(+), 16 deletions(-) diff --git a/src/assets/wise5/components/common/cRater/edit-crater-idea-descriptions/edit-crater-idea-descriptions.component.html b/src/assets/wise5/components/common/cRater/edit-crater-idea-descriptions/edit-crater-idea-descriptions.component.html index d2144dc60b7..593579fee57 100644 --- a/src/assets/wise5/components/common/cRater/edit-crater-idea-descriptions/edit-crater-idea-descriptions.component.html +++ b/src/assets/wise5/components/common/cRater/edit-crater-idea-descriptions/edit-crater-idea-descriptions.component.html @@ -1,10 +1,10 @@
- Idea Names + Idea Descriptions