app/models/studentdb/student_record.rb
def class_standing_description(options = {})
    ref_class_standing = options[:reference_quarter] ? (class_standing(options[:reference_quarter]) || class_standing) : class_standing
    ref_quarter = options[:reference_quarter] || Quarter.current_quarter
    if !degrees.granted.empty? && degrees.granted.first.quarter.id < ref_quarter.id && ref_class_standing == 4
      return options[:recent_graduate_placeholder] if options[:recent_graduate_placeholder]
      return "Graduated #{degrees.granted.first.quarter.title}"
    end
    if !degrees.applied.empty? && ref_class_standing == 4 && options[:show_upcoming_graduation] == true
      return "Senior (Graduating #{degrees.applied.first.quarter.title})"
    end
    ref_class_standing_record = ClassStanding.find(ref_class_standing) rescue nil
    ref_class_standing_record.description unless ref_class_standing_record.nil?
  end
# In the SDB, "class standing" refers to the most recent class standing for this student. If they are a recent graduate, for instance,
# this will still return "Senior." To remedy this, we check to see if this student has any valid degrees AND they have a class standing
# of "4" (senior) and return "Graduated <Quarter>" if so. Otherwise, return the class standing description from the ClassStanding table.
# 
# == Options
# 
# * +show_upcoming_graduation+: Set to true to also include "(Graduating <Quarter>)" if the student 
#   has applied for graduation.
# * +recent_graduate_placeholder+: Return a different text if this is a recent graduate. Default is "Graduated <quarter>"
# * +reference_quarter+: Base the results of this method on a different quarter instead of the current quarter. This
#   will examine the student's transcript records instead of using the +class+ standing attribtue from +student_1_v+
In the SDB, "class standing" refers to the most recent class standing for this student.

Options

+show_upcoming_graduation+: Set to true to also include "(Graduating )" if the student
has applied for graduation.
+recent_graduate_placeholder+: Return a different text if this is a recent graduate. Default is "Graduated "
+reference_quarter+: Base the results of this method on a different quarter instead of the current quarter. This
will examine the student's transcript records instead of using the +class+ standing attribtue from +student_1_v+
In the SDB " class standing " refers to the most recent class standing for this student . Options + show_upcoming_graduation + : Set to true to also include " ( Graduating ) " if the student has applied for graduation . + recent_graduate_placeholder + : Return a different text if this is a recent graduate . Default is " Graduated " + reference_quarter + : Base the results of this method on a different quarter instead of the current quarter . This will examine the student ' s transcript records instead of using the + class + standing attribtue from + student_1_v +
def class_standing_description(options = {})
    ref_class_standing = options[:reference_quarter] ? (class_standing(options[:reference_quarter]) || class_standing) : class_standing
    ref_quarter = options[:reference_quarter] || Quarter.current_quarter
    if !degrees.granted.empty? && degrees.granted.first.quarter.id < ref_quarter.id && ref_class_standing == 4
      return options[:recent_graduate_placeholder] if options[:recent_graduate_placeholder]
      return "Graduated #{degrees.granted.first.quarter.title}"
    end
    if !degrees.applied.empty? && ref_class_standing == 4 && options[:show_upcoming_graduation] == true
      return "Senior (Graduating #{degrees.applied.first.quarter.title})"
    end
    ref_class_standing_record = ClassStanding.find(ref_class_standing) rescue nil
    ref_class_standing_record.description unless ref_class_standing_record.nil?
  end
def class_standing_description ( options = { } ) ref_class_standing = options [ :reference_quarter ] ? ( class_standing ( options [ :reference_quarter ] ) || class_standing ) : class_standing ref_quarter = options [ :reference_quarter ] || Quarter . current_quarter if ! degrees . granted . empty? && degrees . granted . first . quarter . id < ref_quarter . id && ref_class_standing == 4 return options [ :recent_graduate_placeholder ] if options [ :recent_graduate_placeholder ] return "Graduated #{degrees.granted.first.quarter.title}" end if ! degrees . applied . empty? && ref_class_standing == 4 && options [ :show_upcoming_graduation ] == true return "Senior (Graduating #{degrees.applied.first.quarter.title})" end ref_class_standing_record = ClassStanding . find ( ref_class_standing ) rescue nil ref_class_standing_record . description unless ref_class_standing_record . nil? end
In the SDB, "class standing" refers to the most recent class standing for this student.
In the SDB " class standing " refers to the most recent class standing for this student .
options