Skip to content

Commit

Permalink
Fixed point issue messages
Browse files Browse the repository at this point in the history
  • Loading branch information
badkeyy committed Jan 30, 2025
1 parent f6db5f7 commit 6188a3b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function isQuizEditable(quizExercise: QuizExercise): boolean {
}

export function isQuizQuestionValid(question: QuizQuestion, dragAndDropQuestionUtil: DragAndDropQuestionUtil, shortAnswerQuestionUtil: ShortAnswerQuestionUtil) {
if (question.points == undefined || question.points < 0 || question.points > MAX_QUIZ_QUESTION_POINTS) {
if (question.points == undefined || question.points <= 0 || question.points > MAX_QUIZ_QUESTION_POINTS) {
return false;
}
if (question.explanation && question.explanation.length > MAX_QUIZ_QUESTION_EXPLANATION_LENGTH_THRESHOLD) {
Expand Down Expand Up @@ -125,7 +125,7 @@ export function computeQuizQuestionInvalidReason(
translateKey: 'artemisApp.quizExercise.invalidReasons.questionScore',
translateValues: { index: index + 1 },
});
} else if (question.points < 0 || question.points > MAX_QUIZ_QUESTION_POINTS) {
} else if (question.points <= 0 || question.points > MAX_QUIZ_QUESTION_POINTS) {
invalidReasons.push({
translateKey: 'artemisApp.quizExercise.invalidReasons.questionScoreInvalid',
translateValues: { index: index + 1 },
Expand Down

0 comments on commit 6188a3b

Please sign in to comment.