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

Import code docs where their content was proxied #45098

Merged
merged 1 commit into from
Mar 3, 2022

Conversation

bethanyaconnor
Copy link
Contributor

@bethanyaconnor bethanyaconnor commented Mar 1, 2022

These code docs had their content proxied from another code doc on curriculumbuilder. We're not keeping that feature so I'm doing a quick one-off copy of that content here, using the method added in #45097. I did this locally because it was easiest to destroy the old programming expressions then clone them, which I didn't want to risk doing on levelbuilder.

applab_to_gamelab_slugs = ["forLoop_i_0_4", "whileBlock", "ifBlock", "ifElseBlock", "getTime", "setTimeout", "clearTimeout", "setInterval", "clearInterval", "addOperator", "subtractOperator", "multiplyOperator", "divideOperator", "equalityOperator", "inequalityOperator", "greaterThanOperator", "greaterThanOrEqualOperator", "lessThanOperator", "lessThanOrEqualOperator", "andOperator", "orOperator", "notOperator", "randomNumber", "randomNumber_min_max", "mathRound", "mathAbs", "mathMax", "mathMin", "mathRandom", "assign_x", "console.log", "declareAssign_list_abd", "declareAssign_x_array_1_4", "declareAssign_str_hello_world", "declareAssign_x", "declareNoAssign_x", "includes", "indexOf", "length", "listLength", "substring", "toLowerCase", "toUpperCase", "functionParams_none", "functionParams_n", "callMyFunction", "callMyFunction_n", "return", "comment"]
ProgrammingEnvironment.find_by_name('gamelab').programming_expressions.where(key: applab_to_gamelab_slugs).destroy_all
ProgrammingEnvironment.find_by_name('applab').programming_expressions.where(key: applab_to_gamelab_slugs).each {|exp| exp.clone_to_programming_environment('gamelab') }
# rgb was the only code doc that wasn't proxied from gamelab to applab and instead was the other way around
ProgrammingEnvironment.find_by_name('applab').programming_expressions.find_by_key('rgb').destroy!
ProgrammingExpression.where(key: 'rgb').first.clone_to_programming_environment('applab', 'ui_controls')

Links

Testing story

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@bethanyaconnor bethanyaconnor merged commit 3a55e3f into staging Mar 3, 2022
@bethanyaconnor bethanyaconnor deleted the copy-proxied-programming-expressions branch March 3, 2022 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants