edx/edx-platform — pull request #3679 by imiric (2014-05-11 13:38:12+00:00)
Title: (WIP) Fix jump_to_id links returning 404 for private units in preview

Hi,

this fixes an issue with resolving `jump_to_id` links to private units in LMS preview mode.

To reproduce:

1. Create a new private unit (in Studio).
2. Link to it from a public unit with `/jump_to_id/`.
3. View the course in preview mode and click on the `jump_to_id` link.

Before:

- The link would return 404.

After:

- The link will resolve and redirect to the private unit properly.

I wasn't able to add tests for this, as I'm not sure how to create private/draft units in the XML notation. I read through the [documentation](http://edx.readthedocs.org/en/latest/course_data_formats/course_xml.html), but specifying neither `"ispublic": "false"` nor a future start date in the course policy file seemed to reproduce the 404 in the `TestJumpTo` tests. So I could use some help with adding a test case for this.

Thanks!

Internal edX bugtracker reference: STUD-150
cc: @antoviaque

P.S.: This is my first time contributing, so let me know if I messed something up. :) I marked it as WIP because I wanted to get your feedback on if this is the right approach, but otherwise this fix is functional.
P.P.S: I've already sent the signed Contributor Agreement.