Comments (7)
Completed, ready for next releaser
from coderoad-vscode.
I have a few questions about using level/step ids. If a tutorial is changed, these will update. The webhook API would be expected to understand which level/step id it is mapped to. Let me know if this is a problem.
I'm not sure I understand what's being asked here. If a user completes a step, maybe step 50 - then I have to go change step 50 to step 51 and create a different step 50. I suppose it would show that they already finished 50, and 51 would show up as not finished? I don't really see a problem with that.
I had a thought that maybe the best way to go would be to just have one event at the end when a tutorial/project is finished. The whole thing is either done, or it's not. It would simplify things a bit. Although, it would be nice to maybe show the progress on a tutorial as well.
from coderoad-vscode.
A single event at the end of the tutorial would be simpler.
I suppose the value to knowing progress would be to include a progress bar, or to identify areas where users might struggle or drop off.
from coderoad-vscode.
I've been working on this on my end - I have basically generated tokens for users. I think we will need to have them copy and paste it into CodeRoad. Or any other thoughts @ShMcK? How would I get it into the config of the repo? Not sure that's possible. We could set it as an env variable by passing it to CodeAlly, which then passes it to you or adds it as an env variable. I was leaning towards the copy/paste method for now.
So the config might be:
config:
webhook:
endpoint: “https://freecodecamp.org/api/...”
events:
init: false
reset: false
step_complete: false
level_complete: false
tutorial_complete: true
And the request body:
{
"type": “tutorial_complete”,
"tutorialTitle": "title_of_tutorial"
}
And the token they pasted would be in the header or body or something. By using the title of the tutorial, we could control if/when they change or what they are on our end. When you mentioned using the id's, would that be the commit hashes? or maybe some additional property in the markdown?
Edit: ahh, they would be the numbers of the levels/steps - 1.1, 2.1, etc...? So what would the tutorialId be? Those don't have a number - the title works for me, but if you have any other thoughts - let me know.
Also, I was planning on just having the one event for when an entire tutorial or project is complete for now. Hopefully that makes it a little easier.
from coderoad-vscode.
I've drafted up a pull request (in progress), @moT01 I'd love your feedback.
Here's an example of the events for init/step/level/tutorial complete
init - {"tutorialId":"coderoad/fcc-learn-npm:v0.4.2", coderoadVersion: "0.14.5" }
step - {"tutorialId":"coderoad/fcc-learn-npm:v0.4.2", "levelId":"4","stepId":"4.1"}
level - {"tutorialId":"coderoad/fcc-learn-npm:v0.4.2",, "levelId":"4"}
tutorial - {"tutorialId":"coderoad/fcc-learn-npm:v0.4.2" }
Is the tutorialId sufficient? You can parse out the name and the version separated by :v
.
from coderoad-vscode.
In regards to how to identify the user, I was thinking of two options.
I was thinking you could pass in a CODEROAD_WEBHOOK_URL
that includes the users id
An example: "https://some-url.com/user/1234/coderoad_hook`
The router should be able to parse out the user id as a request param.
Setup the webhook URL in the config, as you showed above.
Pass in the user id as an env variable
Then I would pass that in the event body as `{ userId: '1234' }
from coderoad-vscode.
Here's an example of the events for init/step/level/tutorial complete
I can work with that 👍
from coderoad-vscode.
Related Issues (20)
- Error when using # in text HOT 1
- [minor] One hint on the last lesson gives an error HOT 2
- Add CodeRoad to Open VSX HOT 2
- Issue with Git < 2.30 HOT 1
- Go to previous Level
- Database issue HOT 1
- Having git configured to gpgsign commits is interfering with tutorial HOT 2
- Regarding psql --username and dbname HOT 7
- Haha
- Can't seem to move on from "Update Daisy's `favorite_color" lesson (id: 690) HOT 3
- Experiment with vscode ui toolkit
- Can't move on in the SQL lesson because doesn't accept even the hint one. HOT 3
- Marketplace HOT 1
- Unable to start 'Learn SQL by Building a Student Database: Part 1" tutorial
- Error
- Gitpod unable to update my progress in CodeAlly
- Command failed: git stash --include-untracked
- Unauthorized
- Bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coderoad-vscode.