ajnyga / objectsForReview

GNU General Public License v3.0
1 stars 4 forks source link

Review Information is overwritten with new review #8

Open felixhelix opened 1 year ago

felixhelix commented 1 year ago

Dear @ajnyga,

there are some issues I came across, and maybe they are interrelated. The first is that it was not possible for me to select an object for review that was in the list of objects created by the manager: The list was empty. Maybe this is related to the fact that the objects for review can be reserved for certain users. Alas, there is no way to designate such a user, and so the field value is NULL:

grafik

I thus changed the query in ObjectsForReviewForm.inc.php in the fetch method from $objectsForReview = $objectForReviewDao->getByUserId($currentUser->getId(), NULL, true) with $objectsForReview = $objectForReviewDao->getAll($context->getId(), false, false) And also commented out a section in the ObjectsForReviewGridHandler method addReservedObjectForReview where the plugin checked the userId. Then it worked fine, and the user could select an object for review. However, if another user writes a review of the same object, the value submission_id in the table objects_for_review is overwritten with the id of the new review, and the reference to the first review is thus lost. I don't know, if this is maybe by design?

Yours,

Felix

ajnyga commented 1 year ago

thanks, I will check this soon. It has been a while since I last visited the plugin so not sure if this is something I have already fixed locally.