Skip to content

Commit d74e3e9

Browse files
authored
Merge pull request #66 from RemiSaurel/ysen/additional-informations
Fix #61
2 parents ac20f89 + 8fa0140 commit d74e3e9

20 files changed

Lines changed: 997 additions & 341 deletions

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ Datasets should be provided as a JSON object with the following structure:
101101
"studentName": "Alice Johnson",
102102
"submissionTime": "2025-01-14T10:00:00Z",
103103
"attempt": "1"
104+
},
105+
"aiEvaluation": {
106+
"score": 10,
107+
"justification": "Correct and precise answer"
104108
}
105109
}
106110
]
@@ -125,6 +129,11 @@ Datasets should be provided as a JSON object with the following structure:
125129
- `submittedAnswer`: The student's submitted answer
126130
- `context`: Optional metadata (supports string and string[] values for better display)
127131

132+
**AI Evaluation Item Field:**
133+
- `aiEvaluation`: Optional - contains the AI evaluation result
134+
- `score`: Integer between 0 and 10
135+
- `justification`: Explanation of the assigned score (string)
136+
128137
### Evaluating Questions
129138

130139
1. Open an evaluation session

app/components/ConfirmationModal.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ function handleAction(action: ConfirmationModalAction) {
4949
:close="close"
5050
:dismissible="dismissible"
5151
>
52-
<slot />
52+
<div @keydown.stop>
53+
<slot />
54+
</div>
5355

5456
<template #footer>
55-
<div class="flex flex-wrap justify-end gap-2">
57+
<div class="flex flex-wrap justify-end gap-2" @keydown.stop>
5658
<UButton
5759
v-for="(action, index) in actions"
5860
:key="`${action.label}-${index}`"

app/components/EvaluationConfigModal.vue

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,20 @@ watch([isOpen, masteryLevelsList], async ([isOpenNow, list]) => {
164164
sortableInstance.value = null
165165
}
166166
})
167+
168+
// List of evaluation modes
169+
const evaluationModes = computed(() => [
170+
{ label: t('configuration.modal.modes.withoutAi'), value: 'without-ai' },
171+
{ label: t('configuration.modal.modes.withAi'), value: 'with-ai' },
172+
{ label: t('configuration.modal.modes.withoutThenWithAi'), value: 'without-then-with-ai' },
173+
])
174+
175+
// Ensure a default evaluation mode is set when a local config is initialized
176+
watch(() => localConfig.value, (cfg) => {
177+
if (cfg && !cfg.settings.evaluationMode) {
178+
cfg.settings.evaluationMode = 'without-ai'
179+
}
180+
}, { immediate: true })
167181
</script>
168182

169183
<template>
@@ -401,6 +415,20 @@ watch([isOpen, masteryLevelsList], async ([isOpenNow, list]) => {
401415
:label="t('configuration.modal.fields.addTimer')"
402416
/>
403417
</div>
418+
419+
<div class="flex items-center gap-2">
420+
<UIcon name="i-lucide:bot" class="w-5 h-5 text-primary-500" />
421+
<h5 class="font-medium">
422+
{{ t('configuration.modal.evaluationMode') }}
423+
</h5>
424+
</div>
425+
426+
<div class="space-y-3">
427+
<URadioGroup
428+
v-model="localConfig.settings.evaluationMode"
429+
:items="evaluationModes"
430+
/>
431+
</div>
404432
</div>
405433
</template>
406434
</UTabs>

app/components/EvaluationConfigViewModal.vue

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const isOpen = computed({
2323
const typeMeta = computed(() => {
2424
if (!props.config)
2525
return null
26-
return getEvaluationTypeMeta(props.config.type as any)
26+
return getEvaluationTypeMeta(props.config.type)
2727
})
2828
2929
function close() {
@@ -232,6 +232,25 @@ function close() {
232232
</div>
233233
</div>
234234

235+
<!-- Timer Settings -->
236+
<div class="space-y-3">
237+
<USeparator />
238+
<div class="flex items-center gap-2">
239+
<UIcon name="i-lucide:timer" class="w-5 h-5 text-primary-500" />
240+
<h5 class="text-sm font-medium text-neutral-700">
241+
{{ t('configuration.modal.fields.timerSettings') }}
242+
</h5>
243+
</div>
244+
245+
<div class="flex items-center gap-2">
246+
<UIcon
247+
:name="config.settings.timerEnabled ? 'i-lucide:check' : 'i-lucide:x'"
248+
:class="config.settings.timerEnabled ? 'text-green-600' : 'text-neutral-400'"
249+
/>
250+
<span class="text-sm">{{ t('configuration.modal.fields.addTimer') }}</span>
251+
</div>
252+
</div>
253+
235254
<!-- Metadata -->
236255
<div class="space-y-3">
237256
<USeparator />

app/components/EvaluationNavigator.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import type { EvaluationItem } from '~/models'
2+
import type { EvaluatedItem, EvaluationItem } from '~/models'
33
44
const props = defineProps<{
55
isSingleEvaluation: boolean
@@ -8,9 +8,7 @@ const props = defineProps<{
88
currentItemGroup: readonly EvaluationItem[]
99
currentGroupIndex: number
1010
currentItemIndexInGroup: number
11-
evaluatedItems: {
12-
[itemId: string]: { value?: any, masteryLevel?: string, comment?: string }
13-
}
11+
evaluatedItems: Record<string, EvaluatedItem>
1412
onNavigate: (groupIndex: number, itemIndexInGroup: number) => void
1513
goToPrevious: () => void
1614
goToNext: () => void

0 commit comments

Comments
 (0)