Generar enroll_grade_id en cl_courses_x_students

Generar enroll_grade_id en cl_course_x_students para poder comparar correctamente con la nota en el expediente

UPDATE 
cl_courses_end_grades_conv conv
JOIN cl_courses_end_grades grades ON conv.course_end_grade_id = grades.grade_id
JOIN cl_courses_x_aulas cxa ON (cxa.course_aula_id = grades.aula_id OR cxa.course_link = grades.aula_id)
JOIN cl_courses_x_students cxs ON grades.aula_id = cxs.aula_id AND grades.student_id = cxs.student_id
JOIN cl_students_enroll se ON
        se.ciclo_id = cxa.ciclo_id
    AND se.term_id = cxa.term_id
    AND se.section_id = cxa.section_id
    AND se.student_id = grades.student_id
JOIN cl_students_enrollment_grades seg ON
        se.enroll_id = seg.enroll_id
        AND seg.course_id = cxa.course_id

    SET cxs.enroll_grade_id = seg.enroll_grade_id

where cxs.aula_id>0