Skip to content

Commit

Permalink
Fixed Correct/Incorrect display when answer.a is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
rimutaka committed Oct 17, 2024
1 parent bd87523 commit a95bed4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion vue/src/components/QuestionFieldMarkdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import { marked } from 'marked';
const props = defineProps<{
text: string,
correct?: boolean,
/// true: display `Correct`, false: display `Incorrect`, for explanations only
/// undefined: do not display correct/incorrect for question and answer fields
correct: boolean | undefined,
}>()
const renderedHtml = ref("");
Expand Down
2 changes: 1 addition & 1 deletion vue/src/components/QuestionForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<h4>Question: </h4>
<div class="w-full md-group">
<Textarea v-model="questionText" class="w-full" rows="3" />
<QuestionFieldMarkdown :text="questionTextDebounced" />
<QuestionFieldMarkdown :text="questionTextDebounced" :correct="undefined" />
</div>
</div>
<div class="flex flex-wrap gap-4 mb-8">
Expand Down

0 comments on commit a95bed4

Please sign in to comment.