Skip to content

Fix(challenges): code storage/uri#10200

Merged
QuincyLarson merged 12 commits intofreeCodeCamp:stagingfrom
BerkeleyTrue:fix/code-uri
Aug 31, 2016
Merged

Fix(challenges): code storage/uri#10200
QuincyLarson merged 12 commits intofreeCodeCamp:stagingfrom
BerkeleyTrue:fix/code-uri

Conversation

@BerkeleyTrue
Copy link
Copy Markdown
Contributor

@BerkeleyTrue BerkeleyTrue commented Aug 13, 2016

Pulls code in this order

If present in uri (i.e. ?solution=function foo() {}). This will locks the challenge as running untrusted code until the user unlocks it manually.

If present in localStorage

  • this checks first for the modern version, which uses the challenge id instead of title with 'Val' appended
  • then checks for the legacy version,
    • i.e. 'Concat StringsVal', and converts it to the modern version
    • removes the legacy key

If both of the above find nothing, it then looks at the user challengeMap if available and pulls the previous solution.

When a user completes a challenge, the local copy is removed.

closes #9115
closes #9984
closes #9598
closes #10052

@BerkeleyTrue BerkeleyTrue added status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. status: blocked In a transient & temporary hold. and removed status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. labels Aug 13, 2016
@camperbot
Copy link
Copy Markdown
Contributor

@BerkeleyTrue updated the pull request.

1 similar comment
@camperbot
Copy link
Copy Markdown
Contributor

@BerkeleyTrue updated the pull request.

@alayek
Copy link
Copy Markdown
Member

alayek commented Aug 15, 2016

@BerkeleyTrue please tag me once you have completed this one and deployed. I will confirm from my end that it is resolved in beta.

@BerkeleyTrue
Copy link
Copy Markdown
Contributor Author

@alayek Why not confirm from this PR instead?

@camperbot
Copy link
Copy Markdown
Contributor

@BerkeleyTrue updated the pull request.

@alayek
Copy link
Copy Markdown
Member

alayek commented Aug 15, 2016

@BerkeleyTrue ok. I thought this is WIP.

@camperbot
Copy link
Copy Markdown
Contributor

@BerkeleyTrue updated the pull request.

@BerkeleyTrue BerkeleyTrue added status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. and removed status: blocked In a transient & temporary hold. labels Aug 16, 2016
@BerkeleyTrue BerkeleyTrue changed the title [wip] Fix(challenges): code storage/uri Fix(challenges): code storage/uri Aug 16, 2016
@BerkeleyTrue
Copy link
Copy Markdown
Contributor Author

@alayek This is ready to QA

@raisedadead
Copy link
Copy Markdown
Member

@BerkeleyTrue just to confirm to test the use case for:
Fix(challenges): load legacy code from localStorage,

I should first solve a couple of challenges on backup/staging, then switch to this PR and move forth from there? Right?

I know a QA should not ask questions to DEV, but you probably are best suited to guide.

@BerkeleyTrue
Copy link
Copy Markdown
Contributor Author

@raisedadead You can manually change edit your localStorage. Just go to the main site and copy from their.

@camperbot
Copy link
Copy Markdown
Contributor

@BerkeleyTrue updated the pull request.

@camperbot
Copy link
Copy Markdown
Contributor

@BerkeleyTrue updated the pull request.

@camperbot
Copy link
Copy Markdown
Contributor

@BerkeleyTrue updated the pull request.

@BerkeleyTrue
Copy link
Copy Markdown
Contributor Author

@alayek Are you still QA'ing this?

@camperbot
Copy link
Copy Markdown
Contributor

@BerkeleyTrue updated the pull request.

@QuincyLarson
Copy link
Copy Markdown
Contributor

@BerkeleyTrue QA'd LTGTM!

@QuincyLarson QuincyLarson merged commit d48a618 into freeCodeCamp:staging Aug 31, 2016
@QuincyLarson QuincyLarson removed the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Aug 31, 2016
@raisedadead raisedadead mentioned this pull request Sep 1, 2016
10 tasks
@BerkeleyTrue BerkeleyTrue deleted the fix/code-uri branch September 28, 2016 23:24
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.

5 participants