SSP-2971 Fix Elective Admin Sorting
SSP-2980 Fix Error loading Main Details and Transcript tabs

The real issue is with external data in external_student_transcript_course where the term_code is no longer
 found in external_term table. This commit adds guard code so UI doesn't hang.