apluslms / a-plus

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

Fix issues with multilanguage news #1354

Closed mikaelGusse closed 3 months ago

mikaelGusse commented 3 months ago

Description

What?

Removed two leftover print calls and changed how the singular news remove button functions. Previously the button was sending a GET request which then edited the database which should not be done. This has now been changed such that it send a POST request instead.

Why?

Improves code readability and functionality

How?

Added a javascript listener to the singular remove buttons that then sends the request and redirects back to the current page

Testing

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

What type of test did you run?

Tried removing news in different kinds of situations (Just one news item, multiple, last news item, one from the middle etc.)

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!