Skip to content

E2601. Reimplement student quizzes#309

Open
MaybeNotArnav wants to merge 19 commits intoexpertiza:mainfrom
DevPatel1106:Reimp-Quiz
Open

E2601. Reimplement student quizzes#309
MaybeNotArnav wants to merge 19 commits intoexpertiza:mainfrom
DevPatel1106:Reimp-Quiz

Conversation

@MaybeNotArnav
Copy link
Copy Markdown

@MaybeNotArnav MaybeNotArnav commented Mar 23, 2026

Student Quiz Reimplementation

Implement ordered quiz→review task sequencing in StudentTasksController using polymorphic task objects (not quiz_required?/reviewer? conditionals), creating the necessary ResponseMap/Response pairs when both are required and routing both quiz and review through ResponsesController.

Implemented

  • Task ordering domain: Implemented/refactored TaskQueue, TaskFactory, and task types under app/models/task_ordering/ (incl. base_task.rb, quiz_task.rb, review_task.rb, task_queue.rb, task_factory.rb).
  • API/controller logic: Added/updated behavior in app/controllers/student_tasks_controller.rb and app/controllers/responses_controller.rb

Tested

  • RSpec model coverage for task ordering:
    • spec/models/task_ordering/base_task_spec.rb
    • spec/models/task_ordering/quiz_task_spec.rb
    • spec/models/task_ordering/review_task_spec.rb
    • spec/models/task_ordering/task_factory_spec.rb
    • spec/models/task_ordering/task_queue_spec.rb
  • RSpec request coverage for key endpoints:
    • spec/requests/api/v1/responses_controller_spec.rb
    • spec/requests/api/v1/student_tasks_controller_spec.rb
  • Fixtures/test support updated to keep tests reliable: test/fixtures/*, plus spec/spec_helper.rb / test/test_helper.rb as needed.

How to run tests

bundle exec rspec

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 23, 2026

4 Warnings
⚠️ Pull request is too big (more than 500 LoC).
⚠️ Pull request has duplicated commit messages.
⚠️ Pull request modifies markdown files (*.md). Make sure you have a good reason.
⚠️ Pull request modifies config or setup files: config/database.yml.

Generated by 🚫 Danger

MaybeNotArnav and others added 17 commits March 23, 2026 17:32
…f them pass!

run 'rails test' and you can see all 30 test cases passing!
run 'rails test' to test all files.
Feature/test cases has the Rspec testing done for the task_ordering/, student_tasks_controller, responses_controller files.
This reverts commit 6d0871f, reversing
changes made to 6a3bb7c.
…e in which the guidelines did not specifically tell us to do.
Rspec tests for student_task_controller, responses_controller, task_ordering/... files done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants