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

Add completed lessons to timeline #62

Open
chyku opened this issue Apr 10, 2020 · 0 comments
Open

Add completed lessons to timeline #62

chyku opened this issue Apr 10, 2020 · 0 comments
Assignees

Comments

@chyku
Copy link
Contributor

chyku commented Apr 10, 2020

DON'T PICK THIS UP
This is here so we can put the information here for when we're working on GLEN Learn:

If you want to use the event timeline, you can create a new class at src/util/Timeline/timeline.js in glen-learn. There's a few examples in there; just extend the TimelineEvent class and pass whatever data you'd like via the meta field (in this case, it sounds like the custom lesson name, and a date?). Then, in your application code you can do something like:

const glenLearnProfile = useGlenLearnProfile();
glenLearnProfile.addTimelineEvent(new MyCustomEvent(lessonName, date))

To display the event on the timeline screen in the app you can update: src/pages/GlenLearn/AdminDashboard/DashboardForUser/Timeline/Timeline.js (you'll want to update the itemForEvent variable and add your new case). Note that the timeline is also displayed on the dashboard; to display your event there, update src/components/Timeline/Timeline.js in the dashboard repo.

@chyku chyku added the not ready Issues that aren't open for working on yet- DO NOT PICK THIS UP label Apr 10, 2020
@chyku chyku removed the not ready Issues that aren't open for working on yet- DO NOT PICK THIS UP label Apr 24, 2020
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

No branches or pull requests

2 participants