--- loncom/interface/lonparmset.pm 2006/06/23 05:25:27 1.316 +++ loncom/interface/lonparmset.pm 2006/07/14 18:04:27 1.322 @@ -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.322 2006/07/14 18:04:27 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).'
'; + &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', @@ -2710,24 +2718,27 @@ ENDOVER # Menu to select levels, etc - $r->print('
'); + $r->print(' + '); } $r->print('
'); &levelmenu($r,\%alllevs,$parmlev); if ($parmlev ne 'general') { - $r->print(''); + $r->print(''); &mapmenu($r,\%allmaps,$pschp,\%maptitles); $r->print('
'); - $r->print('
'); + $r->print(' +
'); &parmmenu($r,\%allparms,\@pscat,\%keyorder); - $r->print(''. - '
'.&mt('Parts').''.&mt('Section(s)'). - ''.&mt('Group(s)').'
'); + $r->print(' + '. + '
'.&mt('Parts').''.&mt('Section(s)'). + ''.&mt('Group(s)').'
'); &partmenu($r,\%allparts,\@psprt); - $r->print(' '); + $r->print(''); §ionmenu($r,\@selected_sections); - $r->print(' '); + $r->print(''); &groupmenu($r,\@selected_groups); $r->print('
'); $r->print('
'); @@ -2997,7 +3008,8 @@ ENDMAINFORMHEAD my $vgr = &Apache::lonnet::allowed('vgr',$env{'request.course.id'}); my @menu = - ( + ( { divider=>'Settings for Your Course', + }, { text => 'Set Course Environment Parameters', action => 'crsenv', permission => $parm_permission, @@ -3010,17 +3022,17 @@ ENDMAINFORMHEAD url => '/adm/slotrequest?command=showslots', permission => $vgr, }, - { divider => 1, + { text => 'Set Parameter Setting Default Actions', + action => 'setdefaults', + permission => $parm_permission, + }, + { divider => 'New and Existing Parameter Settings for Your Resources', }, { text => 'Set/Modify Resource Parameters - Helper Mode', url => '/adm/helper/parameter.helper', permission => $parm_permission, }, - { text => 'Modify Resource Parameters - Overview Mode', - action => 'setoverview', - permission => $parm_permission, - }, - { text => 'Set Resource Parameters - Overview Mode', + { text => 'Set/Modify Resource Parameters - Overview Mode', action => 'newoverview', permission => $parm_permission, }, @@ -3029,10 +3041,12 @@ ENDMAINFORMHEAD permission => $parm_permission, help => 'Cascading_Parameters', }, - { text => 'Set Parameter Setting Default Actions', - action => 'setdefaults', + { divider => 'Existing Parameter Settings for Your Resources', + }, + { text => 'Modify Resource Parameters - Overview Mode', + action => 'setoverview', permission => $parm_permission, - }, + }, { text => 'Parameter Change Log and Course Blog Posting/User Notification', action => 'parameterchangelog', permission => $parm_permission, @@ -3041,7 +3055,7 @@ ENDMAINFORMHEAD my $menu_html = ''; foreach my $menu_item (@menu) { if ($menu_item->{'divider'}) { - $menu_html .= '
'; + $menu_html .= '

'.&mt($menu_item->{'divider'}).'

'; next; } next if (! $menu_item->{'permission'}); @@ -3242,11 +3256,15 @@ ENDDEFHEAD } $r->print(&mt('Manual setting rules apply to all interfaces.').'
'. &mt('Automatic setting rules apply to table mode interfaces only.')); - $r->print("\n'); + $r->print("\n".&Apache::loncommon::start_data_table(). + &Apache::loncommon::start_data_table_header_row(). + "'. + &Apache::loncommon::end_data_table_header_row()); foreach my $tempkey (&keysindisplayorder(\%allparms,\%keyorder)) { unless ($tempkey) { next; } - $r->print("\n'); + $r->print(''.&Apache::loncommon::end_data_table_row()); } - $r->print("
".&mt('Rule for parameter').''. - &mt('Action').''.&mt('Value').'
".&mt('Rule for parameter').''. + &mt('Action').''.&mt('Value').'
".$allparms{$tempkey}."\n
(".$tempkey.')
'); + $r->print("\n".&Apache::loncommon::start_data_table_row(). + "".$allparms{$tempkey}."\n
(".$tempkey.')
'); my $action=&rulescache($tempkey.'_action'); $r->print(''); } - $r->print('
\n\n". &Apache::loncommon::end_page()); return;