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

version 1.316, 2006/06/23 05:25:27 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 1057  sub parmmenu { Line 1062  sub parmmenu {
 </script>  </script>
 ENDSCRIPT  ENDSCRIPT
     $r->print();      $r->print();
     $r->print("\n<table><tr>");      $r->print("\n<table id=\"LC_parm_overview_parm_menu\"><tr>");
     my $cnt=0;      my $cnt=0;
     foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) {      foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) {
  $r->print("\n<td><font size='-1'><label><input type='checkbox' name='pscat' ");   $r->print("\n<td><label><input type='checkbox' name='pscat' ");
  $r->print('value="'.$tempkey.'"');   $r->print('value="'.$tempkey.'"');
  if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) {   if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) {
     $r->print(' checked');      $r->print(' checked');
  }   }
  $r->print('>'.$$allparms{$tempkey}.'</label></font></td>');   $r->print('>'.$$allparms{$tempkey}.'</label></td>');
   $cnt++;    $cnt++;
         if ($cnt==3) {          if ($cnt==3) {
     $r->print("</tr>\n<tr>");      $r->print("</tr>\n<tr>");
Line 1073  ENDSCRIPT Line 1078  ENDSCRIPT
  }   }
     }      }
     $r->print('      $r->print('
 </tr><tr><td>  </tr><tr id=\"LC_parm_overview_parm_menu_selectors\"><td>
 <a href="javascript:checkall(true, \'pscat\')">Select&nbsp;All</a><br />  <a href="javascript:checkall(true, \'pscat\')">Select&nbsp;All</a><br />
 <a href="javascript:checkstandard()">Select&nbsp;Common&nbsp;Only</a>  <a href="javascript:checkstandard()">Select&nbsp;Common&nbsp;Only</a>
 </td><td>  </td><td>
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 2710  ENDOVER Line 2718  ENDOVER
   
 # Menu to select levels, etc  # Menu to select levels, etc
   
     $r->print('<table border="1"><tr><td>');      $r->print('<table id="LC_parm_overview_scope">
                  <tr><td class="LC_parm_overview_level_menu">');
     &levelmenu($r,\%alllevs,$parmlev);      &levelmenu($r,\%alllevs,$parmlev);
     if ($parmlev ne 'general') {      if ($parmlev ne 'general') {
  $r->print('<td>');   $r->print('<td class="LC_parm_overview_map_menu">');
  &mapmenu($r,\%allmaps,$pschp,\%maptitles);   &mapmenu($r,\%allmaps,$pschp,\%maptitles);
  $r->print('</td>');   $r->print('</td>');
     }      }
     $r->print('</td></tr></table>');      $r->print('</td></tr></table>');
   
     $r->print('<table border="1"><tr><td>');        $r->print('<table id="LC_parm_overview_controls">
                  <tr><td class="LC_parm_overview_parm_selectors">');  
     &parmmenu($r,\%allparms,\@pscat,\%keyorder);      &parmmenu($r,\%allparms,\@pscat,\%keyorder);
     $r->print('</td><td><table border="0" cellspacing="0" cellpadding="0">'.      $r->print('</td><td class="LC_parm_overview_restrictions">
               '<tr><td>'.&mt('Parts').'</td><td></td><td>'.&mt('Section(s)').                  <table class="LC_parm_overview_restrictions">'.
               '</td><td></td><td>'.&mt('Group(s)').'</td></tr><tr><td>');                '<tr><th>'.&mt('Parts').'</th><th>'.&mt('Section(s)').
                 '</th><th>'.&mt('Group(s)').'</th></tr><tr><td>');
     &partmenu($r,\%allparts,\@psprt);      &partmenu($r,\%allparts,\@psprt);
     $r->print('</td><td>&nbsp;</td><td>');      $r->print('</td><td>');
     &sectionmenu($r,\@selected_sections);      &sectionmenu($r,\@selected_sections);
     $r->print('</td><td>&nbsp;</td><td>');      $r->print('</td><td>');
     &groupmenu($r,\@selected_groups);      &groupmenu($r,\@selected_groups);
     $r->print('</td></tr></table>');      $r->print('</td></tr></table>');
     $r->print('</td></tr></table>');      $r->print('</td></tr></table>');
Line 3242  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 3295  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.316  
changed lines
  Added in v.1.321


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