--- loncom/interface/lonparmset.pm 2006/06/23 05:56:35 1.317 +++ loncom/interface/lonparmset.pm 2006/07/14 17:18:24 1.320 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.317 2006/06/23 05:56:35 albertel Exp $ +# $Id: lonparmset.pm,v 1.320 2006/07/14 17:18:24 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -508,21 +508,26 @@ sub storeparm_by_symb_inner { Format a value for output. -Inputs: $value, $type +Inputs: $value, $type, $editable Returns: $value, formatted for output. If $type indicates it is a date, localtime($value) is returned. +$editable will return an icon to click on =cut ################################################## ################################################## sub valout { - my ($value,$type)=@_; + my ($value,$type,$editable)=@_; my $result = ''; # Values of zero are valid. if (! $value && $value ne '0') { - $result = ' '; + if ($editable) { + $result = ''; + } else { + $result=' '; + } } else { if ($type eq 'date_interval') { my ($sec,$min,$hour,$mday,$mon,$year)=gmtime($value); @@ -590,7 +595,7 @@ sub plink { return '
'. ''. - &valout($value,$type).' |
".&mt('Rule for parameter').' | '. - &mt('Action').' | '.&mt('Value').' | ".&mt('Rule for parameter').' | '. + &mt('Action').' | '.&mt('Value').' | '. + &Apache::loncommon::end_data_table_header_row()); foreach my $tempkey (&keysindisplayorder(\%allparms,\%keyorder)) { unless ($tempkey) { next; } - $r->print("\n
---|---|---|---|
".$allparms{$tempkey}."\n (".$tempkey.') | '); + $r->print("\n".&Apache::loncommon::start_data_table_row(). + " | ".$allparms{$tempkey}."\n (".$tempkey.') | '); my $action=&rulescache($tempkey.'_action'); $r->print(' |