Use affiliations to define active/inactive status - #21
Conversation
awilfox
left a comment
There was a problem hiding this comment.
r+ looks good to me. I did have a minor suggestion on a way to simplify the logic of sis_expire_date but it's completely optional!
| return create_expected_end_date if [5, 8, 12].include? Date.today.month | ||
| return Date.today.to_s if withcncl && withcncl == 'CAN' | ||
| return Date.today.to_s if active_student == false | ||
|
|
||
| create_expected_end_date |
There was a problem hiding this comment.
Since the same value is used twice here, I wonder if we could simplify the logic a bit:
unless [5, 8, 12].include? Date.today.month
return Date.today.to_s if active_student == false
end
create_expected_end_dateIt doesn't reduce the lines of code, but it does reduce the number of return points. I don't know if it's worth making that change now, or separately, or even not at all.
There was a problem hiding this comment.
Rubocop didn't like the alternative, and after going over it a bit, even though it has the reduced number of return points, I like the way the original reads a little more naturally. (and I'm lobbying to eventually change that exclusion scenario - it's a bit odd... we'd expire inactive students on April 30th and then un-expire them the following week.)
Change how we definite an active student to use any affiliation with an 'active' status other than 'ALUMFOREVER'