This page will...
This is an example of how pages link to this page:
<a href="enroll.html?id=First902">Writing Audit Reports</a>
- Obtain course title from the id parameter
- Look up title in SQLite3 database table Courses
- Retrieve description (text) and status (number)
- If status=0, course is pending (not yet available); add 1 to number of people interested and exit enrollment
- If status=1, course is available; proceed with enrollment
- Allow user to resume course already started. Prompt for email address
- Look up email in SQLite3 db table Enrolled
- If found, check current date is <= expiry date. If not expired, look up current screen number for user's email in table Progress; return user to that screen & exit enrollment.
- If user's access has expired, continue with new enrollment.
- Wait (5 minutes) for user to enter first name, cell phone & press Submit
- If no response within 5 minutes, give error message and exit enrollment
- Generate One Time Passcode (OTP) & send to user's cell phone
- Wait (15 minutes) for user to submit correct OTP
- If no response within 15 minutes, give error message and exit enrollment
- Display price, based on title. If title[5]=9, price is $35 else price is $15
nb: in JS arrays are 0-based, so [5] is 6th char - Wait for user to press Checkout
- Start PayPal | Stripe process - unsure how to do this
AdMark will set up each process at USD $350 - Wait (15 minutes) for user to complete payment for the course price
- If user leaves or payment declined, give error message and exit enrollment
- Update table Enrolled with email, title and expiry date (10 days hence);
create entry in table Progress for user's email with course & start screen number (0% progress), and expiry date - Send receipt to user's email with date, title and price
As user progresses through the course, update table Progress with current screen number.
When user completes the course, update table History with email, title, date; and delete record
from table Progress. Send notice to user's email congratulating them on completing the course.
Periodically purge records from table Progress where today > expiry date.
Nice to have user dashboard from tables History and Progress.