Urgent Help Needed: How can you secure quiz questions from copy?

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Timothy Takemoto -
Number of replies: 16

Okay, Howard

In this case, when the quiz is costly and even the slightest leak is a major financial problem then the fact that there are always ways around the measures taken are crucial.

For the most of use however, the ability to put students off copying is a large part of the problem. My students do not have a cash motive, only to save time. If it takes more time copying then they will not bother.

So I enclose an updated version of the anti copying measures here below. This is basically Rob Butners and Indjana Dzons' hack, packaged as simply as possible.

The best think about this hack is that it exists entirely in your theme, so there is no need to worry about what happens when you update moodle.

1) Insert

<?php
if (stristr($_SERVER['SCRIPT_FILENAME']."X", "attempt.phpX") || stristr($_SERVER['SCRIPT_FILENAME']."X", "review.phpX"){
  include("blockit.html"); }

  ?>

Into the header.html in your theme. I put it at the second to last line before the <!-- END OF HEADER --> because that enables me to put a warning just below the header, at the top of the quiz (see below)

The above code is simply to decide which of the many moodle pages get the anti-copy/paste treatment. I prevent copying and pasting of quizes (attempt.php) and their feedback.

2) Create a file that does the blockign, called blockit.html in your theme folder.

I attact my version of blockit.hml which includes
  3.1) A warning saying that copying is forbidden in quizes which is displayed at the top of quiz pages.  
  3.2) A right button click blocker that says again that copying is forbidden,
        and that the users' IP addresses has been recorded, along with the
        users' ip address. 
  3.3) The super-java script blocker supplied by Rob Butner here, which prevents an variety of forms of copying, including print screen using CTRL P (all that is printed out is a blank page).  This super duper javascript is obfuscated to help prevent users from realising why they cannot copy.

Be warned that while blockit.hml or a quiz window is open, no copying and pasting can be done on the computer. It is quite a miracle.

4) I have included
<nolink>
at the end in the hope that this will prevent quizes being linked to the glossary. I have not tested this yet.

Does anyone have any suggestions on how to improve the blockit script? I would like scary warnings to appear when people press control C as well.

I have also included the pix to make my header work for you. The header, in use on my Moodles, is based on a part of an Invision board theme supplied by 
http://www.invisionskins.com/index.php?p=skins
copyright 2003 Roadkill71
http://www.roadkill71.com

Timothy

In reply to Timothy Takemoto

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Timothy Takemoto -

The wonderful and miraculous copy blocker works fine as described above.

But for some strange reason the " <nolink> " does not work.

Even though a header incuding " <nolink> " is appended  to the tests, the glossar links to the tests.

Why?

1) There is no </nolink>?

This seems unlikely. I could, if I tried, work out the php required for the footer to include a </nolink> when we are on a test. But surely this cannot be the problem.

2) The <nolink> tag does not reign over other tags.
I a not sure why

uk

Tim


In reply to Timothy Takemoto

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Ger Tielemans -
Students will always be more clever then you and me, why not change strategy and toy with that cleverness?
In reply to Ger Tielemans

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Timothy Takemoto -
When it comes to using computers, I find that my students are pretty inept at using computers. I am often cleverer than they are. This is not because I am clever but because it is about as much as they can do enter a URL and get to a page. Some of the know that the right click button can be used for copying things.

You make it sound simple to change strategy. How do you suggest that I change strategy? I am open to suggestions. 

I do not have the option of making hundreds of questions.
In reply to Timothy Takemoto

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
My students frequently seem inept at doing what they are supposed to learn, and experts at doing the stuff at the fringe I would prefer they did not do smile.

Task: Explain networking
Response: Blank stares

Task not to do: Set up a multi player doom session over the
Wireless networking .....

In reply to Timothy Takemoto

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Ger Tielemans -

To start your brainstorm about this subject:

  1. If you make one question, then always make one or two slightly modified versions of that question (use random question: yes you get to much categories then..)
  2. If you have no time, why not give the students the assignment to create the questions as homework in Word or better in Excel: deliver the Moodle format and let them decide about the feedback and the points
  3. put exercise 2 in a forum and let them comment on/improve eachothers'  questions.
  4. End your quizz with several open questions: let students describe alternatives for your questions in the current quiz: they can earn bonus points for this.
  5. Start (or end) your workday with creating one question (200 in a year, 400 in 2 years, 600 in 3 years...)
In reply to Ger Tielemans

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Good advice. Creating 10 questions in one day is misery, creating one question a day for 10 days is a pleasant distraction.
In reply to Marcus Green

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Timothy Takemoto -
And then, after having spent a year, or 10 days creating a bank of questions a student copies them puts circles on the correct answers and passes the copies around amoung his mates and his juniours.

This may happen anyway, but bearing in mind the misery, copy protection is a very important feature.

Tim
In reply to Timothy Takemoto

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Genner Cerna -
I agree with you Timothy, same problem in our school.
In reply to Timothy Takemoto

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Michael Penney -
copy protection is a very important feature.

After you apply it, that student clicks print screen on your test, and does the same thing with a jpeg. If you find a way to stop print screen (good luck with that in a browser environment), they take a picture of their laptop with a digital camera. You just end up in an unwinnable 'arms race'. If you think your 50 question test is uncopyable because you've got some cool javascripts, the more affluent students are copying it with their cell phone cams, and getting all the As. So its better to realize students can copy the test, and spend time on other measures to make copying fruitless.

Your fighting the underlying design of the web in addition to your students, since html and web standards are designed to be open. Not to mention that all these copy protection 'features' run client side, some of them using up student's system resources (which may be scarce), further exacerbating the digital divide between affluent and poor students.

But if you have a question bank and generate tests on the fly, no student ever sees all of your questions (if you have alot of questions, no student ever sees even many of your questions). So they can copy all they want, share with their friends, they memorize the questions, and then get a test with all different ones, and fail.

A few experiences like this, and most students will simply learn the material. Imagine if you had 1000 total questions for a 50 question test. A student might try to assemble all those questions in a text file (or as jpegs if you've stopped him/her from right clicking), and memorize them all, but for most students that is going to be an impossible task. That's handling copy protection via social engineering.

If you really want to get into a arms race, you are better off choosing a platform that supports copy protection as a design, such as streaming video (as a quicktime text track, for instance) some other web plug-in format, or a disk based system like authorware, than trying to implement this in html.

In reply to Michael Penney

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Timothy Takemoto -

Michael Penny,

I am really surprised by your line of arguement.


I presume that you make quiz questions, don't you? Assuming that you do, then you are clearly a in a different league to I. As someone  mentioned above, a question a day is a pleasurable rate. But lets say I made that 10 a day, putting myself in the unpleasantly hardworking league. Then I would have enough questions for 3 or 4 50 question tests, by your reconning, at then end of the first year. I think that my tests could be a mere 10 questions long so lets say I can make 30 tests a year allowing time off at weekends and bank holidays.

Since I use moodle quizes to encourage practice (evalu-practice), rather than with the objective of setting a grade, I would like to have enough tests so that my students do one a day on weekdays during term time. So I need 5 tests a weak or about 300 tests a year. Hence it will take me about 10 years of unpleasantly hard work to get to a level where I need not worry about copying much for one of my courses.  

This is a lot of work. I know you know because you are doing it to but we are talking about hours and hours of grind over the course of years.

If students can wipe their mouse accross the screen and print out the screen then I weep. If they press print screen then I weep. And no wonder when you think about the sort of work that is involved. Preventing these actions should be one of the first functions added to the quiz module. 

And thankfullly they can be prevented. The above theme does a GOOD job of preventing copying.

Yes I agree there is no fighting digital cameras but I enclose a picture taken by my national panasonic, fairly state of the art mobile phone. Taking pictures of tests using a mobile phone introduces a stress factor that most students will not bother with. My tears are, to a large extent saved.

Tim

Attachment 20030823_1754_000.jpg
In reply to Timothy Takemoto

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Timothy Takemoto -

Dear Rob Butner,
I have just found out that the wonderful anti-copying javascript that you provide does not work with Opera Browsers. One can still use the right click and cut and paste.
Do you have any ideas (other than poking out student's eyes?)

Tim

In reply to Timothy Takemoto

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Todd Anderson -
Hi Prof. Takemoto, thank you very much for your help in this subject.

One thing, I believe your code is missing a second ')' to close the if statement. corrected the code is this:


<?php
if (stristr($_SERVER['SCRIPT_FILENAME']."X", "attempt.phpX") || stristr($_SERVER['SCRIPT_FILENAME']."X", "review.phpX") )
{ include("blockit.html"); }

?>
In reply to Todd Anderson

Re: Urgent Help Needed: How can you secure quiz questions from copy?

by Timothy Takemoto -

Dear Todd,
I am glad to have been of use.
Please do post the corrected codesmile
Timothy

In reply to Timothy Takemoto

Re: Urgent Help Needed: How can you secure quiz questions from copy? -- How can I secure the lesson module too?

by Theodore Tzidamis -

Prof. Takemoto,

I know this post is really old but it has still come to much use to me. I tried to embed the code in a 1.8.3 edition and everything worked fine. By the way, since someone else has already mentioned it, you have indeed missed a parenthesis at the end of the if clause. The corrected code is this:

<?php
        //secure quiz module
        if(stristr($_SERVER['SCRIPT_FILENAME']."X", "attempt.phpX") || stristr($_SERVER['SCRIPT_FILENAME']."X", "review.phpX"))
        {
                include("blockit.html");
        }
?>

However, my initial goal was other than securing the quiz module. I want to secure the lesson module. When I try to modify the code as follows...

<?php
        //secure quiz module
        if(stristr($_SERVER['SCRIPT_FILENAME']."X", "attempt.phpX") || stristr($_SERVER['SCRIPT_FILENAME']."X", "review.phpX"))
        {
                include("blockit.html");
        }

        //secure lesson module
        if(stristr($_SERVER['SCRIPT_FILENAME']."X", "lesson.phpX"))
        {
                include("blockit.html");
        }
?>

...nothing happens; you can right-click in any lesson.

I have "some" experience on php and javascript; enough, that is, to basically understand what the code does. However, I feel I am doing something terribly wrong.

If you or any other moodle user could enlighten me on the matter, I would be really grateful. For the time being, all I can think about is wheather the "lesson.php" file is the one I should protect.

Best regards,

Theodore.

In reply to Theodore Tzidamis

Lesson module secured. No copy-paste, no printscreen, etc.

by Theodore Tzidamis -

For anyone it may concern, the view.php file is the one we are looking for, should we want to secure the lesson module as well.

Another point of interest is that you need to get rid of a <center> statement in the header.html file since lesson pages get center aligned when you include it. Other than that, all is well.

Once more, thanks to everyone for the great advice. I hope someone gets all the help he needs from this, as I did.

Cheers,

Theodore.

In reply to Theodore Tzidamis

Re: Lesson module secured. No copy-paste, no printscreen, etc.

by Timothy Takemoto -

Dear Theodore

I am sorry I missed your post.

So the code to secure the lesson module becomes the following?

<?php
        //secure quiz module
        if(stristr($_SERVER['SCRIPT_FILENAME']."X", "attempt.phpX") || stristr($_SERVER['SCRIPT_FILENAME']."X", "review.phpX"))
        {
                include("blockit.html");
        }

        //secure lesson module
        if(stristr($_SERVER['SCRIPT_FILENAME']."X", "lesson/view.phpX"))
        {
                include("blockit.html");
        }
?>

Thank you very much for your correction.

Tim