Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upDon't show the scholarship dropdown for new facilitators attending summer workshops #28252
Conversation
clareconstantine
added some commits
Apr 25, 2019
clareconstantine
requested review from
breville and
hacodeorg
Apr 26, 2019
hacodeorg
reviewed
Apr 29, 2019
| @@ -33,4 +34,10 @@ def pre_workshop_survey | |||
| def attendances | |||
| object.attendances.count | |||
| end | |||
|
|
|||
| def new_facilitator | |||
This comment has been minimized.
This comment has been minimized.
hacodeorg
Apr 29, 2019
Contributor
I'd suggest a better function name here. The function name is new facilitator which is quite generic, while it actually checks for very specific conditions accepted facilitator for current year summer workshop.
Another approach for your consideration, what we actually want to check is whether a person can have a scholarship or not. We could have a function like cannot_have_scholarship on the server side which returns an no_scholarship_reason message to client. The client will just display it if the message is non-empty. Otherwise, it will show the dropdown.
hacodeorg
reviewed
Apr 29, 2019
| @@ -103,6 +103,10 @@ export class WorkshopEnrollmentSchoolInfo extends React.Component { | |||
| } | |||
|
|
|||
| scholarshipInfo(enrollment) { | |||
| if (enrollment.new_facilitator) { | |||
This comment has been minimized.
This comment has been minimized.
hacodeorg
Apr 29, 2019
Contributor
This logic, certain facilitators cannot have scholarship, should live in model instead of UI component.
clareconstantine
added some commits
Apr 29, 2019
hacodeorg
reviewed
Apr 30, 2019
| @@ -0,0 +1,5 @@ | |||
| module Pd | |||
| module EnrollmentConstants | |||
| NO_NEW_FACILITATOR = "No (New Facilitator)" | |||
This comment has been minimized.
This comment has been minimized.
hacodeorg
Apr 30, 2019
Contributor
Suggest SCHOLARSHIP_INELIGIBLE_NEW_FACILITATOR. We will have constants with the same SCHOLARSHIP_INELIGIBLE_ prefix when we add more reasons to deny scholarship.
clareconstantine commentedApr 26, 2019
Another piece of PLC-165
New facilitators attend local summer workshops to observe and learn how to facilitate. This change hides the scholarship dropdown next to their name in the workshop dashboard, since facilitators do not receive scholarships.