Is there a no-print option/javascript/trigger option in Storyline?

Aug 27, 2013

I have seen from reviewing other posts that there is a way to create a javascript file to allow users to print pages from Storyline, but I am wanting to do the opposite - when users take our quizzes we would like to prevent them from printing out pages (whether during their initial pass through the test or during their review of correct/incorrect answers after receiving their score).  Is  there a way to do this?

Also, is there a way to make it to where a user can only review incorrect answers instead of both correct and incorrect?

Thanks for any help y'all can pass my way!

12 Replies
Debra Bumgarner

Hi Phil - we understand that those things can be done by the user.  We are new to Storyline, but the authoring tool we have been using up to this point DOES allow us to attempt to prevent these things - such as a javascript file and a cascading style sheet that work together to disable print screening/screenshots; we also do not include a "Print" button on any of our pages.  Lastly, we do not allow the use of cell phones during testing.  Because of this standard we have created up to this point, we were wondering if this option exists in Storyline as well.  Leslie, is there someway to do that, or none at all?

I guess I was not clear in my first post, but since we are fairly new to this program we are trying to get quick assistance with how to review only incorrect answers.  We not only want to know that it can be done, but would appreciate assistance with how to do so, which is what I was trying to get across with my original post.  Leslie, would you be able to point me to some tutorials or a staff member that can assist us with figuring out how to do this? 

Phil Mayor

There is no way to do this really, 

You could try hiding all the page content if it is being printed, but this is normally easy to get round.

There's just no reliable way to do this. You can intercept certain key presses etc and cancel them using script,  Also, the print functionality is built into the actual browser itself, you can't actually prevent this.

Overall I just wouldnt try and win this fight.

You say you do not allow cell phones are the users under test conditions onsite?  You could always ensure they don't have access to a printer.

Mike Enders

Hi Debra,

In terms of the reviewing only incorrect answers during the review of a quiz, here's a great Screenr to get you started.  https://player.vimeo.com/video/149069694.

As for not being able to print...hmmmm....

Phil's correct in that if someone wants to get a copy...there's no foolproof method.  But I'm wondering if there's a means of slowing them down?  When I was teaching, we used to drop a bit of HTML code into our quizzes to try and prevent printing, but this sounds like something that would be a post-publish approach in Storyline.  There's not a built-in option in Storyline.  I'll ping some Javascript folks to see if they might have something.

Mike

onEnterFrame (James Kingsley)

Phil is correct that there are ways around it... but you make it harder for folks with a bit of CSS. 

Basically we want to create a special style for print media. In our case we want to hide the whole body of the page. 

I will warn that I didnt test this yet.. but I believe it should do it for you. Add this into the head area of the story.html file 

@media print { body { display:none } }

Debra Bumgarner

Thank you everyone for helping us try to figure these things out!  I have only had time to view the Screenr and start testing the Review on only incorrect answers at this moment, and will also try to use the no print code as soon as I can to see how it will work for us. I will let y'all know if I have any further questions and what I figure out in the end.  Thanks again for all of the help!

Jackson Hamner

Hi Rebecca:

Here is a link to some more information on inline CSS in your HTML file. You want to look at the "Inline Styles" Section.

I think you need to throw some <style> tags around that line of code. Something like:

<style>@media print { body { display:none } } </style>

Hope this helps!

Jackson Hamner

After looking through the HTML page I discovered there is actually already some <style> tags. I tried adding the line of code to the style tag and printing the page. It printed out a blank page!

Here is an image of where I added the line:

I also zipped up the output folder and included it as an attachment. Feel free to download/unzip the file and take a look at the code yourself.

Let me know if its still giving you trouble and I'll help however I can! :)

Billi Switalski

Will this work if the learner presses the "print screen" option on the keyboard? 

Also, when I tested the zip provided I could still print screen the page. It pulled up Snag-it application that is used to capture screenshots. 

Any ideas on how to block the screenshot functionality?

Jose Tansengco

Hi Billi, 

Blocking the screenshot functionality of Windows or any screenshot application will be tricky because this is a feature that just takes an image of the current objects displayed on your monitor. Screenshot applications do not know what they are taking a screenshot of, and there is currently no way to tell them to not take a screenshot when specific applications are being shown in screen. 

If you have control of the computers that your learners are using to view your courses, you can ask your IT staff to possibly disable the screenshot functionality of the Windows machines