function highlightAvailablePrereqs(course_id) {
    //Get list of prerequisites of the last dropped course
    var prereq_list = getPrereq(course_id);
    //Get a list of courses that are in the course countainer
    var available_list = getAvailableCourses();
    var course_index;
    
    //For all courses in course container
    for (var i = 0; i < prereq_list.length; i++) {
        course_index = arrayContains(available_list, prereq_list[i]);
        //If a prerequisite is in course container
        if (course_index >= 0) {
            //Highlight the course with red
            document.getElementById(prereq_list[i]).style.backgroundColor = "red";
        }
    }
}
//Function to highlight with red backgorund the prerequisites that are not in the drop space
Function to highlight with red backgorund the prerequisites that are not in the drop space
Function to highlight with red backgorund the prerequisites that are not in the drop space
function highlightAvailablePrereqs(course_id) {
    var prereq_list = getPrereq(course_id);
    var available_list = getAvailableCourses();
    var course_index;
    for (var i = 0; i < prereq_list.length; i++) {
        course_index = arrayContains(available_list, prereq_list[i]);
        if (course_index >= 0) {
            document.getElementById(prereq_list[i]).style.backgroundColor = "red";
        }
    }
}
function highlightAvailablePrereqs ( course_id ) { var prereq_list = getPrereq ( course_id ) ; var available_list = getAvailableCourses ( ) ; var course_index ; for ( var i = 0 ; i < prereq_list . length ; i ++ ) { course_index = arrayContains ( available_list , prereq_list [ i ] ) ; if ( course_index >= 0 ) { document . getElementById ( prereq_list [ i ] ) . style . backgroundColor = "red" ; } } }
Function to highlight with red backgorund the prerequisites that are not in the drop space
Function to highlight with red backgorund the prerequisites that are not in the drop space
//Get list of prerequisites of the last dropped course //Get a list of courses that are in the course countainer //For all courses in course container //If a prerequisite is in course container //Highlight the course with red