Restrict a Download by IP Address by Putting it in a Moodle Quiz


If you would like to restrict a download to a certain IP address, you’ll need to use the Moodle Quiz module.  It’s the only module with built in IP restrictions.  Basically we’re going to create a quiz as a “house” for our PDF that students will download. Please note that the IP address specified in the video is no longer correct.  The correct IP address is

Create a quiz and restrict it to an IP address


Turn editing on, and click add activity/resource.


Choose Quiz


Name the quiz, then scroll down to Additional restrictions on attempts, click to open it and then click Show more… to reveal the advanced settings.


In the require network address field, enter
This will restrict access to the Seelye basement level.


Click Save and Display

Create a question to "house" the PDF


Make sure you have a PDF in a known location on your computer. The desktop makes it easy to find.


Move from the Edit Settings screen to the Edit Quiz screen. You can find a link to Edit Quiz in the sidebar when you are editing settings on the quiz. If you have just finished saving your new quiz you should see a button that reads Edit Quiz .


You should now see an empty questions screen.


Click add and then add a new question to add a new question.


Choose the essay format.


Under Question Name you can title the question anything you like.  It’s just a name for your reference.


Question text is what students will see.  You will be putting a link to the PDF in this question.  You might also put directions for students to type a quick note to indicate that they read the question and downloaded the exam.  Moodle will actually log the fact that they “attempted” the Quiz, so this is not essential, but it does convey to the user that they have to take a specific action and can help with accountability.

So, useful text in this area might be something like.

  1. Click here to download the quiz
  2. Return to this page and type your name and the date in the blank below
  3. Click Next to finish the quiz.

Add PDF to the question


Click the attachment icon. It looks like a piece of paper with a paper clip on it.


Drag your PDF into the box and then “X” out in the upper right corner.


Highlight the text you would like to serve as the “Download button”.  Then click the link symbol. The link symbol looks like two links in a chain.


Click browse repositories


Choose embedded files and select the document you just dragged over.

Additional Resources

The Moodle Docs have extensive documentation on all the details of managing the Quiz module.

We'd love your feedback!

Last modified: November 27, 2017