Open
Conversation
- Implemented user_to_courses_controller.rb with role-based authorization - PATCH endpoint to toggle allow_extended_requests on enrollments - Authorization: only teachers can toggle - Uses lms_id FK pattern from LMS credentials refactoring - Added teacher? method to UserToCourse model for role checking - Complete spec with 7 test scenarios (instructor, student, missing resources) - All tests passing: 365 examples, 0 failures, 80.88% coverage
gobears01
reviewed
Mar 9, 2026
| @@ -1 +1 @@ | |||
| ruby 3.3.8 | |||
There was a problem hiding this comment.
We don't need to change the ruby version. 3.3 seems to work well in production
| gem 'lograge' | ||
|
|
||
| # Environment variable management | ||
| gem 'dotenv-rails', require: 'dotenv/load' |
There was a problem hiding this comment.
These are specific for development environment
| diff-lcs (1.6.2) | ||
| docile (1.4.1) | ||
| domain_name (0.6.20240107) | ||
| dotenv (3.2.0) |
There was a problem hiding this comment.
These are specific for development environment
| cucumber-rails | ||
| database_cleaner-active_record | ||
| debug | ||
| dotenv-rails |
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.
General Info
CDSS issue: berkeley-cdss#304
Changes
New controller with role based auth
Added
teacher?method toUserToCoursemodel for role checkingUses proper foreign key instead of possibly invalid string LMS references
LMS information can be centralized in the LMS table and changes now occur in a single place
Testing
Run the full rspec test suite to test for changes
Documentation
No documentation needed
Checklist