--- loncom/interface/lonparmset.pm 2008/12/12 20:22:33 1.413.2.1 +++ loncom/interface/lonparmset.pm 2009/03/19 17:05:52 1.413.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.413.2.1 2008/12/12 20:22:33 raeburn Exp $ +# $Id: lonparmset.pm,v 1.413.2.2 2009/03/19 17:05:52 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -643,12 +643,13 @@ sub plink { my ($hour,$min,$sec,$val)=&preset_defaults($parmname); unless (defined($winvalue)) { $winvalue=$val; } my $valout = &valout($value,$type,1); + my $unencmarker = $marker; foreach my $item (\$type, \$dis, \$winvalue, \$marker, \$return, \$call, \$hour, \$min, \$sec) { $$item = &HTML::Entities::encode($$item,'"<>&'); $$item =~ s/\'/\\\'/g; } - return ''.&Apache::loncommon::end_data_table_row()); } } @@ -3768,21 +3803,21 @@ sub output_row { my $multiple_checked; my $single_checked; if ($options =~ m/onlyone/) { - $multiple_checked = ""; - $single_checked = " CHECKED "; + $multiple_checked = ''; + $single_checked = ' checked="checked"'; } else { - $multiple_checked = " CHECKED "; - $single_checked = ""; + $multiple_checked = ' checked="checked"'; + $single_checked = ''; } $output .= &Apache::loncommon::continue_data_table_row(); $output .= ''; + + '.&mt('Student may select multiple choices from list').''; $output .= &Apache::loncommon::end_data_table_row(); $output .= &Apache::loncommon::continue_data_table_row(); $output .= ''; + '.&mt('Student may select only one choice from list').''; $output .= &Apache::loncommon::end_data_table_row(); } return ($output);
'. + return '
'. ''. $valout.'
'; @@ -999,9 +1000,15 @@ sub extractResourceInformation { # my $name=&Apache::lonnet::metadata($srcf,$key.'.name'); if (!exists($$allparms{$name}) || $$allparms{$name} =~ m/^\s*$/ ) { - my $display= &Apache::lonnet::metadata($srcf,$key.'.display'); - my $parmdis = $display; - $parmdis =~ s/\s*\[Part.*$//g; + my ($display,$parmdis); + $display = &standard_parameter_names($name); + if ($display eq '') { + $display= &Apache::lonnet::metadata($srcf,$key.'.display'); + $parmdis = $display; + $parmdis =~ s/\s*\[Part.*$//g; + } else { + $parmdis = $display; + } $$allparms{$name}=$parmdis; if (ref($defkeytype)) { $$defkeytype{$name}= @@ -1127,16 +1134,16 @@ sub parmmenu { ENDSCRIPT $r->print(); - $r->print("\n"); + $r->print("\n".'
'); my $cnt=0; foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) { $r->print("\n'); $cnt++; if ($cnt==3) { @@ -1145,7 +1152,7 @@ ENDSCRIPT } } $r->print('' - .'' + .'' .'
' .'
'.&mt('Parameter Selection').'' .'' @@ -1188,7 +1195,7 @@ ENDSCRIPT sub partmenu { my ($r,$allparts,$psprt)=@_; - $r->print(''); $r->print(''); @@ -1352,7 +1359,7 @@ sub sectionmenu { my %sectionhash = &Apache::loncommon::get_sections(); return if (!%sectionhash); - $r->print(''); foreach my $s ('all',sort keys %sectionhash) { $r->print('
'); &displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder); } else { my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb); @@ -1817,7 +1825,16 @@ ENDTABLEHEADFOUR if (grep $_ eq $tempkeyp, @catmarker) { $part{$_}=&Apache::lonnet::metadata($uri,$_.'.part'); $name{$_}=&Apache::lonnet::metadata($uri,$_.'.name'); - $display{$_}=&Apache::lonnet::metadata($uri,$_.'.display'); + my $parmdis=&Apache::lonnet::metadata($uri,$_.'.display'); + if ($allparms{$name{$_}} ne '') { + my $identifier; + if ($parmdis =~ /(\s*\[Part.*)$/) { + $identifier = $1; + } + $display{$_} = $allparms{$name{$_}}.$identifier; + } else { + $display{$_} = $parmdis; + } unless ($display{$_}) { $display{$_}=''; } $display{$_}.=' ('.$name{$_}.')'; $default{$_}=&Apache::lonnet::metadata($uri,$_); @@ -1924,7 +1941,16 @@ ENDTABLEHEADFOUR if ((grep $_ eq $fullkeyp, @catmarker) &&(!$name{$tempkeyp})) { $part{$tempkeyp}="0"; $name{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.name'); - $display{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.display'); + my $parmdis=&Apache::lonnet::metadata($uri,$fullkeyp.'.display'); + if ($allparms{$name{$tempkeyp}} ne '') { + my $identifier; + if ($parmdis =~ /(\s*\[Part.*)$/) { + $identifier = $1; + } + $display{$tempkeyp} = $allparms{$name{$tempkeyp}}.$identifier; + } else { + $display{$tempkeyp} = $parmdis; + } unless ($display{$tempkeyp}) { $display{$tempkeyp}=''; } $display{$tempkeyp}.=' ('.$name{$tempkeyp}.')'; $display{$tempkeyp} =~ s/_\w+_/_0_/; @@ -2012,7 +2038,16 @@ ENDTABLEHEADFOUR if ((grep $_ eq $fullkeyp, @catmarker) &&(!$name{$tempkeyp})) { $part{$tempkeyp}="0"; $name{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.name'); - $display{$tempkeyp}=&Apache::lonnet::metadata($uri,$fullkeyp.'.display'); + my $parmdis=&Apache::lonnet::metadata($uri,$fullkeyp.'.display'); + if ($allparms{$name{$tempkeyp}} ne '') { + my $identifier; + if ($parmdis =~ /(\s*\[Part.*)$/) { + $identifier = $1; + } + $display{$tempkeyp} = $allparms{$name{$tempkeyp}}.$identifier; + } else { + $display{$tempkeyp} = $parmdis; + } unless ($display{$tempkeyp}) { $display{$tempkeyp}=''; } $display{$tempkeyp}.=' ('.$name{$tempkeyp}.')'; $display{$tempkeyp} =~ s/_\w+_/_0_/; @@ -2314,7 +2349,7 @@ sub crsenv { 'student_classlist_view' => ''.&mt('Allow students to view classlist.').'
' .'('.&mt('[_1]: students can view all sections. [_2]: students can only view their own section. blank or [_3] prevents student view.','"all"','"section"','"disabled"').')', 'student_classlist_portfiles' => ''.&mt('Include link to accessible portfolio files').'
' - .'('.&mt('[_1] for link to each a listing of each student\'s files.','"yes"').')', + .'('.&mt("[_1] for link to each a listing of each student's files.",'"yes"').')', 'student_classlist_opt_in' => ''.&mt("Student's agreement needed for listing in student-viewable roster").'
' .'('.&mt('[_1] to require students to opt-in to listing in the roster (on the roster page).','"yes"').')', 'plc.roles.denied'=> ''.&mt('Disallow live chatroom use for Roles').'
' @@ -2401,7 +2436,7 @@ sub crsenv { 'texengine' => ''.&mt('Force all students in the course to use a specific math rendering engine.').'
' - .'('.&mt('[_1], [_2] (Convert to Images), [_3] (TeX to HTML), or blank for student\'s preference','"jsMath"','"mimetex"','"tth"').')', + .'('.&mt("[_1], [_2] (Convert to Images), [_3] (TeX to HTML), or blank for student's preference",'"jsMath"','"mimetex"','"tth"').')', 'timezone' => ''.&mt('Timezone in which the course takes place').'', @@ -2957,7 +2992,7 @@ sub listdata { } if ($part ne $oldpart) { $r->print(&tableend(). - "\n".&mt('Part').": $part"); + "\n".''.&mt('Part').": $part"); $oldpart=$part; } # @@ -2992,7 +3027,7 @@ sub listdata { $r->print(&default_selector($thiskey,$$resourcedata{$thiskey})); } $r->print(''); + $thistype.'" />'); $r->print('
'.(' ' x 10).''.(' ' x 10).'