Skip to content
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

Merged
merged 3 commits into from
Jan 15, 2015
Merged

Conversation

andrewwuan
Copy link
Member

Also fix a bug that school, major, and year are skipped

@dlbucci
Copy link
Member

dlbucci commented Jan 15, 2015

What do all the various colors mean?

@icanb
Copy link
Member

icanb commented Jan 15, 2015

Are those exceptions defined somewhere? (eg. GreenCUDExistInCourseException)

@andrewwuan
Copy link
Member Author

@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

@andrewwuan
Copy link
Member Author

@icanberk Nope.. I'll change them to string style

@icanb
Copy link
Member

icanb commented Jan 15, 2015

Can we also add that as a comment somewhere in the code?

@dlbucci
Copy link
Member

dlbucci commented Jan 15, 2015

And has this been tested? We do not want this feature breaking.

@andrewwuan
Copy link
Member Author

@dlbucci Yep it has been tested

@andrewwuan
Copy link
Member Author

@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
Copy link
Member

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?)

Copy link
Member Author

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

@dlbucci
Copy link
Member

dlbucci commented Jan 15, 2015

Do we also need to add a rescue somewhere? From what I can tell, it's a different mechanism from try/catch.

@andrewwuan
Copy link
Member Author

@dlbucci The whole transaction block has a rescue statement at the end

icanb pushed a commit that referenced this pull request Jan 15, 2015
update user information when uploading roster
@icanb icanb merged commit 4959a73 into master Jan 15, 2015
@icanb icanb deleted the uploadRoster_fix branch January 15, 2015 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants