This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects

Resolve "Reviewing Badges: Zusätzliche Icons"

Merged Michael Breu requested to merge 397-reviewing-badges-zusatzliche-icons into development
Files
15
@@ -33,16 +33,16 @@ public interface ReviewRatingJPARepository extends JpaRepository<ReviewRating, L
@Query("SELECT rr FROM ReviewRating rr WHERE rr.review.id=:reviewId")
List<ReviewRating> findByReview(@Param("reviewId") Long reviewId);
@Query("SELECT rr.status as status, count(*) as statusCount from ReviewRating rr WHERE rr.user = :user group by status")
List<StatusAndCount> countReviewsForUserByStatus(@Param("user") User user);
@Query(
"SELECT rr.status as status, count(*) as statusCount from Review r LEFT JOIN ReviewRating rr ON rr.review=r.id WHERE r.requestedBy = :userId GROUP BY status"
"SELECT rr.status as status, count(*) as statusCount FROM Review r LEFT JOIN ReviewRating rr ON rr.review = r WHERE r.requestedBy = :userId GROUP BY status"
)
List<StatusAndCount> countReviewsForRequestingUserByStatus(@Param("userId") Long userId);
List<StatusAndCount> countReviewsForUserByStatus(@Param("userId") long userIdl);
@Query("SELECT rr.status as status, count(*) as statusCount FROM ReviewRating rr WHERE rr.user = :user GROUP BY status")
List<StatusAndCount> countReviewsTasksForUserByStatus(@Param("user") User user);
@Query("SELECT count(*) as statusCount from Review r LEFT JOIN ReviewRating rr ON rr.review=r.id WHERE r.requestedBy = :userId")
Integer countReviewsRequestedByUser(@Param("userId") Long userId);
Integer countreviewsRequestedByReviewer(@Param("userId") Long userId);
@Query(
"SELECT count(*) as statusCount from Review r JOIN Statistics s ON r.resourceid = s.exerciseID WHERE r.requestedBy = :userId AND s.badgeRewarded=true "