Student Tutorial Self-Enrollment Feature#79
Open
JosephKS10 wants to merge 9 commits intothoth-tech:9.xfrom
Open
Student Tutorial Self-Enrollment Feature#79JosephKS10 wants to merge 9 commits intothoth-tech:9.xfrom
JosephKS10 wants to merge 9 commits intothoth-tech:9.xfrom
Conversation
Task 1: Add tutorial self enrolment columns and indexes to task_defin…
…odel_update Student self enrolment active model update
…ty_update Student self enrolment api entity update
API Controller Implementation for student self enrolment
gauravmyana2002
approved these changes
Sep 24, 2025
gauravmyana2002
left a comment
There was a problem hiding this comment.
The code looks good and all the features are working.
nouri-devv
approved these changes
Sep 28, 2025
nouri-devv
left a comment
There was a problem hiding this comment.
I ran this code and it looks good.
ibi420
approved these changes
Sep 28, 2025
ibi420
left a comment
There was a problem hiding this comment.
Hey, looking through this, it looks good, the code is well implemented and works as expected. Good job on this
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.
Description
This PR implements a comprehensive Student Tutorial Self-Enrollment feature for the OnTrack/Doubtfire API, enabling students to self-enroll in tutorials for specific tasks. This feature enhances user autonomy and reduces administrative overhead while maintaining proper authorization and validation controls.
The implementation consists of four integrated components delivered through a systematic development approach:
1. Database Schema Foundation (Task 1)
20250912012227_add_tutorial_self_enrolment_to_task_definitions.rbtutorial_self_enrolment_enabled(boolean, default: false) - Feature toggle flagtutorial_self_enrolment_stream_id(foreign key to tutorial_streams) - Target stream for enrollment2. ActiveRecord Model Updates (Task 2)
TaskDefinition Model Enhancements:
tutorial_self_enrolment_streamself_enrolment_stream_unit_must_matchtutorial_self_enrolment_enabled?available_tutorials_for_self_enrolmentTutorialStream Model Updates:
Comprehensive Testing: Model validation tests ensure data integrity
3. API Entity Exposure (Task 3)
TaskDefinitionEntity Updates:
Frontend Integration: API entities provide necessary data for frontend implementation
Testing Coverage: API entity tests verify correct field exposure
4. Complete API Controller Implementation (Task 4)
New API Controller: StudentTutorialEnrolmentApi
TaskDefinitionsApi Updates:
Added support for tutorial_self_enrolment_enabled parameter
Added support for tutorial_self_enrolment_stream_abbr parameter
Enhanced upload_requirements handling with improved JSON parsing
Authorization & Validation:
Type of change
How Has This Been Tested?
Comprehensive Test Suite
Model Tests (
test/models/task_definition_test.rb,test/models/task_definition_self_enrolment_test.rb):API Tests (
test/api/student_tutorial_enrolment_api_test.rb,test/api/tasks_api_test.rb):Manual Testing
Database Migration: Successfully runs rails db:migrate with no conflicts
Checklist:
If you have any questions, please contact @macite or @jakerenzella.