app/models/applications/application_reviewer.rb
# Returns the average score for this CommitteeMember for all total scores for this Offering.
Returns the average score for this CommitteeMember for all total scores for this Offering.
Returns the average score for this CommitteeMember for all total scores for this Offering .
def reviewer_total_average_score
    committee_member.application_reviewers.find(:all, 
      :joins => :scores, 
      :select => "SUM(score) AS summed_score",
      :group => 'application_for_offering_id').collect{|s| s.summed_score.to_i}.average
  end
def reviewer_total_average_score committee_member . application_reviewers . find ( :all , :joins => :scores , :select => "SUM(score) AS summed_score" , :group => 'application_for_offering_id' ) . collect { | s | s . summed_score . to_i } . average end
Returns the average score for this CommitteeMember for all total scores for this Offering.
Returns the average score for this CommitteeMember for all total scores for this Offering .
# committee_member.application_reviewers.for(offering).collect{|r| r.total_score rescue nil}.compact.average