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

raeburn lon-capa-cvs@mail.lon-capa.org
Mon, 05 Jul 2004 22:54:34 -0000


raeburn		Mon Jul  5 18:54:34 2004 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm 
  Log:
  Bug fixes for colspan for threaded discussions, and inline display afetr storing new discussion settings.
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.97 loncom/interface/lonfeedback.pm:1.98
--- loncom/interface/lonfeedback.pm:1.97	Sun Jul  4 19:56:58 2004
+++ loncom/interface/lonfeedback.pm	Mon Jul  5 18:54:33 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.97 2004/07/04 23:56:58 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.98 2004/07/05 22:54:33 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -455,7 +455,7 @@
             my $colspan=$maxdepth+1;
             $discussion .= <<END; 
             <tr bgcolor="#FFFFFF">
-             <td colspan="'.$colspan.'" valign="top">
+             <td colspan="$colspan" valign="top">
               <table border="0" bgcolor="#FFFFFF" width="100%" cellspacing="2" cellpadding="2">
                <tr>
                 <td align="left">
@@ -642,6 +642,11 @@
 
 sub print_display_options {
     my ($r,$symb,$previous,$dispchg,$markchg,$feedurl) = @_;
+ # backward compatibility (bulletin boards used to be 'wrapped')
+    if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) {
+        $feedurl=~s|^/adm/wrapper||;
+    }
+
     my $function = &Apache::loncommon::get_users_function();
     my $tabcolor = &Apache::loncommon::designparm($function.'.tabbg',
                                                     $ENV{'user.domain'});
@@ -786,6 +791,11 @@
   my ($r,$feedurl,$typestyle,$sendsomething,$sendposts,$status,$previous) = @_;
   my $prevtag = '';
   my $qrystr = '';
+ # backward compatibility (bulletin boards used to be 'wrapped')
+  if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) {
+      $feedurl=~s|^/adm/wrapper||;
+  }
+
   if ($feedurl=~/^\/adm\//) { $feedurl.='?register=1' };
   if ($previous > 0) {
       $qrystr = 'previous='.$previous;
@@ -1135,6 +1145,10 @@
       my $previous=$ENV{'form.previous'};
       my ($dispchg,$markchg) = split/_/,$ENV{'form.changes'};
       my $feedurl = &Apache::lonnet::clutter($url);
+ # backward compatibility (bulletin boards used to be 'wrapped')  
+      if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) {
+          $feedurl=~s|^/adm/wrapper||;
+      }
       &print_display_options($r,$symb,$previous,$dispchg,$markchg,$feedurl);
       return OK;
   } elsif (($ENV{'form.markondisp'}) || ($ENV{'form.markonread'}) || ($ENV{'form.allposts'}) || ($ENV{'form.onlyunread'}) ) {
@@ -1305,7 +1319,7 @@
   if ($feedurl=~/\.(problem|exam|quiz|assess|survey|form)$/) {
       unless ($symb) { $goahead=0; }
   }
-  # backward compatibility (bulltin boards used to be 'wrapped')
+  # backward compatibility (bulletin boards used to be 'wrapped')
   if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) {
       $feedurl=~s|^/adm/wrapper||;
   }