It is a sum instead of a count.  Change others?

On Feb 9, 2013, at 7:32 AM, kevinburleigh75 <notifications@github.com> wrote:

> In app/views/analytics/_student.html.erb:
> 
> > +  student = @klass.student_for(present_user) 
> > +  student_exercises = StudentExercise.joins{student_assignment.student}
> > +                                     .joins{assignment_exercise.topic_exercise.topic}
> > +                                     .where{student_assignment.student.id == student.id}
> > +
> > +  student_exercises_by_topic =
> > +      student_exercises.group_by{|se| se.assignment_exercise.topic_exercise.topic}
> > +%>
> > +
> > +<% student_exercises_by_topic.each do |topic, student_exercises| %>
> > +
> > +  <% num_exercises = student_exercises.count
> > +     student_exercises = student_exercises.select{|se| se.automated_credit != nil}
> > +     num_incomplete = num_exercises - student_exercises.count
> > +     num_wrong = student_exercises.count{|se| se.automated_credit == 0}
> > +     right_sum = student_exercises.sum{|se| se.automated_credit} %>
> seems like right_sum should be num_right to match other num_* variables
> 
> —
> Reply to this email directly or view it on GitHub..
>