<commit_before>MyHomeworkSpace.Pages.homework = {
	init: function() {},

	edit: function(id) {
		MHSBridge.default.openModal("loading", {});
		MyHomeworkSpace.API.get("homework/get/" + id, {}, function(data) {
			MHSBridge.default.openModal("homework", data.homework);
		});
	},

	handleNew: function() {
		if (MyHomeworkSpace.Page.current() == "homework" || MyHomeworkSpace.Page.current() == "planner") {
			MyHomeworkSpace.Page.show(MyHomeworkSpace.Page.current());
		}
	},

	markComplete: function(id, complete) {
		MyHomeworkSpace.API.get("homework/get/" + id, {}, function(data) {
			var hwItem = data.homework;
			hwItem.complete = complete;
			MyHomeworkSpace.API.post("homework/edit/", hwItem, function(data) {
				// yay
			});
		});
	},

	open: function() {
		MHSBridge.default.render(MHSBridge.default.h(MHSBridge.default.pages.homework.HomeworkPage, {}), null, document.querySelector("#homework > div"));
	}
};<commit_msg>fix checking off homework not actually working<commit_after>MyHomeworkSpace.Pages.homework = {
	init: function() {},

	edit: function(id) {
		MHSBridge.default.openModal("loading", {});
		MyHomeworkSpace.API.get("homework/get/" + id, {}, function(data) {
			MHSBridge.default.openModal("homework", data.homework);
		});
	},

	handleNew: function() {
		if (MyHomeworkSpace.Page.current() == "homework" || MyHomeworkSpace.Page.current() == "planner") {
			MyHomeworkSpace.Page.show(MyHomeworkSpace.Page.current());
		}
	},

	markComplete: function(id, complete) {
		MyHomeworkSpace.API.get("homework/get/" + id, {}, function(data) {
			var hwItem = data.homework;
			hwItem.complete = complete;
			MyHomeworkSpace.API.post("homework/edit", hwItem, function(data) {
				// yay
			});
		});
	},

	open: function() {
		MHSBridge.default.render(MHSBridge.default.h(MHSBridge.default.pages.homework.HomeworkPage, {}), null, document.querySelector("#homework > div"));
	}
};
{'fraction_non_alphanumeric': 0.18157894736842106, 'fraction_numerical': 0.0, 'mean_word_length': 4.725903614457831, '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': '7111001', 'n_tokens_mistral': 714, 'n_tokens_neox': 651, 'n_words': 86}