Added confirmation page for joining pd workshop sections.#9548
Merged
Conversation
Member
There was a problem hiding this comment.
So this basically means "return to me"?
Member
|
big change! lgtm |
Contributor
There was a problem hiding this comment.
s/TYPE_PD_WORKSHOP/PD_WORKSHOP
The name is already in an array called TYPES...
Contributor
Author
There was a problem hiding this comment.
Still, each constant is defined separately and is not referenced as a member of the container array. This pattern is a shorthand for:
TYPE_PD_WORKSHOP = 'pd_workshop'
TYPES = [TYPE_PD_WORKSHOP]I'm declaring TYPES as the list of all options for the validation, similar to here.
Unfortunately we can't refer to it as something like TYPES.PD_WORKSHOP. If we wanted that, we could use a hash of symbol keys instead of constants? Would this be preferable?
TYPES = {
pd_workshop: 'pd_workshop'
}
# referenced by
TYPES[:pd_workshop]2deb679 to
8bc1306
Compare
Contributor
Author
|
Updated with PR feedback and fixed the failing tests. PTAL |
Member
|
Second commit lgtm |
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.
Now, joining a workshop session behaves differently from joining a normal class section.
If an email exists for the user, it will be locked in this form, with a tooltip that it can be changed in account settings. However, if there is no email (student account, or former student account turned teacher before we required email) it will be open. Then, email is required, and the hash of the supplied email must match the user's hashed_email or it will display an error. Once it matches, the student user will be converted to teacher and the plaintext email set.
@breville FYI I moved the workshop enrollment form into a partial, shared by this and the existing new enrollment view. I also removed the requirement for enrollment.school until we can solidify that and require district, and I removed the * for district and school on the form since they are not actually required yet.