function ClassSelectorChanged() {
	sortClasses();
}

function getSelectedClassId() {
	let options = document.getElementById("class_selector").getElementsByTagName("option");
	for (let i = options.length; i--;)
		if (options[i].selected)
			return options[i].value;
}

window.addEventListener("load", function () {
	document.getElementById("class_selector").addEventListener('change', ClassSelectorChanged);
	sortClasses();
});

@@ -1,39 +1,155 @@
-function ClassSelectorChanged() %7B%0A%09
+// Unclear why this function just wraps sortClasses, but 'ClassSelectorChanged' is overloaded witha teacher version%0Aconst ClassSelectorChanged = () =%3E 
 sort
@@ -163,19 +163,14 @@
 ();%0A
-%7D%0A%0Afunction
+%0Aconst
  get
@@ -184,18 +184,24 @@
 dClassId
-()
+ = () =%3E
  %7B%0A%09let 
@@ -380,53 +380,42 @@
 e;%0A%7D
+;
 %0A%0A
-window.addEventListener(%22load%22, function ()
+const ClassSelectorInit = () =%3E
  %7B%0A%09
@@ -523,11 +523,63 @@
 ses();%0A%7D
+;%0A%0Awindow.addEventListener(%22load%22, ClassSelectorInit
 );%0A

Update class_selector.js