diff --git a/package-lock.json b/package-lock.json index 4339863d9ae..93b8d060ba6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1499,9 +1499,9 @@ } }, "node_modules/@aws-sdk/client-cognito-identity": { - "version": "3.1151.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.1151.0.tgz", - "integrity": "sha512-60MPGnfab7E2FeJtudxc1+0MAQrN0fHkbcbTaJNYeGxVYlr9X9YdgUK9xhNi0sGZ3o82K0Y4gY2CrEHIxL9tFQ==", + "version": "3.1152.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.1152.0.tgz", + "integrity": "sha512-1Esjweep4hFYyTBW4eTWlTo9GoNSNd9BopgfubWWF8xaT7qZh7jmT4vvc5O0JSc/F6tu2XMabOiuXtQBX2goUQ==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/core": "^3.978.3", @@ -1518,9 +1518,9 @@ } }, "node_modules/@aws-sdk/client-comprehend": { - "version": "3.1151.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-comprehend/-/client-comprehend-3.1151.0.tgz", - "integrity": "sha512-1iWTLQa+U+CfylaB6HWihglSDZF2Fpowk6kbIUcS6IFysecc/2EadsHUa9qtKTntRgwBf1w/wbZrV/ZRMzFkUQ==", + "version": "3.1152.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-comprehend/-/client-comprehend-3.1152.0.tgz", + "integrity": "sha512-xuU4bEkggKI6ITDT1pOtpiphXVia9p8RyaErkl09I+gyNat6ca3qf0T9VEvrZIGrwKkEPdKigqG+XRlDF57pHQ==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/core": "^3.978.3", @@ -1537,9 +1537,9 @@ } }, "node_modules/@aws-sdk/client-ses": { - "version": "3.1151.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-ses/-/client-ses-3.1151.0.tgz", - "integrity": "sha512-om6b6o684HCtL0LWTonJSNpGMsOEIumbJC3+IYcGAA/16pEWSyRtop87sfLz7EABSKUrNWVkrF/L1izmKscoZg==", + "version": "3.1152.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-ses/-/client-ses-3.1152.0.tgz", + "integrity": "sha512-iafV/J0KAbj5oB98NeSVBPl7yNrvNdReO3PUQ1icCwdCQvModFpW3kCEjUcRlxyIuQbtVJ3V6XSY7sxOaYN5jg==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/core": "^3.978.3", @@ -1556,9 +1556,9 @@ } }, "node_modules/@aws-sdk/client-transcribe-streaming": { - "version": "3.1151.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-transcribe-streaming/-/client-transcribe-streaming-3.1151.0.tgz", - "integrity": "sha512-Dsa1AcY/MujaGGpenTnSH7Jm+4UiyLZfDaMeb3NivjF16tNvID4nFL5xWTOa5Uevr4it+T6P4UOTHmDb3R0mtQ==", + "version": "3.1152.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-transcribe-streaming/-/client-transcribe-streaming-3.1152.0.tgz", + "integrity": "sha512-F2vHdvLZUSJ29uMI7Quy5FYKzuYwg1thtndZPgVJvAESBIdtdgZDS0FbvZ3NIu5HVnJ2Qt5AR8XGUH3orhc81w==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/core": "^3.978.3", @@ -1579,9 +1579,9 @@ } }, "node_modules/@aws-sdk/client-translate": { - "version": "3.1151.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-translate/-/client-translate-3.1151.0.tgz", - "integrity": "sha512-q+oOWvvG7jKigSJKuHrZOC9xJJJP8lYxTFdKyFSOZyZN0lQ+dI1BLBIido2exJl/0bN5p0BuZpK4aSfHnomVrg==", + "version": "3.1152.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-translate/-/client-translate-3.1152.0.tgz", + "integrity": "sha512-rORLVvu/vf7wUmQWwpZENw8lj/Fnj22O8lfZVDewODdZGTuzbar9DjEfjG5AtrK5vU0fDBOcglFpgJxF8FqVpw==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/core": "^3.978.3", diff --git a/src/app/authoring-tool/edit-component-advanced/edit-component-advanced-shared.module.ts b/src/app/authoring-tool/edit-component-advanced/edit-component-advanced-shared.module.ts index 7782418c9f2..3e375743929 100644 --- a/src/app/authoring-tool/edit-component-advanced/edit-component-advanced-shared.module.ts +++ b/src/app/authoring-tool/edit-component-advanced/edit-component-advanced-shared.module.ts @@ -17,6 +17,7 @@ import { FormsModule } from '@angular/forms'; import { EditComponentAddToNotebookButtonComponent } from '../edit-component-add-to-notebook-button/edit-component-add-to-notebook-button.component'; import { EditConnectedComponentsComponent } from '../edit-connected-components/edit-connected-components.component'; import { EditComponentSummarizerSystemPromptComponent } from '../edit-component-summarizer-system-prompt/edit-component-summarizer-system-prompt.component'; +import { EditComponentTeacherReflectionsComponent } from '../edit-component-teacher-reflections/edit-component-teacher-reflections.component'; @NgModule({ imports: [ @@ -31,6 +32,7 @@ import { EditComponentSummarizerSystemPromptComponent } from '../edit-component- EditComponentWidthComponent, EditComponentRubricComponent, EditComponentSummarizerSystemPromptComponent, + EditComponentTeacherReflectionsComponent, EditComponentTagsComponent, EditComponentConstraintsComponent, EditComponentJsonComponent, @@ -51,6 +53,7 @@ import { EditComponentSummarizerSystemPromptComponent } from '../edit-component- EditComponentWidthComponent, EditComponentRubricComponent, EditComponentSummarizerSystemPromptComponent, + EditComponentTeacherReflectionsComponent, EditComponentTagsComponent, EditComponentConstraintsComponent, EditComponentJsonComponent, diff --git a/src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.html b/src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.html new file mode 100644 index 00000000000..1ac4bc0ebcc --- /dev/null +++ b/src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.html @@ -0,0 +1,53 @@ + + + Teacher Reflection Questions + +
+
+
+ These questions will only appear for teachers (in the Grade by Step view for this + activity in the Teacher Tools). + +
+ + @for (q of componentContent()?.teacher?.reflectionQuestions; track q.id; let idx = $index) { +
+ + Question {{ idx + 1 }} + + + +
+ } +
+
+
diff --git a/src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.spec.ts b/src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.spec.ts new file mode 100644 index 00000000000..40bc71ba84c --- /dev/null +++ b/src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.spec.ts @@ -0,0 +1,98 @@ +import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing'; +import { EditComponentTeacherReflectionsComponent } from './edit-component-teacher-reflections.component'; +import { TeacherProjectService } from '../../../assets/wise5/services/teacherProjectService'; +import { ComponentContent } from '../../../assets/wise5/common/ComponentContent'; + +describe('EditComponentTeacherReflectionsComponent', () => { + let component: EditComponentTeacherReflectionsComponent; + let fixture: ComponentFixture; + let mockProjectService: jasmine.SpyObj; + + beforeEach(async () => { + mockProjectService = jasmine.createSpyObj('TeacherProjectService', ['nodeChanged']); + + await TestBed.configureTestingModule({ + imports: [EditComponentTeacherReflectionsComponent], + providers: [{ provide: TeacherProjectService, useValue: mockProjectService }] + }).compileComponents(); + + fixture = TestBed.createComponent(EditComponentTeacherReflectionsComponent); + component = fixture.componentInstance; + fixture.componentRef.setInput('componentContent', { + id: 'comp1', + type: 'Discussion' + } as ComponentContent); + }); + + it('should create and initialize reflectionQuestions if missing', () => { + fixture.detectChanges(); + expect(component).toBeTruthy(); + expect(component.componentContent().teacher).toBeDefined(); + expect(component.componentContent().teacher.reflectionQuestions).toEqual([]); + }); + + it('should add a reflection question and notify node changed', () => { + fixture.detectChanges(); + component.addQuestion(); + + expect(component.componentContent().teacher.reflectionQuestions.length).toBe(1); + expect(component.componentContent().teacher.reflectionQuestions[0].id).toBeTruthy(); + expect(component.componentContent().teacher.reflectionQuestions[0].text).toBe(''); + expect(mockProjectService.nodeChanged).toHaveBeenCalledTimes(1); + }); + + it('should delete a reflection question and notify node changed', () => { + fixture.componentRef.setInput('componentContent', { + id: 'comp1', + type: 'Discussion', + teacher: { + reflectionQuestions: [ + { id: 'q1', text: 'First question' }, + { id: 'q2', text: 'Second question' } + ] + } + } as ComponentContent); + fixture.detectChanges(); + spyOn(window, 'confirm').and.returnValue(true); + component.deleteQuestion(0); + + expect(component.componentContent().teacher.reflectionQuestions.length).toBe(1); + expect(component.componentContent().teacher.reflectionQuestions[0].id).toBe('q2'); + expect(mockProjectService.nodeChanged).toHaveBeenCalledTimes(1); + }); + + it('should debounce question text changes', fakeAsync(() => { + fixture.componentRef.setInput('componentContent', { + id: 'comp1', + type: 'Discussion', + teacher: { + reflectionQuestions: [{ id: 'q1', text: 'Initial' }] + } + } as ComponentContent); + fixture.detectChanges(); + + component.componentContent().teacher.reflectionQuestions[0].text = 'Typing 1'; + component['onQuestionTextChanged'](); + + expect(mockProjectService.nodeChanged).not.toHaveBeenCalled(); + + tick(500); + component.componentContent().teacher.reflectionQuestions[0].text = 'Typing 2'; + component['onQuestionTextChanged'](); + + tick(1000); + expect(mockProjectService.nodeChanged).toHaveBeenCalledTimes(1); + })); + + it('should emit componentChangedEvent when a question is added', () => { + fixture.detectChanges(); + let emitted = false; + component.componentChangedEvent.subscribe(() => { + emitted = true; + }); + + component.addQuestion(); + + expect(emitted).toBeTrue(); + }); +}); diff --git a/src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.ts b/src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.ts new file mode 100644 index 00000000000..99aba6dcc15 --- /dev/null +++ b/src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.ts @@ -0,0 +1,84 @@ +import { + ChangeDetectionStrategy, + Component, + OnDestroy, + OnInit, + inject, + input, + output +} from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatExpansionModule } from '@angular/material/expansion'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { Subject, Subscription } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; +import { ComponentContent } from '../../../assets/wise5/common/ComponentContent'; +import { generateRandomKey } from '../../../assets/wise5/common/string/string'; +import { TeacherProjectService } from '../../../assets/wise5/services/teacherProjectService'; + +@Component({ + changeDetection: ChangeDetectionStrategy.OnPush, + imports: [ + FormsModule, + MatButtonModule, + MatExpansionModule, + MatFormFieldModule, + MatIconModule, + MatInputModule, + MatTooltipModule + ], + selector: 'edit-component-teacher-reflections', + styles: [':host { display: block; width: 100%; }'], + templateUrl: 'edit-component-teacher-reflections.component.html' +}) +export class EditComponentTeacherReflectionsComponent implements OnInit, OnDestroy { + readonly componentContent = input.required(); + readonly componentChangedEvent = output(); + + protected questionTextChanged = new Subject(); + private projectService = inject(TeacherProjectService); + private subscriptions = new Subscription(); + + ngOnInit(): void { + if (!this.componentContent().teacher) { + this.componentContent().teacher = { reflectionQuestions: [] }; + } + this.subscriptions.add( + this.questionTextChanged.pipe(debounceTime(1000)).subscribe(() => { + this.notifyChanged(); + }) + ); + } + + ngOnDestroy(): void { + this.subscriptions.unsubscribe(); + } + + addQuestion(): void { + this.componentContent().teacher.reflectionQuestions.push({ + id: generateRandomKey(), + text: '' + }); + this.notifyChanged(); + } + + deleteQuestion(index: number): void { + if (confirm($localize`Are you sure you want to delete this question?`)) { + this.componentContent().teacher.reflectionQuestions.splice(index, 1); + this.notifyChanged(); + } + } + + protected onQuestionTextChanged(): void { + this.questionTextChanged.next(); + } + + private notifyChanged(): void { + this.projectService.nodeChanged(); + this.componentChangedEvent.emit(); + } +} diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-summary/component-summary.component.html b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-summary/component-summary.component.html index dbf19e884c9..f7f0326699d 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-summary/component-summary.component.html +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-summary/component-summary.component.html @@ -111,6 +111,16 @@ } + @if (hasReflectionQuestions && isSinglePeriod) { + + } } @else if (component.type === 'Match') {
@@ -149,6 +159,16 @@
} + @if (hasReflectionQuestions && isSinglePeriod) { + + } } } diff --git a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-summary/component-summary.component.ts b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-summary/component-summary.component.ts index 59017d3e17d..ffcf55e247e 100644 --- a/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-summary/component-summary.component.ts +++ b/src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-summary/component-summary.component.ts @@ -27,6 +27,7 @@ import { MatDialogRef } from '@angular/material/dialog'; import { DiscussionSummaryComponent } from '../../../directives/teacher-summary-display/discussion-summary/discussion-summary.component'; +import { TeacherReflectionComponent } from '../../../teacher-reflection/teacher-reflection.component'; @Component({ imports: [ @@ -42,6 +43,7 @@ import { DiscussionSummaryComponent } from '../../../directives/teacher-summary- OpenResponseAiSummaryComponent, NgTemplateOutlet, PeerGroupButtonComponent, + TeacherReflectionComponent, TeacherSummaryDisplayComponent ], selector: 'component-summary', @@ -148,6 +150,14 @@ export class ComponentSummaryComponent { panelClass: 'summary-dialog' }); } + + protected get hasReflectionQuestions(): boolean { + return (this.component.teacher?.reflectionQuestions?.length ?? 0) > 0; + } + + protected get isSinglePeriod(): boolean { + return this.periodId != null && this.periodId !== -1; + } } @Component({ diff --git a/src/assets/wise5/common/ComponentContent.ts b/src/assets/wise5/common/ComponentContent.ts index 60bfd281494..de153b41e86 100644 --- a/src/assets/wise5/common/ComponentContent.ts +++ b/src/assets/wise5/common/ComponentContent.ts @@ -22,9 +22,19 @@ export interface ComponentContent { showSaveButton?: boolean; showSubmitButton?: boolean; tags?: string[]; + teacher?: ComponentTeacherContent; type: string; } +export interface TeacherReflectionQuestion { + id: string; + text: string; +} + +export interface ComponentTeacherContent { + reflectionQuestions?: TeacherReflectionQuestion[]; +} + export function hasConnectedComponent( content: ComponentContent, connectedComponentType: 'importWork' | 'showWork' diff --git a/src/assets/wise5/components/aiChat/edit-ai-chat-advanced/edit-ai-chat-advanced.component.html b/src/assets/wise5/components/aiChat/edit-ai-chat-advanced/edit-ai-chat-advanced.component.html index 4fd8fe2a56c..d90c32ad719 100644 --- a/src/assets/wise5/components/aiChat/edit-ai-chat-advanced/edit-ai-chat-advanced.component.html +++ b/src/assets/wise5/components/aiChat/edit-ai-chat-advanced/edit-ai-chat-advanced.component.html @@ -3,7 +3,10 @@ settings General - +
+ + +
diff --git a/src/assets/wise5/components/animation/edit-animation-advanced/edit-animation-advanced.component.html b/src/assets/wise5/components/animation/edit-animation-advanced/edit-animation-advanced.component.html index 6a62f5b32d5..df50d462ef0 100644 --- a/src/assets/wise5/components/animation/edit-animation-advanced/edit-animation-advanced.component.html +++ b/src/assets/wise5/components/animation/edit-animation-advanced/edit-animation-advanced.component.html @@ -13,6 +13,7 @@ + diff --git a/src/assets/wise5/components/audioOscillator/edit-audio-oscillator-advanced/edit-audio-oscillator-advanced.component.html b/src/assets/wise5/components/audioOscillator/edit-audio-oscillator-advanced/edit-audio-oscillator-advanced.component.html index 6a62f5b32d5..df50d462ef0 100644 --- a/src/assets/wise5/components/audioOscillator/edit-audio-oscillator-advanced/edit-audio-oscillator-advanced.component.html +++ b/src/assets/wise5/components/audioOscillator/edit-audio-oscillator-advanced/edit-audio-oscillator-advanced.component.html @@ -13,6 +13,7 @@ + diff --git a/src/assets/wise5/components/conceptMap/edit-concept-map-advanced/edit-concept-map-advanced.component.html b/src/assets/wise5/components/conceptMap/edit-concept-map-advanced/edit-concept-map-advanced.component.html index 75bce96a1d7..830f7ab9625 100644 --- a/src/assets/wise5/components/conceptMap/edit-concept-map-advanced/edit-concept-map-advanced.component.html +++ b/src/assets/wise5/components/conceptMap/edit-concept-map-advanced/edit-concept-map-advanced.component.html @@ -206,6 +206,7 @@ + diff --git a/src/assets/wise5/components/dialogGuidance/edit-dialog-guidance-advanced/edit-dialog-guidance-advanced.component.html b/src/assets/wise5/components/dialogGuidance/edit-dialog-guidance-advanced/edit-dialog-guidance-advanced.component.html index e8fc30f81da..934cba81128 100644 --- a/src/assets/wise5/components/dialogGuidance/edit-dialog-guidance-advanced/edit-dialog-guidance-advanced.component.html +++ b/src/assets/wise5/components/dialogGuidance/edit-dialog-guidance-advanced/edit-dialog-guidance-advanced.component.html @@ -5,6 +5,7 @@
+
diff --git a/src/assets/wise5/components/discussion/discussion-authoring/discussion-authoring.component.ts b/src/assets/wise5/components/discussion/discussion-authoring/discussion-authoring.component.ts index f79cd76127a..4d72345fa8a 100644 --- a/src/assets/wise5/components/discussion/discussion-authoring/discussion-authoring.component.ts +++ b/src/assets/wise5/components/discussion/discussion-authoring/discussion-authoring.component.ts @@ -5,7 +5,11 @@ import { FormsModule } from '@angular/forms'; import { MatCheckboxModule } from '@angular/material/checkbox'; @Component({ - imports: [EditComponentPrompt, FormsModule, MatCheckboxModule], + imports: [ + EditComponentPrompt, + FormsModule, + MatCheckboxModule + ], styles: ['mat-checkbox { display: block; }'], templateUrl: 'discussion-authoring.component.html' }) diff --git a/src/assets/wise5/components/discussion/edit-discussion-advanced/edit-discussion-advanced.component.html b/src/assets/wise5/components/discussion/edit-discussion-advanced/edit-discussion-advanced.component.html index bda549c17f3..7221a9ed4d2 100644 --- a/src/assets/wise5/components/discussion/edit-discussion-advanced/edit-discussion-advanced.component.html +++ b/src/assets/wise5/components/discussion/edit-discussion-advanced/edit-discussion-advanced.component.html @@ -7,6 +7,7 @@ + diff --git a/src/assets/wise5/components/draw/edit-draw-advanced/edit-draw-advanced.component.html b/src/assets/wise5/components/draw/edit-draw-advanced/edit-draw-advanced.component.html index e06a5a28b96..9e2ad6cc30f 100644 --- a/src/assets/wise5/components/draw/edit-draw-advanced/edit-draw-advanced.component.html +++ b/src/assets/wise5/components/draw/edit-draw-advanced/edit-draw-advanced.component.html @@ -19,6 +19,7 @@ + diff --git a/src/assets/wise5/components/embedded/edit-embedded-advanced/edit-embedded-advanced.component.html b/src/assets/wise5/components/embedded/edit-embedded-advanced/edit-embedded-advanced.component.html index 1732659b66a..bdc2d2bcd82 100644 --- a/src/assets/wise5/components/embedded/edit-embedded-advanced/edit-embedded-advanced.component.html +++ b/src/assets/wise5/components/embedded/edit-embedded-advanced/edit-embedded-advanced.component.html @@ -25,6 +25,7 @@ + diff --git a/src/assets/wise5/components/graph/edit-graph-advanced/edit-graph-advanced.component.html b/src/assets/wise5/components/graph/edit-graph-advanced/edit-graph-advanced.component.html index 0e5e95e4f02..43346dbc40b 100644 --- a/src/assets/wise5/components/graph/edit-graph-advanced/edit-graph-advanced.component.html +++ b/src/assets/wise5/components/graph/edit-graph-advanced/edit-graph-advanced.component.html @@ -203,6 +203,7 @@ + diff --git a/src/assets/wise5/components/html/edit-html-advanced/edit-html-advanced.component.html b/src/assets/wise5/components/html/edit-html-advanced/edit-html-advanced.component.html index c7569c53368..d09c546215d 100644 --- a/src/assets/wise5/components/html/edit-html-advanced/edit-html-advanced.component.html +++ b/src/assets/wise5/components/html/edit-html-advanced/edit-html-advanced.component.html @@ -3,7 +3,10 @@ settings General - +
+ + +
diff --git a/src/assets/wise5/components/label/edit-label-advanced/edit-label-advanced.component.html b/src/assets/wise5/components/label/edit-label-advanced/edit-label-advanced.component.html index d5ad19fffac..fcdf81c9702 100644 --- a/src/assets/wise5/components/label/edit-label-advanced/edit-label-advanced.component.html +++ b/src/assets/wise5/components/label/edit-label-advanced/edit-label-advanced.component.html @@ -19,6 +19,7 @@ + diff --git a/src/assets/wise5/components/match/edit-match-advanced/edit-match-advanced.component.html b/src/assets/wise5/components/match/edit-match-advanced/edit-match-advanced.component.html index c58f0874c7d..9667646c85f 100644 --- a/src/assets/wise5/components/match/edit-match-advanced/edit-match-advanced.component.html +++ b/src/assets/wise5/components/match/edit-match-advanced/edit-match-advanced.component.html @@ -35,6 +35,7 @@ + diff --git a/src/assets/wise5/components/multipleChoice/edit-multiple-choice-advanced/edit-multiple-choice-advanced.component.html b/src/assets/wise5/components/multipleChoice/edit-multiple-choice-advanced/edit-multiple-choice-advanced.component.html index 255ea291d67..8f2ec99345d 100644 --- a/src/assets/wise5/components/multipleChoice/edit-multiple-choice-advanced/edit-multiple-choice-advanced.component.html +++ b/src/assets/wise5/components/multipleChoice/edit-multiple-choice-advanced/edit-multiple-choice-advanced.component.html @@ -24,6 +24,7 @@ + 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 a86b44eca3e..c279f007b31 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 @@ -36,6 +36,7 @@ + diff --git a/src/assets/wise5/components/outsideURL/edit-outside-url-advanced/edit-outside-url-advanced.component.ts b/src/assets/wise5/components/outsideURL/edit-outside-url-advanced/edit-outside-url-advanced.component.ts index e1fa8e2e4f4..5388091ea75 100644 --- a/src/assets/wise5/components/outsideURL/edit-outside-url-advanced/edit-outside-url-advanced.component.ts +++ b/src/assets/wise5/components/outsideURL/edit-outside-url-advanced/edit-outside-url-advanced.component.ts @@ -12,6 +12,7 @@ import { EditComponentAdvancedSharedModule } from '../../../../../app/authoring-
+
diff --git a/src/assets/wise5/components/summary/edit-summary-advanced/edit-summary-advanced.component.ts b/src/assets/wise5/components/summary/edit-summary-advanced/edit-summary-advanced.component.ts index 651f185ed43..0700efa245a 100644 --- a/src/assets/wise5/components/summary/edit-summary-advanced/edit-summary-advanced.component.ts +++ b/src/assets/wise5/components/summary/edit-summary-advanced/edit-summary-advanced.component.ts @@ -12,6 +12,7 @@ import { EditComponentAdvancedSharedModule } from '../../../../../app/authoring-
+
diff --git a/src/assets/wise5/components/table/edit-table-advanced/edit-table-advanced.component.html b/src/assets/wise5/components/table/edit-table-advanced/edit-table-advanced.component.html index 083778cbebf..2ce6263a47c 100644 --- a/src/assets/wise5/components/table/edit-table-advanced/edit-table-advanced.component.html +++ b/src/assets/wise5/components/table/edit-table-advanced/edit-table-advanced.component.html @@ -269,6 +269,7 @@ + diff --git a/src/assets/wise5/teacher-reflection/teacher-reflection.component.html b/src/assets/wise5/teacher-reflection/teacher-reflection.component.html new file mode 100644 index 00000000000..202714af97f --- /dev/null +++ b/src/assets/wise5/teacher-reflection/teacher-reflection.component.html @@ -0,0 +1,23 @@ +

Teacher Reflections

+
+ Capture your thoughts as you reflect on this activity. Your answers won't be shown to + students. + @for (q of questions(); track q.id) { +
+ + + + +
+ } +
diff --git a/src/assets/wise5/teacher-reflection/teacher-reflection.component.scss b/src/assets/wise5/teacher-reflection/teacher-reflection.component.scss new file mode 100644 index 00000000000..579c369a143 --- /dev/null +++ b/src/assets/wise5/teacher-reflection/teacher-reflection.component.scss @@ -0,0 +1,4 @@ +.mat-subtitle-1 { + margin-bottom: 8px; + margin-top: 0; +} diff --git a/src/assets/wise5/teacher-reflection/teacher-reflection.component.spec.ts b/src/assets/wise5/teacher-reflection/teacher-reflection.component.spec.ts new file mode 100644 index 00000000000..3bb2d1b420e --- /dev/null +++ b/src/assets/wise5/teacher-reflection/teacher-reflection.component.spec.ts @@ -0,0 +1,121 @@ +import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing'; +import { provideHttpClientTesting } from '@angular/common/http/testing'; +import { of } from 'rxjs'; +import { TeacherReflectionComponent } from './teacher-reflection.component'; +import { TeacherReflectionService } from './teacher-reflection.service'; +import { ConfigService } from '../services/configService'; +import { MockProvider } from 'ng-mocks'; +import { NotificationService } from '../services/notificationService'; + +describe('TeacherReflectionComponent', () => { + let component: TeacherReflectionComponent; + let fixture: ComponentFixture; + let mockReflectionService: jasmine.SpyObj; + let mockConfigService: jasmine.SpyObj; + + beforeEach(async () => { + mockReflectionService = jasmine.createSpyObj('TeacherReflectionService', [ + 'getQuestions', + 'saveAnswer' + ]); + mockReflectionService.getQuestions.and.returnValue(of([])); + mockReflectionService.saveAnswer.and.returnValue(of({} as any)); + + mockConfigService = jasmine.createSpyObj('ConfigService', ['getRunId', 'getWorkgroupId']); + mockConfigService.getRunId.and.returnValue(100); + mockConfigService.getWorkgroupId.and.returnValue(50); + + await TestBed.configureTestingModule({ + imports: [TeacherReflectionComponent], + providers: [ + provideHttpClientTesting(), + MockProvider(NotificationService), + { provide: TeacherReflectionService, useValue: mockReflectionService }, + { provide: ConfigService, useValue: mockConfigService } + ] + }).compileComponents(); + + fixture = TestBed.createComponent(TeacherReflectionComponent); + component = fixture.componentInstance; + fixture.componentRef.setInput('nodeId', 'node1'); + fixture.componentRef.setInput('componentId', 'comp1'); + fixture.componentRef.setInput('componentType', 'Discussion'); + fixture.componentRef.setInput('periodId', 1); + fixture.componentRef.setInput('questions', [ + { id: 'q1', text: 'Question 1 text' }, + { id: 'q2', text: 'Question 2 text' } + ]); + }); + + it('should create and load answers on init', () => { + mockReflectionService.getQuestions.and.returnValue( + of([ + { + runId: 100, + periodId: 1, + nodeId: 'node1', + componentId: 'comp1', + componentType: 'Discussion', + questionId: 'q1', + questionText: 'Question 1 text', + answerText: 'Saved answer 1', + answeredByWorkgroupId: 5 + } + ]) + ); + + fixture.detectChanges(); + + expect(component).toBeTruthy(); + expect(mockReflectionService.getQuestions).toHaveBeenCalledWith(100, 1, 'node1', 'comp1'); + expect(component.getAnswerText('q1')).toBe('Saved answer 1'); + expect(component.getAnswerText('q2')).toBe(''); + }); + + it('should not load answers if periodId is -1 (all periods)', () => { + fixture.componentRef.setInput('periodId', -1); + fixture.detectChanges(); + + expect(mockReflectionService.getQuestions).not.toHaveBeenCalled(); + }); + + it('should debounce saving answers by 1000ms', fakeAsync(() => { + fixture.detectChanges(); + + component.onAnswerChange(component.questions()[0], 'Draft answer'); + expect(component.getAnswerText('q1')).toBe('Draft answer'); + expect(mockReflectionService.saveAnswer).not.toHaveBeenCalled(); + + tick(500); + component.onAnswerChange(component.questions()[0], 'Updated draft answer'); + expect(mockReflectionService.saveAnswer).not.toHaveBeenCalled(); + + tick(1000); + expect(mockReflectionService.saveAnswer).toHaveBeenCalledTimes(1); + expect(mockReflectionService.saveAnswer).toHaveBeenCalledWith({ + runId: 100, + periodId: 1, + nodeId: 'node1', + componentId: 'comp1', + componentType: 'Discussion', + questionId: 'q1', + questionText: 'Question 1 text', + answerText: 'Updated draft answer', + answeredByWorkgroupId: 50 + }); + })); + + it('should associate question labels with textareas via for and id attributes', () => { + fixture.detectChanges(); + const compiled = fixture.nativeElement as HTMLElement; + const labels = compiled.querySelectorAll('label'); + const textareas = compiled.querySelectorAll('textarea'); + + expect(labels.length).toBe(2); + expect(textareas.length).toBe(2); + expect(labels[0].getAttribute('for')).toBe('reflection_q1'); + expect(textareas[0].getAttribute('id')).toBe('reflection_q1'); + expect(labels[1].getAttribute('for')).toBe('reflection_q2'); + expect(textareas[1].getAttribute('id')).toBe('reflection_q2'); + }); +}); diff --git a/src/assets/wise5/teacher-reflection/teacher-reflection.component.ts b/src/assets/wise5/teacher-reflection/teacher-reflection.component.ts new file mode 100644 index 00000000000..94fdcc8ca9e --- /dev/null +++ b/src/assets/wise5/teacher-reflection/teacher-reflection.component.ts @@ -0,0 +1,144 @@ +import { + ChangeDetectionStrategy, + ChangeDetectorRef, + Component, + OnChanges, + OnDestroy, + OnInit, + SimpleChanges, + inject, + input, + signal +} from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatInputModule } from '@angular/material/input'; +import { Subject, Subscription } from 'rxjs'; +import { debounceTime } from 'rxjs/operators'; +import { ConfigService } from '../services/configService'; +import { TeacherReflectionService } from './teacher-reflection.service'; +import { TeacherReflectionQuestion } from '../common/ComponentContent'; +import { TeacherReflection } from './teacher-reflection.model'; +import { NotificationService } from '../services/notificationService'; + +interface PendingAnswer { + question: TeacherReflectionQuestion; + text: string; +} + +@Component({ + changeDetection: ChangeDetectionStrategy.OnPush, + host: { + class: 'summary' + }, + imports: [CommonModule, FormsModule, MatFormFieldModule, MatInputModule], + selector: 'teacher-reflection, teacher-reflections', + styleUrl: './teacher-reflection.component.scss', + templateUrl: './teacher-reflection.component.html' +}) +export class TeacherReflectionComponent implements OnInit, OnChanges, OnDestroy { + readonly nodeId = input(''); + readonly componentId = input(''); + readonly componentType = input(''); + readonly periodId = input(); + readonly questions = input([]); + + private changeDetectorRef = inject(ChangeDetectorRef); + private configService = inject(ConfigService); + private notificationService = inject(NotificationService); + private reflectionService = inject(TeacherReflectionService); + + private answers = signal>({}); + private answerChangeSubject = new Subject(); + private subscriptions = new Subscription(); + + ngOnInit(): void { + this.subscriptions.add( + this.answerChangeSubject.pipe(debounceTime(1000)).subscribe(({ question, text }) => { + this.notificationService.showSavingMessage(); + this.saveAnswer(question, text); + }) + ); + this.loadAnswers(); + } + + ngOnChanges(changes: SimpleChanges): void { + if ( + (changes.periodId && !changes.periodId.firstChange) || + (changes.nodeId && !changes.nodeId.firstChange) || + (changes.componentId && !changes.componentId.firstChange) + ) { + this.loadAnswers(); + } + } + + ngOnDestroy(): void { + this.subscriptions.unsubscribe(); + } + + getAnswerText(questionId: string): string { + return this.answers()[questionId] ?? ''; + } + + onAnswerChange(question: TeacherReflectionQuestion, text: string): void { + this.answers.update((answers) => ({ ...answers, [question.id]: text })); + this.answerChangeSubject.next({ question, text }); + } + + private loadAnswers(): void { + const runId = this.configService.getRunId(); + const periodId = this.periodId(); + const nodeId = this.nodeId(); + const componentId = this.componentId(); + if (!runId || periodId == null || periodId === -1 || !nodeId || !componentId) { + return; + } + + this.reflectionService.getQuestions(runId, periodId, nodeId, componentId).subscribe({ + next: (questions: TeacherReflection[]) => { + const loadedAnswers: Record = {}; + for (const q of questions) { + if (q.questionId && q.answerText != null) { + loadedAnswers[q.questionId] = q.answerText; + } + } + this.answers.set(loadedAnswers); + this.changeDetectorRef.markForCheck(); + }, + error: (err) => { + console.error('Failed to load teacher reflection answers', err); + } + }); + } + + private saveAnswer(question: TeacherReflectionQuestion, answerText: string): void { + const runId = this.configService.getRunId(); + const periodId = this.periodId(); + const answeredByWorkgroupId = this.configService.getWorkgroupId(); + if (!runId || periodId == null || periodId === -1 || answeredByWorkgroupId == null) { + return; + } + + this.reflectionService + .saveAnswer({ + runId, + periodId, + nodeId: this.nodeId(), + componentId: this.componentId(), + componentType: this.componentType(), + questionId: question.id, + questionText: question.text, + answerText, + answeredByWorkgroupId + }) + .subscribe({ + next: () => { + this.notificationService.showSavedMessage($localize`Answer saved`); + }, + error: (err) => { + console.error('Failed to save teacher reflection answer', err); + } + }); + } +} diff --git a/src/assets/wise5/teacher-reflection/teacher-reflection.model.ts b/src/assets/wise5/teacher-reflection/teacher-reflection.model.ts new file mode 100644 index 00000000000..d3f397450a2 --- /dev/null +++ b/src/assets/wise5/teacher-reflection/teacher-reflection.model.ts @@ -0,0 +1,26 @@ +export interface TeacherReflection { + id?: number; + runId: number; + periodId: number; + nodeId: string; + componentId: string; + componentType: string; + questionId: string; + questionText: string; + answerText: string; + answeredByWorkgroupId: number; + createdAt?: number; + updatedAt?: number; +} + +export interface TeacherReflectionAnswerRequest { + runId: number; + periodId: number; + nodeId: string; + componentId: string; + componentType: string; + questionId: string; + questionText: string; + answerText: string; + answeredByWorkgroupId: number; +} diff --git a/src/assets/wise5/teacher-reflection/teacher-reflection.service.spec.ts b/src/assets/wise5/teacher-reflection/teacher-reflection.service.spec.ts new file mode 100644 index 00000000000..675b56cbe9f --- /dev/null +++ b/src/assets/wise5/teacher-reflection/teacher-reflection.service.spec.ts @@ -0,0 +1,87 @@ +import { TestBed } from '@angular/core/testing'; +import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing'; +import { provideHttpClient } from '@angular/common/http'; +import { TeacherReflectionService } from './teacher-reflection.service'; +import { TeacherReflection, TeacherReflectionAnswerRequest } from './teacher-reflection.model'; + +describe('TeacherReflectionService', () => { + let service: TeacherReflectionService; + let httpMock: HttpTestingController; + + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [TeacherReflectionService, provideHttpClient(), provideHttpClientTesting()] + }); + service = TestBed.inject(TeacherReflectionService); + httpMock = TestBed.inject(HttpTestingController); + }); + + afterEach(() => { + httpMock.verify(); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); + + it('should get questions with correct query params', () => { + const mockReflections: TeacherReflection[] = [ + { + id: 1, + runId: 10, + periodId: 20, + nodeId: 'node1', + componentId: 'comp1', + componentType: 'Discussion', + questionId: 'q1', + questionText: 'Prompt 1', + answerText: 'Answer 1', + answeredByWorkgroupId: 5 + } + ]; + + service.getQuestions(10, 20, 'node1', 'comp1').subscribe((questions) => { + expect(questions).toEqual(mockReflections); + }); + + const req = httpMock.expectOne( + (r) => + r.url === '/api/teacher/reflection' && + r.params.get('runId') === '10' && + r.params.get('periodId') === '20' && + r.params.get('nodeId') === 'node1' && + r.params.get('componentId') === 'comp1' + ); + expect(req.request.method).toBe('GET'); + req.flush(mockReflections); + }); + + it('should save answer with PUT request to /answer', () => { + const request: TeacherReflectionAnswerRequest = { + runId: 10, + periodId: 20, + nodeId: 'node1', + componentId: 'comp1', + componentType: 'Discussion', + questionId: 'q1', + questionText: 'Prompt 1', + answerText: 'New Answer', + answeredByWorkgroupId: 100 + }; + + const mockResponse: TeacherReflection = { + id: 1, + ...request, + answeredByWorkgroupId: 100 + }; + + service.saveAnswer(request).subscribe((response) => { + expect(response).toEqual(mockResponse); + }); + + const req = httpMock.expectOne('/api/teacher/reflection/answer'); + expect(req.request.method).toBe('PUT'); + expect(req.request.body).toEqual(request); + req.flush(mockResponse); + }); +}); diff --git a/src/assets/wise5/teacher-reflection/teacher-reflection.service.ts b/src/assets/wise5/teacher-reflection/teacher-reflection.service.ts new file mode 100644 index 00000000000..073836a9f67 --- /dev/null +++ b/src/assets/wise5/teacher-reflection/teacher-reflection.service.ts @@ -0,0 +1,34 @@ +import { Injectable, inject } from '@angular/core'; +import { HttpClient, HttpParams } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { + TeacherReflection, + TeacherReflectionAnswerRequest +} from './teacher-reflection.model'; + +@Injectable({ + providedIn: 'root' +}) +export class TeacherReflectionService { + private http = inject(HttpClient); + private baseUrl = '/api/teacher/reflection'; + + getQuestions( + runId: number, + periodId: number, + nodeId: string, + componentId: string + ): Observable { + const params = new HttpParams() + .set('runId', runId.toString()) + .set('periodId', periodId.toString()) + .set('nodeId', nodeId) + .set('componentId', componentId); + + return this.http.get(this.baseUrl, { params }); + } + + saveAnswer(request: TeacherReflectionAnswerRequest): Observable { + return this.http.put(`${this.baseUrl}/answer`, request); + } +} diff --git a/src/messages.xlf b/src/messages.xlf index 5f2598b2723..6705dd0d93a 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -958,59 +958,59 @@ src/assets/wise5/components/aiChat/edit-ai-chat-advanced/edit-ai-chat-advanced.component.html - 37,38 + 40,41 src/assets/wise5/components/animation/edit-animation-advanced/edit-animation-advanced.component.html - 47,48 + 48,49 src/assets/wise5/components/audioOscillator/edit-audio-oscillator-advanced/edit-audio-oscillator-advanced.component.html - 47,48 + 48,49 src/assets/wise5/components/conceptMap/edit-concept-map-advanced/edit-concept-map-advanced.component.html - 240,241 + 241,242 src/assets/wise5/components/dialogGuidance/edit-dialog-guidance-advanced/edit-dialog-guidance-advanced.component.html - 39,40 + 40,41 src/assets/wise5/components/discussion/edit-discussion-advanced/edit-discussion-advanced.component.html - 49,50 + 50,51 src/assets/wise5/components/draw/edit-draw-advanced/edit-draw-advanced.component.html - 53,54 + 54,55 src/assets/wise5/components/embedded/edit-embedded-advanced/edit-embedded-advanced.component.html - 60,61 + 61,62 src/assets/wise5/components/graph/edit-graph-advanced/edit-graph-advanced.component.html - 237,238 + 238,239 src/assets/wise5/components/label/edit-label-advanced/edit-label-advanced.component.html - 53,54 + 54,55 src/assets/wise5/components/match/edit-match-advanced/edit-match-advanced.component.html - 69,70 + 70,71 src/assets/wise5/components/multipleChoice/edit-multiple-choice-advanced/edit-multiple-choice-advanced.component.html - 58,59 + 59,60 src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 611,612 + 612,613 src/assets/wise5/components/outsideURL/edit-outside-url-advanced/edit-outside-url-advanced.component.ts - 34,36 + 35,37 src/assets/wise5/components/peerChat/edit-peer-chat-advanced-component/edit-peer-chat-advanced-component.component.ts @@ -1026,11 +1026,11 @@ src/assets/wise5/components/summary/edit-summary-advanced/edit-summary-advanced.component.ts - 34,36 + 35,37 src/assets/wise5/components/table/edit-table-advanced/edit-table-advanced.component.html - 303,304 + 304,305 @@ -1058,6 +1058,67 @@ 85 + + Teacher Reflection Questions + + src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.html + 3,5 + + + + These questions will only appear for teachers (in the Grade by Step view for this activity in the Teacher Tools). + + src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.html + 9,14 + + + + Add teacher reflection question + + src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.html + 18,21 + + + + Question + + src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.html + 29,30 + + + + e.g. Which, if any, response surprised you? + + src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.html + 34,37 + + + + Delete question + + src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.html + 43,46 + + + src/app/authoring-tool/edit-question-bank-rules/edit-question-bank-rules.component.html + 75,77 + + + src/app/authoring-tool/edit-question-bank-rules/edit-question-bank-rules.component.html + 98,100 + + + + Are you sure you want to delete this question? + + src/app/authoring-tool/edit-component-teacher-reflections/edit-component-teacher-reflections.component.ts + 70 + + + src/app/authoring-tool/edit-question-bank-rules/edit-question-bank-rules.component.ts + 62 + + Activity width @@ -1391,17 +1452,6 @@ 62,63 - - Delete question - - src/app/authoring-tool/edit-question-bank-rules/edit-question-bank-rules.component.html - 75,77 - - - src/app/authoring-tool/edit-question-bank-rules/edit-question-bank-rules.component.html - 98,100 - - Add new question @@ -1427,13 +1477,6 @@ 46 - - Are you sure you want to delete this question? - - src/app/authoring-tool/edit-question-bank-rules/edit-question-bank-rules.component.ts - 62 - - Question # @@ -1695,11 +1738,11 @@ src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 88,89 + 89,90 src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 547,548 + 548,549 src/assets/wise5/vle/node/node.component.html @@ -1761,7 +1804,7 @@ src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 528,529 + 529,530 src/assets/wise5/components/summary/summary-authoring/summary-authoring.component.html @@ -1776,7 +1819,7 @@ src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 538,541 + 539,542 src/assets/wise5/components/showGroupWork/show-group-work-authoring/show-group-work-authoring.component.html @@ -1815,7 +1858,7 @@ src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 516,517 + 517,518 src/assets/wise5/components/summary/summary-authoring/summary-authoring.component.html @@ -1849,11 +1892,11 @@ src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 89,90 + 90,91 src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 548,550 + 549,551 src/assets/wise5/vle/node/node.component.html @@ -2735,7 +2778,7 @@ src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 155,158 + 156,159 @@ -10721,63 +10764,63 @@ src/assets/wise5/components/aiChat/edit-ai-chat-advanced/edit-ai-chat-advanced.component.html - 29,32 + 32,35 src/assets/wise5/components/animation/edit-animation-advanced/edit-animation-advanced.component.html - 39,42 + 40,43 src/assets/wise5/components/audioOscillator/edit-audio-oscillator-advanced/edit-audio-oscillator-advanced.component.html - 39,42 + 40,43 src/assets/wise5/components/conceptMap/edit-concept-map-advanced/edit-concept-map-advanced.component.html - 232,235 + 233,236 src/assets/wise5/components/dialogGuidance/edit-dialog-guidance-advanced/edit-dialog-guidance-advanced.component.html - 31,34 + 32,35 src/assets/wise5/components/discussion/edit-discussion-advanced/edit-discussion-advanced.component.html - 41,44 + 42,45 src/assets/wise5/components/draw/edit-draw-advanced/edit-draw-advanced.component.html - 45,48 + 46,49 src/assets/wise5/components/embedded/edit-embedded-advanced/edit-embedded-advanced.component.html - 52,55 + 53,56 src/assets/wise5/components/graph/edit-graph-advanced/edit-graph-advanced.component.html - 229,232 + 230,233 src/assets/wise5/components/html/edit-html-advanced/edit-html-advanced.component.html - 16,18 + 19,21 src/assets/wise5/components/label/edit-label-advanced/edit-label-advanced.component.html - 45,48 + 46,49 src/assets/wise5/components/match/edit-match-advanced/edit-match-advanced.component.html - 61,64 + 62,65 src/assets/wise5/components/multipleChoice/edit-multiple-choice-advanced/edit-multiple-choice-advanced.component.html - 50,53 + 51,54 src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 603,606 + 604,607 src/assets/wise5/components/outsideURL/edit-outside-url-advanced/edit-outside-url-advanced.component.ts - 25,28 + 26,29 src/assets/wise5/components/peerChat/edit-peer-chat-advanced-component/edit-peer-chat-advanced-component.component.ts @@ -10793,11 +10836,11 @@ src/assets/wise5/components/summary/edit-summary-advanced/edit-summary-advanced.component.ts - 25,28 + 26,29 src/assets/wise5/components/table/edit-table-advanced/edit-table-advanced.component.html - 295,298 + 296,299 src/assets/wise5/themes/default/themeComponents/helpIcon/help-icon.component.ts @@ -10835,63 +10878,63 @@ src/assets/wise5/components/aiChat/edit-ai-chat-advanced/edit-ai-chat-advanced.component.html - 41,43 + 44,46 src/assets/wise5/components/animation/edit-animation-advanced/edit-animation-advanced.component.html - 51,53 + 52,54 src/assets/wise5/components/audioOscillator/edit-audio-oscillator-advanced/edit-audio-oscillator-advanced.component.html - 51,53 + 52,54 src/assets/wise5/components/conceptMap/edit-concept-map-advanced/edit-concept-map-advanced.component.html - 244,246 + 245,247 src/assets/wise5/components/dialogGuidance/edit-dialog-guidance-advanced/edit-dialog-guidance-advanced.component.html - 43,45 + 44,46 src/assets/wise5/components/discussion/edit-discussion-advanced/edit-discussion-advanced.component.html - 53,55 + 54,56 src/assets/wise5/components/draw/edit-draw-advanced/edit-draw-advanced.component.html - 57,59 + 58,60 src/assets/wise5/components/embedded/edit-embedded-advanced/edit-embedded-advanced.component.html - 64,66 + 65,67 src/assets/wise5/components/graph/edit-graph-advanced/edit-graph-advanced.component.html - 241,243 + 242,244 src/assets/wise5/components/html/edit-html-advanced/edit-html-advanced.component.html - 21,23 + 24,26 src/assets/wise5/components/label/edit-label-advanced/edit-label-advanced.component.html - 57,59 + 58,60 src/assets/wise5/components/match/edit-match-advanced/edit-match-advanced.component.html - 73,75 + 74,76 src/assets/wise5/components/multipleChoice/edit-multiple-choice-advanced/edit-multiple-choice-advanced.component.html - 62,64 + 63,65 src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 615,617 + 616,618 src/assets/wise5/components/outsideURL/edit-outside-url-advanced/edit-outside-url-advanced.component.ts - 40,42 + 41,43 src/assets/wise5/components/peerChat/edit-peer-chat-advanced-component/edit-peer-chat-advanced-component.component.ts @@ -10907,11 +10950,11 @@ src/assets/wise5/components/summary/edit-summary-advanced/edit-summary-advanced.component.ts - 40,42 + 41,43 src/assets/wise5/components/table/edit-table-advanced/edit-table-advanced.component.html - 307,309 + 308,310 @@ -13790,7 +13833,7 @@ The branches will be removed but the steps will remain in the unit. src/assets/wise5/components/aiChat/edit-ai-chat-advanced/edit-ai-chat-advanced.component.html - 4,6 + 4,7 src/assets/wise5/components/animation/edit-animation-advanced/edit-animation-advanced.component.html @@ -13826,7 +13869,7 @@ The branches will be removed but the steps will remain in the unit. src/assets/wise5/components/html/edit-html-advanced/edit-html-advanced.component.html - 4,6 + 4,7 src/assets/wise5/components/label/edit-label-advanced/edit-label-advanced.component.html @@ -16812,63 +16855,63 @@ Are you sure you want to proceed? Visibility src/assets/wise5/components/aiChat/edit-ai-chat-advanced/edit-ai-chat-advanced.component.html - 10,12 + 13,15 src/assets/wise5/components/animation/edit-animation-advanced/edit-animation-advanced.component.html - 20,22 + 21,23 src/assets/wise5/components/audioOscillator/edit-audio-oscillator-advanced/edit-audio-oscillator-advanced.component.html - 20,22 + 21,23 src/assets/wise5/components/conceptMap/edit-concept-map-advanced/edit-concept-map-advanced.component.html - 213,215 + 214,216 src/assets/wise5/components/dialogGuidance/edit-dialog-guidance-advanced/edit-dialog-guidance-advanced.component.html - 12,14 + 13,15 src/assets/wise5/components/discussion/edit-discussion-advanced/edit-discussion-advanced.component.html - 14,16 + 15,17 src/assets/wise5/components/draw/edit-draw-advanced/edit-draw-advanced.component.html - 26,28 + 27,29 src/assets/wise5/components/embedded/edit-embedded-advanced/edit-embedded-advanced.component.html - 33,35 + 34,36 src/assets/wise5/components/graph/edit-graph-advanced/edit-graph-advanced.component.html - 210,212 + 211,213 src/assets/wise5/components/html/edit-html-advanced/edit-html-advanced.component.html - 10,12 + 13,15 src/assets/wise5/components/label/edit-label-advanced/edit-label-advanced.component.html - 26,28 + 27,29 src/assets/wise5/components/match/edit-match-advanced/edit-match-advanced.component.html - 42,44 + 43,45 src/assets/wise5/components/multipleChoice/edit-multiple-choice-advanced/edit-multiple-choice-advanced.component.html - 31,33 + 32,34 src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 43,45 + 44,46 src/assets/wise5/components/outsideURL/edit-outside-url-advanced/edit-outside-url-advanced.component.ts - 19,21 + 20,22 src/assets/wise5/components/peerChat/edit-peer-chat-advanced-component/edit-peer-chat-advanced-component.component.ts @@ -16884,70 +16927,70 @@ Are you sure you want to proceed? src/assets/wise5/components/summary/edit-summary-advanced/edit-summary-advanced.component.ts - 19,21 + 20,22 src/assets/wise5/components/table/edit-table-advanced/edit-table-advanced.component.html - 276,278 + 277,279 Connections src/assets/wise5/components/aiChat/edit-ai-chat-advanced/edit-ai-chat-advanced.component.html - 16,19 + 19,22 src/assets/wise5/components/animation/edit-animation-advanced/edit-animation-advanced.component.html - 26,29 + 27,30 src/assets/wise5/components/audioOscillator/edit-audio-oscillator-advanced/edit-audio-oscillator-advanced.component.html - 26,29 + 27,30 src/assets/wise5/components/conceptMap/edit-concept-map-advanced/edit-concept-map-advanced.component.html - 219,222 + 220,223 src/assets/wise5/components/dialogGuidance/edit-dialog-guidance-advanced/edit-dialog-guidance-advanced.component.html - 18,21 + 19,22 src/assets/wise5/components/discussion/edit-discussion-advanced/edit-discussion-advanced.component.html - 20,23 + 21,24 src/assets/wise5/components/draw/edit-draw-advanced/edit-draw-advanced.component.html - 32,35 + 33,36 src/assets/wise5/components/embedded/edit-embedded-advanced/edit-embedded-advanced.component.html - 39,42 + 40,43 src/assets/wise5/components/graph/edit-graph-advanced/edit-graph-advanced.component.html - 216,219 + 217,220 src/assets/wise5/components/label/edit-label-advanced/edit-label-advanced.component.html - 32,35 + 33,36 src/assets/wise5/components/match/edit-match-advanced/edit-match-advanced.component.html - 48,51 + 49,52 src/assets/wise5/components/multipleChoice/edit-multiple-choice-advanced/edit-multiple-choice-advanced.component.html - 37,40 + 38,41 src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 49,52 + 50,53 src/assets/wise5/components/table/edit-table-advanced/edit-table-advanced.component.html - 282,285 + 283,286 @@ -18457,7 +18500,7 @@ Are you ready to receive feedback on this answer? src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 341,342 + 342,343 @@ -19600,11 +19643,11 @@ Category Name: AI src/assets/wise5/components/discussion/edit-discussion-advanced/edit-discussion-advanced.component.html - 34,36 + 35,37 src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 62,65 + 63,66 @@ -21452,7 +21495,7 @@ Warning: This will delete all existing choices and buckets in this activity. src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 112,115 + 113,116 @@ -21609,201 +21652,201 @@ Warning: This will delete all existing choices in this activity. Enable AI Model src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 76,79 + 77,80 Score On src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 83,85 + 84,86 Change src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 90,93 + 91,94 Show Score src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 102,106 + 103,107 Enable Feedback Rules src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 122,124 + 123,125 Scoring Rule src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 134,137 + 135,138 Add Scoring Rule src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 139,142 + 140,143 Feedback Text src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 167,169 + 168,170 Move Scoring Rule Up src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 178,180 + 179,181 Move Scoring Rule Down src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 189,191 + 190,192 Delete Scoring Rule src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 199,201 + 200,202 Enable Multiple Attempt Feedback src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 219,222 + 220,223 Multiple Attempt Scoring Rules src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 224,227 + 225,228 Add Multiple Attempt Scoring Rule src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 229,232 + 230,233 Previous Score src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 245,248 + 246,249 src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 354,357 + 355,358 Current Score src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 254,257 + 255,258 src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 364,367 + 365,368 Feedback to Student src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 265,267 + 266,268 src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 452,454 + 453,455 Move Multiple Attempt Scoring Rule Up src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 281,283 + 282,284 Move Multiple Attempt Scoring Rule Down src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 297,299 + 298,300 Delet Multiple Attempt Scoring src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 307,309 + 308,310 Enable Notifications src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 327,330 + 328,331 Notifications src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 332,335 + 333,336 Move Notification Up src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 385,387 + 386,388 Move Notification Down src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 401,403 + 402,404 Delete Notification src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 411,413 + 412,414 Enable Ambient Display Dismiss Mode src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 426,428 + 427,429 Dismiss Code src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 430,433 + 431,434 src/assets/wise5/vle/dismiss-ambient-notification-dialog/dismiss-ambient-notification-dialog.component.html @@ -21814,63 +21857,63 @@ Warning: This will delete all existing choices in this activity. Notify Student src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 446,448 + 447,449 Notify Teacher src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 466,468 + 467,469 Feedback to Teacher src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 472,474 + 473,475 Use Custom Completion Criteria src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 491,493 + 492,494 Custom Completion Criteria src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 495,498 + 496,499 Add Completion Criteria src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 500,503 + 501,504 Move Completion Criteria Up src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 560,562 + 561,563 Move Completion Criteria Down src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 573,575 + 574,576 Delete Completion Criteria src/assets/wise5/components/openResponse/edit-open-response-advanced/edit-open-response-advanced.component.html - 583,585 + 584,586 @@ -23844,6 +23887,34 @@ If this problem continues, let your teacher know and move on to the next activit 37 + + Teacher Reflections + + src/assets/wise5/teacher-reflection/teacher-reflection.component.html + 1,4 + + + + Capture your thoughts as you reflect on this activity. Your answers won't be shown to students. + + src/assets/wise5/teacher-reflection/teacher-reflection.component.html + 4,8 + + + + Enter your reflection... + + src/assets/wise5/teacher-reflection/teacher-reflection.component.html + 17,21 + + + + Answer saved + + src/assets/wise5/teacher-reflection/teacher-reflection.component.ts + 137 + + required