Diff for /loncom/interface/lonfeedback.pm between versions 1.349 and 1.350

version 1.349, 2012/03/17 04:02:28 version 1.350, 2012/03/17 04:55:10
Line 513  imscp_v1p1.xsd http://www.imsglobal.org/ Line 513  imscp_v1p1.xsd http://www.imsglobal.org/
         my $currdepth = 0;          my $currdepth = 0;
         my $firstidx = $alldiscussion{$showposts[0]};          my $firstidx = $alldiscussion{$showposts[0]};
         foreach my $post (@showposts) {          foreach my $post (@showposts) {
             unless (($sortposts eq 'thread') || (($sortposts eq '') && ($env{'environment.threadeddiscussion'})) || ($outputtarget eq 'export')) {              unless (($sortposts eq 'thread') || 
                       (($sortposts eq '') && (!$env{'environment.unthreadeddiscussion'})) || 
                       ($outputtarget eq 'export')) {
                 $alldiscussion{$post} = $post;                  $alldiscussion{$post} = $post;
             }              }
             unless ( ($notshown{$alldiscussion{$post}} eq '1') || ($shown{$alldiscussion{$post}} == 0) ) {              unless ( ($notshown{$alldiscussion{$post}} eq '1') || ($shown{$alldiscussion{$post}} == 0) ) {
Line 1117  sub build_posting_display { Line 1119  sub build_posting_display {
     my $origindex='0.';      my $origindex='0.';
             my $numoldver=0;              my $numoldver=0;
     if ($contrib{$idx.':replyto'}) {      if ($contrib{$idx.':replyto'}) {
                 if ( (($env{'environment.threadeddiscussion'}) && ($sortposts eq '')) || ($sortposts eq 'thread') || ($outputtarget eq 'export')) {                  if ( ((!$env{'environment.unthreadeddiscussion'}) && ($sortposts eq '')) || 
                        ($sortposts eq 'thread') || ($outputtarget eq 'export')) {
 # this is a follow-up message  # this is a follow-up message
     $original[$idx]=$original[$contrib{$idx.':replyto'}];      $original[$idx]=$original[$contrib{$idx.':replyto'}];
     $$depth[$idx]=$$depth[$contrib{$idx.':replyto'}]+1;      $$depth[$idx]=$$depth[$contrib{$idx.':replyto'}]+1;
Line 1330  sub build_posting_display { Line 1333  sub build_posting_display {
                 }                  }
                 if ($outputtarget eq 'export' || $message) {                  if ($outputtarget eq 'export' || $message) {
     my $thisindex=$idx;      my $thisindex=$idx;
     if ( (($env{'environment.threadeddiscussion'}) && ($sortposts eq '')) || ($sortposts eq 'thread') || ($outputtarget eq 'export')) {      if ( ((!$env{'environment.unthreadeddiscussion'}) && ($sortposts eq '')) || 
                            ($sortposts eq 'thread') || ($outputtarget eq 'export')) {
  $thisindex=$origindex.substr('00'.$$replies[$$depth[$idx]],-2,2);   $thisindex=$origindex.substr('00'.$$replies[$$depth[$idx]],-2,2);
     }      }
     $$alldiscussion{$thisindex}=$idx;      $$alldiscussion{$thisindex}=$idx;
Line 4248  ENDREDIR Line 4252  ENDREDIR
       return OK;        return OK;
   } elsif ($env{'form.cmd'}=~/^(threadedoff|threadedon)$/) {    } elsif ($env{'form.cmd'}=~/^(threadedoff|threadedon)$/) {
       my ($symb,$feedurl)=&get_feedurl_and_clean_symb($env{'form.symb'});        my ($symb,$feedurl)=&get_feedurl_and_clean_symb($env{'form.symb'});
       if ($env{'form.cmd'} eq 'threadedon') {        if ($env{'form.cmd'} eq 'threadedoff') {
     &Apache::lonnet::put('environment',{'unthreadeddiscussion' => 'on'});
     &Apache::lonnet::appenv({'environment.unthreadeddiscussion' => 'on'});
     &Apache::lonnet::del('environment',['threadeddiscussion']);
     &Apache::lonnet::delenv('environment.threadeddiscussion');
         } else {
   &Apache::lonnet::put('environment',{'threadeddiscussion' => 'on'});    &Apache::lonnet::put('environment',{'threadeddiscussion' => 'on'});
   &Apache::lonnet::appenv({'environment.threadeddiscussion' => 'on'});    &Apache::lonnet::appenv({'environment.threadeddiscussion' => 'on'});
       } else {    &Apache::lonnet::del('environment',['unthreadeddiscussion']);
    &Apache::lonnet::del('environment',['threadeddiscussion']);    &Apache::lonnet::delenv('environment.unthreadeddiscussion');
   &Apache::lonnet::delenv('environment.threadeddiscussion');  
       }        }
       &redirect_back($r,$feedurl,&mt('Changed discussion view mode').'<br />',        &redirect_back($r,$feedurl,&mt('Changed discussion view mode').'<br />',
      '0','0','','',$env{'form.previous'},undef,undef,undef,       '0','0','','',$env{'form.previous'},undef,undef,undef,

Removed from v.1.349  
changed lines
  Added in v.1.350


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