Diff for /loncom/interface/lonwhatsnew.pm between versions 1.98 and 1.98.2.1

version 1.98, 2009/11/24 02:43:45 version 1.98.2.1, 2009/12/14 22:24:31
Line 282  END Line 282  END
 sub display_actions_box {  sub display_actions_box {
     my ($r,$command,$refpage,$threshold_titles,$interval_titles,$initpage,      my ($r,$command,$refpage,$threshold_titles,$interval_titles,$initpage,
         $cdom,$crs,$checkallowed) = @_;          $cdom,$crs,$checkallowed) = @_;
       my $custommenu = &Apache::loncommon::needs_gci_custom();
     my $udom = $env{'user.domain'};      my $udom = $env{'user.domain'};
     my $uname = $env{'user.name'};      my $uname = $env{'user.name'};
     my $cid = $env{'request.course.id'};      my $cid = $env{'request.course.id'};
Line 343  sub display_actions_box { Line 344  sub display_actions_box {
     }      }
   
     my $header = '';      my $header = '';
     if ($refpage eq 'start') {      if (($refpage eq 'start') && (!$custommenu)) {
         if (tie(my %bighash,'GDBM_File',$env{'request.course.fn'}.'.db',          if (tie(my %bighash,'GDBM_File',$env{'request.course.fn'}.'.db',
             &GDBM_READER(),0640)) {              &GDBM_READER(),0640)) {
             my $furl=&HTML::Entities::encode($bighash{'first_url'},'"<>&');              my $furl=&HTML::Entities::encode($bighash{'first_url'},'"<>&');
Line 352  sub display_actions_box { Line 353  sub display_actions_box {
                   '</a></b><br />';                    '</a></b><br />';
         }          }
     }      }
     $header .= &mt('Page set to be displayed after you have selected a role in this '.$lctype).'.'      unless ($custommenu) {
           $header .= &mt('Page set to be displayed after you have selected a role in this '.$lctype).'.'
               .' <span class="LC_nobreak">'                .' <span class="LC_nobreak">'
               .&mt('Currently: [_1].','<i>'.$currinit.'</i>')                .&mt('Currently: [_1].','<i>'.$currinit.'</i>')
               .'&nbsp;&nbsp;'                .'&nbsp;&nbsp;'
Line 365  sub display_actions_box { Line 367  sub display_actions_box {
                   ,'</a>')                    ,'</a>')
               .' </span>';                .' </span>';
   
     $r->print(&Apache::loncommon::head_subbox($header));          $r->print(&Apache::loncommon::head_subbox($header));
       }
   
     if ($command eq 'reset') {      if ($command eq 'reset') {
         $result = &process_reset($cdom,$crs);          $result = &process_reset($cdom,$crs);
Line 474  sub display_actions_box { Line 477  sub display_actions_box {
     $threshold{'av_attempts'},$threshold{'degdiff'},      $threshold{'av_attempts'},$threshold{'degdiff'},
     '<br />',$threshold{'numstudents'});      '<br />',$threshold{'numstudents'});
   
     my @actionorder = ('handgrading','haserrors','abovethreshold','versionchanges','coursediscussion','coursenormalmail','coursecritmail','newroles','oldroles');      my @actionorder;
       if ($custommenu) {
           @actionorder = ('coursenormalmail','coursecritmail','newroles','oldroles');
       } else {
           @actionorder = ('handgrading','haserrors','abovethreshold','versionchanges','coursediscussion','coursenormalmail','coursecritmail','newroles','oldroles');
       }
   
     foreach my $key (keys(%{$checkallowed})) {      foreach my $key (keys(%{$checkallowed})) {
  if ($key =~ /_section$/) { next; }   if ($key =~ /_section$/) { next; }
Line 535  sub display_actions_box { Line 543  sub display_actions_box {
     }      }
     my $halfway = 4;      my $halfway = 4;
 #    my $halfway = int($totalboxes/2) + $totalboxes%2;  #    my $halfway = int($totalboxes/2) + $totalboxes%2;
       if ($custommenu) {
           $halfway = 2;
       }
     foreach my $actionitem (@actionorder) {      foreach my $actionitem (@actionorder) {
         if ($$checkallowed{$actionitem}) {          if ($$checkallowed{$actionitem}) {
             if ($displayed == $halfway) {              if ($displayed == $halfway) {

Removed from v.1.98  
changed lines
  Added in v.1.98.2.1


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