Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Commit 1730b90

Browse files
committed
Bug fix: assignment filter
1 parent b14d87f commit 1730b90

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

views/dashboard/grades.html

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ <h2>Gradebook</h2>
3232

3333
<thead style="cursor: pointer;">
3434
<tr id = "head">
35-
<td id="leaveAlone0">FName</td>
36-
<td id="leaveAlone1">LName</td>
37-
<td id="leaveAlone2">UName</td>
38-
<td id="leaveAlone3">E-mail</td>
39-
<td id="leaveAlone4">Practice</td>
35+
<td id="leaveAlone0" class="roguecol">FName</td>
36+
<td id="leaveAlone1" class="roguecol">LName</td>
37+
<td id="leaveAlone2" class="roguecol">UName</td>
38+
<td id="leaveAlone3" class="roguecol">E-mail</td>
39+
<td id="leaveAlone4" class="roguecol">Practice</td>
4040
{{for assignment in assignments:}}
4141
<td class="headrow">{{=assignment['name']}}</td>
4242
{{pass}}
@@ -45,11 +45,11 @@ <h2>Gradebook</h2>
4545

4646
<tbody>
4747
<tr style="background-color: lightgray" id="classaverage">
48-
<td>Class Average</td>
49-
<td> </td>
50-
<td> </td>
51-
<td> </td>
52-
<td>{{=practice_average}}</td>
48+
<td class="roguecol">Class Average</td>
49+
<td class="roguecol"> </td>
50+
<td class="roguecol"> </td>
51+
<td class="roguecol"> </td>
52+
<td class="roguecol">{{=practice_average}}</td>
5353
{{for average in range(len(averagerow)):}}
5454

5555
<!-- This if statement is to determine if a percent sign is needed in the average row. -->
@@ -114,6 +114,8 @@ <h2>Gradebook</h2>
114114
tablehead = document.getElementById("head");
115115
tablehead = tablehead.getElementsByTagName("td");
116116

117+
$("td").hide()
118+
$(".roguecol").show()
117119
for (i = 0; i < tablehead.length; i++) {
118120
if (tablehead[i].id != "leaveAlone") {
119121
console.log(tablehead[i].innerHTML)
@@ -128,16 +130,12 @@ <h2>Gradebook</h2>
128130
tds[j].style.display = "";
129131
}
130132

131-
} else {
132-
tablehead[i].style.display = "none";
133-
for (j = 0; j < tds.length; j ++) {
134-
tds[j].style.display = "none";
135-
}
136133
}
137134
}
138135
}
139136
}
140137

138+
141139
</script>
142140

143141
{{end}}

0 commit comments

Comments
 (0)