<commit_before>function StudentSelectorChanged() {
	if (getSelectedStudentOption().className.indexOf('not-admitted') === -1) {
		document.querySelector('#remove_student').removeAttribute("disabled");
		document.querySelector('#new_student_pw').removeAttribute("disabled");
		document.querySelector('#new_student_pw_submit').removeAttribute("disabled");
		document.querySelector('#admit_student').setAttribute("disabled", "disabled");
	} else {
		document.querySelector('#remove_student').removeAttribute("disabled");
		document.querySelector('#new_student_pw').setAttribute("disabled", "disabled");
		document.querySelector('#new_student_pw_submit').setAttribute("disabled", "disabled");
		document.querySelector('#admit_student').removeAttribute("disabled");
	}
}

function RequestStudents() {
	socket.emit('Request_StudentsForClass', {
		cid: getSelectedClassId()
	});
}

function getSelectedStudentOption() {
	return document.querySelector('#student_selector option:checked');
}

function handleReponseGetStudents(data) {
	const student_selector = document.getElementById("student_selector");
	student_selector.innerHTML = "";
	data.enrollments.forEach(enrollment => {
		const option = new Option(enrollment.student.username, enrollment.student._id);
		if (enrollment.admitted === false) {
			option.className = 'bg-info not-admitted ';<commit_msg>Refactor student selector changed<commit_after>function StudentSelectorChanged() {
	document.querySelector('#remove_student').removeAttribute("disabled");
	if (getSelectedStudentOption().className.indexOf('not-admitted') === -1) {
		document.querySelector('#new_student_pw').removeAttribute("disabled");
		document.querySelector('#new_student_pw_submit').removeAttribute("disabled");
		document.querySelector('#admit_student').setAttribute("disabled", "disabled");
	} else {
		document.querySelector('#new_student_pw').setAttribute("disabled", "disabled");
		document.querySelector('#new_student_pw_submit').setAttribute("disabled", "disabled");
		document.querySelector('#admit_student').removeAttribute("disabled");
	}
}

function RequestStudents() {
	socket.emit('Request_StudentsForClass', {
		cid: getSelectedClassId()
	});
}

function getSelectedStudentOption() {
	return document.querySelector('#student_selector option:checked');
}

function handleReponseGetStudents(data) {
	const student_selector = document.getElementById("student_selector");
	student_selector.innerHTML = "";
	data.enrollments.forEach(enrollment => {
		const option = new Option(enrollment.student.username, enrollment.student._id);
		if (enrollment.admitted === false) {
			option.className = 'bg-info not-admitted ';
{'fraction_non_alphanumeric': 0.1487915407854985, 'fraction_numerical': 0.0007552870090634441, 'mean_word_length': 8.597826086956522, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5006443', 'n_tokens_mistral': 716, 'n_tokens_neox': 711, 'n_words': 92}