app/models/my_registrations/cancellation_non_payment_module.rb
# Only consider showing CNP status for undergraduate non-summer terms in which the student is not already Officially Registered
# If a student is Not Enrolled and does not have CNP protection through R99 or ROP, do not show CNP warning as there are no classes to be dropped from.
# If a student is not Officially Registered but is protected from CNP via R99, show protected status regardless of where we are in the term.
# Otherwise, show CNP status until CNP action is taken (start of classes)
# If none of these conditions are met, do not show CNP status
Only consider showing CNP status for undergraduate non-summer terms in which the student is not already Officially Registered
If a student is Not Enrolled and does not have CNP protection through R99 or ROP, do not show CNP warning as there are no classes to be dropped from.
If a student is not Officially Registered but is protected from CNP via R99, show protected status regardless of where we are in the term.
Otherwise, show CNP status until CNP action is taken (start of classes)
If none of these conditions are met, do not show CNP status
Only consider showing CNP status for undergraduate non - summer terms in which the student is not already Officially Registered If a student is Not Enrolled and does not have CNP protection through R99 or ROP do not show CNP warning as there are no classes to be dropped from . If a student is not Officially Registered but is protected from CNP via R99 show protected status regardless of where we are in the term . Otherwise show CNP status until CNP action is taken ( start of classes ) If none of these conditions are met do not show CNP status
def show_cnp?(term)
      is_undergrad = get_term_career(term) == CAREERS[:undergrad]
      return false unless is_undergrad
      summer = term[:isSummer]
      reg_summary = term[:regStatus][:summary]
      past_classes_start = get_term_flag(term, :pastClassesStart)
      if !summer && reg_summary != UGRD_SUMMARIES[:registered]
        return false if reg_summary == UGRD_SUMMARIES[:notEnrolled] && (!term_includes_indicator?(term, '+R99') && !term_includes_indicator?(term, '+ROP'))
        if (reg_summary != UGRD_SUMMARIES[:registered] && term_includes_indicator?(term, '+R99')) || !past_classes_start
          return true
        else
          return false
        end
      else
        return false
      end
    end
def show_cnp? ( term ) is_undergrad = get_term_career ( term ) == CAREERS [ :undergrad ] return false unless is_undergrad summer = term [ :isSummer ] reg_summary = term [ :regStatus ] [ :summary ] past_classes_start = get_term_flag ( term , :pastClassesStart ) if ! summer && reg_summary != UGRD_SUMMARIES [ :registered ] return false if reg_summary == UGRD_SUMMARIES [ :notEnrolled ] && ( ! term_includes_indicator? ( term , '+R99' ) && ! term_includes_indicator? ( term , '+ROP' ) ) if ( reg_summary != UGRD_SUMMARIES [ :registered ] && term_includes_indicator? ( term , '+R99' ) ) || ! past_classes_start return true else return false end else return false end end
Only consider showing CNP status for undergraduate non-summer terms in which the student is not already Officially Registered
If a student is Not Enrolled and does not have CNP protection through R99 or ROP, do not show CNP warning as there are no classes to be dropped from.
Only consider showing CNP status for undergraduate non - summer terms in which the student is not already Officially Registered If a student is Not Enrolled and does not have CNP protection through R99 or ROP do not show CNP warning as there are no classes to be dropped from .
term
<not_specific>