-
Notifications
You must be signed in to change notification settings - Fork 220
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 faulty nil checks #2139
Fixed faulty nil checks #2139
Conversation
WalkthroughWalkthroughThe recent changes enhance error handling and user interaction in specific controller actions. Notably, methods now check for the presence of records before performing actions, providing clear error messages and redirection when records are not found. Some methods, like Changes
Sequence Diagram(s)Updated
|
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.
to be honest don't know how to check scheduler either but otherwise looks good to me! If you could remove the unused code that would be good.
Description
.find
instead of.find_by
Motivation and Context
It prevents the website from responding with ruby errors, and redirects users to valid website and shows them their error.
Issue #2128
How Has This Been Tested?
grading.rb
/courses/:course_name/assessments/:assessment_name/score_grader_info/:id
with an invalid id and made sure it redirects the user back to the assessment pagecourse_user_data_controller.rb
/course/:course_name/course_user_data/:id
with a valid id and made sure that it showed the user/course/:course_name/course_user_data/:id
with an invalid id and made sure that it went back to the user list with the correct errorcourses_controller.rb
groups_controller.rb
users_controller.rb
/users
and checked there are users/users/:id
with valid user id and checked that it shows the user/users/:id
with an invalid user id and check that it goes back to /usersschedulers_controller.rb
,lti_nrps_controller.rb
,updateGradebook.rb
Types of changes
Checklist:
overcommit --install && overcommit --sign
to use pre-commit hook for lintingOther issues / help required
I need some help on testing
schedulers_controller.rb
,lti_nrps_controller.rb
,updateGradebook.rb
.