At the moment, to log in to the website, the user must navigate to either view a course or enroll a
course. Either way, the same “Log in with Facebook” button is used.
Once the user clicks Log in with Facebook, a new user is created, if the user didn’t exist before, but if the
user exist before, it simply uses their information.
Once the user logs in, we can check if they are already enrolled, in this case, we show them the View
solutions button, but if they are not enrolled, they will see the Register button.
Once they click register, they will see this register page to register into the course (important: not
register to the website! The log in with Facebook registers to the website!)
When they submit the information, their request is sent to the subscription page in the admin panel for
the administrator.
The admin can then approve the request or reject it or cancel it.
We want to remove the Log in with Facebook and add the default log in that comes with Wordpress.
When you log in, it automatically redirects you to the next page. So for example, on top, where you see
the Log in with Facebook button, when you press the new and changed log in (with default wordpress),
it will bring you to the log in page ([Link]) and after log in page, it will bring you back to the page
you are on, but this time logged in.
Also on the log in page, have an option to register. Registration will need the following fields:
- First name (letters only, some logical limit say 100 characters, cannot be left empty).
- Last name (letters only, some logical limit say 100 characters, cannot be left empty).
- E-mail (Make sure @ is present, make sure e-mail is in valid form, cannot be left empty).
- Phone number (number only, in this format: xxxxxxxxxx, cannot be left empty, max 10
characters)
- Username (alphanumeric, cannot be left empty, no spaces)
- Password (I am sure wordpress password default is good enough).
- Captcha (we have recaptcha)
Anyways after user registers or logs in, they are redirected to the page they were previously on, but this
time logged in. Please note this is also true for register. When the register happens, the user is logged in
automatically and redirected to the page they came from. Now they must register or view the solution.
If they register, they only need to solve the captcha on the register page, we don’t need them to type
the first name, last name, phone number, e-mail, as these will be taken on the new register page. Once
the user presses register, the enroll request is sent normally.
So here the first name, last name, phone number, and email field should be gone, and only the captcha
remains. This will send the enrollment request! Please do not confuse this with registering a student.
Registering happens when the user registers before this page!