[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface lonwhatsnew.pm

raeburn raeburn@source.lon-capa.org
Mon, 14 Dec 2009 22:24:31 -0000


raeburn		Mon Dec 14 22:24:31 2009 EDT

  Modified files:              (Branch: GCI_3)
    /loncom/interface	lonwhatsnew.pm 
  Log:
  - Customization for GCI_3.
    CCs in GCI Concept Test Course:
      - No toggle first item shown
      - Only four items shown: course messages and enrollment changes.
  
  
Index: loncom/interface/lonwhatsnew.pm
diff -u loncom/interface/lonwhatsnew.pm:1.98 loncom/interface/lonwhatsnew.pm:1.98.2.1
--- loncom/interface/lonwhatsnew.pm:1.98	Tue Nov 24 02:43:45 2009
+++ loncom/interface/lonwhatsnew.pm	Mon Dec 14 22:24:31 2009
@@ -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 @@
 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 @@
     }
 
     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 @@
                   '</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">'
               .&mt('Currently: [_1].','<i>'.$currinit.'</i>')
               .'&nbsp;&nbsp;'
@@ -365,7 +367,8 @@
                   ,'</a>')
               .' </span>';
 
-    $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 @@
 	    $threshold{'av_attempts'},$threshold{'degdiff'},
 	    '<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})) {
 	if ($key =~ /_section$/) { next; }
@@ -535,6 +543,9 @@
     }
     my $halfway = 4;
 #    my $halfway = int($totalboxes/2) + $totalboxes%2;
+    if ($custommenu) {
+        $halfway = 2;
+    }
     foreach my $actionitem (@actionorder) {
         if ($$checkallowed{$actionitem}) {
             if ($displayed == $halfway) {