Overview
ClassQuiz features a public quiz marketplace where users can discover quizzes created by others, share their own quizzes with the community, and rate quizzes they’ve tried. This creates a collaborative ecosystem of educational content.Public vs Private Quizzes
Privacy Settings
Every quiz has apublic boolean field that determines visibility:
Private Quizzes
Default Setting
- Only visible to quiz creator
- Not searchable
- Not indexed in Meilisearch
- Can be used in live games
- Can be edited freely
Public Quizzes
Community Shared
- Visible to all users
- Searchable in marketplace
- Indexed in Meilisearch
- Anyone can start games with them
- Can be rated by community
- Tracked with views, plays, likes
Making a Quiz Public
When you setpublic: true in the editor:
-
Indexing: Quiz is indexed in Meilisearch for search (classquiz/routers/editor.py:166)
-
Visibility: Quiz appears in
/exploreand search results - Analytics: System starts tracking views, plays, likes, and dislikes
- Rating: Users can rate the quiz
Discovering Public Quizzes
Explore Page
The explore page (/explore) displays all public quizzes using Meilisearch.
Frontend implementation (frontend/src/routes/explore/+page.svelte):
- Title and description
- Cover image (if set)
- Creator username
- View count
- Like/dislike ratio
- Number of times played
Search Functionality
Quizzes are searchable by:- Title
- Description
- Creator name
- Question content
Getting Public Quiz Details
Retrieve full details of a public quiz (classquiz/routers/quiz.py:66):Every time someone views a public quiz, the view count increments. This helps identify popular quizzes.
Quiz Analytics
Tracked Metrics
Public quizzes track four key metrics (classquiz/db/models.py:197):- Views
- Plays
- Likes
- Dislikes
View CountIncremented when:
- Someone opens the public quiz page
- API endpoint
/api/v1/quiz/get/public/{quiz_id}is called
Rating System
Rating a Quiz
Users can rate any public quiz (classquiz/routers/community.py:60):Rating Model
Ratings are stored in the database (classquiz/db/models.py:557):Rating Logic
The rating endpoint handles multiple scenarios (classquiz/routers/community.py:61):First-time rating
First-time rating
User has never rated this quiz:
- Create new rating
- Increment likes or dislikes
Duplicate rating
Duplicate rating
User already submitted the same rating:
- Return 409 error
- No changes to counts
Changing rating
Changing rating
User switching from like to dislike or vice versa:
- Delete old rating
- Decrement old count
- Create new rating
- Increment new count
User Profiles
View User Profile
Get basic user information (classquiz/routers/community.py:20):View User’s Quizzes
Get all public quizzes by a user (classquiz/routers/community.py:33):imported(boolean): Filter out imported quizzes
Question content is excluded from the list view for performance. Get full details via the individual quiz endpoint.
Moderation
Moderation Rating
Quizzes can receive a moderation rating (classquiz/db/models.py:201):Content Guidelines
All quiz content should:- Be appropriate for educational use
- Not contain offensive material
- Respect intellectual property
- Follow platform terms of service
Imported Quizzes
Kahoot Imports
Quizzes imported from Kahoot are marked specially (classquiz/db/models.py:192):- Can be made public
- Are marked with import attribution
- Can be filtered out in user profile views
- Store original Kahoot ID for reference
Search Integration
Meilisearch Indexing
When a quiz is made public, it’s indexed for search:get_meili_data() helper extracts searchable fields:
- Title
- Description
- Creator username
- Question text
- Tags/metadata
Updating Search Index
When editing a public quiz (classquiz/routers/editor.py:130):Deleting from Index
When a quiz is deleted (classquiz/routers/quiz.py:220):Best Practices
Quality Over Quantity
Create polished, well-tested quizzes before making them public
Descriptive Metadata
Write clear titles and descriptions to help users find your quiz
Appropriate Content
Ensure content is educational and appropriate for public sharing
Engage with Ratings
Check your quiz ratings and improve based on community feedback
Community Engagement Tips
Creating Popular Quizzes
Choose Relevant Topics
Create quizzes on subjects with high demand (common curriculum topics, popular interests)
Building a Portfolio
- Create series of related quizzes
- Maintain consistent quality
- Update quizzes based on feedback
- Share your profile link with students/colleagues
Privacy & Sharing
What’s shared when a quiz is public:
- Quiz title, description, and questions
- Your username (as creator)
- Creation and update dates
- Cover and background images
- Your email address
- Your full account details
- Private quizzes
- Game results (always private to host)