## WeBWorK Problems

### Disabling red/green indicator bars

by Steven Fiedler -
Number of replies: 4

I’d like to determine if it possible to suppress the red/green indicator bars for regular (i.e., non-Gateway) homework assignments. Attached is a picture for one such use case. The default behavior of scaffold problems appears to display the bars for all sections, even for those that have yet to be opened. As shown, these tend to proliferate for problems that require multiple student responses.

### Re: Disabling red/green indicator bars

by Glenn Rice -

This is the design of the scaffold.pl macro.  This can be changed, but requires you to use a custom version of the scaffold.pl macro.

Change line 471 of scaffold.pl (the line number may be different if you are not using PG 2.16) from

my @styles = (map {".attemptResults > tbody > tr:nth-child($_) {opacity:.5}"} @hide); to my @styles = (map {".attemptResults > tbody > tr:nth-child($_) {display:none}"} @hide);

Place the modified scaffold.pl file in your course's macro directory.

Note that this will probably not quite work the way you want.  When a new section first opens its rows in the results table will still appear and be marked as incorrect.  There is no way to change this at this point.  The scaffold.pl macro has no valid way of distinguishing between the case that the section is first opened and the case that it was open and is incorrect.

### Re: Disabling red/green indicator bars

by Steven Fiedler -
Thank you.  After implementing Glenn's recommended change, I made additional headway on eliminating the red/green indicator bars by replacing line 458 in scaffold.pl from
my %show; map {$show{$_} = 1} @_;
to
my %show; map {$show{$_} = 0} @_;

This completely removes the set of red/green results bars, but unfortunately the header row remains intact.  A blue box in the attached screenshot displays this region.  I would appreciate any additional suggestions for cleaning this up and removing this row as well.

### Re: Disabling red/green indicator bars

by Robert Mařík -
What about to remove the table with some css which is just for this problem?

If you are trying to reduce the number of lines, you could consider using a MultiAnswer object to handle the table (or one per line of the table) with singleResult => 1. You could still organize the student and correct answers as an array in the results table, if you like, but there would only be one row in the table. But removing the table entirely is probably not a good idea.