Diff for /loncom/interface/lonpreferences.pm between versions 1.70 and 1.71

version 1.70, 2005/12/19 21:39:37 version 1.71, 2005/12/20 15:52:27
Line 982  sub coursedisplaychanger { Line 982  sub coursedisplaychanger {
     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('environment',['course_init_display']);      my %userenv = &Apache::lonnet::get('environment',['course_init_display']);
       my $currvalue = 'whatsnew';
     my $firstselect='checked="checked"';      my $firstselect='checked="checked"';
     my $whatsnewselect='';      my $whatsnewselect='';
     if ($userenv{'course_init_display'} ne 'firstres') {      if (exists($userenv{'course_init_display'})) {
         $firstselect='';          if ($userenv{'course_init_display'} eq 'firstres') {
         $whatsnewselect='checked="checked"';              $currvalue = 'firstres';
               $firstselect='';
               $whatsnewselect='checked="checked"';
           }
     }      }
       my %pagenames = (
                          firstres => 'First resource',
                          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] in the course.','<b>first resource</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]" page - a summary of items in the course which require attention.',"<b>What's New</b>");
   
     $r->print('<br /><b>'.&mt('Set the default page to be displayed when you select a course role other than student or TA').':</b><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]" page in the course',"<i>What's New</i>").'<br /><br />');
     $r->print(<<ENDLSCREEN);      $r->print(<<ENDLSCREEN);
 <form name="server" action="/adm/preferences" method="post">  <form name="server" 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 1008  sub verify_and_change_coursepage { Line 1015  sub verify_and_change_coursepage {
     my $message='';      my $message='';
     my %lt = &Apache::lonlocal::texthash(      my %lt = &Apache::lonlocal::texthash(
         'defs' => 'Default now set',          'defs' => 'Default now set',
         'when' => 'when selecting a course role other than student or TA from the roles screen',          'when' => 'when you select a course role from the roles screen',
         'ywbt' => 'you will be taken to the start of the course.',          'ywbt' => 'you will be taken to the start of the course.',
         'apwb' => 'a page will be displayed that lists items in the course that may require action from you.',          'apwb' => 'a page will be displayed that lists items in the course that may require action from you.',
         'gtts' => 'Go to the start of the course',          'gtts' => 'Go to the start of the course',
Line 1225  sub handler { Line 1232  sub handler {
                             text => 'Change Math Preferences'},                              text => 'Change Math Preferences'},
                       printmenu => 'yes',                        printmenu => 'yes',
                       }));                        }));
     if($env{'request.role'} =~ /^cc\.\//) {      if ($env{'user.adv'}) {
         push (@Options,({ action => 'changecourseinit',          push (@Options,({ action => 'changecourseinit',
                           linktext => 'Change Course Initialization Preference',                            linktext => 'Change Course Initialization Preference',
                           href => '/adm/preferences',                            href => '/adm/preferences',

Removed from v.1.70  
changed lines
  Added in v.1.71


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