quiz resetc

This commit is contained in:
Krispire Admin
2026-10-15 20:59:53 +05:30
parent 4b38047c26
commit b1f78b1655
8 changed files with 70 additions and 7 deletions
@@ -0,0 +1,6 @@
-- quizzes:reset — delete one participant's attempt so the quiz is pending
-- for them again. Granted to the seeded Admin role (Superadmin has '*';
-- Moderator and custom roles get it only when a superadmin adds it).
UPDATE admin_roles
SET permissions = array_append(permissions, 'quizzes:reset')
WHERE key = 'admin' AND NOT ('quizzes:reset' = ANY(permissions));