-
Notifications
You must be signed in to change notification settings - Fork 219
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
update user information when uploading roster #93
Conversation
What do all the various colors mean? |
Are those exceptions defined somewhere? (eg. GreenCUDExistInCourseException) |
@dlbucci Colors are visual aid for uploadRoster page. Green means that roster contains new users, red means that user is going to be dropped, and black means that user exists before |
@icanberk Nope.. I'll change them to string style |
Can we also add that as a comment somewhere in the code? |
And has this been tested? We do not want this feature breaking. |
@dlbucci Yep it has been tested |
@icanberk added |
end | ||
|
||
# Make sure this user doesn't have a cud in the course | ||
if (@course.course_user_data.where(user: user).first) | ||
throw NewUserExistInCourseException | ||
throw GreenCUDExistInCourseException |
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.
And here. (As a side note, Ruby has a raise and a throw? WTF? What hasn't this language absorbed from every other language ever?)
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.
Yep it has raise/rescue and throw/catch. Since throw was used before I made the change I didn't look it up and just used throw... my bad
Do we also need to add a rescue somewhere? From what I can tell, it's a different mechanism from try/catch. |
@dlbucci The whole transaction block has a rescue statement at the end |
update user information when uploading roster
Also fix a bug that school, major, and year are skipped