--- loncom/interface/lonparmset.pm 2011/12/28 21:49:54 1.520 +++ loncom/interface/lonparmset.pm 2012/03/13 05:37:49 1.521 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.520 2011/12/28 21:49:54 raeburn Exp $ +# $Id: lonparmset.pm,v 1.521 2012/03/13 05:37:49 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1295,8 +1295,9 @@ sub parmmenu { } function checkdisset() { - checkthis('discussend','pscat'); + checkthis('discussend','pscat'); checkthis('discusshide','pscat'); + checkthis('discussvote','pscat'); } function checkcontdates() { @@ -1395,6 +1396,7 @@ sub lookUpTableParameter { 'scoreformat' => 'misc', 'lenient' => 'grading', 'retrypartial' => 'tries', + 'discussvote' => 'misc', ); } @@ -1942,10 +1944,11 @@ sub standardkeyorder { 'parameter_0_tol' => 16, 'parameter_0_sig' => 17, 'parameter_0_turnoffunit' => 18, - 'parameter_0_discussend' => 19, - 'parameter_0_discusshide' => 20, - 'parameter_0_printopendate' => 21, - 'parameter_0_printclosedate' => 22); + 'parameter_0_discussend' => 19, + 'parameter_0_discusshide' => 20, + 'parameter_0_discussvote' => 21, + 'parameter_0_printopendate' => 22, + 'parameter_0_printclosedate' => 23); } @@ -2146,7 +2149,7 @@ sub assessparms { } } } - } elsif ($markers[$i] =~ /_(type|lenient|retrypartial)\&\d+$/) { + } elsif ($markers[$i] =~ /_(type|lenient|retrypartial|discussvote)\&\d+$/) { $name = $1; $needsrelease = $Apache::lonnet::needsrelease{"parameter:$name:$values[$i]"}; @@ -2808,6 +2811,8 @@ sub storedata { $name = 'type'; } elsif ($typeof eq 'string_lenient') { $name = 'lenient'; + } elsif ($typeof eq 'string_discussvote') { + $name = 'discussvote'; } elsif ($typeof eq 'string_yesno') { if ($thiskey =~ /\.retrypartial$/) { $name = 'retrypartial'; @@ -3140,7 +3145,11 @@ my %strings = 'string_lenient' => [['yes', 'Yes' ], [ 'no', 'No' ], - [ 'default', 'Default - only bubblesheet grading is lenient' ]] + [ 'default', 'Default - only bubblesheet grading is lenient' ]], + 'string_discussvote' + => [['yes','Yes'], + ['notended','Yes, unless discussion ended'], + ['no','No']], ); sub standard_string_options { @@ -3161,6 +3170,7 @@ sub string_selector { my %skiptype; if (($thistype eq 'string_questiontype') || ($thistype eq 'string_lenient') || + ($thistype eq 'string_discussvote') || ($name eq 'retrypartial')) { my ($got_chostname,$chostname,$cmajor,$cminor); foreach my $possibilities (@{ $strings{$thistype} }) { @@ -4625,6 +4635,7 @@ sub oldversion_warning { type => 'string_questiontype', lenient => 'string_lenient', retrypartial => 'string_yesno', + discussvote => 'string_discussvote', ); if (exists($stringtypes{$name})) { if (ref($strings{$stringtypes{$name}}) eq 'ARRAY') {