Diff for /loncom/interface/lonpreferences.pm between versions 1.196.4.11 and 1.199

version 1.196.4.11, 2013/06/10 20:28:12 version 1.199, 2012/10/04 13:41:10
Line 152  sub languagechanger { Line 152  sub languagechanger {
                 text => 'Change Language'});                  text => 'Change Language'});
     $r->print(Apache::loncommon::start_page('Content Display Settings'));      $r->print(Apache::loncommon::start_page('Content Display Settings'));
     $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Language'));       $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Language')); 
     my %userenv = &Apache::lonnet::get('environment',['languages']);      my $user       = $env{'user.name'};
       my $domain     = $env{'user.domain'};
       my %userenv = &Apache::lonnet::get
           ('environment',['languages']);
     my $language=$userenv{'languages'};      my $language=$userenv{'languages'};
   
     $r->print(      my $pref=&mt('Preferred language');
         '<form name="prefs" action="/adm/preferences" method="post">'."\n".      my %langchoices=('' => 'No language preference');
         '<input type="hidden" name="action" value="verify_and_change_languages" />'.      foreach (&Apache::loncommon::languageids()) {
         '<br /><span class="LC_nobreak">'.&mt('Preferred language').':&nbsp;'.   if (&Apache::loncommon::supportedlanguagecode($_)) {
         &Apache::loncommon::select_language('language',$language,1).'</span>'."\n".      $langchoices{&Apache::loncommon::supportedlanguagecode($_)}
         '<br /><input type="submit" value="'.&mt('Save').'" /></form>'                 = &Apache::loncommon::plainlanguagedescription($_);
     );   }
       }
       %langchoices = &Apache::lonlocal::texthash(%langchoices);
       my $selectionbox=
              &Apache::loncommon::select_form(
                  $language,
                  'language',
                  \%langchoices);
       $r->print(<<ENDLSCREEN);
   <form name="prefs" action="/adm/preferences" method="post">
   <input type="hidden" name="action" value="verify_and_change_languages" />
   <br />$pref: $selectionbox
   ENDLSCREEN
       $r->print('<br /><input type="submit" value="'.&mt('Save').'" />');
 }  }
   
   
Line 211  sub texenginechanger { Line 227  sub texenginechanger {
      'tth' => 'tth (TeX to HTML)',       'tth' => 'tth (TeX to HTML)',
      #'ttm' => 'TeX to MathML',       #'ttm' => 'TeX to MathML',
      'jsMath' => 'jsMath',       'jsMath' => 'jsMath',
                      'MathJax' => 'MathJax',       'MathJax' => 'MathJax',
      'mimetex' => 'mimetex (Convert to Images)',       'mimetex' => 'mimetex (Convert to Images)',
                      'raw' => 'Raw (Screen Reader)'                       'raw' => 'Raw (Screen Reader)'
                      );                       );
Line 354  sub rolesprefchanger { Line 370  sub rolesprefchanger {
     my $hotlist_n=$userenv{'recentrolesn'};      my $hotlist_n=$userenv{'recentrolesn'};
     my ($checkedon,$checkedoff);      my ($checkedon,$checkedoff);
     if ($hotlist_flag) {      if ($hotlist_flag) {
         $checkedon = 'checked="checked"';    $checkedon = 'checked="checked"';
     } else {      } else {
         $checkedoff = 'checked="checked"';          $checkedoff = 'checked="checked"';
     }      }
Line 437  $options.' Line 453  $options.'
 &Apache::lonhtmlcommon::row_closure(1).  &Apache::lonhtmlcommon::row_closure(1).
 &Apache::lonhtmlcommon::end_pick_box().'  &Apache::lonhtmlcommon::end_pick_box().'
 </div>');  </div>');
     if ($roles_check_list) {      if ($roles_check_list) { 
         $r->print('<div class="LC_left_float">          $r->print('<div class="LC_left_float">
 <h4>'.&mt('Freeze Roles').'</h4>  <h4>'.&mt('Freeze Roles').'</h4>
 <p>'.&mt('The table below can be used to [_1]freeze[_2] '.$lc_role.'s in the Hotlist.','<q>','</q>').'<br />'.  <p>'.&mt('The table below can be used to [_1]freeze[_2] '.$lc_role.'s in the Hotlist.','<q>','</q>').'<br />'.
 &mt('Those '.$lc_role.'s marked frozen will not be removed from the list, even if not recently used.').'  &mt('Those marked frozen will not be removed from the list, even if not recently used.').'
 </p>  </p>
 '.$roles_check_list.'  '.$roles_check_list.'
 </div>');  </div>');
Line 791  sub domcoordchanger { Line 807  sub domcoordchanger {
     if ($userenv{'domcoord.author'} eq 'blocked') {      if ($userenv{'domcoord.author'} eq 'blocked') {
        $constchecked=' checked="checked"';         $constchecked=' checked="checked"';
     }      }
     my $text=&mt('By default, the Domain Coordinator can enter your Authoring Space.');      my $text=&mt('By default, the Domain Coordinator can enter your construction space.');
     my $construction=&mt('Block access to Authoring Space');      my $construction=&mt('Block access to construction space');
     my $change=&mt('Save');      my $change=&mt('Save');
     $r->print(<<ENDSCREEN);      $r->print(<<ENDSCREEN);
 <form name="prefs" action="/adm/preferences" method="post">  <form name="prefs" action="/adm/preferences" method="post">
Line 818  sub verify_and_change_domcoord { Line 834  sub verify_and_change_domcoord {
     } else {      } else {
         $status=&mt('off');          $status=&mt('off');
     }      }
     my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]','<i>'.&mt('Block access to Authoring Space').'</i>','<tt>'.$status.'</tt>'));      my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]','<i>'.&mt('Block access to construction space').'</i>','<tt>'.$status.'</tt>'));
     $message=&Apache::loncommon::confirmwrapper($message);      $message=&Apache::loncommon::confirmwrapper($message);
     &print_main_menu($r,$message);      &print_main_menu($r,$message);
 }  }
Line 1211  sub colorschanger { Line 1227  sub colorschanger {
     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.=&Apache::loncommon::start_data_table_row().         $chtable.=&Apache::loncommon::start_data_table_row().
                  '<td>'.$colortypes{$item}.'<td><input name="'.$item.     '<td>'.$colortypes{$item}.'</td><td style="background: '.$curcol.
                  '" class="colorchooser"  size="10" value="'.$curcol.          '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input name="'.$item.
                  '" /></td>'.          '" size="10" value="'.$curcol.
          &Apache::loncommon::end_data_table_row()."\n";  '" /></td><td><a href="javascript:pjump('."'color_custom','".$colortypes{$item}.
   "','".$curcol."','"
       .$item."','parmform.pres','psub'".');">'.&mt('Select').'</a></td>'.
       &Apache::loncommon::end_data_table_row()."\n";
     }      }
     my $end_data_table = &Apache::loncommon::end_data_table();      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();
     my $savebutton = &mt('Save');      my $savebutton = &mt('Save');
     my $resetbutton = &mt('Reset All');      my $resetbutton = &mt('Reset All');
     my $resetbuttondesc = &mt('Reset All Colors to Default');      my $resetbuttondesc = &mt('Reset All Colors to Default');
     my $colorchooser=&Apache::lonhtmlcommon::color_picker();  
     $r->print('<script type="text/javascript" language="JavaScript">  
 ' . $colorchooser . '  
 </script>  
 ');  
   
     $r->print(<<ENDCOL);      $r->print(<<ENDCOL);
   <script type="text/javascript" language="JavaScript">
   
       $pjump_def
   
       function psub() {
           modalWindow.close();
           if (document.parmform.pres_marker.value!='') {
               if (document.parmform.pres_type.value!='') {
                   eval('document.prefs.'+
                        document.parmform.pres_marker.value+
        '.value=document.parmform.pres_value.value;');
       }
           } else {
               document.parmform.pres_value.value='';
               document.parmform.pres_marker.value='';
           }
       }
   
   
   </script>
 <form name="parmform">  <form name="parmform">
 <input type="hidden" name="pres_marker" />  <input type="hidden" name="pres_marker" />
 <input type="hidden" name="pres_type" />  <input type="hidden" name="pres_type" />
Line 1267  sub verify_and_change_colors { Line 1299  sub verify_and_change_colors {
     my $message='';      my $message='';
     foreach my $item (keys %colortypes) {      foreach my $item (keys %colortypes) {
         my $color=$env{'form.'.$item};          my $color=$env{'form.'.$item};
         if (!($color =~ /^#/)) {  
             $color = '#' . $color;  
         }  
         my $entry='color.'.$function.'.'.$item;          my $entry='color.'.$function.'.'.$item;
  if (($color=~/^\#[0-9A-Fa-f]{6}$/) && (!$env{'form.resetall'})) {   if (($color=~/^\#[0-9A-Fa-f]{6}$/) && (!$env{'form.resetall'})) {
     &Apache::lonnet::put('environment',{$entry => $color});      &Apache::lonnet::put('environment',{$entry => $color});
Line 1320  sub passwordchanger { Line 1349  sub passwordchanger {
                 $r->print(                  $r->print(
                     '<p class="LC_warning">'                      '<p class="LC_warning">'
                    .&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'                     .&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'
                              ,'<a href="/adm/resetpw">','</a>')                         ,'<a href="/adm/resetpw">','</a>')
                    .'</p>'                     .'</p>'
                 );                  );
                 return;                  return;
Line 1341  sub passwordchanger { Line 1370  sub passwordchanger {
                 }                  }
             } else {              } else {
                 $r->print(                  $r->print(
                    '<p class="LC_warning">'                      '<p class="LC_warning">'
                   .&mt('Sorry, the URL generated when you requested reset of'                     .&mt('Sorry, the URL generated when you requested reset of'
                       .' your password contained incomplete information.')                         .' your password contained incomplete information.')
                    .'</p>'                     .'</p>'
                 );                  );
                 return;                  return;
Line 2126  push(@{ $menu[0]->{items} }, { Line 2155  push(@{ $menu[0]->{items} }, {
  linktitle => 'Change your password.',   linktitle => 'Change your password.',
  });   });
     }      }
     if ($env{'environment.remote'} eq 'off') {  
 push(@{ $menu[1]->{items} }, {  
         linktext => 'Launch Remote Control',  
         url => '/adm/remote?url=/adm/preferences&amp;action=launch',  
         permission => 'F',  
         #help => '',  
         icon => 'remotecontrol.png',  
         linktitle => 'Launch the remote control for LON-CAPA.',  
         });  
     }else{  
 push(@{ $menu[1]->{items} }, {  
         linktext => 'Collapse Remote Control',  
         url => '/adm/remote?url=/adm/preferences&amp;action=collapse',  
         permission => 'F',  
         #help => '',  
         icon => 'remotecontrol.png',  
         linktitle => 'Collapse the remote control for LON-CAPA.',  
         });  
     }  
   
     if (&can_toggle_namelocking()) {      if (&can_toggle_namelocking()) {
         push(@{ $menu[0]->{items} }, {          push(@{ $menu[0]->{items} }, {
Line 2226  sub handler { Line 2236  sub handler {
     } else {      } else {
         $brlink ='/adm/preferences';          $brlink ='/adm/preferences';
         $brtxt = 'Set User Preferences';          $brtxt = 'Set User Preferences';
         $brhelp = 'Prefs_About_Me,Prefs_Language,Prefs_Screen_Name_Nickname,Change_Colors,Change_Password,Prefs_Messages,Change_Discussion_Display';          $brhelp = 'Prefs_About_Me,Prefs_Language,Prefs_Screen_Name_Nickname,Change_Colors,Change_Password,Prefs_Messages,Change_Discussion_Display';   
     }      }
     Apache::lonhtmlcommon::add_breadcrumb      Apache::lonhtmlcommon::add_breadcrumb
         ({href => $brlink,          ({href => $brlink,

Removed from v.1.196.4.11  
changed lines
  Added in v.1.199


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