hide old classes, debugging updates
diff --git a/scripts/assignments.js b/scripts/assignments.js
index e614896..b6bf324 100644
--- a/scripts/assignments.js
+++ b/scripts/assignments.js
@@ -799,7 +799,7 @@
         }
 
             <div onclick="dtps.classInfo(${num})" class="acrylicMaterial" style="border-radius: 50%; height: 40px; width: 40px; text-align: center; display: inline-block; vertical-align: middle; cursor: pointer; margin-right: 3px;">
-                <i style="line-height: 40px;" class="material-icons">info</i>
+                <i style="line-height: 40px;" class="material-icons">${dtps.classes[num].id == dtps.remoteConfig.debugClassID ? "bug_report" : "info"}</i>
             </div>
 
             ${dtps.classes[num].homepage ? /*html*/`
@@ -865,6 +865,7 @@
 
         ${dtps.classes[num].numStudents ? `<div class="assignmentChip"><i class="material-icons">group</i><span>${dtps.classes[num].numStudents} students</span></div>` : ``}
         ${dtps.env == "dev" ? `<div class="assignmentChip"><i class="material-icons">code</i><span>Class ID: ${dtps.classes[num].id}</span></div>` : ``}
+        ${dtps.classes[num].id == dtps.remoteConfig.debugClassID ? `<div class="assignmentChip"><i class="material-icons">bug_report</i><span>Debug class</span></div>` : ``}
     
         <br />
 
diff --git a/scripts/core.js b/scripts/core.js
index 2e5a219..6378842 100644
--- a/scripts/core.js
+++ b/scripts/core.js
@@ -79,6 +79,8 @@
         showGradesInSettings: true,
         dtechHomepageFluidUITabs: true,
         dtechCleanUpAssignments: true,
+        dtechCurrentTerm: "20-21",
+        debugClassID: "1098",
         feedbackButtonUsesEmail: false,
         topSneaky: false
     }
@@ -491,13 +493,14 @@
             fluid.screens.dashboard = dtps.baseURL + "/scripts/assignments.js";
             fluid.screens.stream = dtps.baseURL + "/scripts/assignments.js";
             fluid.screens.moduleStream = dtps.baseURL + "/scripts/assignments.js";
+            fluid.screens.people = dtps.baseURL + "/scripts/people.js";
             fluid.screens.pages = dtps.baseURL + "/scripts/pages-discussions.js";
             fluid.screens.discussions = dtps.baseURL + "/scripts/pages-discussions.js";
 
             if (dtpsLMS.gradebook && !((dtps.env == "dev") && (fluid.get("pref-debuggingGenericGradebook") == "true"))) {
                 //Handle LMS gradebook
                 fluid.screens.gradebook = dtps.showLMSGradebook;
-            } else if (dtpsLMS.genericGradebook) {
+            } else if (dtpsLMS.genericGradebook || ((dtps.env == "dev") && (fluid.get("pref-debuggingGenericGradebook") == "true"))) {
                 //Generic gradebook script
                 fluid.screens.gradebook = dtps.baseURL + "/scripts/assignments.js";
             }
@@ -827,6 +830,10 @@
                 fluid.screen("moduleStream", dtps.classes[dtps.selectedClass].id);
             }
 
+            if ((dtps.selectedContent == "people") && dtps.classes[dtps.selectedClass]) {
+                fluid.screen("people", dtps.classes[dtps.selectedClass].id);
+            }
+
             if ((dtps.selectedContent == "grades") && dtps.classes[dtps.selectedClass]) {
                 if (dtps.classes[dtps.selectedClass].hasGradebook) {
                     fluid.screen("gradebook", dtps.classes[dtps.selectedClass].id);
@@ -924,6 +931,13 @@
             $(".btns .btn.pages").hide();
         }
 
+        //Show people tab if the LMS supports it, otherwise, hide it
+        if (dtpsLMS.fetchUsers) {
+            $(".btns .btn.people").show();
+        } else {
+            $(".btns .btn.people").hide();
+        }
+
         //Show pages tab if the class supports it, otherwise, hide it
         if (dtps.classes[classNum].discussions) {
             $(".btns .btn.discuss").show();
@@ -1021,12 +1035,12 @@
  * @param {string} [bg] The background color that the HTML will be displayed on
  * @returns {string} HTML string with brightened colors 
  */
-dtps.brightenTextForDarkMode = function(html, bg) {
+dtps.brightenTextForDarkMode = function (html, bg) {
     //Use dark mode algorithm
     if (!bg) bg = "black";
     var fakeRoot = $('<div></div>').append(html);
-    fakeRoot.find("span").filter(function() {
-        return $(this).css("color") && !($(this).css("background-color") || $(this).css("background")) && !$(this).parents().filter(function() {
+    fakeRoot.find("span").filter(function () {
+        return $(this).css("color") && !($(this).css("background-color") || $(this).css("background")) && !$(this).parents().filter(function () {
             return $(this).css("background-color") || $(this).css("background");
         }).length;
     }).toArray().forEach(element => {
@@ -1122,7 +1136,7 @@
 /**
  * Renders the grades tab in settings
  */
-dtps.renderGradesInSettings = function() {
+dtps.renderGradesInSettings = function () {
     //Render class grade bars
     $("#classGradeBars").html(dtps.classes.map(course => {
         //Percentages below are for visualization purposes only
@@ -1301,6 +1315,10 @@
                     <i class="material-icons">library_books</i>
                     Coursework
                 </button>
+                <button init="true" onclick="fluid.screen('people', dtps.classes[dtps.selectedClass].id);" class="btn people">
+                    <i class="material-icons">group</i>
+                    People
+                </button>
                 <button init="true" onclick="fluid.screen('discussions', dtps.classes[dtps.selectedClass].id);" class="btn discuss">
                     <i class="material-icons">forum</i>
                     Discussions
@@ -1432,12 +1450,12 @@
                     <div class="label"><i class="material-icons">image</i> Hide class images</div>
 
                     ${
-                        dtpsLMS.dtech && dtps.remoteConfig.dtechCleanUpAssignments ? `
+        dtpsLMS.dtech && dtps.remoteConfig.dtechCleanUpAssignments ? `
                             <br /><br />
                             <div onclick="fluid.set('pref-formatAssignmentContent')" class="switch pref-formatAssignmentContent active"><span class="head"></span></div>
                             <div class="label"><i class="material-icons">format_paint</i> Reformat assignment content</div>
                         ` : ""
-                    }
+        }
 
                 </div>
 
@@ -1746,6 +1764,14 @@
 */
 
 /**
+* @name dtpsLMS.fetchUsers
+* @description [OPTIONAL] Fetches the users for a course from the LMS
+* @kind function
+* @param {string} classID The class ID to fetch users for
+* @return {Promise<ClassSection[]>} A promise which resolves to an array of sections in this class
+*/
+
+/**
 * @name dtpsLMS.fetchDiscussionThreads
 * @description [OPTIONAL] Fetches discussion threads for a course from the LMS
 * @kind function
@@ -1832,6 +1858,7 @@
  * @property {string} name User name
  * @property {string} id User ID
  * @property {string} photoURL User photo URL
+ * @property {string} url [ONLY FOR DTPSLMS.FETCHUSERS] The URL to this user's profile. Only used when displaying users in the people tab.
  * @property {User[]} [children] [ONLY FOR DTPS.USER] Array of child users. If this is defined, the user is treated as a parent account. Sub-children are not allowed.
  * @property {boolean} parent [ONLY FOR DTPS.USER] Automatically managed by DTPS. True if the user is a parent account.
  * @property {string} lmsID [ONLY FOR DTPS.USER] Automatically managed by DTPS. This is the user ID that all LMS web requests should use. Can change when a parent account changes the selected child.
@@ -1844,6 +1871,7 @@
 * @property {string} id Class ID
 * @property {number} num Index of the class in the dtps.classes array
 * @property {string} subject Class subject
+* @property {Date} [endDate] The end date for this course
 * @property {Assignment[]} assignments Class assignments. Assume assignments are still loading if this is undefined. The class has no assignments if this is an empty array. Loaded in dtps.init.
 * @property {Module[]|boolean} [modules] Class modules. Assume this class supports the modules feature, but is not yet loaded, if this is true and that the class has no modules if this is an empty array. For LMSs that do not support modules, either keep it undefined or set it to false.
 * @property {DiscussionThread[]|boolean} [discussions] Class discussion threads. Assume this class supports discussions, but not yet loaded, if this is true and that the class has no threads if this is an empty array. For LMSs that do not support discussions, either keep it undefined or set it to false.
diff --git a/scripts/lms/canvas.js b/scripts/lms/canvas.js
index 624e5f1..1ab60ed 100644
--- a/scripts/lms/canvas.js
+++ b/scripts/lms/canvas.js
@@ -111,7 +111,8 @@
                                         newDiscussionThreadURL: '/courses/' + course.id + '/discussion_topics/new',
                                         pages: course.tabs.map(tab => tab.id).includes("pages"),
                                         modules: course.tabs.map(tab => tab.id).includes("modules"),
-                                        discussions: course.tabs.map(tab => tab.id).includes("discussions")
+                                        discussions: course.tabs.map(tab => tab.id).includes("discussions"),
+                                        endDate: course.end_at
                                     };
 
                                     if (course.teachers[0]) {
@@ -428,6 +429,46 @@
     });
 }
 
+//Fetches user data from Canvas
+dtpsLMS.fetchUsers = function (classID) {
+    return new Promise(function (resolve, reject) {
+        jQuery.ajax({
+            url: "/api/v1/courses/" + classID + "/sections?include[]=avatar_url&include[]=students",
+            type: "GET",
+            headers: dtpsLMS.commonHeaders,
+            success: function (data) {
+                var sections = [];
+                data.forEach(section => {
+                    if (!section.students) return;
+
+                    var users = [];
+                    section.students.forEach(student => {
+                        users.push({
+                            name: student.short_name,
+                            id: student.id,
+                            photoURL: student.avatar_url,
+                            url: "/courses/" + classID + "/users/" + student.id
+                        });
+                    });
+                    var dtechMatch = section.name.match(/[0-9](?=\(A)/);
+                    if (dtpsLMS.dtech && dtechMatch) {
+                        section.name = "Period " + dtechMatch[0];
+                    }
+                    sections.push({
+                        title: section.name,
+                        id: section.id,
+                        users
+                    });
+                });
+                resolve(sections);
+            },
+            error: function (err) {
+                reject(err);
+            }
+        });
+    });
+}
+
 //Fetches homepage data from Canvas
 dtpsLMS.fetchHomepage = function (classID) {
     return new Promise(function (resolve, reject) {
diff --git a/scripts/lms/dtech.js b/scripts/lms/dtech.js
index 5160c85..f2e4e6c 100644
--- a/scripts/lms/dtech.js
+++ b/scripts/lms/dtech.js
@@ -53,6 +53,18 @@
     //Update classes
     dtpsLMS.updateClasses = function (classes) {
         return new Promise((resolve, reject) => {
+            var tmpNewArray = [];
+            classes.forEach((course, i) => {
+                if (course.term == dtps.remoteConfig.dtechCurrentTerm) {
+                    tmpNewArray.push(course);
+                } else if (course.id == dtps.remoteConfig.debugClassID) {
+                    tmpNewArray.push(course);
+                } else if (!course.endDate || (new Date() < new Date(course.endDate))) {
+                    tmpNewArray.push(course);
+                }
+            });
+            classes = tmpNewArray;
+
             //Don't fetch videoMeetingURL if disable by remoteConfig
             if (!dtps.remoteConfig.showVideoMeetingButton) {
                 resolve(classes);
@@ -107,7 +119,7 @@
         //Get d.tech grade calculation formula
         if (course.term == "20-21") {
             formula = "2020s1";
-        } else if (course.id == "1098") {
+        } else if (course.id == dtps.remoteConfig.debugClassID) {
             formula = "2020s1";
         }
 
diff --git a/scripts/people.js b/scripts/people.js
new file mode 100644
index 0000000..a81ec2c
--- /dev/null
+++ b/scripts/people.js
@@ -0,0 +1,84 @@
+/**
+ * @file DTPS course user list screen
+ * @author jottocraft
+ * 
+ * @copyright Copyright (c) 2018-2020 jottocraft. All rights reserved.
+ * @license GPL-2.0-only
+ */
+
+
+/**
+ * Renders the people tab for a class
+ * 
+ * @param {string} courseID The course ID to render the people tab for
+ */
+dtps.usersList = function (courseID) {
+    //Get class index and set as selected class
+    var classNum = dtps.classes.map(course => course.id).indexOf(courseID);
+    dtps.selectedClass = classNum;
+
+    //Set people as the selected content
+    dtps.selectedContent = "people";
+    $("#dtpsTabBar .btn").removeClass("active");
+    $("#dtpsTabBar .btn.people").addClass("active");
+
+    if (classNum == -1) {
+        //Class does not exist
+        dtps.error("The selected class doesn't exist", "classNum check failed @ dtps.usersList");
+    }
+
+    //Load class color and things
+    dtps.presentClass(classNum);
+
+    if ((dtps.selectedClass == classNum) && (dtps.selectedContent == "people")) {
+        jQuery(".classContent").html(`<div class="spinner"></div>`);
+    }
+
+    //Fetch users list
+    dtpsLMS.fetchUsers(dtps.classes[classNum].id).then(function (sections) {
+        if ((dtps.selectedClass == classNum) && (dtps.selectedContent == "people")) {
+            if (!sections || (sections.length == 0)) {
+                //No people in this class? (this shouldn't be possible)
+                jQuery(".classContent").html(/*html*/`
+                    <div style="cursor: auto;" class="card assignment">
+                        <h4>Error</h4>
+                        <p>Power+ could not get the list of people in this course</p>
+                    </div>
+                `);
+            } else {
+                jQuery(".classContent").html(sections.map(section => (
+                    /*html*/`
+                        <div class="card">
+                            <h5><b>${section.title}</b></h5>
+                            ${section.users.map(user => (
+                                /*html*/`
+                                    <div>
+                                        <p>
+                                            <img style="width: 30px; border-radius: 50%; vertical-align: middle; margin-right: 5px;" src="${user.photoURL}" />
+                                            <a href="${user.url}" style="color: var(--text); vertical-align: middle;">${user.name}</a>
+                                        </p>
+                                    </div>
+                                `
+                            )).join("")}
+                        </div>
+                    `
+                )).join(""));
+            }
+        }
+    }).catch(function (err) {
+        dtps.error("Couldn't fetch users", "Caught promise rejection @ dtps.usersList", err);
+    });
+}
+
+//Fluid UI screen definitions
+fluid.externalScreens.people = (courseID) => {
+    dtps.usersList(courseID);
+}
+
+/**
+* @typedef {Object} ClassSection
+* @description Defines a class section in DTPS
+* @property {string} title Name of the section
+* @property {string} id Section ID
+* @property {User[]} users Students in this section
+*/
\ No newline at end of file