Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,20 @@
<mat-option value="show" i18n>Show</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="fill" subscriptSizing="dynamic">
<mat-label i18n>Activity Question</mat-label>
<mat-select
[ngModel]="componentPromptDisplay"
(ngModelChange)="onComponentPromptDisplayChange($event)"
aria-label="Activity Question Display"
i18n-aria-label
>
<mat-option value="show" i18n>Show</mat-option>
<mat-option value="hide" i18n>Hide</mat-option>
</mat-select>
</mat-form-field>
@if (componentPrompt) {
<mat-form-field appearance="fill" subscriptSizing="dynamic">
<mat-label i18n>Activity Question</mat-label>
<mat-select
[ngModel]="componentPromptDisplay"
(ngModelChange)="onComponentPromptDisplayChange($event)"
aria-label="Activity Question Display"
i18n-aria-label
>
<mat-option value="show" i18n>Show</mat-option>
<mat-option value="hide" i18n>Hide</mat-option>
</mat-select>
</mat-form-field>
}
}
</div>
<div class="shrink-0 flex items-center gap-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});
28 changes: 14 additions & 14 deletions src/messages.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">110,112</context>
<context context-type="linenumber">112,114</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/vle/dismiss-ambient-notification-dialog/dismiss-ambient-notification-dialog.component.html</context>
Expand Down Expand Up @@ -14534,7 +14534,7 @@ The branches will be removed but the steps will remain in the unit.</source>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">53,55</context>
<context context-type="linenumber">55,57</context>
</context-group>
</trans-unit>
<trans-unit id="821108549356178066" datatype="html">
Expand Down Expand Up @@ -15173,7 +15173,7 @@ The branches will be removed but the steps will remain in the unit.</source>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">45,49</context>
<context context-type="linenumber">46,49</context>
</context-group>
</trans-unit>
<trans-unit id="8461842260159597706" datatype="html">
Expand All @@ -15192,7 +15192,7 @@ The branches will be removed but the steps will remain in the unit.</source>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">44,46</context>
<context context-type="linenumber">45,46</context>
</context-group>
</trans-unit>
<trans-unit id="2142002953999044695" datatype="html">
Expand Down Expand Up @@ -23927,70 +23927,70 @@ If this problem continues, let your teacher know and move on to the next activit
<source>Activity Question</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">37,39</context>
<context context-type="linenumber">38,40</context>
</context-group>
</trans-unit>
<trans-unit id="2317079278666541708" datatype="html">
<source>Activity Question Display</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">41,44</context>
<context context-type="linenumber">42,45</context>
</context-group>
</trans-unit>
<trans-unit id="3839538951183316109" datatype="html">
<source>Close (Esc)</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">56,59</context>
<context context-type="linenumber">58,61</context>
</context-group>
</trans-unit>
<trans-unit id="1652724113559643497" datatype="html">
<source> [Add optional presentation prompt] </source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">76,80</context>
<context context-type="linenumber">78,82</context>
</context-group>
</trans-unit>
<trans-unit id="2058886405519097162" datatype="html">
<source>Edit prompt</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">83,86</context>
<context context-type="linenumber">85,88</context>
</context-group>
</trans-unit>
<trans-unit id="7730328003227241244" datatype="html">
<source>Presentation Prompt</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">92,95</context>
<context context-type="linenumber">94,97</context>
</context-group>
</trans-unit>
<trans-unit id="1683079703300905038" datatype="html">
<source>Save prompt</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">103,105</context>
<context context-type="linenumber">105,107</context>
</context-group>
</trans-unit>
<trans-unit id="648306878592239743" datatype="html">
<source>Reset to default</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">118,121</context>
<context context-type="linenumber">120,123</context>
</context-group>
</trans-unit>
<trans-unit id="8754890991138613434" datatype="html">
<source>No ideas selected. Close and check ideas to display.</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">140,142</context>
<context context-type="linenumber">142,144</context>
</context-group>
</trans-unit>
<trans-unit id="4444841150052442731" datatype="html">
<source>No posts selected. Close and check posts to display.</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/teacher-presentation/teacher-presentation-dialog/teacher-presentation-dialog.component.html</context>
<context context-type="linenumber">142,145</context>
<context context-type="linenumber">144,147</context>
</context-group>
</trans-unit>
<trans-unit id="5582115095715308623" datatype="html">
Expand Down