--- loncom/interface/lonparmset.pm 2009/05/17 01:02:10 1.450 +++ loncom/interface/lonparmset.pm 2009/06/05 12:49:50 1.455 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.450 2009/05/17 01:02:10 raeburn Exp $ +# $Id: lonparmset.pm,v 1.455 2009/06/05 12:49:50 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -854,7 +854,7 @@ sub page_js { return(< - +// $selscript ENDJS @@ -1248,16 +1249,27 @@ sub parmmenu { my $tempkey; $r->print(< +// ENDSCRIPT - $r->print(); $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parameters to View'))); - $r->print("\n".''); + + #part to print selected parms overview + $r->print(&mt('Selected Parameters:').'
'); + + #print out all possible parms and hide them by default + $r->print('' + .'

' + .&mt('Show detailed Parameter Selection') + .'

' + ); + + &shortCuts($r,$allparms,$pscat,$keyorder); + + $r->print(&Apache::lonhtmlcommon::row_closure(1)); +} + +sub parmboxes { + my ($r,$allparms,$pscat,$keyorder)=@_; + my $tempkey; + + #part to print the parm-list + $r->print('
' + ); my $cnt=0; + + $r->print(''); foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) { $r->print("\n".''); $cnt++; - if ($cnt==3) { + if ($cnt==4) { $r->print("\n"); $cnt=0; } } $r->print('' - .'' + .'
' + .'
' + .'' + .&mt('Hide') + .'' + ); + + #&shortCuts($r,$allparms,$pscat,$keyorder); + $r->print(''); +} +sub shortCuts { + my ($r,$allparms,$pscat,$keyorder)=@_; + + #part to print out the shortcuts for parmselection + $r->print('' .'' .'' - .'
' - .'
'.&mt('Parameter Selection').'' + .'
'.&mt('Parameter Selection').'' .'' .'• '.&mt('Select All').'' .'' @@ -1345,7 +1428,7 @@ ENDSCRIPT .'
' .'
' - .'
'.&mt('Add Selection for...').'' + .'
'.&mt('Add Selection for...').'' .'' .'• '.&mt('Problem Dates').'' .'' @@ -1365,8 +1448,7 @@ ENDSCRIPT .'' .'
' .'
' - ); + .''); } sub partmenu { @@ -1425,6 +1507,7 @@ sub usermenu { $sections .= ' '.&mt('or').' '; $sections .= qq| |; } else { $sections .= qq| |; } @@ -1490,8 +1576,9 @@ sub displaymenu { $r->print(&Apache::lonhtmlcommon::topic_bar (2,&mt('Select Parameters'))); $r->print(&Apache::lonhtmlcommon::start_pick_box()); &parmmenu($r,$allparms,$pscat,$keyorder); - $r->print(&Apache::lonhtmlcommon::row_closure()); - + $r->print(&Apache::lonhtmlcommon::end_pick_box()); + &parmboxes($r,$allparms,$pscat,$keyorder); + $r->print(&Apache::lonhtmlcommon::start_pick_box()); $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); &partmenu($r,$allparts,$psprt); $r->print(&Apache::lonhtmlcommon::row_closure(1)); @@ -2790,7 +2877,7 @@ ENDOVER # '); $r->print('
'); #$r->print('

Step 1

'); - $r->print('
' ); + $r->print('
'); $r->print(&Apache::lonhtmlcommon::start_pick_box()); &levelmenu($r,\%alllevs,$parmlev); if ($parmlev ne 'general') { @@ -2807,11 +2894,12 @@ ENDOVER #$r->print(' #
'); $r->print('
'); - $r->print('
' ); + $r->print('
'); $r->print(&Apache::lonhtmlcommon::start_pick_box()); &parmmenu($r,\%allparms,\@pscat,\%keyorder); - $r->print(&Apache::lonhtmlcommon::row_closure()); - + $r->print(&Apache::lonhtmlcommon::end_pick_box()); + &parmboxes($r,\%allparms,\@pscat,\%keyorder); + $r->print(&Apache::lonhtmlcommon::start_pick_box()); $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View'))); #$r->print('
'. $r->print(''. @@ -2829,7 +2917,7 @@ ENDOVER $r->print(''); $r->print('
'); - $r->print('
' ); + $r->print('
'); my $sortorder=$env{'form.sortorder'}; unless ($sortorder) { $sortorder='realmstudent'; } &sortmenu($r,$sortorder); @@ -3346,19 +3434,19 @@ sub output_row { push @options,['deleted', 'Delete Metadata Field']; } $output = &Apache::loncommon::start_data_table_row(); - $output .= '
'; + $output .= ''; $output .= &Apache::loncommon::end_data_table_row(); foreach my $opt (@options) { my $checked = ($options =~ m/$opt->[0]/) ? ' checked="checked" ' : '' ; $output .= &Apache::loncommon::continue_data_table_row(); - $output .= ''; + &mt($opt->[1]).''; $output .= &Apache::loncommon::end_data_table_row(); } $output .= &Apache::loncommon::continue_data_table_row(); - $output .= ''; + $output .= ''; $output .= &Apache::loncommon::end_data_table_row(); my $multiple_checked; my $single_checked; @@ -3370,14 +3458,14 @@ sub output_row { $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);
'.$field_text.':'.(' ' x 5).''.(' ' x 5).' '.(' ' x 10).''.(' ' x 10).''.(' ' x 10).''.(' ' x 10).' - '.&mt('Student may select multiple choices from list').''.(' ' x 10).''.(' ' x 10).' - '.&mt('Student may select only one choice from list').'