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
Link from workshop view to survey results view #34417
Conversation
return null; | ||
} | ||
|
||
return course === 'CS Fundamentals' && subject === 'Intro' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@molly-moen For CSF Intro, when are we going to switch over to the new survey?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
our current target is mid-May
return course === 'CS Fundamentals' && subject === 'Intro' | ||
? `/pd/workshop_dashboard/survey_results/${workshopId}` | ||
: `/pd/workshop_dashboard/daily_survey_results/${workshopId}`; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this logic already exist someplace in our Rails application? If not, I think it's okay to add it here for now, but it'd be nice to consolidate knowledge of routes to the server and pass them down as needed. Or even better - have only one "workshop survey results" route that worked for all workshop types. 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generic route is where we're heading toward. Once CSF Intro workshops also use the new survey form, all survey requests will be consolidated to 1 endpoint. Other survey view routes are legacy and can be removed.
For now the generic server endpoint is
code-dot-org/dashboard/app/controllers/api/v1/pd/workshop_survey_report_controller.rb
Lines 113 to 122 in 8e9145b
def generic_survey_report | |
# 2 separate routes for CSF deep dive (201) workshop and summer/academic year workshop. | |
# We don't compute survey result roll-up for CSF deep dive. | |
return create_csf_survey_report if @workshop.csf? && @workshop.subject == SUBJECT_CSF_201 | |
return create_generic_survey_report if [COURSE_CSP, COURSE_CSD].include?(@workshop.course) | |
raise 'Action generic_survey_report should not be used for this workshop' | |
rescue => e | |
notify_error e | |
end |
but later it will be in the Foorm system
code-dot-org/dashboard/app/controllers/api/v1/pd/workshop_survey_foorm_report_controller.rb
Lines 6 to 9 in 3cce2fe
def generic_survey_report | |
report = Pd::Foorm::SurveyReporter.get_workshop_report(params[:workshop_id]) | |
render json: report | |
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will be in a different case for a while where some surveys will be using foorm and others using jotform, which will have different view urls most likely. So we may need to keep this if/else around (with different conditions) for a while.
PLC-758: Adds a button to open workshop survey results view (in a new tab) from workshop detail view.
The button is in the Enrollment panel of the workshop view where we also show pre-workshop survey results. It only appears for in-progress/ended CSF/CSD/CSP workshops.
Links
Examples
Workshop dashboard: https://studio.code.org/pd/workshop_dashboard/workshops/
Workshop detail view: https://studio.code.org/pd/workshop_dashboard/workshops/8326
Testing story
Manual test: Created workshops with different types and different states in dev environment. Verified that the view-survey-results button appear and open correct links.
Reviewer Checklist: