The selection of reviewers works as follows:
If the submitting user is member of a reviewgroup, the reviewer is chosen randomly from the other members of that reviewgroup (if the user is a member of several reviewgroups, it is chosen from the members of all the reviewgroups). Reviewgroups are created in table REVIEWGROUP, the user becomes a member via REVIEWGROUP_USER. There is no need to assign review privileges, except the user should review other submissions as well (see below). Privileges are ignored for those assignments. A reviewgroup can have a "super reviewer" (USER_ID in REVIEWGROUP), if so, this user gets all reviews from the group (if a user is a member of several reviewgroups, and one has a super reviewer, this is used. If the user is a member of several reviewgroups who have a super reviewer, one of the super reviewers is chosen randomly).
If the submitting user is not in a reviewgroup and the editor system (see below) is not in place, the reviewer is randomly chosen from all users who have the role assign_reviews. The review role is not relevant, that is needed to access the review tab (the reason for this is that if a reviewer stops to be a reviewer, he should no longer get new reviews, but still be able to do the remaining ones).
If there is an editor (a user with permission) edit, reviews (from outside a reviewgroup) are assigned to this user first. The editor then can either do the review himself or assign it to a reviewer. The editor can chose any of the users with role assign_reviews. There are so called reviewtypes (table REVIEWTYPE), which can contain any number of users (REVIEWTYPE_USER). The editor can chose a reviewtype as well. If he does so, the reviewer is randomly chosen from all users in that reviewtype (who have role assign_reviews).
Reviewers can return reviews to the editor if there is one. The reviewer can then decide again.