--- loncom/interface/lonparmset.pm 2009/01/20 18:37:30 1.424 +++ loncom/interface/lonparmset.pm 2009/02/15 15:14:34 1.431 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.424 2009/01/20 18:37:30 bisitz Exp $ +# $Id: lonparmset.pm,v 1.431 2009/02/15 15:14:34 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -848,12 +848,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 ''); } else { $parm=~s|\[.*\]\s||g; + $parm=&mt($parm); } my $automatic=&rulescache(($which=~/\_([^\_]+)$/)[0].'_triggers'); if ($automatic) { $parm.='
'.&mt('Automatically sets').' '.join(', ',split(/\:/,$automatic)).'
'; } - $r->print(''); + $r->print(''); my $thismarker=$which; $thismarker=~s/^parameter\_//; @@ -1315,9 +1317,15 @@ ENDSCRIPT if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) { $r->print(' checked="checked"'); } - $r->print(' />'.($$allparms{$tempkey}=~/\S/ ? &mt($$allparms{$tempkey}) - : &mt($tempkey)) - .''); + my $displaykey = &standard_parameter_names($tempkey); + if ($displaykey eq '') { + if ($$allparms{$tempkey}=~/\S/) { + $displaykey = $$allparms{$tempkey}; + } else { + $displaykey = $tempkey; + } + } + $r->print(' />'.$displaykey.''); $cnt++; if ($cnt==3) { $r->print("\n"); @@ -2294,12 +2302,12 @@ sub crsenv { my ($name,$domain) = split(':',$user); if (!defined($user) || !defined($domain)) { $setoutput.= '
'. - &mt("Invalid email address specified, address must be of the form username:domain what was specified was ([_1])",$user). + &mt("Invalid e-mail address specified, address must be of the form username:domain what was specified was ([_1])",$user). ''; undef($value); } elsif (&Apache::lonnet::homeserver($user,$domain) eq 'no_host') { $setoutput.= '
'. - &mt("Invalid email address specified, user [_1] is unknown.",$name). + &mt("Invalid e-mail address specified, user [_1] is unknown.",$name). ''; undef($value); } @@ -3453,7 +3461,7 @@ ENDOVER my $foundkeys=&listdata($r,$resourcedata,$resourcedata,$sortorder); $r->print(&tableend().'

'. - ($foundkeys?'':&mt('There are no parameters.')).'

'. + ($foundkeys?'':&mt('There are no parameters.')).'

'. &Apache::loncommon::end_page()); } @@ -4327,7 +4335,7 @@ ENDYESNO } $r->print(&Apache::loncommon::end_data_table(). "\n".''."\n". + &mt('Save').'" />'."\n". &Apache::loncommon::end_page()); return; }
'. + return '
'. ''. $valout.'
'; @@ -974,12 +975,13 @@ sub print_row { .$$part{$which}.'
'.$parm.''.$parm.'