diff --git a/src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html b/src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html index 87490d782e7..4ad2f5ce78e 100644 --- a/src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html +++ b/src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html @@ -33,18 +33,20 @@ Show - - Activity Question - - Show - Hide - - + @if (componentPrompt) { + + Activity Question + + Show + Hide + + + } }
diff --git a/src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.spec.ts b/src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.spec.ts index 2f748d3d5f0..6dacdb1f89b 100644 --- a/src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.spec.ts +++ b/src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.spec.ts @@ -325,13 +325,30 @@ describe('TeacherPresentationDialogComponent', () => { expect(promptSection).toBeNull(); }); - it('should render Original Question dropdown in header when controls are visible', () => { + it('should render Activity Question dropdown in header when controls are visible and componentPrompt exists', () => { + component.data.component = { + id: 'comp1', + type: 'OpenResponse', + prompt: 'Why does ice float?' + } as any; component.toggleControls(true); // controls visible fixture.detectChanges(); const selects = fixture.nativeElement.querySelectorAll('mat-select'); - // There should be both Student Names and Original Question selects + // There should be both Student Names and Activity Question selects expect(selects.length).toBe(2); expect(selects[1].getAttribute('aria-label')).toBe('Activity Question Display'); }); + + it('should not render Activity Question dropdown when componentPrompt does not exist', () => { + component.toggleControls(true); // controls visible, but component has no prompt + fixture.detectChanges(); + + const selects = fixture.nativeElement.querySelectorAll('mat-select'); + // Only Student Names select should be rendered + expect(selects.length).toBe(1); + expect( + fixture.nativeElement.querySelector('mat-select[aria-label="Activity Question Display"]') + ).toBeNull(); + }); }); diff --git a/src/messages.xlf b/src/messages.xlf index 4e9b9a4c8bb..abacce7b6c6 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -573,7 +573,7 @@ src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 110,112 + 112,114 src/assets/wise5/vle/dismiss-ambient-notification-dialog/dismiss-ambient-notification-dialog.component.html @@ -14534,7 +14534,7 @@ The branches will be removed but the steps will remain in the unit. src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 53,55 + 55,57 @@ -15173,7 +15173,7 @@ The branches will be removed but the steps will remain in the unit. src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 45,49 + 46,49 @@ -15192,7 +15192,7 @@ The branches will be removed but the steps will remain in the unit. src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 44,46 + 45,46 @@ -23927,70 +23927,70 @@ If this problem continues, let your teacher know and move on to the next activit Activity Question src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 37,39 + 38,40 Activity Question Display src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 41,44 + 42,45 Close (Esc) src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 56,59 + 58,61 [Add optional presentation prompt] src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 76,80 + 78,82 Edit prompt src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 83,86 + 85,88 Presentation Prompt src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 92,95 + 94,97 Save prompt src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 103,105 + 105,107 Reset to default src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 118,121 + 120,123 No ideas selected. Close and check ideas to display. src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 140,142 + 142,144 No posts selected. Close and check posts to display. src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html - 142,145 + 144,147