[LON-CAPA-cvs] cvs: loncom /interface lonbulletin.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Wed, 28 Jul 2004 18:53:38 -0000


raeburn		Wed Jul 28 14:53:38 2004 EDT

  Modified files:              
    /loncom/interface	lonbulletin.pm 
  Log:
  Modifications to allow Bulletin Boards to use multiple attachment functionality in lonfeedback v 1.108. 
  
  
Index: loncom/interface/lonbulletin.pm
diff -u loncom/interface/lonbulletin.pm:1.25 loncom/interface/lonbulletin.pm:1.26
--- loncom/interface/lonbulletin.pm:1.25	Tue Jul 27 19:35:34 2004
+++ loncom/interface/lonbulletin.pm	Wed Jul 28 14:53:38 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Bulletin Board Handler
 #
-# $Id: lonbulletin.pm,v 1.25 2004/07/27 23:35:34 www Exp $
+# $Id: lonbulletin.pm,v 1.26 2004/07/28 18:53:38 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -43,8 +43,6 @@
     return OK if $r->header_only;
     my $target=$ENV{'form.grade_target'};
 
-
-#    &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['previous']);
 # ------------------------------------------------------------ Print the screen
     if ($target ne 'tex') {
 	$r->print(<<ENDDOCUMENT);
@@ -80,13 +78,18 @@
 
 # ------------------------------------------------------------ Get Query String
     &Apache::loncommon::get_unprocessed_cgi
-                ($ENV{'QUERY_STRING'},['forcestudent','forceedit','register']);
+                ($ENV{'QUERY_STRING'},['forcestudent','forceedit','register','origpage']);
 # ----------------------------------------------------- Force menu registration
     my $addentries='';
     if ($ENV{'form.register'}) {
-       $addentries=' onLoad="'.&Apache::lonmenu::loadevents().
-	   '" onUnload="'.&Apache::lonmenu::unloadevents().'"';
+       $addentries=' onLoad="'.&Apache::lonmenu::loadevents();
+       if ($ENV{'form.origpage'}) {
+           $addentries .= "document.location='#newpost';";
+       }
+       $addentries .= '" onUnload="'.&Apache::lonmenu::unloadevents().'"';
        $r->print(&Apache::lonmenu::registerurl(1));
+    } elsif ($ENV{'form.origpage'}) {
+         $addentries = "onLoad=\"document.location='#newpost';\"";
     }
 # --------------------------------------------------------------- Force Student
     my $forcestudent='';