query("SELECT * FROM quiz_attempts ORDER BY created_at DESC LIMIT 20"); $attempts = $stmt->fetchAll(); $total_attempts_stmt = $pdo->query("SELECT COUNT(*) as total FROM quiz_attempts"); $total_attempts = $total_attempts_stmt->fetch()['total']; $style_distribution_stmt = $pdo->query("SELECT primary_style, COUNT(*) as count FROM quiz_attempts GROUP BY primary_style"); $style_distribution = $style_distribution_stmt->fetchAll(PDO::FETCH_KEY_PAIR); $styles_info = [ 'v' => ['name' => 'Visual'], 'a' => ['name' => 'Auditory'], 'r' => ['name' => 'Read/Write'], 'k' => ['name' => 'Kinesthetic'], ]; ?>

Admin Dashboard

Total Attempts

Primary Style Distribution
$style): $count = $style_distribution[$key] ?? 0; $percentage = $total_styles > 0 ? ($count / $total_styles) * 100 : 0; ?>
%

Last 20 Quiz Attempts

Download Full Attempts CSV
ID Visual Auditory Read/Write Kinesthetic Primary Style Date

Admin Login