From the Quiz settings doc (http://docs.moodle.org/26/en/Quiz_settings), I have found the following feature:
You can restrict access for a quiz to particular subnets on the LAN or Internet by specifying a comma-separated list of partial or full IP address numbers. This is especially useful for a proctored (invigilated) quiz, where you want to be sure that only people in a certain room are able to access the quiz. For example: 192.168. , 220.127.116.11/20, 18.104.22.168
I wonder if I could have this feature applied to an activity or a resource like a Page in a course?