pyvec / naucse

A server for open course material
Other
2 stars 9 forks source link

Make URLs properly hiearchical #6

Open Sanqui opened 7 years ago

Sanqui commented 7 years ago

Currently URLs for lessons expose the file directories used internally in the filesystem, rather than matching the sessions in the breadcrumbs. Observe:

http://naucse.python.cz/2017/pyladies-brno-jaro-po/ http://naucse.python.cz/2017/pyladies-brno-jaro-po/sessions/install/ (issue pyvec/naucse.python.cz#164) http://naucse.python.cz/2017/pyladies-brno-jaro-po/beginners/cmdline/ http://naucse.python.cz/2017/pyladies-brno-jaro-po/git/install/

The last two URLs are a part of the "install" session. In order to match the breadcrumbs, they should instead say something like:

http://naucse.python.cz/2017/pyladies-brno-jaro-po/install/cmdline/ http://naucse.python.cz/2017/pyladies-brno-jaro-po/install/git/

Additionally, this issue enables you to "cheat" and access pages that are not truly a part of the course, like http://naucse.python.cz/2017/pyladies-brno-jaro-po/intro/flask/. This only works with a real webserver and not Elsa, however, since these pages are not linked anywhere.

Blocked by pyvec/naucse#5, because any URL scheme changes require redirects.

encukou commented 7 years ago

The "phantom pages" are intentional: for example /2017/pyknihovny-brno/fast-track/install/ links to /2017/pyknihovny-brno/beginners/install/. The latter is not included in the table of contents, but I think of it a part of the course, rather than an external link.

The courses should ultimately be self-contained, in that content changes in master should not affect a currently running course – we don't want to change materials without the teacher's knowledge.

Sanqui commented 7 years ago

Phantom pages as they are implemented now would work for any lesson, whether linked somewhere or not. The fact that they don't live is a side effect of the freezing process. However, eventually it will be necessary to define the pages that lay outside of the course plan but are linked in advance. (I'd rather not auto-detect links.)

This is low priority.