Fixed SQL Exception

Not all Databases convert smallint to boolean. Added an equality test.
Prevent user seeing rating if no groups

If there are no groups to rate, tell the user and don't show the
rating form.