apluslms / a-plus

A+ frontend portal - A+ LMS documentation:
https://apluslms.github.io/
Other
66 stars 73 forks source link

Login should not take the user to the front page #1352

Closed khattam2 closed 5 months ago

khattam2 commented 6 months ago

Fixes #1133

Description

What?

Login should not take the user to the front page.

Why?

The user should be redirected to the same page they came from after login.

How?

The user is now being taken to the page it came from before logging in.

Testing

image image

Remember to add or update unit tests for new features and changes.

What type of test did you run?

[ADD A DESCRIPTION ABOUT WHAT YOU TESTED MANUALLY]

Did you test the changes in

Think of what is affected by these changes and could become broken

Translation

Programming style

Have you updated the README or other relevant documentation?

Is it Done?

Clean up your git commit history before submitting the pull request!

murhum1 commented 5 months ago

I figured it might be better to build the redirect url on server side instead, to avoid extra JS on every page, and for the (unlikely) event where the logout url would change for some reason. Also added the next-parameter to the mobile login link.