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

Handle old, slash-separated course ids and course-vX:... style #351

Merged
merged 1 commit into from
May 31, 2021

Conversation

bryanlandia
Copy link
Contributor

Allows Figures to run on sites with courses created in e.g., 2015

Split route path into two options: if there are no forward-slashes we assume course id is like course-v1:xxx
I didn't figure out how to get a nice named match param into my regex for that one but if you see how to, feel free.
Second one looks specifically for a course id style with two slash separations.

@bryanlandia bryanlandia force-pushed the bryan/frontend-handle-slash-sep-course-ids branch from 8d760fa to 20ac183 Compare May 27, 2021 19:19
Copy link
Contributor

@johnbaldwin johnbaldwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. Too bad we don't have unit testing on the front end. Are you able to get this to work in Figures devsite @bryanlandia or did you test it elsewhere?

I would like to get @grozdanowski OK on this before we merge it in case he sees something I don't

@bryanlandia
Copy link
Contributor Author

Thanks @johnbaldwin I have just been testing directly against DHIS2 staging :D And yes, it's working for old and new style course ids.

Copy link
Contributor

@grozdanowski grozdanowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, @bryanlandia

@bryanlandia
Copy link
Contributor Author

Thanks guys. I'll rebase and merge

Allows Figures to run on sites with courses created in e.g., 2015
@bryanlandia bryanlandia force-pushed the bryan/frontend-handle-slash-sep-course-ids branch from 20ac183 to c3df86f Compare May 31, 2021 19:08
@bryanlandia bryanlandia merged commit 1cee763 into master May 31, 2021
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.

3 participants