apluslms / mooc-jutut

Course feedback gathering and management tool. Used with A+ learning management system.
1 stars 12 forks source link

Preserve page size selection when changing filters #100

Closed Mikael-Lenander closed 4 months ago

Mikael-Lenander commented 6 months ago

Description

What?

Page size is selected in the paginate_by select menu. Previously the page size was forgotten when the teacher made a new query in the filter feedback form. Now the page size is preserved.

Why?

Improves usability.

How?

Adds a new filter to the FeedbackFilter class. This filter does not actually filter anything. It merely stores the paginate_by parameter in the url. The form field is hidden, since we do not need a duplicate page size input field to the filter form.

Fixes #36

Testing

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

What type of test did you run?

Changed filters in the filter form and made sure that the page size setting is preserved. Changed the page size setting and made sure that the filters are preserved.

Did you test the changes in

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!

etanttila commented 4 months ago

This seems good to me and ready for merging.

ihalaij1 commented 4 months ago

Looks good!

etanttila commented 4 months ago

After merging, it turned out that the code doesn't pass lint tests due to a renamed argument (see https://github.com/apluslms/mooc-jutut/actions/runs/9096725994/job/25002881344#step:5:26). It seems like the lint tests didn't run in your fork @Mikael-Lenander, which is why the problem wasn't noticed earlier. It would be valuable to get them working, so the tests could be run also for your other PRs to avoid the same problem in the future. Are you able to get them working on your own or do you need help with that?

Edit: Jimmy suggested that you probably have to go to the GitHub actions page and enable the workflow runs.

Mikael-Lenander commented 4 months ago

I got them working. Thanks.