Security Questions Plugin  version 1.1
======================================

1. INTRODUCTION
---------------
This plugin shows a random personal question while the student is logged in moodle. The intention is to verify that the student is really enroled in the course. If the student fails the question after several attempts then is locked.

The question only shows in the screen when the student goes to the Home page. Never while the student is in an activity or resource.

To unlock the student, thw admin must go to the profile and unmark the "Suspended Account" checkbox.

The admin can list the locked accounts from the Users list filtering by suspended accounts or using the report included in the plugin (See Site Administration > Plugins > Local Plugins > View Suspended User)


2. INSTALLATION
---------------
a) Unzip the askquestion.zip file and copy the folders to the moodle site overwriting the existent. 

b) By default, the Standard theme is modified. You must modify your theme with the same code at the end of config.php file located in all the Moodle Themes:

// ========================== Ask Question Customization ============================= //

require_once($CFG->dirroot.'/local/askquestion/redirect.php');

// ========================== Ask Question Customization ============================= //
 

c) Login as admin and go to Site Administration > Notifications. The database will be updated and the plugin installed.


3. CONFIGURATION
----------------
a) To create the questions, go to: Site administration > Users > Accounts > User profile fields and create a new category.

b) Create an unlimited number of questions. The type must be "Text Input"

c) The settings in the question must be:

Is this field required?  YES
Is this field locked?  NO
Should the data be unique?  NO
Display on signup page?  YES
Who is this field visible to? NOT VISIBLE
Category  Select the new category created for the security questions

d) Go to Site Administration > Plugins > Local Plugins > Ask Question Settings and configurate the settings:

- Ask security question after login:   NO (default) 
***IMPORTANT*** Enable this option in production sites will lock the users access.

- Maximum attempt allowed in answering the security question:   3 (default) 
The number of failed attempts allowed before lock the user

- Profile field category ID:  2 (default) 
The category of the user profile fields created for the security questions. (You can see the id in the address bar while editing the category) 



4. REPORT A BUG
---------------
To report issues, bugs or forum support:
http://3-bits.org/



5. LICENSE
----------
This plugin is licensed under the GNU General Public License. (see http://www.gnu.org/licenses/gpl.html)


6. CHANGELOG
------------

- 1.0 First release
- 1.1 Changed the random time to be more effective. Actually should show a question about 50% of time or less




********************* IMPORTANT ***********************************************

Affected Moodle core files

login/lib.php
theme/standard/config.php (or any other used theme)

Updating moodle will break the system, specially the login/lib.php file.

*******************************************************************************
