Diff for /loncom/interface/lonparmset.pm between versions 1.317 and 1.321

version 1.317, 2006/06/23 05:56:35 version 1.321, 2006/07/14 17:44:11
Line 508  sub storeparm_by_symb_inner { Line 508  sub storeparm_by_symb_inner {
   
 Format a value for output.  Format a value for output.
   
 Inputs:  $value, $type  Inputs:  $value, $type, $editable
   
 Returns: $value, formatted for output.  If $type indicates it is a date,  Returns: $value, formatted for output.  If $type indicates it is a date,
 localtime($value) is returned.  localtime($value) is returned.
   $editable will return an icon to click on
   
 =cut  =cut
   
 ##################################################  ##################################################
 ##################################################  ##################################################
 sub valout {  sub valout {
     my ($value,$type)=@_;      my ($value,$type,$editable)=@_;
     my $result = '';      my $result = '';
     # Values of zero are valid.      # Values of zero are valid.
     if (! $value && $value ne '0') {      if (! $value && $value ne '0') {
  $result = '  ';   if ($editable) {
       $result = '<img src="/adm/lonIcons/clickhere.gif" border="0" />';
    } else {
       $result='&nbsp;';
    }
     } else {      } else {
         if ($type eq 'date_interval') {          if ($type eq 'date_interval') {
             my ($sec,$min,$hour,$mday,$mon,$year)=gmtime($value);              my ($sec,$min,$hour,$mday,$mon,$year)=gmtime($value);
Line 590  sub plink { Line 595  sub plink {
     return '<table width="100%"><tr valign="top" align="right"><td><a name="'.$marker.'" /></td></tr><tr><td align="center">'.      return '<table width="100%"><tr valign="top" align="right"><td><a name="'.$marker.'" /></td></tr><tr><td align="center">'.
  '<a href="javascript:pjump('."'".$type."','".$dis."','".$winvalue."','"   '<a href="javascript:pjump('."'".$type."','".$dis."','".$winvalue."','"
     .$marker."','".$return."','".$call."','".$hour."','".$min."','".$sec."'".');">'.      .$marker."','".$return."','".$call."','".$hour."','".$min."','".$sec."'".');">'.
  &valout($value,$type).'</a></td></tr></table>';   &valout($value,$type,1).'</a></td></tr></table>';
 }  }
   
 sub page_js {  sub page_js {
Line 655  sub startpage { Line 660  sub startpage {
        &page_js(),         &page_js(),
        {'add_entries' => \%loaditems,});         {'add_entries' => \%loaditems,});
     my $breadcrumbs =       my $breadcrumbs = 
  &Apache::lonhtmlcommon::breadcrumbs('Table Mode Parameter Setting');   &Apache::lonhtmlcommon::breadcrumbs('Table Mode Parameter Setting','Table_Mode');
     $r->print(<<ENDHEAD);      $r->print(<<ENDHEAD);
 $start_page  $start_page
 $breadcrumbs  $breadcrumbs
Line 2187  sub crsenv { Line 2192  sub crsenv {
                     ' ('.&mt('supported types').': Letter [8 1/2x11 in], Legal [8 1/2x14 in],'.                       ' ('.&mt('supported types').': Letter [8 1/2x11 in], Legal [8 1/2x14 in],'. 
                     ' Tabloid [11x17 in], Executive [7 1/2x10 in], A2 [420x594 mm],'.                       ' Tabloid [11x17 in], Executive [7 1/2x10 in], A2 [420x594 mm],'. 
                     ' A3 [297x420 mm], A4 [210x297 mm], A5 [148x210 mm], A6 [105x148 mm])',                      ' A3 [297x420 mm], A4 [210x297 mm], A5 [148x210 mm], A6 [105x148 mm])',
        'print_header_format'
            => '<b>Print header format; substitutions:  %n student name %c course id %a assignment',
              'anonymous_quiz'               'anonymous_quiz'
                  => '<b>'.&mt('Anonymous quiz/exam').'</b><br />'.                   => '<b>'.&mt('Anonymous quiz/exam').'</b><br />'.
                     ' (<tt><b>'.&mt('yes').'</b> '.&mt('to avoid print students names').' </tt>)',                      ' (<tt><b>'.&mt('yes').'</b> '.&mt('to avoid print students names').' </tt>)',
Line 2227  sub crsenv { Line 2234  sub crsenv {
                              'problem_stream_switch',                               'problem_stream_switch',
      'suppress_tries',       'suppress_tries',
                              'default_paper_size',                               'default_paper_size',
        'print_header_format',
                              'disable_receipt_display',                               'disable_receipt_display',
                              'spreadsheet_default_classcalc',                               'spreadsheet_default_classcalc',
                              'spreadsheet_default_studentcalc',                               'spreadsheet_default_studentcalc',
Line 3245  ENDDEFHEAD Line 3253  ENDDEFHEAD
     }      }
 $r->print(&mt('Manual setting rules apply to all interfaces.').'<br />'.  $r->print(&mt('Manual setting rules apply to all interfaces.').'<br />'.
   &mt('Automatic setting rules apply to table mode interfaces only.'));    &mt('Automatic setting rules apply to table mode interfaces only.'));
     $r->print("\n<table border='1'><tr><th>".&mt('Rule for parameter').'</th><th>'.      $r->print("\n".&Apache::loncommon::start_data_table().
       &mt('Action').'</th><th>'.&mt('Value').'</th></tr>');        &Apache::loncommon::start_data_table_header_row().
         "<th>".&mt('Rule for parameter').'</th><th>'.
         &mt('Action').'</th><th>'.&mt('Value').'</th>'.
         &Apache::loncommon::end_data_table_header_row());
     foreach my $tempkey (&keysindisplayorder(\%allparms,\%keyorder)) {      foreach my $tempkey (&keysindisplayorder(\%allparms,\%keyorder)) {
  unless ($tempkey) { next; }   unless ($tempkey) { next; }
  $r->print("\n<tr><td>".$allparms{$tempkey}."\n<br />(".$tempkey.')</td><td>');   $r->print("\n".&Apache::loncommon::start_data_table_row().
     "<td>".$allparms{$tempkey}."\n<br />(".$tempkey.')</td><td>');
  my $action=&rulescache($tempkey.'_action');   my $action=&rulescache($tempkey.'_action');
  $r->print('<select name="'.$tempkey.'_action">');   $r->print('<select name="'.$tempkey.'_action">');
  if (&isdateparm($defkeytype{$tempkey})) {   if (&isdateparm($defkeytype{$tempkey})) {
Line 3298  ENDYESNO Line 3310  ENDYESNO
         } else {          } else {
     $r->print('<input type="text" size="20" name="'.$tempkey.'_value" value="'.&rulescache($tempkey.'_value').'" />');      $r->print('<input type="text" size="20" name="'.$tempkey.'_value" value="'.&rulescache($tempkey.'_value').'" />');
  }   }
         $r->print('</td></tr>');          $r->print('</td>'.&Apache::loncommon::end_data_table_row());
     }      }
     $r->print("</table>\n<input type='submit' name='storerules' value='".      $r->print(&Apache::loncommon::end_data_table().
         "\n<input type='submit' name='storerules' value='".
       &mt('Store Rules')."' /></form>\n".        &mt('Store Rules')."' /></form>\n".
       &Apache::loncommon::end_page());        &Apache::loncommon::end_page());
     return;      return;

Removed from v.1.317  
changed lines
  Added in v.1.321


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>