Friday, May 24th

Last update09:35:45 PM GMT

Add Announcement Here

PIN Activation

PIN Activation

I am developing an elearning website and I have a set of pre-entered PINS in a database. For the user to access certain resources within my site, this PINS have to be entered and matched to the ones in database. When they are matched the user can gain access to the resources and the PIN should expire upon usage so that it cannot be re-used,i am in desperate need of a script that can help me achieve that.

ksituma
useravatar
Offline
3 Posts
User info in posts
Administrator has disabled public posting

Re: PIN Activation

ksituma wrote:

I am developing an elearning website and I have a set of pre-entered PINS in a database. For the user to access certain resources within my site, this PINS have to be entered and matched to the ones in database. When they are matched the user can gain access to the resources and the PIN should expire upon usage so that it cannot be re-used,i am in desperate need of a script that can help me achieve that.

I have a couple of questions regarding your inquiry.
1) Where do you want to handle this PIN management feature in the Database itself or in your business logic code
2) What languages and framework are you using for this website.
Thanks

amadou
useravatar
Offline
169 Posts
User info in posts
Administrator has disabled public posting

Re: PIN Activation

Thanx for the response
I am using moodle which is an online Learning Management System(LMS),the way it has been build students can enroll to courses using an activation PIN which is set by the administrator.The limitation of that is the fact that you have to use a single PIN to enroll for all courses.So i would like to come up with my own activation,which will enable the courses to be activated using different PINs.The PINs should be stored in a separate database and should be encypted and decypted upon a user activating the course and finally flagged so that they cannot be re-used.

ksituma
useravatar
Offline
3 Posts
User info in posts
Administrator has disabled public posting

Re: PIN Activation

I understand that Moodle is written in PHP. I don't thin k you need a separate DB for that you can create a separate within the DB that is created by Moodle. So here what I think, you should write a PHP methods that does the following create randomized PINs for your user upon course registration, and store them in the new table.
Once a course is activated for a given user (using one PIN), have another method that delete that PIN. Lastly you may need to integrate that in the Moodle registration class and switch the (Moodle) method or the code within the method that generate the PIN with your own newly created method. You may have to do the same integration with your DeletePIN method.

The question is how comfortable are you with PHP and the Moodle source code?

amadou
useravatar
Offline
169 Posts
User info in posts
Administrator has disabled public posting

Re: PIN Activation

Thanks Amadou for the quick response,i have so far created a PIN activation script and its working well the problem am facing is for the PIN to be deleted from the database when the user activates the course.Because the method i had tried is flagging of the used PINs whereby a used PIN is flagged to upon activation.But am still having problems implementing that.

ksituma
useravatar
Offline
3 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
117
Total Polls:
0
Total Posts:
463
Dormant:
User Info:
 
Total Users:
1297
Newest User:
margaret0
Members Online:
0
Guests Online:
144

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked

Contact us

  • Add: 554 N Frederick Avenue Suite 216,
    Gaithersburg, MD 20877 USA
  • Tel: (888) 418-1146
You are here: Forum Node.js General Discussion PIN Activation