From 497062adf3a09bee65981fbdd5ec45d255041d03 Mon Sep 17 00:00:00 2001 From: UJJWAL PAWAR Date: Thu, 31 Dec 2020 01:40:24 +0530 Subject: [PATCH] Update gpameter.user.js Added option of satisfactory grade introduced for the fall semester of 2020. It's similar to the Pass/No Pass (P/NP) grade present in many universities. --- gpameter.user.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gpameter.user.js b/gpameter.user.js index ad26682..c59b06a 100644 --- a/gpameter.user.js +++ b/gpameter.user.js @@ -26,6 +26,7 @@ const TYPE_LA = 'Liberal Arts Elective'; const TYPE_CA = 'Creative Arts'; + var grade_values = { 'A+': 10, 'A': 10, @@ -76,6 +77,7 @@ show_total_gpa = function () { dep_el = 0; dep_core = 0; laca = 0; + satfctry = 0 if ($(".cgpa_cal_check").length == 0) add_checkboxes(); elems = $(".hierarchyLi.dataLi").not(".hierarchyHdr, .hierarchySubHdr"); @@ -88,7 +90,8 @@ show_total_gpa = function () { type = $(this).children(".col5").html().trim().slice(6); credits = Number(credits); - if (type == BASIC_SC) basic_sc += credits; + if (grade == 'S') satfctry +=credits; + else if (type == BASIC_SC) basic_sc += credits; else if (type == BASIC_ES) basic_es += credits; else if (type == DEPTT_ELEC) dep_el += credits; else if (type == DEPTT_CORE) dep_core += credits; @@ -122,6 +125,9 @@ show_total_gpa = function () { console.log('LA CA: '); console.log(laca); + console.log('Satisfactory'); + console.log(satfctry); + var gpa = (cg_total_grades / cg_total_credits).toFixed(2); $('#gpa_button').val('Show Gpa'); $('#courseHistoryUI .clear').after('