Greetings

i'm going to work on project thats a script for MCQ quizzes

the requirements are:

1- the instructor can make quiz and save it to the database.
2- the instructor can select specific quiz from the database and allow the students to take it
3- the quiz should be with timer , that mean after like 10 minute of starting the quiz the quiz will be submitted automatically,note that not when the student start it but when the instructor allow the students to access to it
4-there will be login system when the student log in he will be able to take the quiz and the result for each student will be saved in the database.


my quistones , how you suggest the quizzes to be saved ?
i mean if the instructor want to make like 10 quizzes in the semester should it be stored in the DB in special table or every quiz will be in a table ?
and there most be friendly interface to create quiz will be used by instructor

give me some ideas about storing the quiz and retrieve only one specific quiz that instructor select so student can access it.

what is the time you think i'll need to finish such project i'm beginner in php but friend of me who is expert in php will help me.

do you people know any similar scripts ,open source so i can see it and take some ideas

thank You

Dani AI

Generated

Agree with : do not create one table per quiz. Use a small set of related tables and keep quiz data normalized so you can reuse questions, version quizzes, and run reports. Think of the timer as part of the quiz metadata (release time + duration) and enforce deadlines on the server — the client countdown is only UX. Plan autosave, atomic submit, and clear attempt states so partial work isn’t lost and students can’t game the clock.

A compact starting schema (minimal columns to illustrate relationships):

quizzes: id, title, release_at, duration_minutes, created_by, status
questions: id, quiz_id, position, text, type, points
choices: id, question_id, text, is_correct
attempts: id, user_id, quiz_id, started_at, submitted_at, status, score
answers: id, attempt_id, question_id, choice_id, answer_text, points_awarded

Practical implementation notes:

  • For your "timer starts when instructor opens it" case, set release_at and compute deadline = release_at + duration. When release_at passes create attempts (or let users open attempts but mark started_at = release_at) and reject submissions after deadline on the server.
  • Autosave answers frequently (AJAX every 10–30s) into answers so network drops don’t lose data. Use DB transactions when finalizing an attempt to prevent double-scoring. Consider a background job/cron to auto-submit or grade overdue attempts.
  • Support a question bank, randomization, preview/clone quiz, import/export (CSV/GIFT), and per-question point values so grading is flexible.

Security, QA and scope: use parameterized queries, store passwords with a modern hash (bcrypt/argon2), enable HTTPS, validate times server-side, and sanitize any rich text in questions. For a basic MVP with a helper you could have a working prototype in 2–4 weeks; a robust, production-ready system with autosave, import/export, reporting, and anti-cheat features is closer to 6–12 weeks. For design ideas study mature PHP projects such as Moodle, LimeSurvey, or TCExam.

Start with a clean database design which does not contain structural duplicates. You do not need one table for each quiz, but one table each for quizzes, questions, answers, users, users_and_answers.
First do all your database work and see if you store and retrieve all necessary info. Then move on to designing and implementing the interface.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.