--- loncom/interface/lonparmset.pm 2011/11/21 03:25:19 1.515 +++ loncom/interface/lonparmset.pm 2011/12/15 01:21:41 1.519 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.515 2011/11/21 03:25:19 raeburn Exp $ +# $Id: lonparmset.pm,v 1.519 2011/12/15 01:21:41 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -813,6 +813,7 @@ sub valout { &date_sanity_info($value); } else { $result = $value; + $result=~s/\,/\, /gs; $result = &HTML::Entities::encode($result,'"<>&'); } } @@ -854,16 +855,10 @@ sub page_js { return(< // "pclose()", 'onload' => "group_or_section('cgroup')", ); if (!$psymb) { @@ -1400,6 +1394,7 @@ sub lookUpTableParameter { 'maxcollaborators' => 'misc', 'scoreformat' => 'misc', 'lenient' => 'grading', + 'retrypartial' => 'tries', ); } @@ -2015,7 +2010,7 @@ sub assessparms { my @psprt=&Apache::loncommon::get_env_multiple('form.psprt'); - if (!@psprt) { $psprt[0]='0'; } + if (!@psprt) { $psprt[0]='all'; } if (($env{'form.part'}) && ($psprt[0] ne 'all')) { $psprt[0]=$env{'form.part'}; } my $pssymb=''; @@ -2151,7 +2146,7 @@ sub assessparms { } } } - } elsif ($markers[$i] =~ /_(type|lenient)\&\d+$/) { + } elsif ($markers[$i] =~ /_(type|lenient|retrypartial)\&\d+$/) { $name = $1; $needsrelease = $Apache::lonnet::needsrelease{"parameter:$name:$values[$i]"}; @@ -2293,12 +2288,6 @@ COURSECONTENTSCRIPT '
'); $r->print(&Apache::lonhtmlcommon::topic_bar('',&mt('Additional Display Specification (optional)'))); $r->print(&Apache::lonhtmlcommon::start_pick_box()); - $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View')). - ''); &usermenu($r,$uname,$id,$udom,$csec,$cgroup,$parmlev,\@usersgroups); $r->print(&Apache::lonhtmlcommon::row_closure(1)); $r->print(&Apache::lonhtmlcommon::end_pick_box()); @@ -2339,7 +2328,7 @@ COURSECONTENTSCRIPT $coursespan += 3; } - $r->print('

'); + $r->print(&Apache::loncommon::start_data_table()); # # This produces the headers # @@ -2519,7 +2508,7 @@ ENDTABLEHEADFOUR } } # end foreach ids # -------------------------------------------------- End entry for one resource - $r->print('
'); + $r->print(&Apache::loncommon::end_data_table); } # end of full #--------------------------------------------------- Entry for parm level map if ($parmlev eq 'map') { @@ -2819,6 +2808,10 @@ sub storedata { $name = 'type'; } elsif ($typeof eq 'string_lenient') { $name = 'lenient'; + } elsif ($typeof eq 'string_yesno') { + if ($thiskey =~ /\.retrypartial$/) { + $name = 'retrypartial'; + } } if ($name ne '') { my ($needsrelease,$needsnewer); @@ -3167,7 +3160,8 @@ sub string_selector { my %skiptype; if (($thistype eq 'string_questiontype') || - ($thistype eq 'string_lenient')) { + ($thistype eq 'string_lenient') || + ($name eq 'retrypartial')) { my ($got_chostname,$chostname,$cmajor,$cminor); foreach my $possibilities (@{ $strings{$thistype} }) { next unless (ref($possibilities) eq 'ARRAY'); @@ -3312,7 +3306,7 @@ ENDOVER my $pschp=$env{'form.pschp'}; my @psprt=&Apache::loncommon::get_env_multiple('form.psprt'); - if (!@psprt) { $psprt[0]='0'; } + if (!@psprt) { $psprt[0]='all'; } my @selected_sections = &Apache::loncommon::get_env_multiple('form.Section'); @@ -4618,8 +4612,9 @@ sub oldversion_warning { my ($name,$value,$chostname,$cmajor,$cminor,$needsrelease) = @_; my $desc; my %stringtypes = ( - type => 'string_questiontype', - lenient => 'string_lenient' + type => 'string_questiontype', + lenient => 'string_lenient', + retrypartial => 'string_yesno', ); if (exists($stringtypes{$name})) { if (ref($strings{$stringtypes{$name}}) eq 'ARRAY') {