style: fix linting issues met ESLint

This commit is contained in:
Lint Action 2025-03-11 05:14:04 +00:00
parent a69e2625af
commit bdbfe380be
4 changed files with 5 additions and 5 deletions

View file

@ -26,7 +26,7 @@ export interface LearningObjectNode {
transitions: Transition[]; transitions: Transition[];
created_at: string; created_at: string;
updatedAt: string; updatedAt: string;
done?: boolean; // true if a submission exists for this node by the user for whom the learning path is customized. done?: boolean; // True if a submission exists for this node by the user for whom the learning path is customized.
} }
export interface LearningPath { export interface LearningPath {

View file

@ -99,7 +99,7 @@ async function convertNodes(nodesToLearningObjects: Map<LearningPathNode, Filter
version: learningObject.version, version: learningObject.version,
transitions: node.transitions transitions: node.transitions
.filter(trans => !personalizedFor || isTransitionPossible(trans, lastSubmission)) // If we want a personalized learning path, remove all transitions that aren't possible. .filter(trans => !personalizedFor || isTransitionPossible(trans, lastSubmission)) // If we want a personalized learning path, remove all transitions that aren't possible.
.map((trans, i) => convertTransition(trans, i, nodesToLearningObjects)), // then convert all the transition .map((trans, i) => convertTransition(trans, i, nodesToLearningObjects)), // Then convert all the transition
}; };
}) })
.toArray(); .toArray();

View file

@ -20,9 +20,9 @@ export async function getLastSubmissionForCustomizationTarget(node: LearningPath
}; };
if (pathFor.type === 'group') { if (pathFor.type === 'group') {
return await submissionRepo.findMostRecentSubmissionForGroup(learningObjectId, pathFor.group); return await submissionRepo.findMostRecentSubmissionForGroup(learningObjectId, pathFor.group);
} else {
return await submissionRepo.findMostRecentSubmissionForStudent(learningObjectId, pathFor.student);
} }
return await submissionRepo.findMostRecentSubmissionForStudent(learningObjectId, pathFor.student);
} }

View file

@ -26,7 +26,7 @@ const learningPathService = {
const userContentLearningPaths = await databaseLearningPathProvider.fetchLearningPaths(userContentHruids, language, source, personalizedFor); const userContentLearningPaths = await databaseLearningPathProvider.fetchLearningPaths(userContentHruids, language, source, personalizedFor);
const nonUserContentLearningPaths = await dwengoApiLearningPathProvider.fetchLearningPaths(nonUserContentHruids, language, source, personalizedFor); const nonUserContentLearningPaths = await dwengoApiLearningPathProvider.fetchLearningPaths(nonUserContentHruids, language, source, personalizedFor);
let result = (userContentLearningPaths.data || []).concat(nonUserContentLearningPaths.data || []); const result = (userContentLearningPaths.data || []).concat(nonUserContentLearningPaths.data || []);
return { return {
data: result, data: result,