Linking to Tabs in a way that works in re-runs

We have a “resources” tab (custom page) in our course with useful stuff in it. We like to link to it from a text component in different places in the course to call out resources in the flow of the course. We found the URL of the tab and added a hard link to the text block. It works fine.

But when we re-run the course, the link still goes back to the source course. Oddly, users don’t need to be enrolled in the source course, so the old tab is still available. But the user finds themselves in the wrong course and they aren’t even enrollmed. Very disorienting.

Is there a way to create a course-relative link to the tab / custom page? I know there’s a way to do this with static file links, but I don’t see a way to do with custom page links.

Peter Pinch

MIT Open Learning

Hmm. So you want to define the custom page in one place and link to it everywhere, or create the custom page within each course? I don’t remember very much about custom pages, perhaps @dave does?

I don’t believe that there’s any way to make such a link today. One thing that’s relevant is that the custom pages are just XBlocks (StaticTabBlock, which is a subclass of the HTMLBlock used for our text components). So if you were to make an enhancement to the platform for this, I think you’d want to look at the jump_to() function that maps usage keys in the course to a URL via get_course_url(). That code currently assumes it’s being called on something in the course tree, and it would have to be modified to understand how to give the MFE a URL for the custom course tab (which is not part of the course/section/subsection/unit hierarchy).

1 Like