let quizModuleData = { modules: [ { moduleId: 1, type: "Theory Quiz Scores", moduleName: "Module 1 - Life History of Dr. Maria Montessori", quizzes: [ { quizId: 1, quizName: "Lorem Ipsum Dolor Sit", attendQuestion: 48, totalQuestion: 50, internalMarks: 28, attendance: 20, questions: [ { questionId: 1, questionText: "What is the capital of France?", options: [ "Paris", "London", "Berlin", "Madrid" ], correctAnswer: "Paris" }, { questionId: 2, questionText: "What is 2 + 2?", options: [ "3", "4", "5", "6" ], correctAnswer: "4" }, { questionId: 3, questionText: "What is the boiling point of water?", options: [ "90°C", "100°C", "110°C", "120°C" ], correctAnswer: "100°C" }, { questionId: 4, questionText: "Who wrote 'To Kill a Mockingbird'?", options: [ "Harper Lee", "Mark Twain", "J.K. Rowling", "Ernest Hemingway" ], correctAnswer: "Harper Lee" }, { questionId: 5, questionText: "What is the largest planet in our solar system?", options: [ "Earth", "Mars", "Jupiter", "Saturn" ], correctAnswer: "Jupiter" }, { questionId: 6, questionText: "What is the speed of light?", options: [ "300,000 km/s", "150,000 km/s", "100,000 km/s", "50,000 km/s" ], correctAnswer: "300,000 km/s" }, { questionId: 7, questionText: "Who painted the Mona Lisa?", options: [ "Vincent van Gogh", "Pablo Picasso", "Leonardo da Vinci", "Claude Monet" ], correctAnswer: "Leonardo da Vinci" }, { questionId: 8, questionText: "What is the chemical symbol for gold?", options: [ "Au", "Ag", "Pt", "Pb" ], correctAnswer: "Au" }, { questionId: 9, questionText: "What is the tallest mountain in the world?", options: [ "K2", "Kangchenjunga", "Mount Everest", "Lhotse" ], correctAnswer: "Mount Everest" }, { questionId: 10, questionText: "What is the smallest unit of life?", options: [ "Cell", "Atom", "Molecule", "Organ" ], correctAnswer: "Cell" } ] }, { quizId: 2, quizName: "Lorem Ipsum Dolor Sit", attendQuestion: 45, totalQuestion: 50, internalMarks: 29, attendance: 20, questions: [ { questionId: 1, questionText: "What is the capital of Italy?", options: [ "Rome", "Venice", "Florence", "Milan" ], correctAnswer: "Rome" }, { questionId: 2, questionText: "What is 3 + 5?", options: [ "7", "8", "9", "10" ], correctAnswer: "8" }, { questionId: 3, questionText: "What is the freezing point of water?", options: [ "0°C", "32°C", "100°C", "273K" ], correctAnswer: "0°C" }, { questionId: 4, questionText: "Who wrote 'Pride and Prejudice'?", options: [ "Jane Austen", "Charles Dickens", "Emily Brontë", "George Eliot" ], correctAnswer: "Jane Austen" }, { questionId: 5, questionText: "What is the smallest planet in our solar system?", options: [ "Mercury", "Venus", "Earth", "Mars" ], correctAnswer: "Mercury" }, { questionId: 6, questionText: "What is the speed of sound?", options: [ "343 m/s", "300 m/s", "1500 m/s", "1000 m/s" ], correctAnswer: "343 m/s" }, { questionId: 7, questionText: "Who painted the Starry Night?", options: [ "Vincent van Gogh", "Pablo Picasso", "Leonardo da Vinci", "Claude Monet" ], correctAnswer: "Vincent van Gogh" }, { questionId: 8, questionText: "What is the chemical symbol for silver?", options: [ "Au", "Ag", "Pt", "Pb" ], correctAnswer: "Ag" }, { questionId: 9, questionText: "What is the second tallest mountain in the world?", options: [ "K2", "Kangchenjunga", "Mount Everest", "Lhotse" ], correctAnswer: "K2" }, { questionId: 10, questionText: "What is the largest organ in the human body?", options: [ "Liver", "Heart", "Skin", "Brain" ], correctAnswer: "Skin" } ] } ] }, { moduleId: 2, type: "Theory Quiz Scores", moduleName: "Module 2", attendQuestion: 42, totalQuestion: 50, internalMarks: 22, attendance: 20, quizzes: [ { quizId: 1, quizName: "Quiz 1", attendQuestion: 49, totalQuestion: 50, internalMarks: 2, attendance: 20, questions: [ { questionId: 1, questionText: "What is the capital of Germany?", options: [ "Berlin", "Munich", "Hamburg", "Frankfurt" ], correctAnswer: "Berlin" }, { questionId: 2, questionText: "What is 5 + 3?", options: [ "7", "8", "9", "10" ], correctAnswer: "8" }, { questionId: 3, questionText: "What is the melting point of ice?", options: [ "0°C", "32°C", "100°C", "273K" ], correctAnswer: "0°C" }, { questionId: 4, questionText: "Who wrote '1984'?", options: [ "George Orwell", "Aldous Huxley", "Ray Bradbury", "J.D. Salinger" ], correctAnswer: "George Orwell" }, { questionId: 5, questionText: "What is the second smallest planet in our solar system?", options: [ "Mercury", "Venus", "Earth", "Mars" ], correctAnswer: "Mars" }, { questionId: 6, questionText: "What is the speed of light in a vacuum?", options: [ "300,000 km/s", "150,000 km/s", "299,792 km/s", "299,792 m/s" ], correctAnswer: "299,792 km/s" }, { questionId: 7, questionText: "Who painted the Last Supper?", options: [ "Vincent van Gogh", "Pablo Picasso", "Leonardo da Vinci", "Claude Monet" ], correctAnswer: "Leonardo da Vinci" }, { questionId: 8, questionText: "What is the chemical symbol for iron?", options: [ "Fe", "Ir", "In", "I" ], correctAnswer: "Fe" }, { questionId: 9, questionText: "What is the third tallest mountain in the world?", options: [ "K2", "Kangchenjunga", "Mount Everest", "Lhotse" ], correctAnswer: "Kangchenjunga" }, { questionId: 10, questionText: "What is the smallest bone in the human body?", options: [ "Stapes", "Femur", "Tibia", "Fibula" ], correctAnswer: "Stapes" } ] } ] } ] } console.log(quizModuleData) import React, { useState } from 'react'; import { Modal } from 'antd'; export default function Index() { const [isModalOpen, setIsModalOpen] = useState(false); const [selectedQuiz, setSelectedQuiz] = useState(null); const showModal = (quiz) => { setSelectedQuiz(quiz); setIsModalOpen(true); }; const handleOk = () => { setIsModalOpen(false); setSelectedQuiz(null); }; const handleCancel = () => { setIsModalOpen(false); setSelectedQuiz(null); }; return (
{ quizModuleData.modules.map((moduleData) => (

{moduleData.type}

{moduleData.moduleName}

3/8 Quizzes Completed

{ moduleData.quizzes.map((quizData) => (
showModal(quizData)} className="flex flex-row justify-between place-items-center hover:bg-[#FFF4EA] duration-500 border-b-[1px] border-b-[#CFCFCF] p-6 cursor-pointer" key={quizData.quizId}>

#{quizData.quizId} {quizData.quizName}

Internal Marks: {quizData.internalMarks}  •   Attendance: {quizData.attendance}

{quizData.attendQuestion}/ {quizData.totalQuestion}

)) }
)) }
{selectedQuiz && (

18/10

Attendance

12 Questions

Attempted

12 Correct

Attempts

{selectedQuiz.questions.map((questionData) => (

Q{questionData.questionId}: {questionData.questionText}

Your Answer

{questionData.correctAnswer}

 Correct

{questionData.correctAnswer}

    {/* {questionData.options.map((option, index) => (
  • {option}
  • ))} */}
))}
)}
); }