Diff for /loncom/interface/lonpreferences.pm between versions 1.81 and 1.85

version 1.81, 2006/05/01 19:37:34 version 1.85, 2006/05/08 22:22:48
Line 306  People with very few roles should leave Line 306  People with very few roles should leave
   
 <form name="prefs" action="/adm/preferences" method="POST">  <form name="prefs" action="/adm/preferences" method="POST">
 <input type="hidden" name="action" value="verify_and_change_rolespref" />  <input type="hidden" name="action" value="verify_and_change_rolespref" />
 <br />Enable Recent Roles Hotlist:  <br /><label>Enable Recent Roles Hotlist:
 <input type="checkbox" $checked name="recentroles" value="true" />  <input type="checkbox" $checked name="recentroles" value="true" /></label>
 <br />Number of roles in Hotlist:  <br />Number of roles in Hotlist:
 <select name="recentrolesn" size="1">  <select name="recentrolesn" size="1">
 $options  $options
Line 514  sub colorschanger { Line 514  sub colorschanger {
                     'link'  => 'Un-Visited Link',                      'link'  => 'Un-Visited Link',
                     'vlink' => 'Visited Link',                      'vlink' => 'Visited Link',
                     'alink' => 'Active Link');                      'alink' => 'Active Link');
       my $start_data_table = &Apache::loncommon::start_data_table();
     my $chtable='';      my $chtable='';
     foreach my $item (sort(keys(%colortypes))) {      foreach my $item (sort(keys(%colortypes))) {
        my $curcol=&Apache::loncommon::designparm($function.'.'.$item,$domain);         my $curcol=&Apache::loncommon::designparm($function.'.'.$item,$domain);
        $chtable.='<tr><td>'.$colortypes{$item}.'</td><td bgcolor="'.$curcol.         $chtable.=&Apache::loncommon::start_data_table_row().
      '<td>'.$colortypes{$item}.'</td><td style="background: '.$curcol.
         '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input name="'.$item.          '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input name="'.$item.
         '" size="10" value="'.$curcol.          '" size="10" value="'.$curcol.
 '" /></td><td><a href="javascript:pjump('."'color_custom','".$colortypes{$item}.  '" /></td><td><a href="javascript:pjump('."'color_custom','".$colortypes{$item}.
 "','".$curcol."','"  "','".$curcol."','"
     .$item."','parmform.pres','psub'".');">Select</a></td></tr>';      .$item."','parmform.pres','psub'".');">Select</a></td>'.
       &Apache::loncommon::end_data_table_row()."\n";
     }      }
       my $end_data_table = &Apache::loncommon::end_data_table();
     my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();      my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
     $r->print(<<ENDCOL);      $r->print(<<ENDCOL);
 <script>  <script type="text/javascript">
   
     function pclose() {      function pclose() {
         parmwin=window.open("/adm/rat/empty.html","LONCAPAparms",          parmwin=window.open("/adm/rat/empty.html","LONCAPAparms",
Line 559  sub colorschanger { Line 563  sub colorschanger {
 </form>  </form>
 <form name="prefs" action="/adm/preferences" method="POST">  <form name="prefs" action="/adm/preferences" method="POST">
 <input type="hidden" name="action" value="verify_and_change_colors" />  <input type="hidden" name="action" value="verify_and_change_colors" />
 <table border="2">  $start_data_table
 $chtable  $chtable
   $end_data_table
 </table>  </table>
 <input type="submit" value="Change Custom Colors" />  <input type="submit" value="Change Custom Colors" />
 <input type="submit" name="resetall" value="Reset All Colors to Default" />  <input type="submit" name="resetall" value="Reset All Colors to Default" />
Line 595  sub verify_and_change_colors { Line 600  sub verify_and_change_colors {
     $message.='Reset '.$colortypes{$item}.'<br />';      $message.='Reset '.$colortypes{$item}.'<br />';
  }   }
     }      }
       my $now = time;
       &Apache::lonnet::put('environment',{'color.timestamp' => $now});
       &Apache::lonnet::appenv('environment.color.timestamp' => $now);
   
     $r->print(<<ENDVCCOL);      $r->print(<<ENDVCCOL);
 $message  $message
 <form name="client" action="/adm/preferences" method="POST">  <form name="client" action="/adm/preferences" method="POST">
Line 873  sub discussionchanger { Line 882  sub discussionchanger {
 $lt{'sdpf'}<br/> $lt{'prca'}  <ol><li>$lt{'whpo'}</li><li>$lt{'unwh'}</li></ol>   $lt{'sdpf'}<br/> $lt{'prca'}  <ol><li>$lt{'whpo'}</li><li>$lt{'unwh'}</li></ol> 
 <br />  <br />
 <br />  <br />
 <table border="0" cellpadding="0" cellspacing="0">  END
  <tr>      $r->print(&Apache::loncommon::start_data_table());
   <td width="100%" bgcolor="#000000">      $r->print(<<"END");
    <table width="100%" border="0" cellpadding="1" cellspacing="0">         <tr>
     <tr>          <th>$lt{'pref'}</th>
      <td width="100%" bgcolor="#000000">          <th>$lt{'curr'}</th>
       <table border="0" cellpadding="3" cellspacing="3" bgcolor="#FFFFFF">          <th>$lt{'actn'}?</th>
        <tr bgcolor="$color">  
         <td><b>$lt{'pref'}</b></td>  
         <td><b>$lt{'curr'}</b></td>  
         <td><b>$lt{'actn'}?</b></td>  
        </tr>         </tr>
        <tr bgcolor="#dddddd">  END
       $r->print(&Apache::loncommon::start_data_table_row());
       $r->print(<<"END");
        <td>$lt{'disa'}</td>         <td>$lt{'disa'}</td>
        <td>$lt{$discdisp}</td>         <td>$lt{$discdisp}</td>
        <td><input type="checkbox" name="discdisp" /><input type="hidden" name="newdisp" value="$newdisp" />&nbsp;$lt{'chgt'} "$dispchange"</td>         <td><label><input type="checkbox" name="discdisp" /><input type="hidden" name="newdisp" value="$newdisp" />&nbsp;$lt{'chgt'} "$dispchange"</label></td>
       </tr><tr bgcolor="#eeeeee">  END
       $r->print(&Apache::loncommon::end_data_table_row().
         &Apache::loncommon::start_data_table_row());
       $r->print(<<"END");
        <td>$lt{'npmr'}</td>         <td>$lt{'npmr'}</td>
        <td>$lt{$discmark}</td>         <td>$lt{$discmark}</td>
        <td><input type="checkbox" name="discmark" /><input type="hidden" name="newmark" value="$newmark" />&nbsp;$lt{'chgt'} "$markchange"</td>         <td><label><input type="checkbox" name="discmark" /><input type="hidden" name="newmark" value="$newmark" />&nbsp;$lt{'chgt'} "$markchange"</label></td>
       </tr>        </tr>
      </table>  END
     </td>      $r->print(&Apache::loncommon::end_data_table_row().
    </tr>        &Apache::loncommon::end_data_table());
   </table>      $r->print(<<"END");
  </td>  
 </tr>  
 </table>  
 <br />  <br />
 <br />  <br />
 <input type="submit" name="sub" value="Store Changes" />  <input type="submit" name="sub" value="Store Changes" />
Line 1204  sub handler { Line 1211  sub handler {
                             text => 'Change Math Preferences'},                              text => 'Change Math Preferences'},
                       printmenu => 'yes',                        printmenu => 'yes',
                       }));                        }));
   
       if ($env{'environment.remote'} eq 'off') {
    push (@Options,({ action => 'launch',
     linktext => 'Launch Remote Control',
     href => '/adm/remote?url=/adm/preferences',
         }));
       } else {
    push (@Options,({ action => 'collapse',
     linktext => 'Collapse Remote Control',
     href => '/adm/remote?url=/adm/preferences',
         }));
       }
   
     if (&Apache::lonnet::allowed('whn',$env{'request.course.id'})      if (&Apache::lonnet::allowed('whn',$env{'request.course.id'})
  || &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/'   || &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/'
     .$env{'request.course.sec'})) {      .$env{'request.course.sec'})) {
Line 1270  sub handler { Line 1290  sub handler {
         foreach my $option(@Options) {          foreach my $option(@Options) {
             my $optiontext = '';              my $optiontext = '';
             if (exists($option->{'href'})) {              if (exists($option->{'href'})) {
                 $optiontext .=    $option->{'href_args'}{'action'}=$option->{'action'};
                     '<a href="'.$option->{'href'}.   $optiontext .= 
                     '?action='.$option->{'action'}.'">'.                      '<a href="'.&add_get_param($option->{'href'},
          $option->{'href_args'}).'">'.
                     &mt($option->{'linktext'}).'</a>';                      &mt($option->{'linktext'}).'</a>';
             }              }
             if (exists($option->{'text'})) {              if (exists($option->{'text'})) {

Removed from v.1.81  
changed lines
  Added in v.1.85


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