Skip to content

Commit

Permalink
Add note about suggested searches filtering tags in practice mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-bstein committed Nov 1, 2023
1 parent ada4f3f commit aaaaf39
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ <h2>Suggested searches</h2>
these to direct players to useful or interesting subsets of the available practice challenges.
</p>

<p>
These terms also "filter" the list of tags applied to the challenges.
<span class="link-button" role="button" (click)="handleShowSuggestedSearchesNote()">Click here</span>
for more information.
</p>

<textarea class="form-control" (input)="handleSettingsChanged(ctx.settings)"
[(ngModel)]="suggestedSearchesLineDelimited" rows="10">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class PracticeSettingsComponent implements OnInit {
this.suggestedSearchesLineDelimited = this.ctx.settings.suggestedSearches.join("\n");
}

handleShowCertificateTemplateHelp() {
protected handleShowCertificateTemplateHelp() {
this.modalService.open({
title: "Creating a certificate template",
bodyContent: this.certificateHtmlPlaceholder,
Expand All @@ -65,7 +65,24 @@ export class PracticeSettingsComponent implements OnInit {
});
}

handleSettingsChanged(settings: PracticeModeSettings) {
protected handleShowSuggestedSearchesNote() {
this.modalService.open({
title: "About suggested searches & tags",
bodyContent: `
In addition to directing players to specific collections of challenges, the Suggested Searches
feature also acts as a filter on the challenge "tags" which are displayed in the list of practice
challenges.
When a challenge is created, the challenge designer may optionally apply tags to it. Some tags
are descriptive of the skills necessary to solve the challenge, while others are used for internal
tracking only. Only tags which match values from the Suggested Searches list will be displayed
to the player when browsing the Practice Area.
`,
renderBodyAsMarkdown: true
});
}

protected handleSettingsChanged(settings: PracticeModeSettings) {
settings.suggestedSearches = !this.suggestedSearchesLineDelimited ? [] : this.suggestedSearchesLineDelimited.split("\n").map(entry => entry.trim());
this._startUpdate$.next(settings);
}
Expand Down

0 comments on commit aaaaf39

Please sign in to comment.