This repository was archived by the owner on Jun 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -36,22 +36,31 @@ function gradeIndividualItem() {
3636 width: 60%;
3737 margin-left: auto;
3838 margin-right: auto;
39- border: solid blue;
40- border-radius: 5px;
4139 padding: 5px;">
42- <input id='filterto0' type=checkbox unchecked/>Click to only show questions with a grade of 0 or not graded</div>` ) ;
43- let rsd = document . querySelector ( "#filterto0" ) ;
40+ <select id="filterSelect">
41+ <option value="nofilter">Show All</option>
42+ <option value="filterto0">Show questions with a score of 0 or None</option>
43+ <option value="filterto1">Show questions with a non-zero score</option>
44+ </select>
45+ ` )
46+ let rsd = document . querySelector ( "#filterSelect" ) ;
4447 rsd . addEventListener ( 'change' ,
4548 function ( ) {
4649 let gPanels = document . querySelectorAll ( ".loading" ) ;
4750 for ( let panel of gPanels ) {
4851 let v = panel . querySelector ( "#gradingform" ) . querySelector ( "#input-grade" ) . value ;
49- if ( rsd . checked ) {
52+ if ( rsd . value == "filterto0" ) {
5053 if ( v == 0 || v == "" ) {
5154 panel . style . display = "block" ;
5255 } else {
5356 panel . style . display = "none" ;
5457 }
58+ } else if ( rsd . value == "filterto1" ) {
59+ if ( v > 0 ) {
60+ panel . style . display = "block" ;
61+ } else {
62+ panel . style . display = "none" ;
63+ }
5564 } else {
5665 panel . style . display = "block" ;
5766 }
You can’t perform that action at this time.
0 commit comments