Diff for /loncom/interface/lonfeedback.pm between versions 1.181 and 1.184

version 1.181, 2006/03/02 18:54:49 version 1.184, 2006/03/15 19:41:26
Line 2224  $html Line 2224  $html
 <meta http-equiv="pragma" content="no-cache" />  <meta http-equiv="pragma" content="no-cache" />
 <meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" />  <meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" />
 </head>  </head>
 <body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { this.document.reldt.submit(); self.close(); }'>  <body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { this.document.reldt.submit(); self.window.close(); }'>
 <img align="right" src="$logo" />  <img align="right" src="$logo" />
 $typestyle  $typestyle
 <b>Sent $sendsomething message(s), and $sendposts post(s).</b>  <b>Sent $sendsomething message(s), and $sendposts post(s).</b>
Line 2264  ENDNOREDIR Line 2264  ENDNOREDIR
   my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif');    my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif');
   $r->print (<<ENDNOREDIRTWO);    $r->print (<<ENDNOREDIRTWO);
 </head>  </head>
 <body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { self.close(); }'>  <body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { self.window.close(); }'>
 <img align="right" src="$logo" />  <img align="right" src="$logo" />
 <b>$nofeed</b>  <b>$nofeed</b>
 <br /><a href="$feedurl">$continue</a>  <br /><a href="$feedurl">$continue</a>
Line 2541  sub adddiscuss { Line 2541  sub adddiscuss {
     }      }
     if (($symb) && ($email)) {      if (($symb) && ($email)) {
         if ($env{'form.editdisc'}) {          if ($env{'form.editdisc'}) {
             my %newcontrib = ();  
             $contrib{'ip'}=$ENV{'REMOTE_ADDR'};              $contrib{'ip'}=$ENV{'REMOTE_ADDR'};
             $contrib{'host'}=$Apache::lonnet::perlvar{'lonHostID'};              $contrib{'host'}=$Apache::lonnet::perlvar{'lonHostID'};
             $contrib{'timestamp'} = time;              $contrib{'timestamp'} = time;
Line 2584  sub adddiscuss { Line 2583  sub adddiscuss {
                 }                  }
             }              }
             $contrib{'history'} .= $oldcontrib{$oldidx.':timestamp'};              $contrib{'history'} .= $oldcontrib{$oldidx.':timestamp'};
             foreach (keys %contrib) {  
                 my $key = $oldidx.':'.&Apache::lonnet::escape($oldsymb).':'.$_;                                                                                 
                 $newcontrib{$key} = $contrib{$_};  
             }  
             my $put_reply = &Apache::lonnet::putstore($env{'request.course.id'},              my $put_reply = &Apache::lonnet::putstore($env{'request.course.id'},
                   \%newcontrib,                    $oldsymb,$oldidx,\%contrib,
                   $env{'course.'.$env{'request.course.id'}.'.domain'},                    $env{'course.'.$env{'request.course.id'}.'.domain'},
                   $env{'course.'.$env{'request.course.id'}.'.num'});                    $env{'course.'.$env{'request.course.id'}.'.num'});
             $status='Editing class discussion'.($anon?' (anonymous)':'');              $status='Editing class discussion'.($anon?' (anonymous)':'');
Line 3138  $html Line 3133  $html
 <meta http-equiv="pragma" content="no-cache" />  <meta http-equiv="pragma" content="no-cache" />
 <meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" />  <meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" />
 </head>  </head>
 <body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { this.document.reldt.submit(); self.close(); }'>  <body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { this.document.reldt.submit(); self.window.close(); }'>
 <img align="right" src="$logo" />  <img align="right" src="$logo" />
 $textline  $textline
 <form name="reldt" action="$feedurl" target="loncapaclient">  <form name="reldt" action="$feedurl" target="loncapaclient">
Line 3498  sub editing_allowed { Line 3493  sub editing_allowed {
     my $cid = $env{'request.course.id'};      my $cid = $env{'request.course.id'};
     my $role = (split(/\./,$env{'request.role'}))[0];      my $role = (split(/\./,$env{'request.role'}))[0];
     my $section = $env{'request.course.sec'};      my $section = $env{'request.course.sec'};
     my $allow_editing_config = $env{'course.'.$env{'request.course.id'}.      my $allow_editing_config = 
                                '.allow_discussion_post_editing'};   $env{'course.'.$cid.'.allow_discussion_post_editing'};
     if ($allow_editing_config =~ m/^\s*yes\s*$/i) {      if ($allow_editing_config =~ m/^\s*yes\s*$/i) {
         $can_edit = 1;          $can_edit = 1;
     } else {      } else {
         my @editor_roles = split(/,/,$allow_editing_config);   foreach my $editor (split(/,/,$allow_editing_config)) {
         if (@editor_roles > 0) {      my ($editor_role,$editor_sec) = split(/:/,$editor);
             foreach my $editor (@editor_roles) {      if ($editor_role eq $role
                 my ($editor_role,$editor_sec) = split(/:/,$editor);   && defined($editor_sec)
                 if ($editor_role eq $role) {   && defined($section)
                     if (defined($editor_sec)) {   && $editor_sec eq $section) {
                         if (defined($section)) {   $can_edit = 1;
                             if ($editor_sec eq $section) {   last;
                                 $can_edit = 1;      }
                                 last;      if ($editor_role eq $role
                             }   && !defined($editor_sec)) {
                         }   $can_edit = 1;
                     } else {      }
                         $can_edit = 1;   }
                         last;  
                     }  
                 }  
             }  
         }  
     }      }
     return $can_edit;      return $can_edit;
 }  }

Removed from v.1.181  
changed lines
  Added in v.1.184


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