| Version 1 (modified by , 15 hours ago) ( diff ) |
|---|
Taking a Quiz
Actors: Registered User (USER)
1. Load Quiz for a Lesson.
SELECT quiz_id, total_points, passing_score FROM quiz WHERE lesson_id = :lessonId;
2. Store Quiz Attempt.
INSERT INTO quiz_attempt (score, attempt_date, user_id, quiz_id) VALUES (:score, CURRENT_DATE, :userId, :quizId);
3. Check Quiz Result.
SELECT CASE
WHEN :score >= passing_score THEN 'PASSED'
ELSE 'FAILED'
END AS result
FROM quiz
WHERE quiz_id = :quizId;
Note:
See TracWiki
for help on using the wiki.
