Bug 29749 - Clean up OpacStarRatings
Summary: Clean up OpacStarRatings
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-21 22:27 UTC by Lucas Gass
Modified: 2023-06-24 20:43 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 29749: Clean up OpacStarRatings code (21.11 KB, patch)
2021-12-21 23:01 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 29749: Clean up OpacStarRatings code (21.21 KB, patch)
2022-03-23 17:12 UTC, Lucas Gass
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2021-12-21 22:27:27 UTC
While working on Bug 29280 I noticed there is some different code related to OpacStarRatings that could be consolidated a bit. 

OPAC pages that include OpacStarRatings are:

-OPAC detail
-OPAC user summary 
-OPAC reading history
-OPAC results

Sometimes a logged in user can interact with the ratings (OPAC detail, user summary, reading history )

Other times they cannot ( results )

A bit of cleanup here can make it easier to implement OPACStarRatigs elsewhere, like on the list displays in Bug 29280.
Comment 1 Lucas Gass 2021-12-21 23:01:07 UTC
Created attachment 128850 [details] [review]
Bug 29749: Clean up OpacStarRatings code

To test:
1. Apply patch
2. Make sure OpacStarRatings is set to 'results, details, patrons'
3. Check out some items to a patron you can login to the OPAC as
4. Do a OPAC catalog search that will turn up some of those items you checked out
5. Go to the item's detail pages, logged in as the patron with those checkouts
6. From the detail page, rate some of those items.
7. Go to the user summary page, make sure you can see and change the ratings from there.
8. Go to the reading history page, make sure you can see and change those ratins from there.
9. Go back to the detail pages and make sure any changes you made on the user summary and reading history page are acuratly reflected
10. Look at those items from the results page. You should be able to view the ratings but not change them.
11. Again visit the OPAC, this time as a unauthenticated user. You should be able to view the ratings from the details page but not interact with them.
Comment 2 Jonathan Druart 2022-01-03 11:11:41 UTC
Lucas, is this patch ready for testing?
Comment 3 Lucas Gass 2022-03-23 17:12:03 UTC
Created attachment 132067 [details] [review]
Bug 29749: Clean up OpacStarRatings code

To test:
1. Apply patch
2. Make sure OpacStarRatings is set to 'results, details, patrons'
3. Check out some items to a patron you can login to the OPAC as
4. Do a OPAC catalog search that will turn up some of those items you checked out
5. Go to the item's detail pages, logged in as the patron with those checkouts
6. From the detail page, rate some of those items.
7. Go to the user summary page, make sure you can see and change the ratings from there.
8. Go to the reading history page, make sure you can see and change those ratins from there.
9. Go back to the detail pages and make sure any changes you made on the user summary and reading history page are acuratly reflected
10. Look at those items from the results page. You should be able to view the ratings but not change them.
11. Again visit the OPAC, this time as a unauthenticated user. You should be able to view the ratings from the details page but not interact with them.
Comment 4 Katrin Fischer 2023-06-24 20:43:24 UTC
Is this patch ready for testing?