edx/edx-platform — pull request #452 by chrisndodge (2013-07-21 01:09:36+00:00)
Title: add a /jump_to_id/ shortcut for producing more durable links between cou...

...rseware in Studio

NOTE TO REVIEWERS:

This work is motivated by:

1) the existing /course/ shortcut does not work well for Studio authored course since the author would need to know the URL sub-path that the target would have in the LMS. The sub-path also ends with an ordinal (index into the sequence). This is nearly imposible for the author to know when building a course

2) /course/ shortcut is also not robust/durable when items are moved around in the course tree

3) the jump_to redirect URL had been recomended to authors but it is very, very awkward to have the author determine what the 'i4x' location should be

4) the jump_to redirect is not durable when "re-namespacing" a course (e.g. export and re-import into a different course) as the and are 'burned' into content

The solution is to create a new shortcut that authors can use:

link is here

where is the location.name. In Studio location.name is always a GUID and therefore can be assumed to be unique.

This shortcut get's rewritten at LMS rendering time, using the same get_html() wrappers that /static/ and /course/ shortcuts use.

Also, there is a small change in the edit Unit page where we removed that useless display of the /course/aaa/bbb. There we now just display the Id of the Unit (aka Vertical)