Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Modified My Grades to show 'Excused' & 'Missing'.

  • Loading branch information...
commit 54a0c0b65c7fb0d3a711969dd19cdf9e8fd41fb5 1 parent 6dc63f6
@rnhurt authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 app/helpers/grade_helper.rb
View
8 app/helpers/grade_helper.rb
@@ -80,9 +80,13 @@ def my_grades_detail_table(course_term)
else
course_term.assignments.sort{|a,b| a.due_date <=> b.due_date}.each do |assignment|
grade = assignment.calculate_grade(current_user.id)
- score = grade[:letter]
assignment_evaluation = assignment.assignment_evaluations.select{|ae| ae.student_id == current_user.id}.first
- score += " (#{grade[:score].round}%)" if grade[:score].round >= 0 && !course_term.grading_scale.simple_view
+ if !grade[:desc].blank?
+ score = grade[:desc]
+ else
+ score = grade[:letter]
+ score += " (#{grade[:score].round}%)" if grade[:score].round >= 0 && !course_term.grading_scale.simple_view
+ end
body += %{
<tr class="#{cycle('odd','even')}">
<td>#{assignment.name}</td>
Please sign in to comment.
Something went wrong with that request. Please try again.