app/models/studentdb/student_record.rb
# Returns a list of the student's majors. By default, this is a comma-separated list of the major abbreviations, but this can
# be changed by passing parameters to include your own join string and/or include full major names. Does not include
# the "Non Matriculated" major name.
# 
# To see this student's majors list from a previous quarter, specify that quarter for +reference_quarter+. If the student had no
# majors in that quarter, this method returns a blank string.
Returns a list of the student's majors. By default, this is a comma-separated list of the major abbreviations, but this can
be changed by passing parameters to include your own join string and/or include full major names. Does not include
the "Non Matriculated" major name.

To see this student's majors list from a previous quarter, specify that quarter for +reference_quarter+. If the student had no
majors in that quarter, this method returns a blank string.
Returns a list of the student ' s majors . By default this is a comma - separated list of the major abbreviations but this can be changed by passing parameters to include your own join string and / or include full major names . Does not include the " Non Matriculated " major name . To see this student ' s majors list from a previous quarter specify that quarter for + reference_quarter + . If the student had no majors in that quarter this method returns a blank string .
def majors_list(show_full_names = true, join_string = ", ", reference_quarter = nil)
    if reference_quarter.nil? || (Quarter.current_quarter == reference_quarter)      
      ref_majors = majors
    else
      t = transcripts.find([system_key, reference_quarter.year, reference_quarter.quarter_code_id]) rescue nil
      t = (transcripts.find([system_key, reference_quarter.prev.year, reference_quarter.prev.quarter_code_id]) rescue nil) if t.nil?
      ref_majors = t.nil? ? [] : t.majors
    end
    ref_majors.collect { |m| show_full_names ? m.full_name : m.major_abbr.strip }.reject{|m| m == "Non Matriculated" }.join(join_string)
  end
def majors_list ( show_full_names = true , join_string = ", " , reference_quarter = nil ) if reference_quarter . nil? || ( Quarter . current_quarter == reference_quarter ) ref_majors = majors else t = transcripts . find ( [ system_key , reference_quarter . year , reference_quarter . quarter_code_id ] ) rescue nil t = ( transcripts . find ( [ system_key , reference_quarter . prev . year , reference_quarter . prev . quarter_code_id ] ) rescue nil ) if t . nil? ref_majors = t . nil? ? [ ] : t . majors end ref_majors . collect { | m | show_full_names ? m . full_name : m . major_abbr . strip } . reject { | m | m == "Non Matriculated" } . join ( join_string ) end
Returns a list of the student's majors.
Returns a list of the student ' s majors .
show_full_names
join_string
reference_quarter