RunestoneServer icon indicating copy to clipboard operation
RunestoneServer copied to clipboard

Offer `?mode=browsing` link in flash when requesting non-current course

Open eah13 opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. Somewhat. Currently, logged-in users can't access the documentation by visiting a link like https://runestone.academy/ns/books/published/instructorguide/Introduction.html#prose-philosophy

...unless someone adds ?mode=browsing to it manually

Describe the solution you'd like I'd like the flash to include the link to the requested page with query string added. This balances the goal of preventing students from going to the wrong course/book with letting logged-in users choose to view other ~courses~ books anyways.

Specifically, I envision:

  • To "f"You requested {request.vars.requested_course} but are logged in to {request.vars.current_course}", add something like "Browse course anyways?" that would be the URL of the specific page the user was linked to, with the magical query string added.

Describe alternatives you've considered If students landing in the wrong book is a huge problem, a persistent or recurring flash when they're browsing might be appropriate. Edit: Or other visual styling. e.g. the top bar could clearly distinguish logged-in "Course" from not-logged-in "Book" visually and textually

"You're logged in to {current_course}. Click here to return to it"

Instead or in addition to all of the above, reference books like instructorguide could be exempted from the flash/redirect logic.

Additional context Screenshot 2022-09-01 3 37 28 PM

Relevant controller code

eah13 avatar Sep 01 '22 21:09 eah13