version 1.133, 2004/11/15 21:35:37
|
version 1.138, 2004/11/15 23:02:45
|
Line 132 sub list_discussion {
|
Line 132 sub list_discussion {
|
$prevread = $dischash{$lastkey}; |
$prevread = $dischash{$lastkey}; |
} |
} |
} |
} |
&Apache::lonnet::logthis("\n last read r symb ".$lastkey); |
|
|
|
# Get information about students and non-students in course for filtering display of posts |
# Get information about students and non-students in course for filtering display of posts |
my %roleshash = (); |
my %roleshash = (); |
Line 355 imscp_v1p1.xsd http://www.imsglobal.org/
|
Line 354 imscp_v1p1.xsd http://www.imsglobal.org/
|
} |
} |
</script> |
</script> |
|; |
|; |
#FIXME need a <form back here for indiviaual red toggling |
$discussion.='<form name="readchoices" method="post" action="/adm/feedback?chgreads='.$ressymb.'" ><table bgcolor="#AAAAAA" cellpadding="2" cellspacing="2" border="0">'; |
$discussion.='<form><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>'; |
if ($visible>2) { |
if ($visible>2) { |
$discussion.='<td align="left">'. |
$discussion.='<td align="left">'. |
'<a href="/adm/feedback?threadedon='.$ressymb; |
'<a href="/adm/feedback?cmd=threadedon&symb='.$ressymb; |
if ($newpostsflag) { |
if ($newpostsflag) { |
$discussion .= '&previous='.$prevread; |
$discussion .= '&previous='.$prevread; |
} |
} |
$discussion .='">'.&mt('Threaded View').'</a> '. |
$discussion .='">'.&mt('Threaded View').'</a> '. |
'<a href="/adm/feedback?threadedoff='.$ressymb; |
'<a href="/adm/feedback?cmd=threadedoff&symb='.$ressymb; |
if ($newpostsflag) { |
if ($newpostsflag) { |
$discussion .= '&previous='.$prevread; |
$discussion .= '&previous='.$prevread; |
} |
} |
$discussion .='">'.&mt('Chronological View').'</a> |
$discussion .='">'.&mt('Chronological View').'</a> |
<a href= "/adm/feedback?sortfilter='.$ressymb; |
<a href= "/adm/feedback?cmd=sortfilter&symb='.$ressymb; |
if ($newpostsflag) { |
if ($newpostsflag) { |
$discussion .= '&previous='.$prevread; |
$discussion .= '&previous='.$prevread; |
} |
} |
Line 386 imscp_v1p1.xsd http://www.imsglobal.org/
|
Line 384 imscp_v1p1.xsd http://www.imsglobal.org/
|
$discussion .= '">'.&mt('Export').'?</a> </td>'; |
$discussion .= '">'.&mt('Export').'?</a> </td>'; |
if ($newpostsflag) { |
if ($newpostsflag) { |
if (!$markondisp) { |
if (!$markondisp) { |
$discussion .='<td align="right"><a href="/adm/feedback?markread='.$ressymb.'">'.&mt('Mark NEW posts no longer new').'</a> '; |
$discussion .='<td align="right"><a href="/adm/feedback?markread=1&symb='.$ressymb.'">'.&mt('Mark NEW posts no longer new').'</a> '; |
} else { |
} else { |
$discussion .= '<td> </td>'; |
$discussion .= '<td> </td>'; |
} |
} |
Line 562 END
|
Line 560 END
|
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
<br /><br /> |
<br /><br /></form> |
</form> |
|
END |
END |
} |
} |
if ($outputtarget eq 'export') { |
if ($outputtarget eq 'export') { |
Line 1477 END
|
Line 1474 END
|
|
|
sub print_display_options { |
sub print_display_options { |
my ($r,$symb,$previous,$dispchgA,$dispchgB,$markchg,$toggchg,$feedurl) = @_; |
my ($r,$symb,$previous,$dispchgA,$dispchgB,$markchg,$toggchg,$feedurl) = @_; |
&dewrapper(\$feedurl); |
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
|
my $function = &Apache::loncommon::get_users_function(); |
my $function = &Apache::loncommon::get_users_function(); |
my $tabcolor = &Apache::loncommon::designparm($function.'.tabbg', |
my $tabcolor = &Apache::loncommon::designparm($function.'.tabbg', |
Line 1658 $lt{'sdpf'}<br/> $lt{'prca'} <ol><li>$l
|
Line 1656 $lt{'sdpf'}<br/> $lt{'prca'} <ol><li>$l
|
</table> |
</table> |
<br /> |
<br /> |
<br /> |
<br /> |
|
<input type="hidden" name="symb" value="$symb" /> |
<input type="hidden" name="previous" value="$previous" /> |
<input type="hidden" name="previous" value="$previous" /> |
<input type="hidden" name="$dispchgA" value=""/> |
<input type="hidden" name="$dispchgA" value=""/> |
<input type="hidden" name="$dispchgB" value=""/> |
<input type="hidden" name="$dispchgB" value=""/> |
Line 1676 END
|
Line 1675 END
|
sub print_sortfilter_options { |
sub print_sortfilter_options { |
my ($r,$symb,$previous,$feedurl) = @_; |
my ($r,$symb,$previous,$feedurl) = @_; |
|
|
&dewrapper(\$feedurl); |
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
|
my @sections = (); |
my @sections = (); |
my $section_sel = ''; |
my $section_sel = ''; |
my $numsections = 0; |
my $numsections = 0; |
Line 1999 sub redirect_back {
|
Line 2000 sub redirect_back {
|
my $qrystr = ''; |
my $qrystr = ''; |
my $prevtag = ''; |
my $prevtag = ''; |
|
|
|
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
|
&dewrapper(\$feedurl); |
&dewrapper(\$feedurl); |
if ($feedurl=~/^\/adm\//) { $feedurl.='?register=1' }; |
if ($feedurl=~/^\/adm\//) { $feedurl.='?register=1' }; |
if ($previous > 0) { |
if ($previous > 0) { |
Line 2398 sub adddiscuss {
|
Line 2402 sub adddiscuss {
|
|
|
sub show_preview { |
sub show_preview { |
my $r=shift; |
my $r=shift; |
|
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
my $message=&clear_out_html($ENV{'form.comment'}); |
my $message=&clear_out_html($ENV{'form.comment'}); |
$message=~s/\n/\<br \/\>/g; |
$message=~s/\n/\<br \/\>/g; |
$message=&Apache::lonspeller::markeduptext($message); |
$message=&Apache::lonspeller::markeduptext($message); |
Line 2731 sub handler {
|
Line 2737 sub handler {
|
# --------------------------- Get query string for limited number of parameters |
# --------------------------- Get query string for limited number of parameters |
|
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['hide','unhide','deldisc','postdata','preview','replydisc','editdisc','threadedon','threadedoff','onlyunread','allposts','onlyunmark','previous','markread','markonread','markondisp','toggoff','toggon','modifydisp','changes','navtime','navmaps','navurl','sortfilter','sortposts','applysort','rolefilter','statusfilter','sectionpick','posterlist','userpick','attach','origpage','currnewattach','deloldattach','keepold','allversions','export']); |
['hide','unhide','deldisc','postdata','preview','replydisc','editdisc','cmd','symb','onlyunread','allposts','onlyunmark','previous','markread','markonread','markondisp','toggoff','toggon','modifydisp','changes','navtime','navmaps','navurl','sortposts','applysort','rolefilter','statusfilter','sectionpick','posterlist','userpick','attach','origpage','currnewattach','deloldattach','keepold','allversions','export']); |
if ($ENV{'form.discsymb'}) { |
if ($ENV{'form.discsymb'}) { |
my ($symb,$feedurl) = &get_feedurl_and_clean_symb($ENV{'form.discsymb'}); |
my ($symb,$feedurl) = &get_feedurl_and_clean_symb($ENV{'form.discsymb'}); |
my $readkey = $symb.'_read'; |
my $readkey = $symb.'_read'; |
Line 2754 sub handler {
|
Line 2760 sub handler {
|
&Apache::lonnet::put('nohist_'.$ENV{'request.course.id'}.'_discuss', |
&Apache::lonnet::put('nohist_'.$ENV{'request.course.id'}.'_discuss', |
\%readinghash,$ENV{'user.domain'},$ENV{'user.name'}); |
\%readinghash,$ENV{'user.domain'},$ENV{'user.name'}); |
} |
} |
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
&redirect_back($r,$feedurl,&mt('Marked postings read/unread').'<br />', |
&redirect_back($r,$feedurl,&mt('Marked postings read/unread').'<br />', |
'0','0','',$ENV{'form.previous'},'','','',); |
'0','0','',$ENV{'form.previous'},'','','',); |
return OK; |
return OK; |
Line 2795 END
|
Line 2799 END
|
return OK; |
return OK; |
} |
} |
if ($ENV{'form.posterlist'}) { |
if ($ENV{'form.posterlist'}) { |
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.applysort'}); |
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.applysort'}); |
&print_showposters($r,$symb,$ENV{'form.previous'},$feedurl, |
&print_showposters($r,$symb,$ENV{'form.previous'},$feedurl, |
$ENV{'form.sortposts'}); |
$ENV{'form.sortposts'}); |
return OK; |
return OK; |
} |
} |
if ($ENV{'form.userpick'}) { |
if ($ENV{'form.userpick'}) { |
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
my @posters = &Apache::loncommon::get_env_multiple('form.stuinfo'); |
my @posters = &Apache::loncommon::get_env_multiple('form.stuinfo'); |
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.userpick'}); |
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.userpick'}); |
my $numpicks = @posters; |
my $numpicks = @posters; |
Line 2818 END
|
Line 2818 END
|
return OK; |
return OK; |
} |
} |
if ($ENV{'form.applysort'}) { |
if ($ENV{'form.applysort'}) { |
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.applysort'}); |
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.applysort'}); |
&redirect_back($r,$feedurl,&mt('Changed sort/filter').'<br />','0','0', |
&redirect_back($r,$feedurl,&mt('Changed sort/filter').'<br />','0','0', |
'',$ENV{'form.previous'},$ENV{'form.sortposts'}, |
'',$ENV{'form.previous'},$ENV{'form.sortposts'}, |
$ENV{'form.rolefilter'},$ENV{'form.statusfilter'}, |
$ENV{'form.rolefilter'},$ENV{'form.statusfilter'}, |
$ENV{'form.secpick'}); |
$ENV{'form.secpick'}); |
return OK; |
return OK; |
} elsif ($ENV{'form.sortfilter'}) { |
} elsif ($ENV{'form.cmd'} eq 'sortfilter') { |
&Apache::loncommon::content_type($r,'text/html'); |
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.symb'}); |
$r->send_http_header; |
|
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.sortfilter'}); |
|
&print_sortfilter_options($r,$symb,$ENV{'form.previous'},$feedurl); |
&print_sortfilter_options($r,$symb,$ENV{'form.previous'},$feedurl); |
return OK; |
return OK; |
} elsif ($ENV{'form.navtime'}) { |
} elsif ($ENV{'form.navtime'}) { |
Line 2891 $textline
|
Line 2887 $textline
|
ENDREDIR |
ENDREDIR |
return OK; |
return OK; |
} elsif ($ENV{'form.modifydisp'}) { |
} elsif ($ENV{'form.modifydisp'}) { |
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.modifydisp'}); |
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.modifydisp'}); |
my ($dispchgA,$dispchgB,$markchg,$toggchg) = |
my ($dispchgA,$dispchgB,$markchg,$toggchg) = |
split(/_/,$ENV{'form.changes'}); |
split(/_/,$ENV{'form.changes'}); |
Line 2902 ENDREDIR
|
Line 2896 ENDREDIR
|
} elsif ($ENV{'form.markondisp'} || $ENV{'form.markonread'} || |
} elsif ($ENV{'form.markondisp'} || $ENV{'form.markonread'} || |
$ENV{'form.allposts'} || $ENV{'form.onlyunread'} || |
$ENV{'form.allposts'} || $ENV{'form.onlyunread'} || |
$ENV{'form.onlyunmark'} || $ENV{'form.toggoff'} || |
$ENV{'form.onlyunmark'} || $ENV{'form.toggoff'} || |
$ENV{'form.toggon'} ) { |
$ENV{'form.toggon'} || $ENV{'form.markread'}) { |
&Apache::loncommon::content_type($r,'text/html'); |
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.symb'}); |
$r->send_http_header; |
my %discinfo; |
my $feedurl; |
|
if ( ($ENV{'form.toggoff'}) || ($ENV{'form.toggon'}) ) { |
|
# ------------------------ Modify setting for read/unread toggle for each post |
# ------------------------ Modify setting for read/unread toggle for each post |
my $symb=$ENV{'form.toggoff'}?$ENV{'form.toggoff'}:$ENV{'form.toggon'}; |
if ($ENV{'form.toggoff'}) { $discinfo{$symb.'_readtoggle'}=0; } |
($symb,$feedurl)=&get_feedurl_and_clean_symb($symb); |
if ($ENV{'form.toggon'}) { $discinfo{$symb.'_readtoggle'}=1; } |
my %discinfo; |
|
$discinfo{$symb.'_readtoggle'}=1; |
|
if ($ENV{'form.toggoff'}) { $discinfo{$symb.'_readtoggle'}=0; } |
|
&Apache::lonnet::put('nohist_'.$ENV{'request.course.id'}.'_discuss', |
|
\%discinfo,$ENV{'user.domain'},$ENV{'user.name'}); |
|
} |
|
if (($ENV{'form.markondisp'}) || ($ENV{'form.markonread'})) { |
|
# --------- Modify setting for identification of 'NEW' posts in this discussion |
# --------- Modify setting for identification of 'NEW' posts in this discussion |
my $symb=$ENV{'form.markondisp'}?$ENV{'form.markondisp'}:$ENV{'form.markonread'}; |
if ($ENV{'form.markondisp'}) { |
($symb,$feedurl)=&get_feedurl_and_clean_symb($symb); |
$discinfo{$symb.'_lastread'} = time; |
my %discinfo; |
$discinfo{$symb.'_markondisp'} = 1; |
my $lastkey = $symb.'_lastread'; |
} |
my $ondispkey = $symb.'_markondisp'; |
if ($ENV{'form.markonread'}) { |
if ($ENV{'form.markondisp'}) { |
if ( $ENV{'form.previous'} > 0 ) { |
$discinfo{$lastkey} = time; |
$discinfo{$symb.'_lastread'} = $ENV{'form.previous'}; |
$discinfo{$ondispkey} = 1; |
} |
} elsif ($ENV{'form.markonread'}) { |
$discinfo{$symb.'_markondisp'} = 0; |
if ( $ENV{'form.previous'} > 0 ) { |
|
$discinfo{$lastkey} = $ENV{'form.previous'}; |
|
} |
|
$discinfo{$ondispkey} = 0; |
|
} |
|
&Apache::lonnet::put('nohist_'.$ENV{'request.course.id'}.'_discuss', |
|
\%discinfo,$ENV{'user.domain'},$ENV{'user.name'}); |
|
} |
} |
if ($ENV{'form.allposts'} || $ENV{'form.onlyunread'} || |
|
$ENV{'form.onlyunmark'}) { |
|
# --------------------------------- Modify display setting for this discussion |
# --------------------------------- Modify display setting for this discussion |
my $symb; |
if ($ENV{'form.allposts'}) { |
if ($ENV{'form.allposts'}) { |
$discinfo{$symb.'_showonlyunread'} = 0; |
$symb = $ENV{'form.allposts'}; |
$discinfo{$symb.'_showonlyunmark'} = 0; |
} elsif ($ENV{'form.onlyunread'}) { |
|
$symb = $ENV{'form.onlyunread'}; |
|
} else { |
|
$symb = $ENV{'form.onlyunmark'}; |
|
} |
|
($symb,$feedurl)=&get_feedurl_and_clean_symb($symb); |
|
my %discinfo; |
|
if ($ENV{'form.allposts'}) { |
|
$discinfo{$symb.'_showonlyunread'} = 0; |
|
$discinfo{$symb.'_showonlyunmark'} = 0; |
|
} elsif ($ENV{'form.onlyunread'}) { |
|
$discinfo{$symb.'_showonlyunread'} = 1; |
|
} else { |
|
$discinfo{$symb.'_showonlyunmark'} = 1; |
|
} |
|
&Apache::lonnet::put('nohist_'.$ENV{'request.course.id'}.'_discuss', |
|
\%discinfo,$ENV{'user.domain'},$ENV{'user.name'}); |
|
} |
} |
|
if ($ENV{'form.onlyunread'}) { $discinfo{$symb.'_showonlyunread'} = 1; } |
|
if ($ENV{'form.onlyunmark'}) { $discinfo{$symb.'_showonlyunmark'} = 1; } |
|
# ----------------------------------------------------- Mark new posts not NEW |
|
if ($ENV{'form.markread'}) { $discinfo{$symb.'_lastread'} = time; } |
|
&Apache::lonnet::put('nohist_'.$ENV{'request.course.id'}.'_discuss', |
|
\%discinfo,$ENV{'user.domain'},$ENV{'user.name'}); |
my $previous=$ENV{'form.previous'}; |
my $previous=$ENV{'form.previous'}; |
if ($ENV{'form.markondisp'}) { $previous=undef; } |
if ($ENV{'form.markondisp'}) { $previous=undef; } |
&redirect_back($r,$feedurl,&mt('Changed display status').'<br />', |
&redirect_back($r,$feedurl,&mt('Changed display status').'<br />', |
'0','0','',$previous); |
'0','0','',$previous); |
return OK; |
return OK; |
} elsif ($ENV{'form.markread'}) { |
|
# ----------------------------------------------------- Mark new posts not NEW |
|
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.markread'}); |
|
&Apache::lonnet::logthis("\n last read w symb ".$symb); |
|
my %discinfo; |
|
$discinfo{$symb.'_lastread'} = time; |
|
&Apache::lonnet::put('nohist_'.$ENV{'request.course.id'}.'_discuss', |
|
\%discinfo,$ENV{'user.domain'},$ENV{'user.name'}); |
|
&redirect_back($r,$feedurl,&mt('Changed reading status').'<br />', |
|
'0','0'); |
|
return OK; |
|
} elsif (($ENV{'form.hide'}) || ($ENV{'form.unhide'})) { |
} elsif (($ENV{'form.hide'}) || ($ENV{'form.unhide'})) { |
# ----------------------------------------------------------------- Hide/unhide |
# ----------------------------------------------------------------- Hide/unhide |
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
|
|
my $entry=$ENV{'form.hide'}?$ENV{'form.hide'}:$ENV{'form.unhide'}; |
my $entry=$ENV{'form.hide'}?$ENV{'form.hide'}:$ENV{'form.unhide'}; |
my ($symb,$idx)=split(/\:\:\:/,$entry); |
my ($symb,$idx)=split(/\:\:\:/,$entry); |
($symb,my $feedurl)=&get_feedurl_and_clean_symb($symb); |
($symb,my $feedurl)=&get_feedurl_and_clean_symb($symb); |
Line 3019 ENDREDIR
|
Line 2968 ENDREDIR
|
|
|
&redirect_back($r,$feedurl,&mt('Changed discussion status').'<br />', |
&redirect_back($r,$feedurl,&mt('Changed discussion status').'<br />', |
'0','0','',$ENV{'form.previous'}); |
'0','0','',$ENV{'form.previous'}); |
} elsif (($ENV{'form.threadedon'}) || ($ENV{'form.threadedoff'})) { |
return OK; |
&Apache::loncommon::content_type($r,'text/html'); |
} elsif ($ENV{'form.cmd'}=~/^(threadedoff|threadedon)$/) { |
$r->send_http_header; |
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.symb'}); |
my $symb; |
if ($ENV{'form.cmd'} eq 'threadedon') { |
if ($ENV{'form.threadedon'}) { |
|
$symb=$ENV{'form.threadedon'}; |
|
&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 { |
} else { |
$symb=$ENV{'form.threadedoff'}; |
|
&Apache::lonnet::del('environment',['threadeddiscussion']); |
&Apache::lonnet::del('environment',['threadeddiscussion']); |
&Apache::lonnet::delenv('environment\.threadeddiscussion'); |
&Apache::lonnet::delenv('environment\.threadeddiscussion'); |
} |
} |
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($symb); |
|
&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'}); |
'0','0','',$ENV{'form.previous'}); |
|
return OK; |
} elsif ($ENV{'form.deldisc'}) { |
} elsif ($ENV{'form.deldisc'}) { |
# --------------------------------------------------------------- Hide for good |
# --------------------------------------------------------------- Hide for good |
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
|
|
my ($symb,$idx)=split(/\:\:\:/,$ENV{'form.deldisc'}); |
my ($symb,$idx)=split(/\:\:\:/,$ENV{'form.deldisc'}); |
($symb,my $feedurl)=&get_feedurl_and_clean_symb($symb); |
($symb,my $feedurl)=&get_feedurl_and_clean_symb($symb); |
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'}); |
my %newhash=('deleted' => $contrib{'deleted'}.".$idx."); |
my %newhash=('deleted' => $contrib{'deleted'}.".$idx."); |
&Apache::lonnet::store(\%newhash,$symb,$ENV{'request.course.id'}, |
&Apache::lonnet::store(\%newhash,$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'}); |
&redirect_back($r,$feedurl,&mt('Changed discussion status').'<br />', |
&redirect_back($r,$feedurl,&mt('Changed discussion status').'<br />', |
'0','0','',$ENV{'form.previous'}); |
'0','0','',$ENV{'form.previous'}); |
|
return OK; |
} elsif ($ENV{'form.preview'}) { |
} elsif ($ENV{'form.preview'}) { |
# -------------------------------------------------------- User wants a preview |
# -------------------------------------------------------- User wants a preview |
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
&show_preview($r); |
&show_preview($r); |
|
return OK; |
} elsif ($ENV{'form.attach'}) { |
} elsif ($ENV{'form.attach'}) { |
# -------------------------------------------------------- Work on attachments |
# -------------------------------------------------------- Work on attachments |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
Line 3081 ENDREDIR
|
Line 3024 ENDREDIR
|
} |
} |
&modify_attachments($r,\@currnewattach,\@currdelold,$symb,$idx, |
&modify_attachments($r,\@currnewattach,\@currdelold,$symb,$idx, |
$attachmenturls); |
$attachmenturls); |
|
return OK; |
} elsif ($ENV{'form.export'}) { |
} elsif ($ENV{'form.export'}) { |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
Line 3096 ENDREDIR
|
Line 3040 ENDREDIR
|
my $bodytag=&Apache::loncommon::bodytag('Resource Feedback and Discussion'); |
my $bodytag=&Apache::loncommon::bodytag('Resource Feedback and Discussion'); |
$r->print($bodytag.$discussion); |
$r->print($bodytag.$discussion); |
return OK; |
return OK; |
#FIXME deleted CHGREADS needs to be readded |
|
} else { |
} else { |
# ------------------------------------------------------------- Normal feedback |
# ------------------------------------------------------------- Normal feedback |
my $feedurl=$ENV{'form.postdata'}; |
my $feedurl=$ENV{'form.postdata'}; |
Line 3141 ENDREDIR
|
Line 3084 ENDREDIR
|
return OK; |
return OK; |
} |
} |
# Go ahead with feedback, no ambiguous reference |
# Go ahead with feedback, no ambiguous reference |
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
|
|
unless ( |
unless ( |
( |
( |
($feedurl=~m:^/res:) && ($feedurl!~m:^/res/adm:) |
($feedurl=~m:^/res:) && ($feedurl!~m:^/res/adm:) |
Line 3153 ENDREDIR
|
Line 3093 ENDREDIR
|
|| |
|| |
($ENV{'request.course.id'} && ($symb=~/^bulletin\_\_\_/)) |
($ENV{'request.course.id'} && ($symb=~/^bulletin\_\_\_/)) |
) { |
) { |
|
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
# Unable to give feedback |
# Unable to give feedback |
&no_redirect_back($r,$feedurl); |
&no_redirect_back($r,$feedurl); |
} |
} |
# --------------------------------------------------- Print login screen header |
# --------------------------------------------------- Print login screen header |
unless ($ENV{'form.sendit'}) { |
unless ($ENV{'form.sendit'}) { |
|
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
my $options=&screen_header($feedurl); |
my $options=&screen_header($feedurl); |
if ($options) { |
if ($options) { |
&mail_screen($r,$feedurl,$options); |
&mail_screen($r,$feedurl,$options); |