Change link to doc after posting to LMS
January 30, 2019 12:00 AM
I have a course with a button that links to a document on a website. The external link has changed - short of changing, republishing and reuploading, is there a way to access the link in the pubhished files? The button in question is an asset that shows on all pages, so I can't just find the page in question and edit.
Discussion (4)
Yes, it is relatively simple. In the published content open the html page that the button is on using any text editor, notepad works fine, search for the URL and make changes as necessary. Resave.
In the attached, I set the button to open google. Open page_1.html (in HTML folder) in notepad. Search for "google". When you find the URL change google to something else like trivantis. Resave and open by double clicking the index.html. click the button and you should now go to the revised site.
This happens to us a lot. The first thing we do is ask the owner of the document if they can change the filename back to what it was, or move the file back to where it was, or both. When we explain why, it works far more often than it fails.
I know that doesn't answer your question directly, but it might make your question moot!
If you happen to know a tool like sed, you could just have a single-line command search and replace the URL in all files. Of course unless you change the source, you'll have to do this swap every time you publish the course.
undefined
Oh, and in case my first suggestion doesn't work? Before editing the course, consider creating a shortened URL (e.g. bit.ly or goo.gl) that points to the new location, and then pointing your course to the shortened URL instead. That way, if the doc moves again, you'll be able to just repoint your shortened URL instead of editing and republishing the course.
Discussions have been disabled for this post