Skip to content

Commit

Permalink
Added hidden flag for catalog criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
srietkerk committed Feb 22, 2024
1 parent 031f234 commit dd7edc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions teachertool/src/state/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ export function getSelectableCatalogCriteria(state: AppState): CatalogCriteria[]
return (
state.catalog?.filter(
catalogCriteria =>
(catalogCriteria.parameters && catalogCriteria.parameters.length > 0) ||
!usedCatalogCriteria.includes(catalogCriteria.id)
((catalogCriteria.parameters && catalogCriteria.parameters.length > 0) ||
!usedCatalogCriteria.includes(catalogCriteria.id)) &&
!catalogCriteria.hideInCatalog
) ?? []
);
}
1 change: 1 addition & 0 deletions teachertool/src/types/criteria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface CatalogCriteria {
description: string | undefined; // More detailed description
docPath: string | undefined; // Path to documentation
parameters: CriteriaParameter[] | undefined; // Any parameters that affect the criteria
hideInCatalog?: boolean; // Whether the criteria should be hidden in the catalog
}

// An instance of a criteria in a rubric.
Expand Down

0 comments on commit dd7edc2

Please sign in to comment.