-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed LTI duplicate roster error #2213
Conversation
📝 WalkthroughWalkthroughWalkthroughThe changes enhance the handling of warnings during roster uploads in the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CoursesController
participant Roster
User->>CoursesController: Upload roster
CoursesController->>Roster: Process roster data
Roster-->>CoursesController: Return warnings/errors
CoursesController->>CoursesController: Check for warnings
alt Warnings exist
CoursesController->>User: Display warnings
end
alt Errors exist
CoursesController->>User: Display errors
end
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 RuboCop (1.69.1)app/controllers/courses_controller.rbError: No such file or directory: /app/controllers/courses_controller.rb 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- app/controllers/courses_controller.rb (4 hunks)
Additional comments not posted (1)
app/controllers/courses_controller.rb (1)
556-559
: LGTM: Successfully implemented roster warning systemThe changes successfully implement a warning system for roster uploads, focusing on detecting and reporting duplicate email addresses. This aligns well with the PR objectives of allowing roster synchronization to proceed while alerting users to potential issues.
Key improvements:
- Added a mechanism to collect and store warnings during the roster processing.
- Implemented specific handling for duplicate email warnings.
- Added logic to display warnings to the user after roster upload.
The implementation is sound and doesn't introduce any apparent bugs or issues. However, there are opportunities for minor improvements in naming conventions and error/warning handling, as mentioned in the previous comments.
Overall, this change enhances the user experience by providing more informative feedback during the roster upload process.
Also applies to: 805-805, 953-957, 960-961
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me, verified behavior on both roster upload and LTI roster sync
An error occurs when we have a roster with duplicate email addresses, so changed it to only a warning.
Description
Before: When we sync the roster to a LTI course that has duplicate users, an error occured.

After: When we sync the roster, the sync works, but a warning is produced.
Motivation and Context
The LTI Test Course has duplicate users, and the roster sync was failing.
How Has This Been Tested?
I created a new course in my development environment, and linked the LTI test course, and synced the roster.

Types of changes
Checklist:
overcommit --install && overcommit --sign
to use pre-commit hook for lintingOther issues / help required
If unsure, feel free to submit first and we'll help you along.