Files
classroomio/src/lib/mocks/utils.ts
T
tunny17andRotimi Best 849154711b CLASSROOMIO-T-193: Exercise Templates for HTML
CLASSROOMIO-T-193: Convert to single quotes

CLASSROOMIO-T-193: Resolved Feedbacks

landing page improvement

add spacing on mobile for notes in lms

little bug fixes in lms

CLASSROOMIO-T-193: return the array

Simplify template generation

CLASSROOMIO-T-193: Styling improvement

CLASSROOMIO-T-193: Exercise Templates for HTML


Co-authored-by: Rotimi Best <[email protected]>
Co-authored-by: Tunji Adeyemi <[email protected]>


Merge-request: CLASSROOMIO-MR-88
Merged-by: Best Admin <[email protected]>
2023-10-06 09:06:03 +00:00

28 lines
523 B
TypeScript

import type { CustomQuestionType } from '$lib/utils/types';
import type { ExerciseTemplate } from '$lib/utils/types';
export const QuestionTypes: CustomQuestionType[] = [
{
id: 1,
label: 'RADIO'
},
{
id: 2,
label: 'CHECKBOX'
},
{
id: 3,
label: 'TEXTAREA'
}
];
export function calculateTotalPoints(template: ExerciseTemplate): number {
let totalPoints = 0;
template.questionnaire.questions.forEach((question) => {
totalPoints += question.points;
});
return totalPoints;
}