Repository navigation
Exam generation: topic-based selection, delete, and unassign support - #169
Merged
Merged
Conversation
- Show all available topics (not just distinct categories) in exam generation form - Support generating exams from topic_ids in addition to categories - Add DELETE /instructor/exams endpoint to delete exams - Add DELETE /instructor/exams/unassign endpoint to unassign exams from students - Add GET /instructor/exams/topics endpoint returning all active topics - Update frontend to use topics, show delete/unassign buttons - Add tests for new handlers
…frontend JS - topicNamesFromIDs now resolves topic IDs via GetTopic for correct names - Replace no-op shuffle with rand.Shuffle in GetQuestionsByTopicIDs - Frontend: use module-level userId variable in unassign handler - Frontend: store _currentDetailExamName alongside _currentDetailExamId
Copilot
AI
changed the title
[WIP] Update exam generation to support multiple topics
Exam generation: topic-based selection, delete, and unassign support
Jul 15, 2026
kristofer
approved these changes
Jul 15, 2026
kristofer
marked this pull request as ready for review
July 15, 2026 19:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exam generation was limited to filtering by broad category values only, showed no way to target specific topics, and provided no mechanism to delete exams or remove assignments from individual students.
Backend
New
ExamRepositorymethods (interface + SQLiteDB + InMemoryDB):GetQuestionsByTopicIDs— filter questions by exact topic IDs instead of category stringsDeleteExam— delete exam with cascading removal of assignments/attemptsUnassignExamFromUser— remove a single exam assignment by exam+user IDUpdated
GenerateExamHandler— acceptstopic_ids []int(new) alongside existingcategories []string(backward compatible); derives exam display labels viatopicNamesFromIDsusing actual topic names from DB rather than tagsNew handlers + routes:
GET/instructor/exams/topicsDELETE/instructor/exams?exam_id={id}DELETE/instructor/exams/unassign?exam_id={id}&user_id={id}Frontend (
exams-page.js)/instructor/exams/topics), grouped by categorygenerateExam()sendstopic_idsinstead ofcategoriesTests
New API-level tests for all four new handlers including not-found error paths.