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
Default stage extras to 'yes' for express courses #27888
Conversation
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.
Apologies for the scary red 🔴 👻but I think there is a better way.
script && /course[1-4a-f]/.test(script.script_name) | ||
script && | ||
(/course[1-4a-f]/.test(script.script_name) || | ||
/express/.test(script.script_name)) |
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 approach makes me sad and will be difficult to maintain. this info should really live as a property in the script. then when we create copies for new version years, this property will be copied over, i.e. if express-2018 has the flag, and you create express-2019 from it, then express-2019 would already have the flag.
Could we please take this opportunity to clean this up? The stage_extras_available
property is already defined on many scripts, so all we would need to do is add it to the .script files for all the courses which currently match these regexes, and then remove this test.
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.
oh, perfect! i hadn't known about the stage_extras_available
property -- that's a much better way. i'll update and re-request review
@davidsbailey @dmcavoy i refactored this work with dave's suggestion, so please take a look! |
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.
Thank you for doing this refactor!
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.
Just want to check my understanding: After this goes in someone will need to go in and set stage_extras_available for the courses that we want this to default to yes? Also is it always true that if a script has stage extras available we would want it to default to yes? We use stage extras outside CSF.
Great catch Dani. Here are all the courses where we currently set it. I would definitely want to double check before enabling this for CSD:
|
if stage extras needs to be disabled for any scripts, I'd suggest doing so in this PR rather than separately going into levelbuilder, to try and avoid any timing issues if this PR were to reach production first. |
ooo, great point. i'll check with stakeholders to see if this list of scripts is okay to have stage extras turned on by default. @dmcavoy re: your question...
yes, that's correct -- any script that should have stage extras enabled by default should set stage_extras_available in levelbuilder |
FWIW, this setting should get copied over by default when cloning scripts, so e.g. coursea-2020 and similar will not need to have this set manually. |
@mrjoshida confirmed that it's okay to enable stage extras by default for the above CSD scripts, so i think we're good to go |
LP-154
Sets stage extras to "yes" by default for express courses (was previously only defaulting to "yes" for courses 1-4 and a-f).
Note: Since we are now using the
stage_extras_available
set on scripts in levelbuilder, any script that has this property set to true will have stage extras enabled by default.