Diff for /loncom/interface/lonpreferences.pm between versions 1.127 and 1.135

version 1.127, 2008/12/02 20:10:27 version 1.135, 2009/02/10 09:30:16
Line 193  sub verify_and_change_languages { Line 193  sub verify_and_change_languages {
         &Apache::lonnet::delenv('environment\.languages');          &Apache::lonnet::delenv('environment\.languages');
         $message=&mt('Reset preferred language.');          $message=&mt('Reset preferred language.');
     }      }
       &Apache::loncommon::flush_langs_cache($user,$domain);
     print_main_menu($r, $message);      print_main_menu($r, $message);
 #    $r->print(<<ENDVCSCREEN);  #    $r->print(<<ENDVCSCREEN);
 #$message  #$message
Line 514  sub screennamechanger { Line 515  sub screennamechanger {
         ('environment',['screenname','nickname']);          ('environment',['screenname','nickname']);
     my $screenname=$userenv{'screenname'};      my $screenname=$userenv{'screenname'};
     my $nickname=$userenv{'nickname'};      my $nickname=$userenv{'nickname'};
     my %lt = &Apache::lonlocal::texthash(  
                                           text_screenname  => 'New screenname (shown if you post anonymously):',  
                                           text_nickname  => 'New nickname (shown if you post non-anonymously):',  
                                           text_submit => 'Change',  
                                         );  
     Apache::lonhtmlcommon::add_breadcrumb(      Apache::lonhtmlcommon::add_breadcrumb(
  { href => '/adm/preferences?action=changescreenname',   { href => '/adm/preferences?action=changescreenname',
                   text => 'Change Screen Name'});                    text => 'Change Screen Name'});
     $r->print(Apache::loncommon::start_page('Change Screen Name'));      $r->print(Apache::loncommon::start_page('Change Screen Name'));
     $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Screen Name'));      $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Screen Name'));
     $r->print(<<ENDSCREEN);      $r->print('<p>'
 <form name="prefs" action="/adm/preferences" method="post">               .&mt('Change the name that is displayed in your posts.')
 <input type="hidden" name="action" value="verify_and_change_screenname" />               .'</p>'
 <br />$lt{'text_screenname'}      );
 <input type="text" size="20" value="$screenname" name="screenname" />      $r->print('<form name="prefs" action="/adm/preferences" method="post">'
 <br />$lt{'text_nickname'}               .'<input type="hidden" name="action" value="verify_and_change_screenname" />'
 <input type="text" size="20" value="$nickname" name="nickname" />               .&Apache::lonhtmlcommon::start_pick_box()
 <br />               .&Apache::lonhtmlcommon::row_title(&mt('New screenname (shown if you post anonymously)'))
 <input type="submit" value="$lt{'text_submit'}" />               .'<input type="text" size="20" value="'.$screenname.'" name="screenname" />'
 </form>               .&Apache::lonhtmlcommon::row_closure()
 ENDSCREEN               .&Apache::lonhtmlcommon::row_title(&mt('New nickname (shown if you post non-anonymously)'))
                .'<input type="text" size="20" value="'.$nickname.'" name="nickname" />'
                .&Apache::lonhtmlcommon::row_closure()
                .&Apache::lonhtmlcommon::row_title()
                .'<input type="submit" value="'.&mt('Save').'" />'
                .&Apache::lonhtmlcommon::row_closure(1)
                .&Apache::lonhtmlcommon::end_pick_box()
                .'</form>'
       );
 }  }
   
 sub verify_and_change_screenname {  sub verify_and_change_screenname {
Line 772  sub msgforwardchanger { Line 776  sub msgforwardchanger {
                                           foad  => 'Forwarding Address(es)',                                            foad  => 'Forwarding Address(es)',
                                           noti  => 'Notification E-mail Address(es)',                                             noti  => 'Notification E-mail Address(es)', 
                                           foad_exmpl => 'e.g. <tt>userA:domain1,userB:domain2,...</tt>',                                            foad_exmpl => 'e.g. <tt>userA:domain1,userB:domain2,...</tt>',
                                           mnot  => 'Email Address(es) which should be notified about new LON-CAPA messages', # old: 'Message Notification Email Address(es)',                                            mnot  => 'E-mail Address(es) which should be notified about new LON-CAPA messages',
    # old: 'Message Notification Email Address(es)',
                                           mnot_exmpl => 'e.g. <tt>joe@doe.com</tt>',                                            mnot_exmpl => 'e.g. <tt>joe@doe.com</tt>',
                                           chg   => 'Change',                                            chg   => 'Change',
                                           email => 'The e-mail address entered in row ',                                            email => 'The e-mail address entered in row ',
Line 1596  sub discussionchanger { Line 1601  sub discussionchanger {
         'pref' => 'Display Preference',          'pref' => 'Display Preference',
         'curr' => 'Current setting ',          'curr' => 'Current setting ',
         'actn' => 'Action',          'actn' => 'Action',
         'sdpf' => 'Set display preferences for discussion posts for both bulletin boards and individual resources in all your courses.',          'sdpf' => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.',
         'prca' => 'Preferences can be set that determine',          'prca' => 'Preferences can be set that determine',
         'whpo' => 'Which posts are displayed when you display a bulletin board or resource, and',          'whpo' => 'Which posts are displayed when you display a discussion board or resource, and',
         'unwh' => 'Under what circumstances posts are identfied as "New"',          'unwh' => 'Under what circumstances posts are identfied as "New"',
         'allposts' => 'All posts',          'allposts' => 'All posts',
         'unread' => 'New posts only',          'unread' => 'New posts only',
Line 1661  END Line 1666  END
     $r->print(<<"END");      $r->print(<<"END");
 <br />  <br />
 <br />  <br />
 <input type="submit" name="sub" value="Save Changes" />  <input type="submit" name="sub" value="Save" />
 <br />  <br />
 <br />  <br />
 Note: $lt{'thde'}  Note: $lt{'thde'}
Line 1727  sub coursedisplaychanger { Line 1732  sub coursedisplaychanger {
     $whatsnewselect = '';      $whatsnewselect = '';
         }          }
     }      }
     my %pagenames = (      my %pagenames = &Apache::lonlocal::texthash(
                        firstres => 'First resource',                         firstres => 'First resource',
                        whatsnew => "What's new page",                         whatsnew => "What's New page",
                     );                      );
     my $whatsnew_off=&mt('Display the [_1] in the course.','<b>first resource</b>');      my $whatsnew_off=&mt('Display the [_1]first resource[_2] in the course.','<b>','</b>');
     my $whatsnew_on=&mt('Display the "[_1]" page - a summary of items in the course which require attention.',"<b>What's New</b>");      my $whatsnew_on=&mt("Display the [_1]What's New page[_2] - a summary of items in the course which require attention.",'<b>','</b>');
   
     $r->print('<br /><b>'.&mt('Set the default page to be displayed when you select a course role').'</b>&nbsp;'.&mt('(Currently: [_1])',$pagenames{$currvalue}).'<br />'.&mt('The global user preference you set for your courses can be overridden in an individual course by setting a course specific setting via the "[_1]" page in the course',"<i>What's New</i>").'<br /><br />');      $r->print('<br /><b>'
                .&mt('Set the default page to be displayed when you select a course role')
                .'</b>&nbsp;'
                .&mt('(Currently: [_1])',$pagenames{$currvalue})
                .'<br />'
                .&mt("The global user preference you set for your courses can be overridden in an individual course by setting a course specific setting via the [_1]What's New page[_2] in the course.",'<i>','</i>')
                .'<br /><br />'
       );
     $r->print(<<ENDLSCREEN);      $r->print(<<ENDLSCREEN);
 <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_coursepage" />  <input type="hidden" name="action" value="verify_and_change_coursepage" />
Line 1798  sub print_main_menu { Line 1810  sub print_main_menu {
     # build the data structure for menu generation      # build the data structure for menu generation
 my $aboutmeurl='/adm/'.$env{'user.domain'}.'/'.$env{'user.name'}.'/aboutme';  my $aboutmeurl='/adm/'.$env{'user.domain'}.'/'.$env{'user.name'}.'/aboutme';
 my $role = ($env{'user.adv'} ? 'Roles' : 'Course');  my $role = ($env{'user.adv'} ? 'Roles' : 'Course');
   my %permissions;
   if (&Apache::lonnet::usertools_access($user,$domain,'aboutme')) {
       $permissions{'aboutme'} = 'F';
   }
 my @menu=  my @menu=
     ({ categorytitle=>'Personal Data',      ({ categorytitle=>'Personal Data',
  items =>[   items =>[
     { linktext => 'About Me',      { linktext => 'About Me',
  url => $aboutmeurl,   url => $aboutmeurl,
  permission => 'F',   permission => $permissions{'aboutme'},
  #help => 'Prefs_About_Me',   #help => 'Prefs_About_Me',
  icon => 'system-users.png',   icon => 'system-users.png',
  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.'
Line 1836  my @menu= Line 1852  my @menu=
   
  ]   ]
     },      },
     { categorytitle=>'Message Management',  
  items =>[  
     { linktext => 'Messages & Notifications',  
  url => '/adm/preferences?action=changemsgforward',  
  permission => 'F',  
  #help => 'Prefs_Messages',  
  icon => 'mail-reply-all.png',  
  linktitle => 'Change messageforwarding or notifications settings.'  
     },  
     { linktext => 'Discussion Display Preferences',  
  url => '/adm/preferences?action=changediscussions',  
  permission => 'F',  
  #help => 'Change_Discussion_Display',  
  icon => 'mail-message-new.png',  
  linktitle => 'Set display preferences for discussion posts for both bulletin boards and individual resources in all your courses.'  
     },  
  ]  
     },  
     { categorytitle=>'Content Display Settings',      { categorytitle=>'Content Display Settings',
  items =>[   items =>[
     { linktext => 'Language',      { linktext => 'Language',
Line 1863  my @menu= Line 1861  my @menu=
  icon => 'preferences-desktop-locale.png',   icon => 'preferences-desktop-locale.png',
  linktitle => 'Choose the default language for this user.'   linktitle => 'Choose the default language for this user.'
     },      },
     { linktext => 'WYSIWYG Editor Preferences',      { linktext => 'WYSIWYG Editor',
  url => '/adm/preferences?action=changewysiwyg',   url => '/adm/preferences?action=changewysiwyg',
  permission => 'F',   permission => 'F',
  #help => '',   #help => '',
  icon => 'edit-select-all.png',   icon => 'edit-select-all.png',
  linktitle => 'Enable or disable the WYSIWYG-Editor.'   linktitle => 'Enable or disable the WYSIWYG-Editor.'
     },      },
     { linktext => $role.' Page Preferences',      { linktext => $role.' Page',
  url => '/adm/preferences?action=changerolespref',   url => '/adm/preferences?action=changerolespref',
  permission => 'F',   permission => 'F',
  #help => '',   #help => '',
Line 1886  my @menu= Line 1884  my @menu=
     },      },
  ]   ]
     },      },
       { categorytitle=>'Message Management',
    items =>[
       { linktext => 'Messages & Notifications',
    url => '/adm/preferences?action=changemsgforward',
    permission => 'F',
    #help => 'Prefs_Messages',
    icon => 'mail-reply-all.png',
    linktitle => 'Change messageforwarding or notifications settings.'
       },
       { linktext => 'Discussion Display',
    url => '/adm/preferences?action=changediscussions',
    permission => 'F',
    #help => 'Change_Discussion_Display',
    icon => 'mail-message-new.png',
    linktitle => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.'
       },
    ]
       },
     { categorytitle=>'Other',      { categorytitle=>'Other',
  items =>[   items =>[
     { linktext => 'Register Response Devices ("Clickers")',      { linktext => 'Register Response Devices ("Clickers")',
Line 1944  push(@{ $menu[4]->{items} }, { Line 1960  push(@{ $menu[4]->{items} }, {
  || &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/'   || &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/'
     .$env{'request.course.sec'})) {      .$env{'request.course.sec'})) {
 push(@{ $menu[4]->{items} }, {  push(@{ $menu[4]->{items} }, {
  linktext => 'Course Initialization Preference',   linktext => 'Course Initialization',
  url => '/adm/preferences?action=changecourseinit',   url => '/adm/preferences?action=changecourseinit',
  permission => 'F',   permission => 'F',
  #help => '',   #help => '',
Line 2119  sub handler2 { Line 2135  sub handler2 {
                       }));                        }));
   
     push (@Options,({ action   => 'changemsgforward',      push (@Options,({ action   => 'changemsgforward',
                       linktext => 'Change Message Forwarding and Notification Email Addresses',                        linktext => 'Change Message Forwarding and Notification E-mail Addresses',
                       href     => '/adm/preferences',                        href     => '/adm/preferences',
                       help     => 'Prefs_Messages',                        help     => 'Prefs_Messages',
                       breadcrumb =>                         breadcrumb => 

Removed from v.1.127  
changed lines
  Added in v.1.135


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