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
make script level checkboxes on lesson edit page work in UI tests #37641
Conversation
67098bc
to
6a22030
Compare
@@ -223,7 +223,7 @@ def summarize(include_bonus_levels = false) | |||
title: localized_title, | |||
lesson_group_display_name: lesson_group&.localized_display_name, | |||
lockable: !!lockable, | |||
levels: cached_levels.map {|l| l.summarize(false)}, | |||
levels: cached_levels.map {|sl| sl.summarize(false, for_edit: for_edit)}, |
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.
note: we should no longer have to pass in for_edit
here after PLAT-460 is done.
95115bd
to
e2f52d0
Compare
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.
This looks good to me.
Is there something special about this call to Rails.application.config.levelbuilder_mode
because there are other places like in the update_text method for script.rb where I have also seen it called.
Good question :-) Yes. Heads up @molly-moen in case there are any places you need to use |
I decided to do this because this line looked like a problem waiting to happen:
code-dot-org/dashboard/app/models/script_level.rb
Line 401 in 1649206
What this PR does:
summarize_for_edit
tosummarize_for_lesson_edit
for activity, activity section and script levelFuture work
Ideally we would extract
summarize_for_script_edit
methods for lesson and script level, however since that extraction looked messy and we won't have script levels on the script edit page after PLAT-460 anyway, it seemed better to stop short of doing that work.Testing story
Reviewer Checklist: