Enable d.tech CBL for 2021-22 school year
diff --git a/scripts/core.js b/scripts/core.js
index f34c51c..a8ddd20 100644
--- a/scripts/core.js
+++ b/scripts/core.js
@@ -36,8 +36,8 @@
  * @property {boolean} searchScrollListener True if the search scroll listener has been added

  */

 var dtps = {

-    ver: 316,

-    readableVer: "v3.1.6",

+    ver: 317,

+    readableVer: "v3.1.7",

     env: new URL(window.dtpsBaseURL || "https://powerplus.app").hostname == "localhost" ? "dev" : window.jottocraftSatEnv || "prod",

     classes: [],

     baseURL: window.dtpsBaseURL || "https://powerplus.app",

@@ -74,8 +74,8 @@
     remoteConfig: {

         allowWhatIfGrades: true,

         canvasRequestSpacing: 25,

-        debugClassID: "1098",

-        dtechCurrentTerm: "S2",

+        debugClassID: "1455",

+        dtechCurrentTerm: "S1",

         gradeCalculationEnabled: true,

         loadingAlert: false,

         remoteUpdate: {

diff --git a/scripts/lms/dtech.js b/scripts/lms/dtech.js
index c1f6605..a9fae28 100644
--- a/scripts/lms/dtech.js
+++ b/scripts/lms/dtech.js
@@ -209,12 +209,12 @@
         var formula = null;

 

         //Get d.tech grade calculation formula

-        if (course.term == "20-21") {

-            formula = "2020-21";

+        if (course.term == "S1") {

+            formula = "2020-DASH-LT";

         } else if (course.term == "S2") {

-            formula = "2020-21";

+            //formula = "2020-DASH-LT";

         } else if (String(course.id).includes(dtps.remoteConfig.debugClassID)) {

-            formula = "2020-21";

+            formula = "2020-DASH-LT";

         }

 

         //If there is no grade calculation formula, don't run grade calc

@@ -295,11 +295,11 @@
         letters: ["A", "A-", "B+", "B", "B-", "C", "I"],

         params: {

             /**

-             * @description 2020-21 grade calculation parameters

+             * @description 2020-DASH-LT (from Long-Term CBL Grade Dashboard) grade calculation parameters

              * @property {{string, number}} percentage Percentage criteria parameters. The key of each item in the object is the letter and the value is the percentage needed to meet the criteria

              * @property {{string, number}} lowest Lowest average criteria perameters. The key of each item in the object is the letter and the value is the lowest average needed to meet the criteria

              */

-            "2020-21": {

+            "2020-DASH-LT": {

                 percentage: {

                     "A": 3.3,

                     "A-": 3.3,

@@ -336,7 +336,7 @@
          * This function returns undefined if there is no grade.

          * 

          * @param {Assignment[]} assignments Array of assignments to use for grade calculation

-         * @param {string} formula Formula to use for grade calculation. Can be one of the following: 2020-21

+         * @param {string} formula Formula to use for grade calculation. Can be one of the following: 2020-DASH-LT

          * @param {object} outcomesOverride An outcome object to use instead of using assignments. Used for what-if grades.

          * @return {object} Grade calculation results

          */

@@ -349,10 +349,10 @@
             //This doesn't have to be used by the grade calculation formula. Can be overridden for What-If grades.

             var outcomes = outcomesOverride || {};

 

-            if (formula == "2020-21") {

-                //2020-21 SEMESTER 1 OUTCOME AVERAGE FORMULA (2020-21)

+            if (formula == "2020-DASH-LT") {

+                //2020-DASH-LT SEMESTER 1 OUTCOME AVERAGE FORMULA (2020-DASH-LT)

 

-                // ------- [2020-21] Step 1: Get rubric assessments by outcome -------

+                // ------- [2020-DASH-LT] Step 1: Get rubric assessments by outcome -------

 

                 if (!outcomesOverride) {

                     assignments.forEach(assignment => {

@@ -381,7 +381,7 @@
                     });

                 }

 

-                // ------- [2020-21] Step 2: Calculate outcome averages -------

+                // ------- [2020-DASH-LT] Step 2: Calculate outcome averages -------

 

                 //If there are no outcomes, this class doesn't have a grade

                 if (Object.keys(outcomes).length == 0) return;

@@ -418,7 +418,7 @@
                 });

 

 

-                // ------- [2020-21] Step 3: Calculate letter grade variations -------

+                // ------- [2020-DASH-LT] Step 3: Calculate letter grade variations -------

 

                 //All outcomes variation

                 var outcomeAvgs = Object.values(outcomes).map(outcome => outcome.average);

@@ -459,13 +459,13 @@
             //Sort outcome averages highest -> lowest

             outcomeAvgs.sort((a, b) => b - a);

 

-            if (formula == "2020-21") {

-                //2020-21 SEMESTER 1 LETTER GRADE FORMULA (2020-21)

+            if (formula == "2020-DASH-LT") {

+                //2020-DASH-LT SEMESTER 1 LETTER GRADE FORMULA (2020-DASH-LT)

 

                 //Array of letters from each criteria

                 var letters = [];

 

-                // ------- [2020-21] Step 1: Get highest letter for Criteria 1 (percentage of outcomes criteria) -------

+                // ------- [2020-DASH-LT] Step 1: Get highest letter for Criteria 1 (percentage of outcomes criteria) -------

                 var percentage = .75;

                 var numOutcomesRequired = Math.floor(outcomeAvgs.length * percentage); //Minimum number of outcomes required

 

@@ -496,7 +496,7 @@
                 //Add highest criteria 1 letter to the letters array

                 letters.push(bestLetter);

 

-                // ------- [2020-21] Step 2: Get highest letter for Criteria 2 (lowest outcome criteria) -------

+                // ------- [2020-DASH-LT] Step 2: Get highest letter for Criteria 2 (lowest outcome criteria) -------

 

                 //Reset best letter

                 var bestLetter = null;

@@ -538,7 +538,7 @@
         return new Promise((resolve, reject) => {

             if (course.gradeCalculation && course.gradeCalculation.dtech) {

                 //RENDERER: RENDER GRADE CALCULATION SUMMARY ------------------------------------

-                if (course.gradeCalculation.dtech.formula == "2020-21") {

+                if (course.gradeCalculation.dtech.formula == "2020-DASH-LT") {

                     var gradeCalcSummary = /*html*/`

                     <div id="gradeSummary" style="--size: 250px; margin: 0px 20px; --classColor: ${course.color};" class="grid flex">

                       <div style="background-color: var(--classColor); color: white;" class="block status letterGrade card">

@@ -548,7 +548,7 @@
                       </div>

                       <div class="block status number75">

                         <h2 class="main numFont">${course.gradeCalculation.dtech.results.parameters.number75.toFixed(2)}</h2>

-                        <h5 class="bottom"><i class="fluid-icon">functions</i> 75% of outcomes (${course.gradeCalculation.dtech.results.parameters.number75thresh}) ≥</h5>

+                        <h5 class="bottom"><i class="fluid-icon">functions</i> 75% of outcomes (rounded down, ${course.gradeCalculation.dtech.results.parameters.number75thresh}) ≥</h5>

                       </div>

                       <div class="block status lowestScore">

                         <h2 class="main numFont">${course.gradeCalculation.dtech.results.parameters.lowestScore.toFixed(2)}</h2>

@@ -562,8 +562,8 @@
                                 <thead>

                                     <tr>

                                     <th>&nbsp;&nbsp;Final Letter</th>

-                                    <th>75% (rounded down) of outcome scores is ≥</th>

-                                    <th>No outcome scores below</th>

+                                    <th>75% (rounded down) of outcomes are ≥</th>

+                                    <th>No outcomes below</th>

                                     </tr>

                                 </thead>