<commit_before>/*
 Compares the student's current schedule of courses to their
 transfer and credit-by-exam courses, and complains about
 any currently enrolled courses that are redundant.
 */

var completedCourses = transfercourses.concat(bSttrNcCourses).sort().join();
var duplicateCourses = [];
for (i in coursenumberactive) 
{
    if (completedCourses.indexOf(coursenumberactive[i]) >-1)
    {
        duplicateCourses.push(coursenumberactive[i]);
    }
}
duplicateCourses ? "<div style='color:#990000'>The student is enrolled for the following courses which their transfer credits make redundant:\n"+duplicateCourses.join() : "<div style='color:navy'>No transfer credit redundancies found.";<commit_msg>support legacy codes for LVIS and LENG-223<commit_after>/*
 Compares the student's current schedule of courses to their
 transfer and credit-by-exam courses, and complains about
 any currently enrolled courses that are redundant.
 */

var completedCourses = transfercourses.concat(bSttrNcCourses).sort();
var duplicateCourses = [];
var completedCoursesString = completedCourses.join();

// For each LAHS (deprecated history code) credit, also consider
// its LVIS (new code) equivalent.
// For each LENG-201 credit, also consider its new code, LENG-223.
for (i in completedCourses) {
    var completedCourse = completedCourses[i];
    if (completedCourse.indexOf("LAHS") === 0) {
        completedCourses.push(completedCourse.replace("LAHS", "LVIS"));
    }
    else if (completedCourse === 'LENG-201') {
        completedCourses.push('LENG-223');
    }
}

// List all currently enrolled courses that are redundant
// because of transfer or noncourse credit.
var completedCoursesString = completedCourses.join();
for (j in coursenumberactive) {
    var course = coursenumberactive[j];
    if (completedCoursesString.indexOf(course) >-1)
    {
        duplicateCourses.push(course);
    }
}
duplicateCourses ? "<div style='color:#990000'>The student is enrolled for the following courses which their transfer credits make redundant:\n"+duplicateCourses.join() +"</div>" : "<div style='color:navy'>No transfer credit redundancies found.</div>";
{'fraction_non_alphanumeric': 0.11069767441860465, 'fraction_numerical': 0.013953488372093023, 'mean_word_length': 4.797843665768194, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1533453', 'n_tokens_mistral': 644, 'n_tokens_neox': 591, 'n_words': 188}