Creating a security Module

Creating a security Module

by Waleed Sohail -
Number of replies: 14

Hey guys, I am actually creating a security module that would make sure that the correct person is attempting the quiz.

First when the user signs up, he would be given some additional security questions to answer. Once they are attempted, the account is created. Then they can login and access the course. For every attempt I want to make sure that this is the right person, I want to use those answers in my quiz for confirmation, if it works, they can attempt the quiz.



Average of ratings: -
In reply to Waleed Sohail

Re: Creating a security Module

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Wow.. that is a huge task, and likely impossible to fully cover every angle. In the end, the majority of students will be honest, but there will always be a few who will try a shortcut, or just try to cheat their way through. (The kinds of people who become CEOs, Presidents or serial killers I expect..smile. ) 

You may want to start with the Plugin Development documents, there is likely to be something there that will help. From there, have a look at the existing plugins in the Downloads pages. There may be something existing that you could use as a template or there may be a number of plugins that do one thing each that you could combine into a single plugin. This is likely to save you some time if find something you could use. Just make sure that the code is Open Source though, some plugins are free to use, but not Open Source, I understand. 

If you are looking for serious Development support, which you may need if something is just not working, try the General Developer's Forum. Lots of help is available from existing Devs. Good luck.  

In reply to Colin Fraser

Re: Creating a security Module

by Waleed Sohail -

I just want to make it secure enough that only the account owner can attempt all the modules.

In reply to Waleed Sohail

Re: Creating a security Module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Two things...

1. please don't post exactly the same question in multiple forums (https://moodle.org/mod/forum/discuss.php?d=371190, https://moodle.org/mod/forum/discuss.php?d=371191). You posted this in four different forums - not cool!

2. It would be much better if you updated your user profile to show your real name. Then we know who we are talking to wink

In reply to Howard Miller

Re: Creating a security Module

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hello. Just to say I deleted all your other duplicate posts and kept this one as it had two responses.
Average of ratings: Useful (2)
In reply to Howard Miller

Re: Creating a security Module

by Waleed Sohail -

Yeah Im sorry for posting in multiple forums, was needing a faster reply. 

Second thing, I signed up using my company mail address thats why the name was that. 

Next thing, Please help me on this.

In reply to Waleed Sohail

Re: Creating a security Module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I can't see how this would give any more security than a username and password. How does it stop someone cheating?

In reply to Howard Miller

Re: Creating a security Module

by Waleed Sohail -

Actually im getting this form filled at the signup, and the next time user logs in and tries to solve a module he gets one or two in his quiz.


In reply to Waleed Sohail

Re: Creating a security Module

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Do you think this might actually be a little excessive? There is a point where a desire to protect something becomes onerous, overbearing and threatening. As a User, unless I saw this as critical to my continued employment, I would leave it it, go somewhere else and complain heartily that someone is a tad overzealous and preventing Users from doing the things they need to. If I had no choice my first action after taking the test would be to write a harsh email to every person I could think of about how threatening this was, undermining my confidence and all sorts of other things. You cannot build a "system of perfection", it's impossible but in trying you can alienate a lot of people. You could have one security question chosen at random from a bank of questions the User has responded to earlier. That would be less imposing, less threatening, I suggest. 

In reply to Waleed Sohail

Re: Creating a security Module

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
A neat idea! Why don't you simply create a quiz with only questions of this kind and making it a condition for entering the "module", whatever that is?
In reply to Visvanath Ratnaweera

Re: Creating a security Module

by Waleed Sohail -

I tried using the quiz module, but the quiz answers are static, they must be given when making the module, it can not be kept based on users. Like if Person A likes Pizza and B likes Pasta.

I can add a security question about favorite food, but the answer must be generic for both of them in the quiz. 

I want such a quiz that has different correct answers based on user id.

In reply to Waleed Sohail

Re: Creating a security Module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Ok... but it won't work. 

If someone cheats by giving someone else their username and password they just need to give them this information as well. 

In reply to Howard Miller

Re: Creating a security Module

by Waleed Sohail -

What else can be done to provide security then?

In reply to Waleed Sohail

Re: Creating a security Module

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Define "security". What problem do you have that you are trying to fix?

If you want to be able to administer quizzes and be absolutely sure that the person you think should be doing the quiz is doing it then you need to do it under exam conditions. There is loads and loads of discussion on the Interweb about this. It's most certainly not something you can "just fix" in Moodle. 

If people want to cheat, they will cheat.