Linking to a file in an attachment block in RISE

Jan 01, 2023

I've seen a few discussions here about being able to use a link to a file loaded as an attachment in an attachment block in RISE mainly to do with changing the way in which the attachment is viewed. BUT I was wondering if there is any way to access the file using JavaScript in a Storyline block inserted into the course. 

I have Storyline modules that can populate a pdf form from input variables using JavaScript. The code is 'self-contained' in that it loads the JavaScript libraries it needs dynamically (i.e. at run time) so there is no need to modify the story.html or index_lms.html files. The only thing the code needs is to read the pdf form template.

If I use an external link in the JavaScript obviously I get a CORS block error. So I need a way of placing the pdf on the server and I was thinking using RISE attachments might be the way to go.

Any ideas?

By the way, Happy New Year

1 Reply
John Cooper

I think I might have had too much champagne last night. My brain clearly wasn't working this morning. The answer to my question is extremely simple:

- just add the pdf template as an attachment in an attachment block

- get the link to the file

- insert the link in the JavaScript code

And voila! You have the ability to create a downloadable pdf incorporating the learner's own notes from within the RISE course.

I have no idea what I was doing when I couldn't get this to work - it works fine!