Diff for /loncom/interface/lonpreferences.pm between versions 1.246 and 1.248

version 1.246, 2025/03/05 02:27:00 version 1.248, 2025/03/07 02:13:40
Line 103  sub languagechanger { Line 103  sub languagechanger {
     { href => '/adm/preferences?action=changelanguages',      { href => '/adm/preferences?action=changelanguages',
                 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').
                 '<div class="LC_landmark" role="main">'); 
     my %userenv = &Apache::lonnet::get('environment',['languages']);      my %userenv = &Apache::lonnet::get('environment',['languages']);
     my $language=$userenv{'languages'};      my $language=$userenv{'languages'};
   
     $r->print(      $r->print(
         '<form name="prefs" action="/adm/preferences" method="post">'."\n".          '<form name="prefs" action="/adm/preferences" method="post">'."\n".
         '<input type="hidden" name="action" value="verify_and_change_languages" />'.          '<input type="hidden" name="action" value="verify_and_change_languages" />'.
         '<br /><span class="LC_nobreak">'.&mt('Preferred language').':&nbsp;'.          '<br /><span class="LC_nobreak"><label>'.&mt('Preferred language').':&nbsp;'.
         &Apache::loncommon::select_language('language',$language,1).'</span>'."\n".          &Apache::loncommon::select_language('language',$language,1).'</label></span>'."\n".
         '<br /><input type="submit" value="'.&mt('Save').'" /></form>'          '<br /><input type="submit" value="'.&mt('Save').'" /></form></div>'
     );      );
 }  }
   
Line 192  sub texenginechanger { Line 193  sub texenginechanger {
 <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_texengine" />  <input type="hidden" name="action" value="verify_and_change_texengine" />
 <p>  <p>
 $lt{'preftxt'}: $selectionbox   <label>$lt{'preftxt'}: $selectionbox 
 <br />  </label><br />
 <input type="submit" value="$lt{'change'}" />  <input type="submit" value="$lt{'change'}" />
 </p>  </p>
 </form>  </form>
Line 275  sub rolesprefchanger { Line 276  sub rolesprefchanger {
     { href => '/adm/preferences?action=changerolespref',      { href => '/adm/preferences?action=changerolespref',
                 text => $brtext});                  text => $brtext});
     $r->print(Apache::loncommon::start_page('Content Display Settings'));      $r->print(Apache::loncommon::start_page('Content Display Settings'));
     $r->print(Apache::lonhtmlcommon::breadcrumbs($brtitle));      $r->print(Apache::lonhtmlcommon::breadcrumbs($brtitle).
                 '<div class="LC_landmark" role="main">');
     my $hotlist_flag=$userenv{'recentroles'};      my $hotlist_flag=$userenv{'recentroles'};
     my $hotlist_n=$userenv{'recentrolesn'};      my $hotlist_n=$userenv{'recentrolesn'};
     my ($checkedon,$checkedoff);      my ($checkedon,$checkedoff);
Line 294  sub rolesprefchanger { Line 296  sub rolesprefchanger {
     }      }
   
 # Get list of recent roles and display with checkbox in front  # Get list of recent roles and display with checkbox in front
     my $roles_check_list = '';      my $roles_check_list;
     my $role_key='';  
     if ($env{'environment.recentroles'}) {      if ($env{'environment.recentroles'}) {
         my %recent_roles =          my %recent_roles =
                &Apache::lonhtmlcommon::get_recent('roles',$env{'environment.recentrolesn'});                 &Apache::lonhtmlcommon::get_recent('roles',$env{'environment.recentrolesn'});
         my %frozen_roles =          my %frozen_roles =
                &Apache::lonhtmlcommon::get_recent_frozen('roles',$env{'environment.recentrolesn'});                 &Apache::lonhtmlcommon::get_recent_frozen('roles',$env{'environment.recentrolesn'});
           
         my %role_text = &rolespref_get_role_text([keys(%recent_roles)]);          my %role_text = &rolespref_get_role_text([keys(%recent_roles)]);
         my @sorted_roles = sort {$role_text{$a} cmp $role_text{$b}} keys(%role_text);          my @sorted_roles = sort {$role_text{$a} cmp $role_text{$b}} keys(%role_text);
   
         $roles_check_list .=          if (@sorted_roles) {
     &Apache::loncommon::start_data_table().              $roles_check_list =
     &Apache::loncommon::start_data_table_header_row().          &Apache::loncommon::start_data_table().
     "<th>".&mt('Freeze '.$role)."</th>".          &Apache::loncommon::start_data_table_header_row().
     "<th>".&mt($role)."</th>".          "<th>".&mt('Freeze '.$role)."</th>".
     &Apache::loncommon::end_data_table_header_row().          "<th>".&mt($role)."</th>".
     "\n";          &Apache::loncommon::end_data_table_header_row()."\n";
  my $count;      my $count = 0;
         foreach $role_key (@sorted_roles) {              foreach my $role_key (@sorted_roles) {
             my $checked = "";                  my $checked = "";
             my $value = $recent_roles{$role_key};                  my $value = $recent_roles{$role_key};
             if ($frozen_roles{$role_key}) {                  if ($frozen_roles{$role_key}) {
                 $checked = ' checked="checked"';                      $checked = ' checked="checked"';
             }                  }
     $count++;          $count++;
             $roles_check_list .=                  $roles_check_list .=
  &Apache::loncommon::start_data_table_row().      &Apache::loncommon::start_data_table_row().
  '<td class="LC_table_cell_checkbox">'.      '<td class="LC_table_cell_checkbox">'.
  "<input type=\"checkbox\"$checked name=\"freezeroles\"".      "<input type=\"checkbox\"$checked name=\"freezeroles\"".
  " id=\"freezeroles$count\" value=\"$role_key\" /></td>".      " id=\"freezeroles$count\" value=\"$role_key\" /></td>".
  "<td><label for=\"freezeroles$count\">".      "<td><label for=\"freezeroles$count\">".
  "$role_text{$role_key}</label></td>".      "$role_text{$role_key}</label></td>".
  &Apache::loncommon::end_data_table_row(). "\n";      &Apache::loncommon::end_data_table_row(). "\n";
               }
               $roles_check_list .= &Apache::loncommon::end_data_table."\n";
         }          }
         $roles_check_list .= "</table>\n";  
     }      }
   
     my $actionurl = '/adm/preferences';      my $actionurl = '/adm/preferences';
     if ($env{'form.returnurl'} eq '/adm/roles') {      if ($env{'form.returnurl'} eq '/adm/roles') {
         $actionurl = '/adm/roles';          $actionurl = '/adm/roles';
     }      }
     $r->print('<h3>'.&mt('Recent Roles Hotlist').'</h3>');      $r->print('<h2 class="LC_heading_2">'.&mt('Recent Roles Hotlist').'</h2>');
     unless ($checkedon) {      unless ($checkedon) {
         $r->print(&mt('LON-CAPA users with several '.$lc_role.'s may wish to enable the Hotlist.').'<br />');          $r->print(&mt('LON-CAPA users with several '.$lc_role.'s may wish to enable the Hotlist.').'<br />');
     }      }
Line 344  sub rolesprefchanger { Line 346  sub rolesprefchanger {
 <form name="prefs" action="'.$actionurl.'" method="post">  <form name="prefs" action="'.$actionurl.'" method="post">
 <input type="hidden" name="action" value="verify_and_change_rolespref" />  <input type="hidden" name="action" value="verify_and_change_rolespref" />
 <input type="hidden" name="returnurl" value="'.$env{'form.returnurl'}.'" />  <input type="hidden" name="returnurl" value="'.$env{'form.returnurl'}.'" />
 <div class="LC_left_float"><h4>'.&mt('Hotlist options').'</h4>  <div class="LC_left_float"><h3 class="LC_heading_3">'.&mt('Hotlist options').'</h3>
 <p>'.  <p>'.
 &mt('When enabled, the Hotlist keeps track of the last N '.$lc_role.'s visited.').'<br />'.  &mt('When enabled, the Hotlist keeps track of the last N '.$lc_role.'s visited.').'<br />'.
 &mt('Those N '.$lc_role.'s are then shown in a table at the top of the '.$lc_role.'s page.').'</p>'.  &mt('Those N '.$lc_role.'s are then shown in a table at the top of the '.$lc_role.'s page.').'</p>'.
Line 365  $options.' Line 367  $options.'
 </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>  <h3 class="LC_heading_3">'.&mt('Freeze Roles').'</h3>
 <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 '.$lc_role.'s marked frozen will not be removed from the list, even if not recently used.').'
 </p>  </p>
Line 378  $options.' Line 380  $options.'
      $r->print('       $r->print('
 <br clear="all" />  <br clear="all" />
 <input type="submit" value="'.&mt('Save').'" />  <input type="submit" value="'.&mt('Save').'" />
 </form>');  </form></div>');
 }  }
   
 sub rolespref_get_role_text {  sub rolespref_get_role_text {
Line 491  sub screennamechanger { Line 493  sub screennamechanger {
                   text => 'Change Screen Name'});                    text => 'Change Screen Name'});
     $r->print(Apache::loncommon::start_page('Personal Data'));      $r->print(Apache::loncommon::start_page('Personal Data'));
     $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Screen Name'));      $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Screen Name'));
     $r->print('<p>'      $r->print('<div class="LC_landmark" role="main">');
              .&mt('Change the name that is displayed in your posts.')      my $caption = &mt('Name displayed in posts you make').':';            
              .'</p>'  
     );  
     $r->print('<form name="prefs" action="/adm/preferences" method="post">'      $r->print('<form name="prefs" action="/adm/preferences" method="post">'
              .'<input type="hidden" name="action" value="verify_and_change_screenname" />'               .'<p><input type="hidden" name="action" value="verify_and_change_screenname" />'
              .&Apache::lonhtmlcommon::start_pick_box()               .&Apache::lonhtmlcommon::start_pick_box(undef,undef,$caption,'LC_caption_prefs')
              .&Apache::lonhtmlcommon::row_title(&mt('Screenname').' '.&mt('(shown if you post anonymously)'))               .&Apache::lonhtmlcommon::row_title('<label for="screenname">'.&mt('Screenname').'</label> '.&mt('(shown if you post anonymously)'))
              .'<input type="text" size="20" value="'.$screenname.'" name="screenname" />'               .'<input type="text" size="20" value="'.$screenname.'" name="screenname" id="screenname" />'
              .&Apache::lonhtmlcommon::row_closure()               .&Apache::lonhtmlcommon::row_closure()
              .&Apache::lonhtmlcommon::row_title(&mt('Nickname').' '.&mt('(shown if you post non-anonymously)'))               .&Apache::lonhtmlcommon::row_title('<label for="nickname">'.&mt('Nickname').'</label> '.&mt('(shown if you post non-anonymously)'))
              .'<input type="text" size="20" value="'.$nickname.'" name="nickname" />'               .'<input type="text" size="20" value="'.$nickname.'" name="nickname" id="nickname" />'
              .&Apache::lonhtmlcommon::row_closure()               .&Apache::lonhtmlcommon::row_closure()
              .&Apache::lonhtmlcommon::row_title()               .&Apache::lonhtmlcommon::row_title('<span class="LC_visually_hidden">'.&mt('Submit').':</span>','','','',1)
              .'<input type="submit" value="'.&mt('Save').'" />'               .'<input type="submit" value="'.&mt('Save').'" />'
              .&Apache::lonhtmlcommon::row_closure(1)               .&Apache::lonhtmlcommon::row_closure(1)
              .&Apache::lonhtmlcommon::end_pick_box()               .&Apache::lonhtmlcommon::end_pick_box()
              .'</form>'               .'</p></form></div>'
     );      );
 }  }
   
Line 556  sub iconchanger { Line 556  sub iconchanger {
             {   href => '/adm/preferences?action=changeicons',              {   href => '/adm/preferences?action=changeicons',
                 text => 'Change Menu Display'});                  text => 'Change Menu Display'});
     $r->print(Apache::loncommon::start_page('Page Display Settings'));      $r->print(Apache::loncommon::start_page('Page Display Settings'));
     $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Menu Display'));      $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Menu Display').
                 '<div class="LC_landmark" role="main">');
   
     my $user       = $env{'user.name'};      my $user       = $env{'user.name'};
     my $domain     = $env{'user.domain'};      my $domain     = $env{'user.domain'};
Line 591  sub iconchanger { Line 592  sub iconchanger {
                       '<ul>'.                        '<ul>'.
                       $iconic_preview.                        $iconic_preview.
                       '</ul></li></ul>';                         '</ul></li></ul>'; 
       my $title = &mt('Use of icons and text');
     $r->print(<<ENDSCREEN);      $r->print(<<ENDSCREEN);
 $classic  $classic
 <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_icons" />  <input type="hidden" name="action" value="verify_and_change_icons" />
   <fieldset style="display:inline;"><legend>$title</legend>
 <label><input type="radio" name="menumode" value="iconic" $iconic /> $lt{'iconic'}</label>$iconic_preview<br />  <label><input type="radio" name="menumode" value="iconic" $iconic /> $lt{'iconic'}</label>$iconic_preview<br />
 <label><input type="radio" name="menumode" value="iconsonly" $onlyicon /> $lt{'iconsonly'}</label>$iconsonly_preview<br />  <label><input type="radio" name="menumode" value="iconsonly" $onlyicon /> $lt{'iconsonly'}</label>$iconsonly_preview<br />
   </fieldset>
   <p>
 <input type="submit" value="$change" />  <input type="submit" value="$change" />
 </form>  </p>
   </form></div>
 ENDSCREEN  ENDSCREEN
 }  }
   
Line 657  sub clickerchanger { Line 663  sub clickerchanger {
     { href => '/adm/preferences?action=changeclicker',      { href => '/adm/preferences?action=changeclicker',
                 text => 'Register Clicker'});                  text => 'Register Clicker'});
     $r->print(Apache::loncommon::start_page('Other'));      $r->print(Apache::loncommon::start_page('Other'));
     $r->print(Apache::lonhtmlcommon::breadcrumbs('Register Clicker'));      $r->print(Apache::lonhtmlcommon::breadcrumbs('Register Clicker').
                 '<div class="LC_landmark" role="main">');
     my $user       = $env{'user.name'};      my $user       = $env{'user.name'};
     my $domain     = $env{'user.domain'};      my $domain     = $env{'user.domain'};
     my %userenv = &Apache::lonnet::get      my %userenv = &Apache::lonnet::get
Line 668  sub clickerchanger { Line 675  sub clickerchanger {
     my $change=&mt('Save');      my $change=&mt('Save');
     my $helplink=&Apache::loncommon::help_open_topic('Clicker_Registration',&mt('Locating your clicker ID'));      my $helplink=&Apache::loncommon::help_open_topic('Clicker_Registration',&mt('Locating your clicker ID'));
     $r->print(<<ENDSCREEN);      $r->print(<<ENDSCREEN);
   <br />
 <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_clicker" />  <input type="hidden" name="action" value="verify_and_change_clicker" />
 <label>$helplink<br /><br />$text<br />  <label>$helplink<br /><br />$text<br />
 <textarea name="clickers" rows="5" cols="20">$clickers</textarea>  <textarea name="clickers" rows="5" cols="20">$clickers</textarea>
 </label>  </label>
 <br />  <p>
 <input type="submit" value="$change" />  <input type="submit" value="$change" />
   </p>
 </form>  </form>
   </div>
 ENDSCREEN  ENDSCREEN
 }  }
   
Line 848  sub msgforwardchanger { Line 858  sub msgforwardchanger {
                                           notv => 'is not a valid e-mail address',                                            notv => 'is not a valid e-mail address',
                                           toen => "To enter multiple addresses, enter one address at a time, click 'Change' and then add the next one",                                             toen => "To enter multiple addresses, enter one address at a time, click 'Change' and then add the next one", 
                                           prme => 'Back',                                            prme => 'Back',
                                             acti => 'Action',
                                             type => 'Types of message for which notification is sent',
                                             nota => 'Notification address',
                                             exce => 'Excerpt retains HTML tags in message',
                                             modi => 'Modify',
                                             dele => 'Delete',
                                             addn => 'Add new address',
                                             yes  => 'Yes',
                                             no   => 'No',
                                         );                                          );
     $lt{'foad_exmpl'} = &mt('e.g. [_1]userA:domain1,userB:domain2,...[_2]','<tt>','</tt>');      $lt{'foad_exmpl'} = &mt('e.g. [_1]userA:domain1,userB:domain2,...[_2]','<tt>','</tt>');
     $lt{'mnot_exmpl'} = &mt('e.g. [_1]joe@doe.com[_2]','<tt>','</tt>');      $lt{'mnot_exmpl'} = &mt('e.g. [_1]joe@doe.com[_2]','<tt>','</tt>');
     Apache::lonhtmlcommon::add_breadcrumb(      Apache::lonhtmlcommon::add_breadcrumb(
     { href => '/adm/preferences?action=changemsgforward',      { href => '/adm/preferences?action=changemsgforward',
  text => 'Messages & Notifications'});   text => 'Messages &amp; Notifications'});
     $r->print(Apache::loncommon::start_page('Messages &amp; Notifications'));      $r->print(Apache::loncommon::start_page('Messages &amp; Notifications'));
     $r->print(Apache::lonhtmlcommon::breadcrumbs('Messages &amp; Notifications'));      $r->print(Apache::lonhtmlcommon::breadcrumbs('Messages &amp; Notifications').
                 '<div class="LC_landmark" role="main">');
     my $forwardingHelp = &Apache::loncommon::help_open_topic("Prefs_Forwarding");      my $forwardingHelp = &Apache::loncommon::help_open_topic("Prefs_Forwarding");
     my $notificationHelp = &Apache::loncommon::help_open_topic("Prefs_Notification");      my $notificationHelp = &Apache::loncommon::help_open_topic("Prefs_Notification");
     my $criticalMessageHelp = &Apache::loncommon::help_open_topic("Course_Critical_Message");      my $criticalMessageHelp = &Apache::loncommon::help_open_topic("Course_Critical_Message");
Line 924  $validatescript Line 944  $validatescript
     $r->print(<<ENDMSG);      $r->print(<<ENDMSG);
 $jscript  $jscript
 $message  $message
 <h3>$lt{'fwdm'} $forwardingHelp</h3>  <h2 class="LC_heading_2">$lt{'fwdm'} $forwardingHelp</h2>
 <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_msgforward" />  <input type="hidden" name="action" value="verify_and_change_msgforward" />
 $lt{'foad'} ($lt{'foad_exmpl'}):  <label for="msgforward">$lt{'foad'}</label> ($lt{'foad_exmpl'}):
 <input type="text" size="40" value="$msgforward" name="msgforward" />  <input type="text" size="40" value="$msgforward" name="msgforward" id="msgforward" />
 <br /><br />  <p />
 <h3>$lt{'noti'} $notificationHelp</h3>  <h2 class="LC_heading_2">$lt{'noti'} $notificationHelp</h2>
 $lt{'mnot'} ($lt{'mnot_exmpl'}):<br />  <span id="LC_email_notify">$lt{'mnot'}</span> ($lt{'mnot_exmpl'}):<br />
 ENDMSG  ENDMSG
     my @sortforwards = sort (keys(%allnot));      my @sortnotify = sort (keys(%allnot));
     my $output = &Apache::loncommon::start_data_table().      my $output = &Apache::loncommon::start_data_table().
                  &Apache::loncommon::start_data_table_header_row().                   &Apache::loncommon::start_data_table_header_row().
                  '<th>&nbsp;</th>'.                   '<th>#</th>'.
                  '<th>'.&mt('Action').'</th>'.                   '<th>'.$lt{'acti'}.'</th>'.
                  '<th>'.&mt('Notification address').'</th><th>'.                   '<th>'.$lt{'nota'}.'</th><th>'.
                  &mt('Types of message for which notification is sent').                   $lt{'type'}.
                  $criticalMessageHelp.'</th><th>'.                   $criticalMessageHelp.'</th><th>'.
                  &mt('Excerpt retains HTML tags in message').'</th>'.                   $lt{'exce'}.'</th>'.
                  &Apache::loncommon::end_data_table_header_row();                   &Apache::loncommon::end_data_table_header_row();
     my $num = 0;      my $num = 0;
     my $counter = 1;      my $counter = 1;
     foreach my $item (@sortforwards) {      foreach my $item (@sortnotify) {
         $output .= &Apache::loncommon::start_data_table_row().          $output .= &Apache::loncommon::start_data_table_row('LC_prefs_row').
                    '<td><b>'.$counter.'</b></td>'.                     '<td><b>'.$counter.'</b></td>'.
                    '<td><span class="LC_nobreak"><label>'.                     '<td><span class="LC_nobreak"><label>'.
                    '<input type="checkbox" name="modify_notify_'.                     '<input type="checkbox" name="modify_notify_'.
                    $num.'" onclick="javscript:modify_address('."'$num'".')" />'.                     $num.'" onclick="javscript:modify_address('."'$num'".')" />'.
                    &mt('Modify').'</label></span>&nbsp;&nbsp; '.                     $lt{'modi'}.'</label></span> '.('&nbsp;' x2).
                    '<span class="LC_nobreak"><label>'.                     '<span class="LC_nobreak"><label>'.
                    '<input type="checkbox" name="del_notify_'.$num.                     '<input type="checkbox" name="del_notify_'.$num.
                    '" onclick="javscript:delete_address('."'$num'".')" />'.                     '" onclick="javscript:delete_address('."'$num'".')" />'.
                    &mt('Delete').'</label></span></td>'.                     $lt{'dele'}.'</label></span></td>'.
                    '<td><input type="text" value="'.$item.'" name="address_'.                     '<td><span style="padding: 10px;"><input type="text" value="'.$item.'" name="address_'.
                    $num.'" onfocus="javascript:address_changes('."'$num'".                     $num.'" onfocus="javascript:address_changes('."'$num'".
                    ')" /></td><td>';                     ')" aria-labelledby="LC_email_notify" /></span></td><td>';
         my %chk;          my %chk;
         if (defined($allnot{$item}{'crit'})) {          if (defined($allnot{$item}{'crit'})) {
             if (defined($allnot{$item}{'reg'})) {              if (defined($allnot{$item}{'reg'})) {
Line 969  ENDMSG Line 989  ENDMSG
         } else {          } else {
             $chk{'reg'} = 'checked="checked" ';              $chk{'reg'} = 'checked="checked" ';
         }          }
           $output .= '<fieldset class="LC_landmark" style="display:inline"><legend class="LC_visually_hidden">'.$lt{'type'}.'</legend>';
         foreach my $type ('all','crit','reg') {          foreach my $type ('all','crit','reg') {
             $output .= '<span class="LC_nobreak"><label>'.              $output .= '<span class="LC_nobreak"><label>'.
                        '<input type="radio" name="notify_type_'.$num.                          '<input type="radio" name="notify_type_'.$num. 
                        '" value="'.$type.'" '.$chk{$type}.                         '" value="'.$type.'" '.$chk{$type}.
                        ' onchange="javascript:address_changes('."'$num'".')" />'.                         ' onchange="javascript:address_changes('."'$num'".')" />'.
                        $lt{$type}.'</label></span>'.('&nbsp;' x4);                         $lt{$type}.'</label></span> '.('&nbsp;' x2);
         }          }
           $output .= '</fieldset>';
         my $htmlon = '';          my $htmlon = '';
         my $htmloff = '';          my $htmloff = '';
         if (grep/^\Q$item\E/,@allow_html) {          if (grep/^\Q$item\E/,@allow_html) {
Line 983  ENDMSG Line 1005  ENDMSG
         } else {          } else {
             $htmloff = 'checked="checked" ';              $htmloff = 'checked="checked" ';
         }          }
         $output .= '</td><td><label><input type="radio" name="html_'.$num.          $output .= '</td><td>'.
                      '<fieldset class="LC_landmark" style="display:inline"><legend class="LC_visually_hidden">'.$lt{'exce'}.'</legend>'.
                      '<label><input type="radio" name="html_'.$num.
                    '" value="1" '.$htmlon.                     '" value="1" '.$htmlon.
                    ' onchange="javascript:address_changes('."'$num'".')" />'.                     ' onchange="javascript:address_changes('."'$num'".')" />'.
                    &mt('Yes').'</label>'.('&nbsp;' x3).                     $lt{'yes'}.'</label> '.('&nbsp;' x2).
                    '<label><input type="radio" name="html_'.$num.'" value="0" '.                     '<label><input type="radio" name="html_'.$num.'" value="0" '.
                    $htmloff. ' onchange="javascript:address_changes('."'$num'".                     $htmloff. ' onchange="javascript:address_changes('."'$num'".
 ')" />'.  ')" />'.
                    &mt('No').'</label></td>'.                     $lt{'no'}.'</label></fieldset></td>'.
                    &Apache::loncommon::end_data_table_row();                     &Apache::loncommon::end_data_table_row();
         $num ++;          $num ++;
         $counter ++;          $counter ++;
Line 1000  ENDMSG Line 1024  ENDMSG
                    crit => '',                     crit => '',
                    reg => '',                     reg => '',
                  );                   );
     $output .= &Apache::loncommon::start_data_table_row().      $output .= &Apache::loncommon::start_data_table_row('LC_prefs_row').
                '<td><b>'.$counter.'</b></td>'.                 '<td><b>'.$counter.'</b></td>'.
                '<td><span class="LC_nobreak"><label>'.                 '<td><span class="LC_nobreak"><label>'.
                '<input type="checkbox" name="add_notify_'.$num.                 '<input type="checkbox" name="add_notify_'.$num.
                '" value="1" />'.&mt('Add new address').'</label></span></td>'.                 '" value="1" />'.$lt{'addn'}.'</label></span></td>'.
                '<td><input type="text" value="" name="address_'.$num.                 '<td><span style="padding: 10px;"><input type="text" value="" name="address_'.$num.
                '" onfocus="javascript:new_address('."'$num'".')" /></td><td>';                 '" onfocus="javascript:new_address('."'$num'".')" aria-labelledby="LC_email_notify" /></span></td><td>';
       $output .= '<fieldset class="LC_landmark" style="display:inline"><legend class="LC_visually_hidden">'.$lt{'type'}.'</legend>';
     foreach my $type ('all','crit','reg') {      foreach my $type ('all','crit','reg') {
         $output .= '<span class="LC_nobreak"><label>'.          $output .= '<span class="LC_nobreak"><label>'.
                    '<input type="radio" name="notify_type_'.$num.                     '<input type="radio" name="notify_type_'.$num.
                    '" value="'.$type.'" '.$defchk{$type}.'/>'.                     '" value="'.$type.'" '.$defchk{$type}.'/>'.
                    $lt{$type}.'</label></span>'.('&nbsp;' x4);                     $lt{$type}.'</label></span> '.('&nbsp;' x2);
     }      }
     $output .= '</td><td><label><input type="radio" name="html_'.$num.      $output .= '</fieldset></td><td>'.
                '" value="1" />'.&mt('Yes').'</label>'.('&nbsp;' x3).                 '<fieldset class="LC_landmark" style="display:inline"><legend class="LC_visually_hidden">'.$lt{'exce'}.'</legend>'.
                  '<label><input type="radio" name="html_'.$num.
                  '" value="1" />'.$lt{'yes'}.'</label> '.('&nbsp;' x2).
                '<label><input type="radio" name="html_'.$num.'" value="0" '.                 '<label><input type="radio" name="html_'.$num.'" value="0" '.
                ' checked="checked" />'.                 ' checked="checked" />'.
                &mt('No').'</label></td>'.                 $lt{'no'}.'</label></fieldset></td>'.
                &Apache::loncommon::end_data_table_row().                 &Apache::loncommon::end_data_table_row().
                &Apache::loncommon::end_data_table();                 &Apache::loncommon::end_data_table();
     $num ++;      $num ++;
Line 1027  ENDMSG Line 1054  ENDMSG
 <input type="hidden" name="numnotify" value="$num" />  <input type="hidden" name="numnotify" value="$num" />
 <input type="button" value="$lt{'prme'}" onclick="location.href='/adm/preferences'" />  <input type="button" value="$lt{'prme'}" onclick="location.href='/adm/preferences'" />
 <input type="button" value="$lt{'chg'}" onclick="javascript:validate()" />  <input type="button" value="$lt{'chg'}" onclick="javascript:validate()" />
 </form>  </form></div>
 |);  |);
   
 }  }
Line 1161  sub colorschanger { Line 1188  sub colorschanger {
     { href => '/adm/preferences?action=changecolors',      { href => '/adm/preferences?action=changecolors',
                 text => 'Change Colors'});                  text => 'Change Colors'});
     $r->print(Apache::loncommon::start_page('Page Display Settings'));      $r->print(Apache::loncommon::start_page('Page Display Settings'));
     $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Colors'));      $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Colors').
                 '<div class="LC_landmark" role="main">');
 # figure out colors  # figure out colors
     my $function=&Apache::loncommon::get_users_function();      my $function=&Apache::loncommon::get_users_function();
     my $domain=&Apache::loncommon::determinedomain();      my $domain=&Apache::loncommon::determinedomain();
Line 1175  sub colorschanger { Line 1203  sub colorschanger {
         'vlink'    => 'Visited Link Color',          'vlink'    => 'Visited Link Color',
         'alink'    => 'Active Link Color',          'alink'    => 'Active Link Color',
     );      );
     my $start_data_table = &Apache::loncommon::start_data_table();      my $start_data_table = &Apache::loncommon::start_data_table().
                              &Apache::loncommon::data_table_caption(&mt('Colors for LON-CAPA pages')).
                              &Apache::loncommon::start_data_table_header_row().
                              '<th>'.&mt('Page Element').'</th><th>'.&mt('Color').'</th>'.
                              &Apache::loncommon::end_data_table_header_row();
     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.=&Apache::loncommon::start_data_table_row().         $chtable.=&Apache::loncommon::start_data_table_row().
    '<td>'.$colortypes{$item}.'<td><input name="'.$item.     '<td><label for="'.$item.'">'.$colortypes{$item}.'</label></td>'.
         '" class="colorchooser"  size="10" value="'.$curcol.     '<td><input name="'.$item.
           '" class="colorchooser" id="'.$item.'" size="10" value="'.$curcol.
 '" /></td>'.  '" /></td>'.
     &Apache::loncommon::end_data_table_row()."\n";      &Apache::loncommon::end_data_table_row()."\n";
     }      }
Line 1192  sub colorschanger { Line 1225  sub colorschanger {
     my $resetbuttondesc = &mt('Reset All Colors to Default');      my $resetbuttondesc = &mt('Reset All Colors to Default');
     my $colorchooser=&Apache::lonhtmlcommon::color_picker();      my $colorchooser=&Apache::lonhtmlcommon::color_picker();
     $r->print('<script type="text/javascript" language="JavaScript">      $r->print('<script type="text/javascript" language="JavaScript">
 // <![CDATA[' ."\n".' . $colorchooser . '."\n". '  // <![CDATA[' ."\n". $colorchooser . "\n". '
 // ]]>  // ]]>
 </script>  </script>
 ');  ');
Line 1203  sub colorschanger { Line 1236  sub colorschanger {
 <input type="hidden" name="pres_type" />  <input type="hidden" name="pres_type" />
 <input type="hidden" name="pres_value" />  <input type="hidden" name="pres_value" />
 </form>  </form>
   <br />
 <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" />
 $start_data_table  $start_data_table
Line 1213  $end_data_table Line 1247  $end_data_table
 <input type="submit" value="$savebutton" />  <input type="submit" value="$savebutton" />
 <input type="submit" name="resetall" value="$resetbutton" title="$resetbuttondesc" />  <input type="submit" name="resetall" value="$resetbutton" title="$resetbuttondesc" />
 </p>  </p>
 </form>  </form></div>
 ENDCOL  ENDCOL
 }  }
   
Line 1276  sub passwordchanger { Line 1310  sub passwordchanger {
                   text => 'Change Password'});                    text => 'Change Password'});
     unless ($caller eq 'reset_by_email') {      unless ($caller eq 'reset_by_email') {
         $r->print(Apache::loncommon::start_page('Personal Data'));          $r->print(Apache::loncommon::start_page('Personal Data'));
         $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Password'));          $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Password').
                     '<div class="LC_landmark" role="main">');
     }      }
     if ((!defined($caller)) || ($caller eq 'preferences')) {      if ((!defined($caller)) || ($caller eq 'preferences')) {
         $user = $env{'user.name'};          $user = $env{'user.name'};
Line 1287  sub passwordchanger { Line 1322  sub passwordchanger {
         my ($blocked,$blocktext) =          my ($blocked,$blocktext) =
             &Apache::loncommon::blocking_status('passwd',$clientip);              &Apache::loncommon::blocking_status('passwd',$clientip);
         if ($blocked) {          if ($blocked) {
             $r->print('<p class="LC_warning">'.$blocktext.'</p>');              $r->print('<p class="LC_warning">'.$blocktext.'</p></div>');
             return;              return;
         }          }
     } elsif ($caller eq 'reset_by_email') {      } elsif ($caller eq 'reset_by_email') {
Line 1337  sub passwordchanger { Line 1372  sub passwordchanger {
         $r->print(          $r->print(
             '<p class="LC_error">'              '<p class="LC_error">'
            .&mt('Page requested in unexpected context')             .&mt('Page requested in unexpected context')
            .'</p>'             .'</p></div>'
         );          );
         return;          return;
     }      }
     my $currentauth=&Apache::lonnet::queryauthenticate($user,$domain);      my $currentauth=&Apache::lonnet::queryauthenticate($user,$domain);
     # Check for authentication types that allow changing of the password.      # Check for authentication types that allow changing of the password.
     return if ($currentauth !~ /^(unix|internal):/);      if ($currentauth !~ /^(unix|internal):/) {
           unless ($caller eq 'reset_by_email') {
               $r->print('</div>');
           }
           return;
       }
     #      #
     # Generate keys      # Generate keys
     my ($lkey_cpass ,$ukey_cpass ) = &Apache::loncommon::des_keys();      my ($lkey_cpass ,$ukey_cpass ) = &Apache::loncommon::des_keys();
Line 1375  sub passwordchanger { Line 1415  sub passwordchanger {
     $r->print(<<ENDFORM);      $r->print(<<ENDFORM);
 $errormessage  $errormessage
   
 <p>  <p></p>
 <!-- We separate the forms into 'server' and 'client' in order to  <!-- We separate the forms into 'server' and 'client' in order to
      ensure that unencrypted passwords will not be sent out by a       ensure that unencrypted passwords will not be sent out by a
      crappy browser -->       crappy browser -->
 ENDFORM  ENDFORM
     $r->print(&server_form($logtoken,$caller,$mailtoken,$extrafields));      $r->print(&server_form($logtoken,$caller,$mailtoken,$extrafields));
     $r->print(&client_form($caller,\%hexkey,$currentpass,$domain,$extrafields));      $r->print(&client_form($caller,\%hexkey,$currentpass,$domain,$extrafields));
       unless ($caller eq 'reset_by_email') {
           $r->print('</div>');
       }
     #      #
     return;      return;
 }  }
Line 1562  sub client_form { Line 1604  sub client_form {
     } else {      } else {
         $output .= &Apache::lonhtmlcommon::row_title(          $output .= &Apache::lonhtmlcommon::row_title(
                        '<label for="currentpass">'.$lt{'currentpass'}.'</label>')                         '<label for="currentpass">'.$lt{'currentpass'}.'</label>')
                   .'<input type="password" name="currentpass" size="20"/>'                    .'<input type="password" name="currentpass" id="currentpass" size="20" />'
                   .&Apache::lonhtmlcommon::row_closure();                    .&Apache::lonhtmlcommon::row_closure();
     }      }
     $output .= &Apache::lonhtmlcommon::row_title(      $output .= &Apache::lonhtmlcommon::row_title(
                    '<label for="newpass_1">'.$lt{'newpass'}.'</label>')                     '<label for="newpass_1">'.$lt{'newpass'}.'</label>')
               .'<input type="password" name="newpass_1" size="20" />'                .'<input type="password" name="newpass_1" id="newpass_1" size="20" />'
               .&Apache::lonhtmlcommon::row_closure()                .&Apache::lonhtmlcommon::row_closure()
               .&Apache::lonhtmlcommon::row_title(                .&Apache::lonhtmlcommon::row_title(
                    '<label for="newpass_2">'.$lt{'confirmpass'}.'</label>')                     '<label for="newpass_2">'.$lt{'confirmpass'}.'</label>')
               .'<input type="password" name="newpass_2" size="20" />'                .'<input type="password" name="newpass_2" id="newpass_2" size="20" />'
               .&Apache::lonhtmlcommon::row_closure(1)                .&Apache::lonhtmlcommon::row_closure(1)
               .&Apache::lonhtmlcommon::end_pick_box();                .&Apache::lonhtmlcommon::end_pick_box();
     if ($caller eq 'reset_by_email') {      if ($caller eq 'reset_by_email') {
Line 1586  sub client_form { Line 1628  sub client_form {
 <input type="hidden" name="ukey_npass2" value="$hexkey->{'ukey_npass2'}" />  <input type="hidden" name="ukey_npass2" value="$hexkey->{'ukey_npass2'}" />
 <input type="hidden" name="lkey_npass2" value="$hexkey->{'lkey_npass2'}" />  <input type="hidden" name="lkey_npass2" value="$hexkey->{'lkey_npass2'}" />
 </form>  </form>
 </p>  
 |;  |;
     return $output;      return $output;
 }  }
Line 1853  sub discussionchanger { Line 1894  sub discussionchanger {
     { href => '/adm/preferences?action=changediscussions',      { href => '/adm/preferences?action=changediscussions',
                 text => 'Change Discussion Preferences'});                  text => 'Change Discussion Preferences'});
     $r->print(Apache::loncommon::start_page('Change Discussion Preferences'));      $r->print(Apache::loncommon::start_page('Change Discussion Preferences'));
     $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Discussion Preferences'));      $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Discussion Preferences').
                 '<div class="LC_landmark" role="main">');
     my $user       = $env{'user.name'};      my $user       = $env{'user.name'};
     my $domain     = $env{'user.domain'};      my $domain     = $env{'user.domain'};
     my %userenv = &Apache::lonnet::get      my %userenv = &Apache::lonnet::get
Line 1921  END Line 1963  END
   
     $r->print('<p class="LC_info">'.$lt{'thde'}.'</p>');      $r->print('<p class="LC_info">'.$lt{'thde'}.'</p>');
   
     $r->print(&Apache::loncommon::start_data_table());      $r->print(&Apache::loncommon::start_data_table().
                 &Apache::loncommon::start_data_table_header_row());
     $r->print(<<"END");      $r->print(<<"END");
        <tr>  
         <th>$lt{'pref'}</th>          <th>$lt{'pref'}</th>
         <th>$lt{'curr'}</th>          <th>$lt{'curr'}</th>
         <th>$lt{'actn'}?</th>          <th>$lt{'actn'}?</th>
        </tr>  
 END  END
     $r->print(&Apache::loncommon::start_data_table_row());      $r->print(&Apache::loncommon::end_data_table_header_row().
                 &Apache::loncommon::start_data_table_row());
     $r->print(<<"END");      $r->print(<<"END");
        <td>$lt{'disa'}</td>         <td>$lt{'disa'}</td>
        <td>$lt{$discdisp}</td>         <td>$lt{$discdisp}</td>
Line 1941  END Line 1983  END
        <td>$lt{'npmr'}</td>         <td>$lt{'npmr'}</td>
        <td>$lt{$discmark}</td>         <td>$lt{$discmark}</td>
        <td><label><input type="checkbox" name="discmark" /><input type="hidden" name="newmark" value="$newmark" />&nbsp;$lt{'chgt'} "$markchange"</label></td>         <td><label><input type="checkbox" name="discmark" /><input type="hidden" name="newmark" value="$newmark" />&nbsp;$lt{'chgt'} "$markchange"</label></td>
       </tr>  
 END  END
     $r->print(&Apache::loncommon::end_data_table_row().      $r->print(&Apache::loncommon::end_data_table_row().
       &Apache::loncommon::end_data_table());        &Apache::loncommon::end_data_table());
   
     $r->print('<br />'      $r->print('<br />'
              .'<input type="submit" name="sub" value="'.&mt('Save').'" />'               .'<input type="submit" name="sub" value="'.&mt('Save').'" />'
              .'</form>'               .'</form></div>'
     );      );
 }  }
                                                                                                                                                                                                                                   
Line 2180  sub author_space_settings { Line 2221  sub author_space_settings {
                     $divsty = 'display:inline-block';                      $divsty = 'display:inline-block';
                 }                  }
                 $r->print(<<"END");                  $r->print(<<"END");
 <h4><span class="LC_nobreak">$titles{$item}</span></h4>  <h3 class="LC_heading_3"><span class="LC_nobreak">$titles{$item}</span></h3>
 <p class="LC_nobreak">$lt{'curd'}: <span style="font-style:italic">$domdefdisplay</span></p>  <p class="LC_nobreak">$lt{'curd'}: <span style="font-style:italic">$domdefdisplay</span></p>
 <p class="LC_nobreak">  <p class="LC_nobreak">
 <label><input type="radio" name="$item" value="dom" onclick="toggleOptions(this.form,'$item','user_$item');"$checkeddom />$lt{'used'}</label>&nbsp;&nbsp;&nbsp;  <label><input type="radio" name="$item" value="dom" onclick="toggleOptions(this.form,'$item','user_$item');"$checkeddom />$lt{'used'}</label>&nbsp;&nbsp;&nbsp;
Line 2521  sub timezonechanger { Line 2562  sub timezonechanger {
                 {   href => '/adm/preferences?action=',                  {   href => '/adm/preferences?action=',
                     text => 'Set Your Time Zone'});                      text => 'Set Your Time Zone'});
         $r->print(Apache::loncommon::start_page('Set Your Time Zone',$js,$args));          $r->print(Apache::loncommon::start_page('Set Your Time Zone',$js,$args));
         $r->print(Apache::lonhtmlcommon::breadcrumbs('Set Your Time Zone'));          $r->print(Apache::lonhtmlcommon::breadcrumbs('Set Your Time Zone').
                     '<div class="LC_landmark" role="main">');
         my %userenv = &Apache::lonnet::get('environment',['timezone']);          my %userenv = &Apache::lonnet::get('environment',['timezone']);
         my $timezone = $userenv{'timezone'};          my $timezone = $userenv{'timezone'};
         my %lt = &Apache::lonlocal::texthash(          my %lt = &Apache::lonlocal::texthash(
                        tztu  => 'Time Zone in use',
                      lctz  => 'Use Time Zone set by LON-CAPA',                       lctz  => 'Use Time Zone set by LON-CAPA',
                      owntz => 'Use Time Zone set by you',                       owntz => 'Use Time Zone set by you',
                      save  => 'Save',                       save  => 'Save',
Line 2542  sub timezonechanger { Line 2585  sub timezonechanger {
         $r->print(<<"END");          $r->print(<<"END");
 <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_timezone" />  <input type="hidden" name="action" value="verify_and_change_timezone" />
   <fieldset style="display:inline; padding: 5px;"><legend>$lt{'tztu'}</legend>
 <span class="LC_nobreak">  <span class="LC_nobreak">
 <label><input type="radio" name="settimezone" value="0"$checked{'lctz'}$onclick />  <label><input type="radio" name="settimezone" value="0"$checked{'lctz'}$onclick />
 $lt{'lctz'}</label>&nbsp;&nbsp;&nbsp;&nbsp;  $lt{'lctz'}</label></span><br />
   <span class="LC_nobreak">
 <label><input type="radio" name="settimezone" value="1"$checked{'owntz'}$onclick />  <label><input type="radio" name="settimezone" value="1"$checked{'owntz'}$onclick />
 $lt{'owntz'}</label><div style="display:$tzsty" id="LC_timezone_selector">&nbsp;  $lt{'owntz'}</label></span><div style="display:$tzsty" id="LC_timezone_selector">&nbsp;
 $selector  $selector
 </div></span><br /><br />  </div></fieldset><p>
 <input type="submit" value="$lt{'save'}" />  <input type="submit" value="$lt{'save'}" />
 </form>  </p></form></div>
 END  END
     }      }
     return;      return;
Line 2618  my @menu= Line 2663  my @menu=
  permission => $permissions{'aboutme'},   permission => $permissions{'aboutme'},
  #help => 'Prefs_About_Me',   #help => 'Prefs_About_Me',
  icon => 'system-users.png',   icon => 'system-users.png',
                   alttext => 'About Me Icon',
  linktitle => 'Edit information about yourself that should be displayed on your public profile.'   linktitle => 'Edit information about yourself that should be displayed on your public profile.'
     },      },
     { linktext => 'Screen Name',      { linktext => 'Screen Name',
Line 2625  my @menu= Line 2671  my @menu=
  permission => 'F',   permission => 'F',
  #help => 'Prefs_Screen_Name_Nickname',   #help => 'Prefs_Screen_Name_Nickname',
  icon => 'preferences-desktop-font.png',   icon => 'preferences-desktop-font.png',
                   alttext => 'Nickname Icon',
  linktitle => 'Change the name that is displayed in your posts.'   linktitle => 'Change the name that is displayed in your posts.'
     },      },
  ]   ]
Line 2636  my @menu= Line 2683  my @menu=
  permission => 'F',   permission => 'F',
  #help => 'Prefs_Language',   #help => 'Prefs_Language',
  icon => 'preferences-desktop-locale.png',   icon => 'preferences-desktop-locale.png',
                   alttext => 'Language Icon',
  linktitle => 'Choose the default language for this user.'   linktitle => 'Choose the default language for this user.'
     },      },
     { linktext => $role.' Page',      { linktext => $role.' Page',
Line 2643  my @menu= Line 2691  my @menu=
  permission => 'F',   permission => 'F',
  #help => '',   #help => '',
  icon => 'role_hotlist.png',   icon => 'role_hotlist.png',
                   alttext => 'Switch Role Icon',
  linktitle => 'Configure the roles hotlist.'   linktitle => 'Configure the roles hotlist.'
     },      },
     { linktext => 'Math display settings',      { linktext => 'Math display settings',
Line 2650  my @menu= Line 2699  my @menu=
  permission => 'F',   permission => 'F',
  #help => '',   #help => '',
  icon => 'dismath.png',   icon => 'dismath.png',
                   alttext => 'Math Icon',
  linktitle => 'Change how math is displayed.'   linktitle => 'Change how math is displayed.'
     },      },
             {              {
Line 2658  my @menu= Line 2708  my @menu=
                 permission => $permissions{'timezone'},                  permission => $permissions{'timezone'},
                 #help => '',                  #help => '',
                 icon => 'timezone.png',                  icon => 'timezone.png',
                   alttext => 'Clock Icon',
                 linktitle => 'Set your time zone.',                  linktitle => 'Set your time zone.',
              }               }
  ]   ]
Line 2669  my @menu= Line 2720  my @menu=
  permission => 'F',   permission => 'F',
  #help => 'Change_Colors',   #help => 'Change_Colors',
  icon => 'preferences-desktop-theme.png',   icon => 'preferences-desktop-theme.png',
                   alttext => 'Colors Icon',
  linktitle => 'Change LON-CAPA default colors.'   linktitle => 'Change LON-CAPA default colors.'
     },      },
             {   linktext => 'Menu Display',              {   linktext => 'Menu Display',
Line 2676  my @menu= Line 2728  my @menu=
                 permission => 'F',                  permission => 'F',
                 #help => '',                  #help => '',
                 icon => 'preferences-system-windows.png',                  icon => 'preferences-system-windows.png',
                   alttext => 'Menus Icon',
                 linktitle => 'Change whether the menus are displayed with icons or icons and text.'                  linktitle => 'Change whether the menus are displayed with icons or icons and text.'
             }              }
  ]   ]
Line 2687  my @menu= Line 2740  my @menu=
  permission => 'F',   permission => 'F',
  #help => 'Prefs_Messages',   #help => 'Prefs_Messages',
  icon => 'mail-reply-all.png',   icon => 'mail-reply-all.png',
                   alttext => 'Notifications Icon',
  linktitle => 'Change messageforwarding or notifications settings.'   linktitle => 'Change messageforwarding or notifications settings.'
     },      },
     { linktext => 'Discussion Display',      { linktext => 'Discussion Display',
Line 2694  my @menu= Line 2748  my @menu=
  permission => 'F',   permission => 'F',
  #help => 'Change_Discussion_Display',   #help => 'Change_Discussion_Display',
  icon => 'chat.png',   icon => 'chat.png',
                   alttext => 'Discussions Icon',
  linktitle => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.'   linktitle => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.'
     },      },
  ]   ]
Line 2708  if (keys(%author_coauthor_roles) > 0) { Line 2763  if (keys(%author_coauthor_roles) > 0) {
                   url => '/adm/preferences?action=authorsettings',                    url => '/adm/preferences?action=authorsettings',
                   permission => 'F',                    permission => 'F',
                   icon => 'codemirror.png',                    icon => 'codemirror.png',
                     alttext => 'Coding Icon',
                   linktitle => 'Settings for your authoring space.',                    linktitle => 'Settings for your authoring space.',
              },               },
                   ]                    ]
Line 2720  if (keys(%author_coauthor_roles) > 0) { Line 2776  if (keys(%author_coauthor_roles) > 0) {
         permission => 'F',          permission => 'F',
         #help => '',          #help => '',
         icon => 'system-lock-screen.png',          icon => 'system-lock-screen.png',
           alttext => 'Lock Icon',
         linktitle => 'Restrict domain coordinator access.',          linktitle => 'Restrict domain coordinator access.',
         });          });
     }      }
Line 2732  push(@menu, Line 2789  push(@menu,
  permission => 'F',   permission => 'F',
  #help => '',   #help => '',
  icon => 'network-workgroup.png',   icon => 'network-workgroup.png',
                   alttext => 'Clicker Icon',
  linktitle => 'Register your clicker.'   linktitle => 'Register your clicker.'
     },      },
  ]   ]
Line 2745  push(@menu, Line 2803  push(@menu,
  permission => 'F',   permission => 'F',
  #help => 'Change_Password',   #help => 'Change_Password',
  icon => 'emblem-readonly.png',   icon => 'emblem-readonly.png',
           alttext => 'Secure Icon',
  linktitle => 'Change your password.',   linktitle => 'Change your password.',
  });   });
     }      }
Line 2756  push(@menu, Line 2815  push(@menu,
         permission => 'F',          permission => 'F',
         #help => '',          #help => '',
         icon => 'system-lock-screen.png',          icon => 'system-lock-screen.png',
           alttext => 'Screen Lock Icon',
         linktitle => 'Allow/disallow propagation of name changes from institutional directory service',          linktitle => 'Allow/disallow propagation of name changes from institutional directory service',
         });          });
     }      }
Line 2769  push(@{ $menu[-1]->{items} }, { Line 2829  push(@{ $menu[-1]->{items} }, {
  permission => 'F',   permission => 'F',
  #help => '',   #help => '',
  icon => 'course_ini.png',   icon => 'course_ini.png',
           alttext => 'Course Launch Icon',
  linktitle => 'Set the default page to be displayed when you select a course role.',   linktitle => 'Set the default page to be displayed when you select a course role.',
  });   });
   
Line 2781  push(@{ $menu[-1]->{items} }, { Line 2842  push(@{ $menu[-1]->{items} }, {
  permission => 'F',   permission => 'F',
  #help => '',   #help => '',
  icon => 'blog.png',   icon => 'blog.png',
           alttext => 'Debugging Icon',
  linktitle => 'Toggle Debug Messages.',   linktitle => 'Toggle Debug Messages.',
  });   });
     }      }
   
     $r->print(&Apache::loncommon::start_page('My Space'));      $r->print(&Apache::loncommon::start_page('My Space'));
     $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Preferences'));      $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Preferences'));
     $r->print($message);      $r->print('<div class="LC_landmark" role="main">'."\n".$message);
     $r->print(Apache::lonhtmlcommon::generate_menu(@menu));      $r->print(Apache::lonhtmlcommon::generate_menu(@menu)."\n".'</div>');
     $r->print(Apache::loncommon::end_page());      $r->print(Apache::loncommon::end_page());
 }  }
   

Removed from v.1.246  
changed lines
  Added in v.1.248


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