Commit Graph
13 Commits
Author SHA1 Message Date
Jukka KuustoandGitHub ff5789c084 Jukka/multichoice listing (#322)
* Create listing of existing multichoice exercises

* Aadd multichoice to exercise listing
2025-04-25 13:58:33 +03:00
Jukka KuustoandGitHub b598ba3d99 Jukka/multichoice db (#304)
* Create database tables for multichoice exercise

* Fetch exercise data from DB, form page slugs according to multichoice_exercises id

* Populate DB with example multichoice exercise data

* Remove confusing user message while useQuery handles data

* Display exercise description

* Add automatic shuffle of multichoice options order

* Reset incorrect answer style coloring when user reselects an answer option (before resubmitting)

* Rename migrations to avoid conflicts with master

* Update populate file with category column

* Create tests for multichoice exercise

* Fix typo from conflict resolving
2025-04-24 14:21:53 +03:00
Jukka KuustoandGitHub fd4a783734 Remove commented-out, unused styling (#306) 2025-04-24 13:19:36 +03:00
Jukka KuustoandGitHub e20242db8a Jukka/multichoice front (#234)
* Create multiple choice exercise page

* Create multichoice exercise logic with basic user feedback

* Create multichoice.css, use Button component

* Fine-tune and clean up exercise CSS

* Remove reset of incorrect answers, small changes for improved readability

* Change to a more explicit structure for exercise data

* Change file and component names to more descriptive ones
2025-04-02 12:08:33 +03:00
Jukka KuustoandGitHub b7430d725a Update middleware protected path (#217) 2025-03-27 14:12:30 +02:00
Jukka KuustoandGitHub dda5a559e8 Jukka/session management (#181)
* Create session check feature with logout link in navbar

* Create session context to update conditional user view on first render

* Add logout api call to navigation logout button

* Create middleware to restrict logged-in users from accessing login and register pages

* Add middleware for logged-in users only protected pages

* Redirect user back to original protected page after successful login

* Create tests for session api route

* Create documentation
2025-03-26 12:38:06 +02:00
000d0f2e28 Jukka/login tests (#154)
* WIP

* WIP2

* fixed jsdom

* Create 3 more tests for login and refactor for drier code

* Chore: Fix spelling of verifyPassword

---------

Co-authored-by: DoebelnAtz <axel.ej.adlercreutz@gmail.com>
2025-03-11 13:36:45 +02:00
Jukka KuustoandGitHub ddd404d3f8 Jukka/login refactor (#132)
* Refactor password verification logic into verifyPassword()

* Refactor: Move session.js to backend/auth and update imports and test mock paths
2025-03-06 10:32:11 +02:00
Jukka KuustoandGitHub 792f75ead9 Jukka/login db (#128)
* Add input email and password verification by comparing to db entry
2025-02-27 16:11:01 +02:00
Jukka KuustoandGitHub a5c58b10eb Jukka/session cookie (#96)
* Add session cookie creation

* Create logout function, create tests, refactoring, minor chores

* Fix logout api and test, some housekeeping
2025-02-19 10:55:02 +02:00
Jukka KuustoandGitHub ecb0457314 Add try-catch statement for upcoming login validation, globals.css support (#55) 2025-02-06 09:24:34 +02:00
Jukka KuustoandGitHub 2d4ce31cdf Create route for Login page (#35)
* Create route for Login page

* Add login form and basic layout pattern for auth with placeholder styling

* Add basic event handling for form

* Add controlled inputs to form
2025-02-04 20:18:01 +02:00
Jukka KuustoandGitHub 24bfaa2841 Update README, create package-lock.json (#34) 2025-01-31 10:02:11 +02:00