--- loncom/interface/lonparmset.pm 2006/06/23 05:25:27 1.316 +++ loncom/interface/lonparmset.pm 2006/09/07 21:57:52 1.334 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.316 2006/06/23 05:25:27 albertel Exp $ +# $Id: lonparmset.pm,v 1.334 2006/09/07 21:57:52 banghart 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).'
'; + &valout($value,$type,1).''; } sub page_js { @@ -655,7 +660,7 @@ sub startpage { &page_js(), {'add_entries' => \%loaditems,}); my $breadcrumbs = - &Apache::lonhtmlcommon::breadcrumbs('Table Mode Parameter Setting'); + &Apache::lonhtmlcommon::breadcrumbs('Table Mode Parameter Setting','Table_Mode'); $r->print(< ENDSCRIPT $r->print(); - $r->print("\n"); + $r->print("\n
"); my $cnt=0; foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) { - $r->print("\n'); + $r->print('>'.$$allparms{$tempkey}.''); $cnt++; if ($cnt==3) { $r->print("\n"); @@ -1073,7 +1078,7 @@ ENDSCRIPT } } $r->print(' -
+
Select All
Select Common Only
@@ -2187,6 +2192,8 @@ sub crsenv { ' ('.&mt('supported types').': Letter [8 1/2x11 in], Legal [8 1/2x14 in],'. ' Tabloid [11x17 in], Executive [7 1/2x10 in], A2 [420x594 mm],'. ' A3 [297x420 mm], A4 [210x297 mm], A5 [148x210 mm], A6 [105x148 mm])', + 'print_header_format' + => 'Print header format; substitutions: %n student name %c course id %a assignment', 'anonymous_quiz' => ''.&mt('Anonymous quiz/exam').'
'. ' ('.&mt('yes').' '.&mt('to avoid print students names').' )', @@ -2227,6 +2234,7 @@ sub crsenv { 'problem_stream_switch', 'suppress_tries', 'default_paper_size', + 'print_header_format', 'disable_receipt_display', 'spreadsheet_default_classcalc', 'spreadsheet_default_studentcalc', @@ -2302,7 +2310,7 @@ sub crsenv { ''; my $start_page = - &Apache::loncommon::start_page('Set Course Environment Parameters', + &Apache::loncommon::start_page('Set Course Environment', $browse_js); my $end_page = &Apache::loncommon::end_page(); @@ -2424,7 +2432,7 @@ sub storedata { } &Apache::lonnet::devalidateuserresdata($tuname,$tudom); } else { - push (@deldata,$thiskey); + push (@deldata,$thiskey,$thiskey.'.type'); } } elsif ($cmd eq 'datepointer') { my $data=&Apache::lonhtmlcommon::get_date_from_form($env{$_}); @@ -2581,15 +2589,6 @@ sub listdata { $oldpart=$part; } # -# Preset defaults? -# - my ($hour,$min,$sec,$val)=('','','',''); - unless ($$resourcedata{$thiskey}) { - my ($parmname)=($thiskey=~/\.(\w+)$/); - ($hour,$min,$sec,$val)=&preset_defaults($parmname); - } - -# # Ready to print # $r->print(&tablestart(). @@ -2605,7 +2604,7 @@ sub listdata { &Apache::lonhtmlcommon::date_setter('parmform', $jskey, $$resourcedata{$thiskey}, - '',1,'','',$hour,$min,$sec). + '',1,'',''). ''. &date_sanity_info($$resourcedata{$thiskey}) ); @@ -2613,8 +2612,6 @@ sub listdata { my $showval; if (defined($$resourcedata{$thiskey})) { $showval=$$resourcedata{$thiskey}; - } else { - $showval=$val; } $r->print('