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

Fix: Workshops without subjects have exit surveys #29718

Merged
merged 1 commit into from Jul 16, 2019

Conversation

islemaster
Copy link
Contributor

In particular, workshops with a NULL subject will still be included in the with_surveys enrollment scope, and therefore will remind about pending exit surveys on the professional learning landing page.

Fixes a regression introduced in #29511 when I added a condition to the with_surveys scope, not realizing it would implicitly exclude null values as well.

Did some work to evaluate impact, and it looks like we've had no workshops with NULL subject end in the week or so since I introduced this regression, so overall impact is near-zero. Still, I'd like to get it fixed before I move on to disabling exit surveys for Facilitator workshops (which also have a NULL subject).

In particular, workshops with a `NULL` subject will still be included in
the `with_surveys` enrollment scope, and therefore will remind about
pending exit surveys on the professional learning landing page.

Fixes a regression introduced in
#29511 when I added a
condition to the `with_surveys` scope, not realizing it would implicitly
exclude null values as well.

Did some work to evaluate impact, and it looks like we've had no
workshops with `NULL` subject end in the week or so since I introduced
this regression, so overall impact is near-zero.  Still, I'd like to get
it fixed before I move on to disabling exit surveys for Facilitator
workshops (which also have a `NULL` subject).
@@ -120,7 +120,11 @@ def self.for_school_district(school_district)
# Except for FiT workshops - no exit surveys for them!
# This scope is used in ProfessionalLearningLandingController to direct the teacher
# to their latest pending survey.
scope :with_surveys, -> {for_ended_workshops.attended.where.not(pd_workshops: {subject: SUBJECT_FIT})}
scope :with_surveys, (lambda do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious: is the switch to lambda purely to get multi-line code support?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah; Rubocop prefers curlies for one-lines, and do ... end for multiline, and it turns out lambda syntax is tied to one or the other.

@islemaster islemaster requested a review from agealy July 16, 2019 00:54
@islemaster islemaster merged commit 3e0411e into staging Jul 16, 2019
@fisher-alice fisher-alice deleted the admin-exit-surveys branch July 13, 2022 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants