From 0f9fe71e6be2e9456bd385d326c9aa5b4fdca86a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Fri, 17 Oct 2025 21:31:31 +0300 Subject: [PATCH] =?UTF-8?q?Question=20Entity=20ve=20d=C3=BCzenlemeler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/mocks/mockPools.ts | 7 ++----- .../views/coordinator/ExamInterface/ExamInterface.tsx | 6 +++--- .../coordinator/ExamInterface/PDFTestInterface.tsx | 10 +++++----- .../coordinator/ExamInterface/QuestionRenderer.tsx | 4 ++-- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/ui/src/mocks/mockPools.ts b/ui/src/mocks/mockPools.ts index b820c12f..139f88f6 100644 --- a/ui/src/mocks/mockPools.ts +++ b/ui/src/mocks/mockPools.ts @@ -9,7 +9,7 @@ export const generateMockPools = (): QuestionPoolDto[] => [ questions: [ { id: "q1", - type: "multiple-choice", + questionType: "multiple-choice", title: "Verb Tenses", content: "Select the appropriate tense form for the given context.", options: [ @@ -21,26 +21,23 @@ export const generateMockPools = (): QuestionPoolDto[] => [ correctAnswer: "opt2", points: 10, difficulty: "easy", - tags: ["grammar", "verbs"], creationTime: new Date(), lastModificationTime: new Date(), }, { id: "q2", - type: "fill-blank", + questionType: "fill-blank", title: "Articles", content: 'Fill in the blank: "I saw _____ elephant at the zoo yesterday."', correctAnswer: "an", points: 15, difficulty: "medium", - tags: ["grammar", "articles"], creationTime: new Date(), lastModificationTime: new Date(), }, ], tags: ["grammar", "fundamentals"], - createdBy: "admin", creationTime: new Date(), }, ]; diff --git a/ui/src/views/coordinator/ExamInterface/ExamInterface.tsx b/ui/src/views/coordinator/ExamInterface/ExamInterface.tsx index 2229e7dc..01325ac4 100644 --- a/ui/src/views/coordinator/ExamInterface/ExamInterface.tsx +++ b/ui/src/views/coordinator/ExamInterface/ExamInterface.tsx @@ -150,7 +150,7 @@ const ExamInterface: React.FC = () => { const currentQuestion = exam.questions[currentQuestionIndex] const currentAnswer = session.answers.find((a) => a.questionId === currentQuestion?.id) - + const navigateQuestion = (direction: 'next' | 'prev' | number) => { if (typeof direction === 'number') { setCurrentQuestionIndex(Math.max(0, Math.min(exam.questions.length - 1, direction))) @@ -206,7 +206,7 @@ const ExamInterface: React.FC = () => { {/* Header */}
-
+

{exam.title}

@@ -228,7 +228,7 @@ const ExamInterface: React.FC = () => {

{/* Main Content */} -
+
{/* Question Content */}
diff --git a/ui/src/views/coordinator/ExamInterface/PDFTestInterface.tsx b/ui/src/views/coordinator/ExamInterface/PDFTestInterface.tsx index db0a65ef..6523a5f2 100644 --- a/ui/src/views/coordinator/ExamInterface/PDFTestInterface.tsx +++ b/ui/src/views/coordinator/ExamInterface/PDFTestInterface.tsx @@ -272,7 +272,7 @@ const PDFTestInterface: React.FC = () => { {/* Header */}
-
+

{exam.title}

@@ -294,10 +294,10 @@ const PDFTestInterface: React.FC = () => {

{/* Main Content */} -
-
+
+
{/* Document Viewer */} -
+
{exam.testDocument?.type === 'pdf' ? ( @@ -327,7 +327,7 @@ const PDFTestInterface: React.FC = () => {
{/* Answer Key */} -
+

Cevap Anahtarı

diff --git a/ui/src/views/coordinator/ExamInterface/QuestionRenderer.tsx b/ui/src/views/coordinator/ExamInterface/QuestionRenderer.tsx index a49d8476..46318f5c 100644 --- a/ui/src/views/coordinator/ExamInterface/QuestionRenderer.tsx +++ b/ui/src/views/coordinator/ExamInterface/QuestionRenderer.tsx @@ -104,7 +104,7 @@ export const QuestionRenderer: React.FC = ({ ); }; -const getQuestionTypeLabel = (type: string): string => { +const getQuestionTypeLabel = (questionType: string): string => { const labels: Record = { 'multiple-choice': 'Çoktan Seçmeli', 'fill-blank': 'Boşluk Doldurma', @@ -115,7 +115,7 @@ const getQuestionTypeLabel = (type: string): string => { 'ordering': 'Sıralama', 'calculation': 'Hesaplama' }; - return labels[type] || type; + return labels[questionType] || questionType; }; const getDifficultyLabel = (difficulty: string): string => {