Diff for /loncom/interface/lonfeedback.pm between versions 1.73.2.1 and 1.74

version 1.73.2.1, 2004/02/18 20:33:49 version 1.74, 2004/01/13 02:31:09
Line 25 Line 25
 #  #
 # http://www.lon-capa.org/  # http://www.lon-capa.org/
 #  #
 ###  # (Internal Server Error Handler
   #
   # (Login Screen
   # 5/21/99,5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14,
   # 1/14/00,5/29,5/30,6/1,6/29,7/1,11/9 Gerd Kortemeyer)
   #
   # 3/1/1 Gerd Kortemeyer)
   #
   # 3/1,2/3,2/5,2/6,2/8 Gerd Kortemeyer
   # 2/9 Guy Albertelli
   # 2/10 Gerd Kortemeyer
   # 2/13 Guy Albertelli
   # 7/25 Gerd Kortemeyer
   # 7/26 Guy Albertelli
   # 7/26,8/10,10/1,11/5,11/6,12/27,12/29 Gerd Kortemeyer
   # YEAR=2002
   # 1/1,1/16 Gerd Kortemeyer
   #
   
 package Apache::lonfeedback;  package Apache::lonfeedback;
   
Line 51  sub list_discussion { Line 68  sub list_discussion {
     }      }
     unless ($symb) { return ''; }      unless ($symb) { return ''; }
     my $seeid=&Apache::lonnet::allowed('rin',$crs);      my $seeid=&Apache::lonnet::allowed('rin',$crs);
     my $viewgrades=(&Apache::lonnet::allowed('vgr',$crs)      my $viewgrades=&Apache::lonnet::allowed('vgr',$crs);
  && ($symb=~/\.(problem|exam|quiz|assess|survey|form)$/));  
     my @discussionitems=();      my @discussionitems=();
     # backward compatability (bulltein boards used to be 'wrapped')      # backward compatibility (bulletin boards used to be 'wrapped')
     my $ressymb=$symb;      my $ressymb=$symb;
     if ($mode eq 'board') {      if ($mode eq 'board') {
  $ressymb=~s|(bulletin___\d+___)|$1adm/wrapper|;   $ressymb=~s|(bulletin___\d+___)|$1adm/wrapper|;
Line 136  sub list_discussion { Line 152  sub list_discussion {
  if ($seeid) {   if ($seeid) {
     if ($hidden) {      if ($hidden) {
  $sender.=' <a href="/adm/feedback?unhide='.   $sender.=' <a href="/adm/feedback?unhide='.
     $ressymb.':::'.$idx.'">'.&mt('Make Visible').'</a>';      $symb.':::'.$idx.'">'.&mt('Make Visible').'</a>';
     } else {      } else {
  $sender.=' <a href="/adm/feedback?hide='.   $sender.=' <a href="/adm/feedback?hide='.
     $ressymb.':::'.$idx.'">'.&mt('Hide').'</a>';      $symb.':::'.$idx.'">'.&mt('Hide').'</a>';
     }                           }                     
     $sender.=' <a href="/adm/feedback?deldisc='.      $sender.=' <a href="/adm/feedback?deldisc='.
  $ressymb.':::'.$idx.'">'.&mt('Delete').'</a>';   $symb.':::'.$idx.'">'.&mt('Delete').'</a>';
    }
    if (&Apache::lonnet::allowed('pch',
      $ENV{'request.course.id'}.
    ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
       $sender.=' <a href="/adm/feedback?replydisc='.
    $symb.':::'.$idx.'" '.$target.'>'.&mt('Reply').'</a>';
  }   }
     } else {      } else {
  if ($screenname) {   if ($screenname) {
     $sender='<i>'.$screenname.'</i>';      $sender='<i>'.$screenname.'</i>';
  }   }
     }      }
     if (&Apache::lonnet::allowed('pch',  
  $ENV{'request.course.id'}.  
  ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {  
  $sender.=' <a href="/adm/feedback?replydisc='.  
     $ressymb.':::'.$idx.'" '.$target.'>'.&mt('Reply').'</a>';  
     }  
     my $vgrlink;      my $vgrlink;
     if ($viewgrades) {      if ($viewgrades) {
  $vgrlink=&Apache::loncommon::submlink('Submissions',   $vgrlink=&Apache::loncommon::submlink('Submissions',
Line 216  Attachment (128 KB max size): <input typ Line 232  Attachment (128 KB max size): <input typ
 </form>  </form>
 ENDDISCUSS  ENDDISCUSS
       $discussion.=&generate_preview_button();        $discussion.=&generate_preview_button();
    }      } else {
    if (&Apache::lonnet::allowed('pch',
      $ENV{'request.course.id'}.
    ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
       $discussion.='<table bgcolor="#BBBBBB"><tr><td><a href="/adm/feedback?replydisc='.
    $symb.':::" '.$target.'>'.
    '<img src="/adm/lonMisc/chat.gif" border="0" />'.
    &mt('Post Discussion').'</a></td></tr></table>';
    }
       }
    return $discussion;     return $discussion;
 }  }
   
Line 239  sub mail_screen { Line 264  sub mail_screen {
       }        }
   }    }
   my $latexHelp = Apache::loncommon::helpLatexCheatsheet();    my $latexHelp = Apache::loncommon::helpLatexCheatsheet();
     my $send=&mt('Send');
   $r->print(<<ENDDOCUMENT);    $r->print(<<ENDDOCUMENT);
 <html>  <html>
 <head>  <head>
Line 307  Attachment (128 KB max size): <input typ Line 333  Attachment (128 KB max size): <input typ
 </p>  </p>
 <p>  <p>
 <input type="hidden" name="sendit" value="1" />  <input type="hidden" name="sendit" value="1" />
 <input type="button" value="Send Feedback" onClick='gosubmit();' />  <input type="button" value="$send" onClick='gosubmit();' />
 </p>  </p>
 </form>  </form>
 ENDDOCUMENT  ENDDOCUMENT
Line 405  sub screen_header { Line 431  sub screen_header {
  if (&Apache::lonnet::allowed('pch',   if (&Apache::lonnet::allowed('pch',
      $ENV{'request.course.id'}.       $ENV{'request.course.id'}.
      ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {       ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
     $discussoptions='<input type="checkbox" name="discuss" onClick="this.form.anondiscuss.checked=false;" /> '.      $discussoptions='<input type="checkbox" name="discuss" onClick="this.form.anondiscuss.checked=false;" '.
    ($ENV{'form.replydisc'}?' checked="1"':'').' /> '.
  &mt('Contribution to course discussion of resource');   &mt('Contribution to course discussion of resource');
     $discussoptions.='<br /><input type="checkbox" name="anondiscuss" onClick="this.form.discuss.checked=false;" /> '.      $discussoptions.='<br /><input type="checkbox" name="anondiscuss" onClick="this.form.discuss.checked=false;" /> '.
  &mt('Anonymous contribution to course discussion of resource').   &mt('Anonymous contribution to course discussion of resource').
  ' <i>('.&mt('name only visible to course faculty').')</i>';   ' <i>('.&mt('name only visible to course faculty').')</i>';
       }        }
     }      }
     if ($msgoptions) { $msgoptions='<h2>'.&mt('Sending Messages').'</h2>'.$msgoptions; }      if ($msgoptions) { $msgoptions='<h2><img src="/adm/lonMisc/feedback.gif" />'.&mt('Sending Messages').'</h2>'.$msgoptions; }
     if ($discussoptions) {       if ($discussoptions) { 
  $discussoptions='<h2>'.&mt('Discussion Contributions').'</h2>'.$discussoptions; }   $discussoptions='<h2><img src="/adm/lonMisc/chat.gif" />'.&mt('Discussion Contributions').'</h2>'.$discussoptions; }
     return $msgoptions.$discussoptions;      return $msgoptions.$discussoptions;
 }  }
   
Line 726  sub handler { Line 753  sub handler {
        &mt('Changed discussion status').'<br />','0','0');         &mt('Changed discussion status').'<br />','0','0');
   } elsif ($ENV{'form.preview'}) {    } elsif ($ENV{'form.preview'}) {
 # -------------------------------------------------------- User wants a preview  # -------------------------------------------------------- User wants a preview
       $r->content_type('text/html');  
       $r->send_http_header;  
       &show_preview($r);        &show_preview($r);
   } else {    } else {
 # ------------------------------------------------------------- Normal feedback  # ------------------------------------------------------------- Normal feedback
Line 756  sub handler { Line 781  sub handler {
   if ($feedurl=~/\.(problem|exam|quiz|assess|survey|form)$/) {    if ($feedurl=~/\.(problem|exam|quiz|assess|survey|form)$/) {
       unless ($symb) { $goahead=0; }        unless ($symb) { $goahead=0; }
   }    }
   # backward compatability (bulltein boards used to be 'wrapped')    # backward compatibility (bulltin boards used to be 'wrapped')
   if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) {    if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) {
       $feedurl=~s|^/adm/wrapper||;        $feedurl=~s|^/adm/wrapper||;
   }    }

Removed from v.1.73.2.1  
changed lines
  Added in v.1.74


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