rage / mooc.fi

https://mooc.fi
5 stars 6 forks source link

Multiple open university registration links based on tiers #733

Open nygrenh opened 3 years ago

nygrenh commented 3 years ago

New building AI open university registration progress will require the user fill two different open university forms. Right now , in order to initiate the open university registration, we direct the users to https://www.mooc.fi/en/profile/completions.

Right now it looks like this: image

For Building AI we'll need two entries here in the future: one for the base course registration and one for the registration of an additional module.

The base registration should be shown to people who have either completed the medium or the highest tier of building AI and the additional module registration be shown to people who have completed the highest tier.

Currently when the user clicks the "register completion" button, they will be taken to a page that includes instructions for filling the open university form and the open university form link.

In that page, we want the two white boxes merged and we want to add a new card for course-specific instructions that would editable from the course edit page (e.g. https://www.mooc.fi/fi/courses/alon/edit)

register-completion

For the open university form link we need to setup automatic fetching of new urls because the open university rotates the form links frequently. Our current fetching script (https://github.com/rage/mooc.fi/blob/master/backend/bin/fetchAvoinLinks.ts) fetches new links for all entries in the open_university_registration_link based on the course code field. See table definition here: https://github.com/rage/mooc.fi/blob/110520d61acc4dc7c9a2559784acc9253c159a1f/backend/prisma/schema.prisma#L254-L267. This table and the script will need to be extended to support different links for different tiers.

The instruction page gets the correct link with this resolver: (https://github.com/rage/mooc.fi/blob/110520d61acc4dc7c9a2559784acc9253c159a1f/frontend/pages/%5Blng%5D/register-completion/%5Bslug%5D/index.tsx#L61, https://github.com/rage/mooc.fi/blob/350b8ad19fe6f7db6c06d19ece9c50debb9eb747/backend/graphql/Completion/model.ts#L70)

Technopathic commented 3 years ago

We currently already have entries for Building AI Intermediate and Building AI Advanced, which appear upon completion on https://www.mooc.fi/en/profile/completions

These tiers are treated as their own individual courses with their own course_ids in mooc.fi, so it should work as long as they have their own open university form links, which they don't. It looks like Building AI (the handler course) has an open university link, but it shouldn't need one. The Intermediate and Advanced courses should have open university links instead. I'm not sure how this is set up with the open university system, do they take a specific course_id or slug? In which case, they should be using the ones for BAI Intermediate and BAI Advanced.

nygrenh commented 3 years ago

They take the identifier that is specified in the course code field in the database.