Diff for /loncom/interface/lonfeedback.pm between versions 1.167 and 1.173

version 1.167, 2005/06/06 20:40:01 version 1.173, 2005/11/10 11:31:04
Line 45  use Cwd; Line 45  use Cwd;
   
 sub discussion_open {  sub discussion_open {
     my ($status,$symb)=@_;      my ($status,$symb)=@_;
       if ($env{'request.role.adv'}) { return 1; }
     if (defined($status) &&      if (defined($status) &&
  !($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER'   !($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER'
   || $status eq 'OPEN')) {    || $status eq 'OPEN')) {
Line 97  sub list_discussion { Line 98  sub list_discussion {
     $ressymb=&wrap_symb($ressymb);      $ressymb=&wrap_symb($ressymb);
     my $encsymb=&Apache::lonenc::check_encrypt($ressymb);      my $encsymb=&Apache::lonenc::check_encrypt($ressymb);
     my $viewgrades=(&Apache::lonnet::allowed('vgr',$crs)      my $viewgrades=(&Apache::lonnet::allowed('vgr',$crs)
   && ($ressymb=~/\.(problem|exam|quiz|assess|survey|form)$/));    && ($ressymb=~/\.(problem|exam|quiz|assess|survey|form|task)$/));
           
     my %usernamesort = ();      my %usernamesort = ();
     my %namesort =();      my %namesort =();
Line 113  sub list_discussion { Line 114  sub list_discussion {
     my $toggkey = $ressymb.'_readtoggle';      my $toggkey = $ressymb.'_readtoggle';
     my $readkey = $ressymb.'_read';      my $readkey = $ressymb.'_read';
     $ressymb=$encsymb;      $ressymb=$encsymb;
     my %dischash = &Apache::lonnet::get('nohist_'.$env{'request.course.id'}.'_discuss',[$lastkey,$showkey,$markkey,$visitkey,$ondispkey,$userpickkey,$toggkey,$readkey],$env{'user.domain'},$env{'user.name'});      my %dischash = &Apache::lonnet::get('nohist_'.$cid.'_discuss',[$lastkey,$showkey,$markkey,$visitkey,$ondispkey,$userpickkey,$toggkey,$readkey],$env{'user.domain'},$env{'user.name'});
     my %discinfo = ();      my %discinfo = ();
     my $showonlyunread = 0;      my $showonlyunread = 0;
     my $showunmark = 0;       my $showunmark = 0; 
Line 154  sub list_discussion { Line 155  sub list_discussion {
     my %roleshash = ();      my %roleshash = ();
     my %roleinfo = ();      my %roleinfo = ();
     if ($env{'form.rolefilter'}) {      if ($env{'form.rolefilter'}) {
         %roleshash = &Apache::lonnet::dump('nohist_userroles',$env{'course.'.$env{'request.course.id'}.'.domain'},$env{'course.'.$env{'request.course.id'}.'.num'});          %roleshash = &Apache::lonnet::dump('nohist_userroles',
      $env{'course.'.$cid.'.domain'},
      $env{'course.'.$cid.'.num'});
         foreach (keys %roleshash) {          foreach (keys %roleshash) {
             my ($role,$uname,$udom,$sec) = split/:/,$_;              my ($role,$uname,$udom,$sec) = split/:/,$_;
             if ($role =~ /^cr/) {              if ($role =~ /^cr/) {
Line 171  sub list_discussion { Line 174  sub list_discussion {
             }              }
         }          }
         my ($classlist) = &Apache::loncoursedata::get_classlist(          my ($classlist) = &Apache::loncoursedata::get_classlist(
                               $env{'request.course.id'},                                $env{'course.'.$cid.'.domain'},
                               $env{'course.'.$env{'request.course.id'}.'.domain'},                                $env{'course.'.$cid.'.num'});
                               $env{'course.'.$env{'request.course.id'}.'.num'});  
         my $sec_index = &Apache::loncoursedata::CL_SECTION();          my $sec_index = &Apache::loncoursedata::CL_SECTION();
         my $status_index = &Apache::loncoursedata::CL_STATUS();          my $status_index = &Apache::loncoursedata::CL_STATUS();
         while (my ($student,$data) = each %$classlist) {          while (my ($student,$data) = each %$classlist) {
Line 235  sub list_discussion { Line 237  sub list_discussion {
     my %notshown = ();      my %notshown = ();
     my %newitem = ();      my %newitem = ();
     my $maxdepth=0;      my $maxdepth=0;
       my %anonhash=();
       my $anoncnt=0;
     my $target='';      my $target='';
     unless ($env{'browser.interface'} eq 'textual' ||      unless ($env{'browser.interface'} eq 'textual' ||
     $env{'environment.remote'} eq 'off' ) {      $env{'environment.remote'} eq 'off' ) {
Line 245  sub list_discussion { Line 248  sub list_discussion {
     my $now = time;      my $now = time;
     $discinfo{$visitkey} = $visit;      $discinfo{$visitkey} = $visit;
   
     &Apache::lonnet::put('nohist_'.$env{'request.course.id'}.'_discuss',\%discinfo,$env{'user.domain'},$env{'user.name'});      &Apache::lonnet::put('nohist_'.$cid.'_discuss',\%discinfo,$env{'user.domain'},$env{'user.name'});
     &build_posting_display(\%usernamesort,\%subjectsort,\%namesort,\%notshown,\%newitem,\%dischash,\%shown,\%alldiscussion,\%imsitems,\%imsfiles,\%roleinfo,\@discussionitems,\@replies,\@depth,\@posters,\$maxdepth,\$visible,\$newpostsflag,\$current,$status,$viewgrades,$seeid,$prevread,$sortposts,$encsymb,$target,$readkey,$showunmark,$showonlyunread,$totposters,\@rolefilter,\@sectionpick,$statusfilter,$toggkey,$outputtarget);      &build_posting_display(\%usernamesort,\%subjectsort,\%namesort,\%notshown,\%newitem,\%dischash,\%shown,\%alldiscussion,\%imsitems,\%imsfiles,\%roleinfo,\@discussionitems,\@replies,\@depth,\@posters,\$maxdepth,\$visible,\$newpostsflag,\$current,$status,$viewgrades,$seeid,$prevread,$sortposts,$encsymb,$target,$readkey,$showunmark,$showonlyunread,$totposters,\@rolefilter,\@sectionpick,$statusfilter,$toggkey,$outputtarget,\%anonhash,$anoncnt);
   
     my $discussion='';      my $discussion='';
     my $manifestfile;      my $manifestfile;
Line 390  imscp_v1p1.xsd http://www.imsglobal.org/ Line 393  imscp_v1p1.xsd http://www.imsglobal.org/
     $discussion.='<form name="readchoices" method="post" action="/adm/feedback?chgreads='.$ressymb.'" ><table bgcolor="#AAAAAA" cellpadding="2" cellspacing="2" border="0">';      $discussion.='<form name="readchoices" method="post" action="/adm/feedback?chgreads='.$ressymb.'" ><table bgcolor="#AAAAAA" cellpadding="2" cellspacing="2" border="0">';
     $discussion .='<tr><td bgcolor="#DDDDBB" colspan="'.$colspan.'">'.      $discussion .='<tr><td bgcolor="#DDDDBB" colspan="'.$colspan.'">'.
  '<table border="0" width="100%" bgcolor="#DDDDBB"><tr>';   '<table border="0" width="100%" bgcolor="#DDDDBB"><tr>';
       my $escsymb=&Apache::lonnet::escape($ressymb);
     if ($visible>2) {      if ($visible>2) {
  $discussion.='<td align="left">'.   $discussion.='<td align="left">'.
     '<a href="/adm/feedback?cmd=threadedon&amp;symb='.$ressymb;      '<a href="/adm/feedback?cmd=threadedon&amp;symb='.$escsymb;
  if ($newpostsflag) {   if ($newpostsflag) {
     $discussion .= '&previous='.$prevread;      $discussion .= '&previous='.$prevread;
  }   }
  $discussion .='">'.&mt('Threaded View').'</a>&nbsp;&nbsp;'.   $discussion .='">'.&mt('Threaded View').'</a>&nbsp;&nbsp;'.
     '<a href="/adm/feedback?cmd=threadedoff&amp;symb='.$ressymb;      '<a href="/adm/feedback?cmd=threadedoff&amp;symb='.$escsymb;
  if ($newpostsflag) {   if ($newpostsflag) {
     $discussion .= '&previous='.$prevread;      $discussion .= '&previous='.$prevread;
  }   }
  $discussion .='">'.&mt('Chronological View').'</a>&nbsp;&nbsp;   $discussion .='">'.&mt('Chronological View').'</a>&nbsp;&nbsp;
                               <a href= "/adm/feedback?cmd=sortfilter&amp;symb='.$ressymb;                                <a href= "/adm/feedback?cmd=sortfilter&amp;symb='.$escsymb;
                 if ($newpostsflag) {                  if ($newpostsflag) {
                     $discussion .= '&previous='.$prevread;                      $discussion .= '&previous='.$prevread;
                 }                  }
Line 410  imscp_v1p1.xsd http://www.imsglobal.org/ Line 414  imscp_v1p1.xsd http://www.imsglobal.org/
             } else {              } else {
                 $discussion .= '<td align="left">';                  $discussion .= '<td align="left">';
             }              }
             $discussion .='<a href= "/adm/feedback?export='.$ressymb;              $discussion .='<a href= "/adm/feedback?export='.$escsymb;
             if ($newpostsflag) {              if ($newpostsflag) {
                 $discussion .= '&previous='.$prevread;                  $discussion .= '&previous='.$prevread;
             }              }
             $discussion .= '">'.&mt('Export').'?</a>&nbsp;&nbsp;</td>';              $discussion .= '">'.&mt('Export').'?</a>&nbsp;&nbsp;</td>';
     if ($newpostsflag) {      if ($newpostsflag) {
  if (!$markondisp) {   if (!$markondisp) {
     $discussion .='<td align="right"><a href="/adm/feedback?markread=1&amp;symb='.$ressymb.'">'.&mt('Mark NEW posts no longer new').'</a>&nbsp;&nbsp;';      $discussion .='<td align="right"><a href="/adm/preferences?action=changediscussions">'.
    &mt('Preferences on what is marked as NEW').
    '</a><br /><a href="/adm/feedback?markread=1&amp;symb='.$escsymb.'">'.&mt('Mark NEW posts no longer new').'</a>';
  } else {   } else {
     $discussion .= '<td>&nbsp;</td>';      $discussion .= '<td>&nbsp;</td>';
  }   }
Line 430  imscp_v1p1.xsd http://www.imsglobal.org/ Line 436  imscp_v1p1.xsd http://www.imsglobal.org/
             if ($numhidden > 0) {              if ($numhidden > 0) {
                 my $colspan = $maxdepth+1;                  my $colspan = $maxdepth+1;
                 $discussion.="\n".'<tr><td bgcolor="#CCCCCC" colspan="'.$colspan.'">'.                  $discussion.="\n".'<tr><td bgcolor="#CCCCCC" colspan="'.$colspan.'">'.
                          '<a href="/adm/feedback?allposts=1&amp;symb='.$ressymb;                           '<a href="/adm/feedback?allposts=1&amp;symb='.$escsymb;
                 if ($newpostsflag) {                  if ($newpostsflag) {
                     $discussion .= '&previous='.$prevread;                      $discussion .= '&previous='.$prevread;
                 }                  }
Line 743  ENDDISCUSS Line 749  ENDDISCUSS
         ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {          ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
     if ($outputtarget ne 'tex') {      if ($outputtarget ne 'tex') {
  $discussion.='<table bgcolor="#BBBBBB"><tr><td><a href="/adm/feedback?replydisc='.   $discussion.='<table bgcolor="#BBBBBB"><tr><td><a href="/adm/feedback?replydisc='.
     $ressymb.':::" '.$target.'>'.      &Apache::lonnet::escape($ressymb).':::" '.$target.'>'.
     '<img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/chat.gif').'" border="0" />'.      '<img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/chat.gif').'" border="0" />'.
     &mt('Post Discussion').'</a></td></tr></table>';      &mt('Post Discussion').'</a></td></tr></table>';
     }      }
Line 753  ENDDISCUSS Line 759  ENDDISCUSS
 }  }
   
 sub build_posting_display {  sub build_posting_display {
     my ($usernamesort,$subjectsort,$namesort,$notshown,$newitem,$dischash,$shown,$alldiscussion,$imsitems,$imsfiles,$roleinfo,$discussionitems,$replies,$depth,$posters,$maxdepth,$visible,$newpostsflag,$current,$status,$viewgrades,$seeid,$prevread,$sortposts,$ressymb,$target,$readkey,$showunmark,$showonlyunread,$totposters,$rolefilter,$sectionpick,$statusfilter,$toggkey,$outputtarget) = @_;      my ($usernamesort,$subjectsort,$namesort,$notshown,$newitem,$dischash,$shown,$alldiscussion,$imsitems,$imsfiles,$roleinfo,$discussionitems,$replies,$depth,$posters,$maxdepth,$visible,$newpostsflag,$current,$status,$viewgrades,$seeid,$prevread,$sortposts,$ressymb,$target,$readkey,$showunmark,$showonlyunread,$totposters,$rolefilter,$sectionpick,$statusfilter,$toggkey,$outputtarget,$anonhash,$anoncnt) = @_;
     my @original=();      my @original=();
     my @index=();      my @index=();
     my $symb=&Apache::lonenc::check_decrypt($ressymb);      my $symb=&Apache::lonenc::check_decrypt($ressymb);
       my $escsymb=&Apache::lonnet::escape($ressymb);
     my %contrib=&Apache::lonnet::restore($symb,$env{'request.course.id'},      my %contrib=&Apache::lonnet::restore($symb,$env{'request.course.id'},
   $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'});
Line 820  sub build_posting_display { Line 827  sub build_posting_display {
                 my %allattachments = ();                  my %allattachments = ();
                 my ($screenname,$plainname);                  my ($screenname,$plainname);
                 my $sender = &mt('Anonymous');                  my $sender = &mt('Anonymous');
   # Anonymous users getting number within a discussion
   # Since idx is in static order, this should give the same sequence every time. 
    my $key=$contrib{$idx.':sendername'}.'@'.$contrib{$idx.':senderdomain'};
    unless ($$anonhash{$key}) {
                       $anoncnt++;
       $$anonhash{$key}=&mt('Anonymous').' '.$anoncnt;
    }
                 my ($message,$subject,$vgrlink,$ctlink);                  my ($message,$subject,$vgrlink,$ctlink);
                 &get_post_contents(\%contrib,$idx,$seeid,$outputtarget,\%messages,\%subjects,\%allattachments,\%attachtxt,$imsfiles,\$screenname,\$plainname,$numoldver);                  &get_post_contents(\%contrib,$idx,$seeid,$outputtarget,\%messages,\%subjects,\%allattachments,\%attachtxt,$imsfiles,\$screenname,\$plainname,$numoldver);
   
Line 858  sub build_posting_display { Line 872  sub build_posting_display {
  $contrib{$idx.':sendername'}.' at '.   $contrib{$idx.':sendername'}.' at '.
  $contrib{$idx.':senderdomain'}.')';   $contrib{$idx.':senderdomain'}.')';
     if ($contrib{$idx.':anonymous'}) {      if ($contrib{$idx.':anonymous'}) {
         $sender.=' <font color="red"><b>['.&mt('anonymous').']</b></font> '.          $sender.=' <font color="red"><b>['.$$anonhash{$key}.']</b></font> '.
     $screenname;      $screenname;
     }      }
   
Line 894  sub build_posting_display { Line 908  sub build_posting_display {
                             if ($env{'course.'.$env{'request.course.id'}.'.allow_discussion_post_editing'} =~ m/yes/i) {                              if ($env{'course.'.$env{'request.course.id'}.'.allow_discussion_post_editing'} =~ m/yes/i) {
                                 if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) {                                  if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) {
                                     $sender.=' <a href="/adm/feedback?editdisc='.                                      $sender.=' <a href="/adm/feedback?editdisc='.
                                          $ressymb.':::'.$idx;                                           $escsymb.':::'.$idx;
                                     if ($newpostsflag) {                                      if ($newpostsflag) {
                                         $sender .= '&previous='.$prevread;                                          $sender .= '&previous='.$prevread;
                                     }                                      }
                                     $sender .= '" '.$target.'>'.&mt('Edit').'</a>';                                                                                   $sender .= '" '.$target.'>'.&mt('Edit').'</a>';                                             
                                     unless ($seeid) {                                      unless ($seeid) {
                                         $sender.=" <a href=\"javascript:studentdelete('$ressymb','$idx','$newpostsflag','$prevread')";                                          $sender.=" <a href=\"javascript:studentdelete('$escsymb','$idx','$newpostsflag','$prevread')";
                                         $sender .= '">'.&mt('Delete').'</a>';                                          $sender .= '">'.&mt('Delete').'</a>';
                                     }                                      }
                                 }                                  }
Line 909  sub build_posting_display { Line 923  sub build_posting_display {
         if ($hidden) {          if ($hidden) {
                                     unless ($studenthidden) {                                      unless ($studenthidden) {
                 $sender.=' <a href="/adm/feedback?unhide='.                  $sender.=' <a href="/adm/feedback?unhide='.
                 $ressymb.':::'.$idx;                  $escsymb.':::'.$idx;
                                         if ($newpostsflag) {                                          if ($newpostsflag) {
                                              $sender .= '&previous='.$prevread;                                               $sender .= '&previous='.$prevread;
                                         }                                          }
Line 917  sub build_posting_display { Line 931  sub build_posting_display {
                                     }                                      }
         } else {          } else {
     $sender.=' <a href="/adm/feedback?hide='.      $sender.=' <a href="/adm/feedback?hide='.
         $ressymb.':::'.$idx;          $escsymb.':::'.$idx;
                                     if ($newpostsflag) {                                      if ($newpostsflag) {
                                         $sender .= '&previous='.$prevread;                                          $sender .= '&previous='.$prevread;
                                     }                                      }
                                     $sender .= '">'.&mt('Hide').'</a>';                                      $sender .= '">'.&mt('Hide').'</a>';
         }                               }                     
         $sender.=' <a href="/adm/feedback?deldisc='.          $sender.=' <a href="/adm/feedback?deldisc='.
         $ressymb.':::'.$idx;          $escsymb.':::'.$idx;
                                 if ($newpostsflag) {                                  if ($newpostsflag) {
                                     $sender .= '&previous='.$prevread;                                      $sender .= '&previous='.$prevread;
                                 }                                  }
Line 933  sub build_posting_display { Line 947  sub build_posting_display {
         } else {          } else {
     if ($screenname) {      if ($screenname) {
         $sender='<i>'.$screenname.'</i>';          $sender='<i>'.$screenname.'</i>';
       } else {
    $sender='<i>'.$$anonhash{$key}.'</i>';
     }      }
 # Set up for sorting by domain, then username for anonymous  # Set up for sorting by domain, then username for anonymous
                             unless (defined($$usernamesort{'__anon'})) {                              unless (defined($$usernamesort{'__anon'})) {
Line 958  sub build_posting_display { Line 974  sub build_posting_display {
  $env{'request.course.id'}.   $env{'request.course.id'}.
  ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {   ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
     $sender.=' <a href="/adm/feedback?replydisc='.      $sender.=' <a href="/adm/feedback?replydisc='.
             $ressymb.':::'.$idx;              $escsymb.':::'.$idx;
                             if ($newpostsflag) {                              if ($newpostsflag) {
                                     $sender .= '&previous='.$prevread;                                      $sender .= '&previous='.$prevread;
                             }                              }
Line 1074  sub build_posting_display { Line 1090  sub build_posting_display {
                                 my @postversions = ();                                  my @postversions = ();
                                 $$discussionitems[$idx] .= &mt('This post has been edited by the author.');                                  $$discussionitems[$idx] .= &mt('This post has been edited by the author.');
                                 if ($seeid) {                                  if ($seeid) {
                                     $$discussionitems[$idx] .= '&nbsp;&nbsp;<a href="/adm/feedback?allversions='.$ressymb.':::'.$idx.'">'.&mt('Display all versions').'</a>';                                      $$discussionitems[$idx] .= '&nbsp;&nbsp;<a href="/adm/feedback?allversions='.$escsymb.':::'.$idx.'">'.&mt('Display all versions').'</a>';
                                 }                                  }
                                 $$discussionitems[$idx].='<br/>'.&mt('Earlier version(s) were posted on: ');                                  $$discussionitems[$idx].='<br/>'.&mt('Earlier version(s) were posted on: ');
                                 if ($contrib{$idx.':history'} =~ m/:/) {                                  if ($contrib{$idx.':history'} =~ m/:/) {
Line 1164  sub get_post_contents { Line 1180  sub get_post_contents {
 #    $$screenname=&Apache::loncommon::screenname(  #    $$screenname=&Apache::loncommon::screenname(
 #                                        $$contrib{$idx.':sendername'},  #                                        $$contrib{$idx.':sendername'},
 #                                        $$contrib{$idx.':senderdomain'});  #                                        $$contrib{$idx.':senderdomain'});
 #    $$plainname=&Apache::loncommon::nickname(      $$plainname=&Apache::loncommon::nickname(
 #                                        $$contrib{$idx.':sendername'},                                          $$contrib{$idx.':sendername'},
 #                                        $$contrib{$idx.':senderdomain'});                                          $$contrib{$idx.':senderdomain'});
     ($$screenname,$$plainname)=($$contrib{$idx.':screenname'},      $$screenname=$$contrib{$idx.':screenname'};
  $$contrib{$idx.':plainname'});  
     my $sender=&Apache::loncommon::aboutmewrapper(      my $sender=&Apache::loncommon::aboutmewrapper(
                                  $$plainname,                                   $$plainname,
                                  $$contrib{$idx.':sendername'},                                   $$contrib{$idx.':sendername'},
Line 2292  sub screen_header { Line 2308  sub screen_header {
  &mt('Contribution to course discussion of resource');   &mt('Contribution to course discussion of resource');
     $discussoptions.='</label><br /><label><input type="checkbox" name="anondiscuss" onClick="this.form.discuss.checked=false;" /> '.      $discussoptions.='</label><br /><label><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></label>';   ' <i>('.&mt('name only visible to course faculty').')</i></label> '.
    '<a href="/adm/preferences?action=changescreenname">'.&mt('Change Screenname').'</a>';
         }          }
     }      }
     if ($msgoptions) { $msgoptions='<h2><img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/feedback.gif').'" />'.&mt('Sending Messages').'</h2>'.$msgoptions; }      if ($msgoptions) { $msgoptions='<h2><img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/feedback.gif').'" />'.&mt('Sending Messages').'</h2>'.$msgoptions; }
Line 2639  sub newline_to_br { Line 2656  sub newline_to_br {
 }  }
   
 sub generate_preview_button {  sub generate_preview_button {
       my ($formname,$fieldname)=@_;
       unless ($formname) { $formname='mailform'; }
       unless ($fieldname) { $fieldname='comment'; }
     my $pre=&mt("Show Preview and Check Spelling");      my $pre=&mt("Show Preview and Check Spelling");
     return(<<ENDPREVIEW);      return(<<ENDPREVIEW);
 <form name="preview" action="/adm/feedback?preview=1" method="post" target="preview">  <form name="preview" action="/adm/feedback?preview=1" method="post" target="preview">
 <input type="hidden" name="subject">  <input type="hidden" name="subject">
 <input type="hidden" name="comment" />  <input type="hidden" name="comment" />
 <input type="button" value="$pre"  <input type="button" value="$pre"
 onClick="if (typeof(document.mailform.onsubmit)=='function') {document.mailform.onsubmit();};this.form.comment.value=document.mailform.comment.value;this.form.subject.value=document.mailform.subject.value;this.form.submit();" />  onClick="if (typeof(document.$formname.onsubmit)=='function') {document.$formname.onsubmit();};this.form.comment.value=document.$formname.$fieldname.value;this.form.subject.value=document.$formname.subject.value;this.form.submit();" />
 </form>  </form>
 ENDPREVIEW  ENDPREVIEW
 }  }
Line 3257  ENDREDIR Line 3277  ENDREDIR
       my $mode='board';        my $mode='board';
       my $status='OPEN';        my $status='OPEN';
       my $previous=$env{'form.previous'};        my $previous=$env{'form.previous'};
       if ($feedurl =~ /\.(problem|exam|quiz|assess|survey|form|library)$/) {        if ($feedurl =~ /\.(problem|exam|quiz|assess|survey|form|library|task)$/) {
           $mode='problem';            $mode='problem';
           $status=$Apache::inputtags::status[-1];            $status=$Apache::inputtags::status[-1];
       }        }
Line 3296  ENDREDIR Line 3316  ENDREDIR
       }        }
       &Apache::lonenc::check_decrypt(\$symb);        &Apache::lonenc::check_decrypt(\$symb);
       my $goahead=1;        my $goahead=1;
       if ($feedurl=~/\.(problem|exam|quiz|assess|survey|form)$/) {        if ($feedurl=~/\.(problem|exam|quiz|assess|survey|form|task)$/) {
   unless ($symb) { $goahead=0; }    unless ($symb) { $goahead=0; }
       }        }
       # backward compatibility (bulletin boards used to be 'wrapped')        # backward compatibility (bulletin boards used to be 'wrapped')

Removed from v.1.167  
changed lines
  Added in v.1.173


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