diff --git a/public/js/buttonFunctions.js b/public/js/buttonFunctions.js
index 5315d8bd..bb528055 100755
--- a/public/js/buttonFunctions.js
+++ b/public/js/buttonFunctions.js
@@ -11,6 +11,7 @@ let newAssignment = function() {
"max_score": 10,
"percentage": 100,
"color": "green",
+ "synthetic": "true",
});
updateGradePage();
diff --git a/public/js/home.js b/public/js/home.js
index a970f215..e3990efd 100644
--- a/public/js/home.js
+++ b/public/js/home.js
@@ -316,15 +316,21 @@ let assignmentsTable = new Tabulator("#assignmentsTable", {
{
title: "Stats",
titleFormatter: () => '',
- formatter: cell =>
- (!isNaN(cell.getRow().getData().score)) ?
- '' : "",
+ formatter: cell => (
+ isNaN(cell.getRow().getData().score)
+ || currentTableData.currentTermData
+ .classes[selected_class_i]
+ .assignments[cell.getRow().getPosition()].synthetic
+ ) ? "" : '',
width: 40,
align: "center",
cellClick: async function(e, cell) {
- if (isNaN(cell.getRow().getData().score)) {
- return;
- }
+ if (
+ isNaN(cell.getRow().getData().score)
+ || currentTableData.currentTermData
+ .classes[selected_class_i]
+ .assignments[cell.getRow().getPosition()].synthetic
+ ) return;
noStats();
document.getElementById("no_stats_caption").innerHTML = "Loading Statistics...";
showModal("stats");