--- loncom/interface/lonwhatsnew.pm 2009/11/24 02:43:45 1.98 +++ loncom/interface/lonwhatsnew.pm 2009/12/14 22:24:31 1.98.2.1 @@ -1,5 +1,5 @@ # -# $Id: lonwhatsnew.pm,v 1.98 2009/11/24 02:43:45 raeburn Exp $ +# $Id: lonwhatsnew.pm,v 1.98.2.1 2009/12/14 22:24:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -282,6 +282,7 @@ END sub display_actions_box { my ($r,$command,$refpage,$threshold_titles,$interval_titles,$initpage, $cdom,$crs,$checkallowed) = @_; + my $custommenu = &Apache::loncommon::needs_gci_custom(); my $udom = $env{'user.domain'}; my $uname = $env{'user.name'}; my $cid = $env{'request.course.id'}; @@ -343,7 +344,7 @@ sub display_actions_box { } my $header = ''; - if ($refpage eq 'start') { + if (($refpage eq 'start') && (!$custommenu)) { if (tie(my %bighash,'GDBM_File',$env{'request.course.fn'}.'.db', &GDBM_READER(),0640)) { my $furl=&HTML::Entities::encode($bighash{'first_url'},'"<>&'); @@ -352,7 +353,8 @@ sub display_actions_box { '
'; } } - $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).'.' .' ' .&mt('Currently: [_1].',''.$currinit.'') .'  ' @@ -365,7 +367,8 @@ sub display_actions_box { ,'') .' '; - $r->print(&Apache::loncommon::head_subbox($header)); + $r->print(&Apache::loncommon::head_subbox($header)); + } if ($command eq 'reset') { $result = &process_reset($cdom,$crs); @@ -474,7 +477,12 @@ sub display_actions_box { $threshold{'av_attempts'},$threshold{'degdiff'}, '
',$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})) { if ($key =~ /_section$/) { next; } @@ -535,6 +543,9 @@ sub display_actions_box { } my $halfway = 4; # my $halfway = int($totalboxes/2) + $totalboxes%2; + if ($custommenu) { + $halfway = 2; + } foreach my $actionitem (@actionorder) { if ($$checkallowed{$actionitem}) { if ($displayed == $halfway) {