diff --git a/teachertool/src/components/CatalogModal.tsx b/teachertool/src/components/CatalogModal.tsx index 12d3ffdb9cd7..a9b5ff03bf9e 100644 --- a/teachertool/src/components/CatalogModal.tsx +++ b/teachertool/src/components/CatalogModal.tsx @@ -17,17 +17,17 @@ const CatalogCriteriaDisplay: React.FC = ({ criteri return (
- {criteria.template &&
- { - segments.map((segment, index) => { + {criteria.template && ( +
+ {segments.map((segment, index) => { return ( {segment.content} ); - }) - } -
} + })} +
+ )} {criteria.description &&
{criteria.description}
}
); diff --git a/teachertool/src/components/CriteriaTable.tsx b/teachertool/src/components/CriteriaTable.tsx index 18f1ff3042d7..02dd95f69fb9 100644 --- a/teachertool/src/components/CriteriaTable.tsx +++ b/teachertool/src/components/CriteriaTable.tsx @@ -21,7 +21,11 @@ const CriteriaInstanceRow: React.FC = ({ criteriaI } return catalogCriteria ? ( -
+
diff --git a/teachertool/src/transforms/setParameterValue.ts b/teachertool/src/transforms/setParameterValue.ts index 6974f07dd21f..c9ca7d914fd2 100644 --- a/teachertool/src/transforms/setParameterValue.ts +++ b/teachertool/src/transforms/setParameterValue.ts @@ -16,13 +16,21 @@ export function setParameterValue(instanceId: string, paramName: string, newValu const oldParam = oldCriteriaInstance.params?.find(p => p.name === paramName); if (!oldParam) { - logError(ErrorCode.missingParameter, `Unable to find parameter with name '${paramName}' in criteria instance '${instanceId}'`); + logError( + ErrorCode.missingParameter, + `Unable to find parameter with name '${paramName}' in criteria instance '${instanceId}'` + ); return; } const newParam = { ...oldParam, value: newValue }; - const newCriteriaInstance = {...oldCriteriaInstance, params: oldCriteriaInstance.params?.map(p => p.name === paramName ? newParam : p)}; - const newInstanceSet = teacherTool.rubric.criteria.map(c => c.instanceId === instanceId ? newCriteriaInstance : c); + const newCriteriaInstance = { + ...oldCriteriaInstance, + params: oldCriteriaInstance.params?.map(p => (p.name === paramName ? newParam : p)), + }; + const newInstanceSet = teacherTool.rubric.criteria.map(c => + c.instanceId === instanceId ? newCriteriaInstance : c + ); const newRubric = { ...teacherTool.rubric, criteria: newInstanceSet }; setRubric(newRubric);