sqrl-client icon indicating copy to clipboard operation
sqrl-client copied to clipboard

Add dedicated course link (with modal)

Open eamonma opened this issue 2 years ago • 9 comments

Add the ability to share a course as a link, such that when someone opens this link a modal displays information regarding this course. The motivation for this feature is to enable easier coordination with friends, i.e. "take this course with me".

  • Potentially add ability to share link containing section(s) selected

eamonma avatar May 26 '22 21:05 eamonma

How is this any different from just sending the course code to friend? Not sure what benefit this would provide. I like the idea of packaging selected sections into the link. I think that makes it a somewhat worthwhile feature.

galacticglum avatar May 27 '22 17:05 galacticglum

I agree, I think inherently sharing selected sections makes this much more valuable.

eamonma avatar May 27 '22 17:05 eamonma

Possible url spec for implementation could be:

https://app.sqrlplanner.com/course/share?id=<:id>&sections=<:id1>,<:id2>,...

or

https://app.sqrlplanner.com/course/<:id>/share?sections=<:id1>,<:id2>,...

which will open a page including the course information with a button that allows them to add it to their timetable of choice (assuming we are supporting multiple timetables).

galacticglum avatar Jun 03 '22 15:06 galacticglum

The latter looks good to me. I tend to avoid query params if possible—for no reason other than it looks ugly. Also, I'd probably extend that to specify lecture section, tutorial section, and practical section, particularly because I don't believe we have unique ids for sections in case of duplicate section ids, such as CSC110.

image

eamonma avatar Jun 03 '22 15:06 eamonma

I thought the db had unique ids for them? Sure, we can avoid query params, but I'm not sure how you would do it without.

EDIT: Looks like sections are embedded in the course document in the mongodb. I think the cleanest solution is to give sections unique ids. We can keep them as embedded documents but at data syncing time (in the backend) assign uids. Alternatively, we can do what we did with course ids, and do something like <section_type>-<id>.

galacticglum avatar Jun 03 '22 15:06 galacticglum

I meant for the course id. So in this case, we would have https://app.sqrlplanner.com/course/<:id>/share?lecture=<:lecid>&tutorial=<:tutid>,...

eamonma avatar Jun 03 '22 15:06 eamonma

I think I'd prefer to not have query params for each section type.

galacticglum avatar Jun 03 '22 15:06 galacticglum

BLOCKED by issue #35 in gator.

galacticglum avatar Jun 03 '22 16:06 galacticglum

UPDATE: Issue is unblocked.

galacticglum avatar Jul 19 '22 20:07 galacticglum