Skip to content

Commit

Permalink
current course past quarter charts
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeseibel committed Dec 24, 2024
1 parent 3ebe549 commit 88624dc
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions coursedashboards/static/coursedashboards/js/course.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ var showCourseData = function (label) {
renderStudentProfile('repeat', section.current_repeating, section.current_enrollment);

renderGPADisribution('current-cumulative-median-gpa', section.current_median, section.gpas);

renderCoursePercentage1('current-declared-majors-chart', section.current_student_majors, 'major_name', 'percent_students');
renderCoursePercentage1('current-concurrent-courses-chart', section.concurrent_courses, 'course_ref', 'percent_students');
} else {
performanceTemplate = Handlebars.compile($("#historic-performance-template").html());
$("#current-performance-panel").html(performanceTemplate({
Expand All @@ -97,6 +94,21 @@ var showCourseData = function (label) {
if (chart_container.length > 0) {
renderGPADisribution(chart_container[0], section.current_median, section.gpas);
}

chart_container = $("#current-performance-panel #historic-median-course-gpa");
if (chart_container.length > 0) {
renderGPADisribution(chart_container[0], section.median_course_grade, section.gpas);
}
}

chart_container = $("#current-performance-panel #current-declared-majors-chart");
if (chart_container.length > 0) {
renderCoursePercentage1(chart_container[0], section.current_student_majors, 'major_name', 'percent_students');
}

chart_container = $("#current-performance-panel #current-concurrent-courses-chart");
if (chart_container.length > 0) {
renderCoursePercentage1(chart_container[0], section.concurrent_courses, 'course_ref', 'percent_students');
}

$('.course-title span').html(section.course_title);
Expand Down

0 comments on commit 88624dc

Please sign in to comment.