version 1.252, 2008/02/25 13:16:34
|
version 1.265, 2009/02/18 07:06:15
|
Line 625 END
|
Line 625 END
|
$filterchoice .= ' '.$role_types{$role}.','; |
$filterchoice .= ' '.$role_types{$role}.','; |
} |
} |
$filterchoice =~ s/,$//; |
$filterchoice =~ s/,$//; |
$filterchoice .= '<br />     '; |
$filterchoice .= '<br />'.(' ' x8); |
} |
} |
if ($statusfilter) { |
if ($statusfilter) { |
$filterchoice .= '<i>'.&mt('status').'</i>- '.$status_types{$statusfilter}; |
$filterchoice .= '<i>'.&mt('status').'</i>- '.$status_types{$statusfilter}; |
Line 794 sub action_links_bar {
|
Line 794 sub action_links_bar {
|
$discussion .= '&previous='.$prevread; |
$discussion .= '&previous='.$prevread; |
} |
} |
$discussion .= &group_args($group); |
$discussion .= &group_args($group); |
$discussion .='">'.&mt('Sorting/Filtering options').'</a>  '; |
$discussion .='">'.&mt('Sorting/Filtering options').'</a>'.(' ' x2); |
} else { |
} else { |
$discussion .= '<td align="left">'; |
$discussion .= '<td align="left">'; |
} |
} |
Line 1008 sub build_posting_display {
|
Line 1008 sub build_posting_display {
|
$plainname, |
$plainname, |
$contrib{$idx.':sendername'}, |
$contrib{$idx.':sendername'}, |
$contrib{$idx.':senderdomain'}).' ('. |
$contrib{$idx.':senderdomain'}).' ('. |
$contrib{$idx.':sendername'}.' at '. |
$contrib{$idx.':sendername'}.':'. |
$contrib{$idx.':senderdomain'}.')'; |
$contrib{$idx.':senderdomain'}.')'; |
if ($contrib{$idx.':anonymous'}) { |
if ($contrib{$idx.':anonymous'}) { |
$sender.=' <font color="red"><b>['.$$anonhash{$key}.']</b></font> '. |
$sender.=' <font color="red"><b>['.$$anonhash{$key}.']</b></font> '. |
Line 1240 sub build_posting_display {
|
Line 1240 sub build_posting_display {
|
$$newitem{$idx} = 1; |
$$newitem{$idx} = 1; |
$$discussionitems[$idx] .= ' |
$$discussionitems[$idx] .= ' |
<p><table border="0" width="100%"> |
<p><table border="0" width="100%"> |
<tr><td align="left"><font color="#FF0000"><b>NEW</b></font></td>'; |
<tr><td align="left"><font color="#FF0000"><b>'.&mt('NEW').'</b></font></td>'; |
} else { |
} else { |
$$newitem{$idx} = 0; |
$$newitem{$idx} = 0; |
$$discussionitems[$idx] .= ' |
$$discussionitems[$idx] .= ' |
Line 1472 sub replicate_attachments {
|
Line 1472 sub replicate_attachments {
|
} |
} |
|
|
sub mail_screen { |
sub mail_screen { |
my ($r,$feedurl,$options,$caller_symb) = @_; |
my ($r,$feedurl,$options,$caller_symb,$attachmaxtext) = @_; |
if (exists($env{'form.origpage'})) { |
if (exists($env{'form.origpage'})) { |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['subject','comment','currnewattach','addnewattach','deloldattach','delnewattach','timestamp','idx','anondiscuss','discuss','blog','group','ref']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['subject','comment','currnewattach','addnewattach','deloldattach','delnewattach','timestamp','idx','anondiscuss','discuss','blog','group','ref']); |
} |
} |
Line 1482 sub mail_screen {
|
Line 1482 sub mail_screen {
|
'myqu' => 'My question/comment/feedback:', |
'myqu' => 'My question/comment/feedback:', |
'title' => 'Title', |
'title' => 'Title', |
'reta' => 'Retained attachments', |
'reta' => 'Retained attachments', |
'atta' => 'Attachment (128 KB max size)', |
'atta' => 'Attachment', |
); |
); |
my $restitle = &get_resource_title($caller_symb,$feedurl); |
my $restitle = &get_resource_title($caller_symb,$feedurl); |
my $quote=''; |
my $quote=''; |
Line 1618 END
|
Line 1618 END
|
$comment = &unescape($env{'form.comment'}); |
$comment = &unescape($env{'form.comment'}); |
&process_attachments(\@currnewattach,\@currdelold,\@keepold); |
&process_attachments(\@currnewattach,\@currdelold,\@keepold); |
} |
} |
my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(); |
my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(undef,undef,1); |
my $send=&mt('Send'); |
my $send=&mt('Send'); |
my $alert = &mt('Please select a feedback type.'); |
my $alert = &mt('Please select a feedback type.'); |
my $js= <<END; |
my $js= <<END; |
Line 1721 END
|
Line 1721 END
|
} |
} |
} else { |
} else { |
$r->print(<<END); |
$r->print(<<END); |
$lt{'atta'}: <input type="file" name="attachment" /> |
$lt{'atta'} $attachmaxtext: <input type="file" name="attachment" /> |
</p> |
</p> |
END |
END |
} |
} |
Line 1795 sub print_display_options {
|
Line 1795 sub print_display_options {
|
'actn' => 'Action', |
'actn' => 'Action', |
'deff' => 'Default for all discussions', |
'deff' => 'Default for all discussions', |
'prca' => 'Preferences can be set for this discussion that determine ....', |
'prca' => 'Preferences can be set for this discussion that determine ....', |
'whpo' => 'Which posts are displayed when you display this bulletin board or resource, and', |
'whpo' => 'Which posts are displayed when you display this discussion board or resource, and', |
'unwh' => 'Under what circumstances posts are identified as "NEW", and', |
'unwh' => 'Under what circumstances posts are identified as "NEW", and', |
'wipa' => 'Whether individual posts can be marked as read/unread', |
'wipa' => 'Whether individual posts can be marked as read/unread', |
'allposts' => 'All posts', |
'allposts' => 'All posts', |
'unread' => 'New posts only', |
'unread' => 'New posts only', |
'unmark' => 'Posts not marked read', |
'unmark' => 'Posts not marked read', |
'ondisp' => 'Once displayed', |
'ondisp' => 'Once displayed', |
'onmark' => 'Once marked not NEW ', |
'onmark' => 'Once marked not NEW', |
'toggon' => 'Shown', |
'toggon' => 'Shown', |
'toggoff' => 'Not shown', |
'toggoff' => 'Not shown', |
'disa' => 'Posts displayed?', |
'disa' => 'Posts displayed?', |
Line 1960 END
|
Line 1960 END
|
<td>$lt{$disctogg}</td> |
<td>$lt{$disctogg}</td> |
<td><label><input type="checkbox" name="disctogg" onClick="discdispChk('2')" />$lt{'chgt'} "$toggchange"</label></td> |
<td><label><input type="checkbox" name="disctogg" onClick="discdispChk('2')" />$lt{'chgt'} "$toggchange"</label></td> |
END |
END |
|
my $save = &mt('Save'); |
$r->print(&Apache::loncommon::end_data_table_row()); |
$r->print(&Apache::loncommon::end_data_table_row()); |
$r->print(&Apache::loncommon::end_data_table()); |
$r->print(&Apache::loncommon::end_data_table()); |
$r->print(<<END); |
$r->print(<<END); |
Line 1971 END
|
Line 1972 END
|
<input type="hidden" name="$dispchgB" value=""/> |
<input type="hidden" name="$dispchgB" value=""/> |
<input type="hidden" name="$markchg" value=""/> |
<input type="hidden" name="$markchg" value=""/> |
<input type="hidden" name="$toggchg" value="" /> |
<input type="hidden" name="$toggchg" value="" /> |
<input type="button" name="sub" value="Save Changes" onClick="javascript:setDisp()" /> |
<input type="button" name="sub" value="$save" onClick="javascript:setDisp()" /> |
END |
END |
if (exists($env{'form.group'})) { |
if (exists($env{'form.group'})) { |
$r->print('<input type="hidden" name="group" value="'.$env{'form.group'}.'" />'); |
$r->print('<input type="hidden" name="group" value="'.$env{'form.group'}.'" />'); |
Line 2151 $start_page
|
Line 2152 $start_page
|
</td> |
</td> |
<td> </td> |
<td> </td> |
<td align="center" valign="top"> |
<td align="center" valign="top"> |
<select name="rolefilter" multiple="true" size="5"> |
<select name="rolefilter" multiple="multiple" size="5"> |
<option value="all">$role_types{'all'}</option> |
<option value="all">$role_types{'all'}</option> |
<option value="st">$role_types{'st'}</option> |
<option value="st">$role_types{'st'}</option> |
<option value="cc">$role_types{'cc'}</option> |
<option value="cc">$role_types{'cc'}</option> |
Line 2163 $start_page
|
Line 2164 $start_page
|
</td> |
</td> |
<td> </td> |
<td> </td> |
<td align="center" valign="top"> |
<td align="center" valign="top"> |
<select name="sectionpick" multiple="true" size="$numvisible"> |
<select name="sectionpick" multiple="multiple" size="$numvisible"> |
$section_sel |
$section_sel |
</select> |
</select> |
</td> |
</td> |
<td> </td> |
<td> </td> |
<td align="center" valign="top"> |
<td align="center" valign="top"> |
<select name="grouppick" multiple="true" size="$numvisible"> |
<select name="grouppick" multiple="multiple" size="$numvisible"> |
$group_sel |
$group_sel |
</select> |
</select> |
</td> |
</td> |
Line 2390 ENDFAILREDIR
|
Line 2391 ENDFAILREDIR
|
} |
} |
|
|
sub redirect_back { |
sub redirect_back { |
my ($r,$feedurl,$typestyle,$sendsomething,$sendposts,$blog,$status,$previous,$sort,$rolefilter,$statusfilter,$sectionpick,$grouppick,$numpicks,$group) = @_; |
my ($r,$feedurl,$typestyle,$sendsomething,$sendposts,$blog,$status,$previous,$sort,$rolefilter,$statusfilter,$sectionpick,$grouppick,$numpicks,$group,$toolarge) = @_; |
my $sorttag = ''; |
my $sorttag = ''; |
my $roletag = ''; |
my $roletag = ''; |
my $statustag = ''; |
my $statustag = ''; |
Line 2504 $start_page
|
Line 2505 $start_page
|
$typestyle |
$typestyle |
<b>Sent $sendsomething message(s), and $sendposts post(s).</b> |
<b>Sent $sendsomething message(s), and $sendposts post(s).</b> |
$blog |
$blog |
|
$toolarge |
<font color="red">$status</font> |
<font color="red">$status</font> |
<form name="reldt" action="$feedurl" target="loncapaclient"> |
<form name="reldt" action="$feedurl" target="loncapaclient"> |
$prevtag |
$prevtag |
Line 2887 sub show_preview {
|
Line 2889 sub show_preview {
|
|
|
my $end_page = &Apache::loncommon::end_page(); |
my $end_page = &Apache::loncommon::end_page(); |
|
|
$r->print($start_page.'<table border="2"><tr><td>'. |
$r->print($start_page |
'<b>'.&mt('Subject').':</b> '.$subject.'<br /><br />'. |
.'<h1>'.&mt('Preview').'</h1>' |
$message.'</td></tr></table>'.$end_page); |
.&Apache::lonhtmlcommon::start_pick_box() |
|
.&Apache::lonhtmlcommon::row_title(&mt('Subject')) |
|
.$subject |
|
.&Apache::lonhtmlcommon::row_closure() |
|
.&Apache::lonhtmlcommon::row_title(&mt('Message')) |
|
.$message |
|
.&Apache::lonhtmlcommon::row_closure(1) |
|
.&Apache::lonhtmlcommon::end_pick_box() |
|
.$end_page |
|
); |
} |
} |
|
|
|
|
Line 2931 ENDPREVIEW
|
Line 2942 ENDPREVIEW
|
} |
} |
|
|
sub modify_attachments { |
sub modify_attachments { |
my ($r,$currnewattach,$currdelold,$symb,$idx,$attachmenturls)=@_; |
my ($r,$currnewattach,$currdelold,$symb,$idx,$attachmenturls, |
|
$attachmaxtext,$toolarge)=@_; |
|
|
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
'subj' => 'Subject', |
'subj' => 'Subject', |
Line 2973 END
|
Line 2985 END
|
|
|
$r->print(<<END); |
$r->print(<<END); |
$start_page |
$start_page |
|
$toolarge |
<form name="modattachments" method="post" enctype="multipart/form-data" action="/adm/feedback?attach=$symb"> |
<form name="modattachments" method="post" enctype="multipart/form-data" action="/adm/feedback?attach=$symb"> |
<table border="2"> |
<br /> |
|
<table class="LC_data_table"> |
<tr> |
<tr> |
<td> |
<td colspan="2"> |
<b>Subject:</b> $subject</b><br /><br /> |
<b>Subject:</b> $subject</b><br /><br /> |
END |
END |
if ($idx) { |
if ($idx) { |
Line 3002 END
|
Line 3016 END
|
$r->print("<br />"); |
$r->print("<br />"); |
} |
} |
$r->print(<<END); |
$r->print(<<END); |
$lt{'adda'} <input type="file" name="addnewattach" /><input type="button" name="upload" value="Upload" onClick="this.form.submit()" /> |
</td></tr> |
|
<tr> |
|
<td> |
|
$lt{'adda'}</td><td><input type="file" name="addnewattach" /><input type="button" name="upload" value="Upload" onClick="this.form.submit()" /> |
</td> |
</td> |
</tr> |
</tr> |
|
<tr> |
|
<td colspan="2">$attachmaxtext</td> |
|
</tr> |
</table> |
</table> |
<input type="hidden" name="subject" value="$env{'form.subject'}" /> |
<input type="hidden" name="subject" value="$env{'form.subject'}" /> |
<input type="hidden" name="comment" value="$env{'form.comment'}" /> |
<input type="hidden" name="comment" value="$env{'form.comment'}" /> |
Line 3236 function setblogvalue() {
|
Line 3256 function setblogvalue() {
|
sub has_discussion { |
sub has_discussion { |
my $resourcesref = shift; |
my $resourcesref = shift; |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my @allres=$navmap->retrieveResources(); |
if (defined($navmap)) { |
foreach my $resource (@allres) { |
my @allres=$navmap->retrieveResources(); |
if ($resource->hasDiscussion()) { |
foreach my $resource (@allres) { |
my $ressymb = $resource->wrap_symb(); |
if ($resource->hasDiscussion()) { |
push(@{$resourcesref}, $ressymb); |
my $ressymb = $resource->wrap_symb(); |
|
if (ref($resourcesref) eq 'ARRAY') { |
|
push(@{$resourcesref}, $ressymb); |
|
} |
|
} |
} |
} |
|
} else { |
|
&Apache::lonnet::logthis('Has discussion check failed - could not create navmap object.'); |
} |
} |
return; |
return; |
} |
} |
Line 3287 sub handler {
|
Line 3313 sub handler {
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['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','groupick','posterlist','userpick','attach','origpage','currnewattach','deloldattach','keepold','allversions','export','sendmessageonly','group','ref']); |
['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','groupick','posterlist','userpick','attach','origpage','currnewattach','deloldattach','keepold','allversions','export','sendmessageonly','group','ref']); |
my $group = $env{'form.group'}; |
my $group = $env{'form.group'}; |
|
my %attachmax = ( |
|
text => '(128 KB max size)', |
|
num => 131072, |
|
); |
if ($env{'form.editdisc'}) { |
if ($env{'form.editdisc'}) { |
if (!(&editing_allowed($env{'form.editdisc'},$env{'form.group'}))) { |
if (!(&editing_allowed($env{'form.editdisc'},$env{'form.group'}))) { |
my $symb=(split(/\:\:\:/,$env{'form.editdisc'}))[0]; |
my $symb=(split(/\:\:\:/,$env{'form.editdisc'}))[0]; |
Line 3414 sub handler {
|
Line 3444 sub handler {
|
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
'mnpa' => 'Marked "New" posts as read in a total of', |
'mnpa' => 'Marked "New" posts as read in a total of', |
'robb' => 'resources/bulletin boards.', |
'robb' => 'resources/bulletin boards.', |
'twnp' => 'There are currently no resources or bulletin boards with unread discussion postings.' |
'twnp' => 'There are currently no resources or discussion boards with unread discussion postings.' |
); |
); |
foreach my $res (@resources) { |
foreach my $res (@resources) { |
my $ressymb=$res; |
my $ressymb=$res; |
Line 3557 ENDREDIR
|
Line 3587 ENDREDIR
|
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 '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 { |
&Apache::lonnet::del('environment',['threadeddiscussion']); |
&Apache::lonnet::del('environment',['threadeddiscussion']); |
&Apache::lonnet::delenv('environment\.threadeddiscussion'); |
&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, |
Line 3595 ENDREDIR
|
Line 3625 ENDREDIR
|
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['subject','comment','addnewattach','delnewattach','timestamp','numoldver','idx','discuss','blog']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['subject','comment','addnewattach','delnewattach','timestamp','numoldver','idx','discuss','blog']); |
my (@currnewattach,@currdelold,@keepold); |
my (@currnewattach,@currdelold,@keepold,$toolarge); |
&process_attachments(\@currnewattach,\@currdelold,\@keepold); |
&process_attachments(\@currnewattach,\@currdelold,\@keepold); |
if (exists($env{'form.addnewattach.filename'})) { |
if (exists($env{'form.addnewattach.filename'})) { |
unless (length($env{'form.addnewattach'})>131072) { |
if (length($env{'form.addnewattach'})<=$attachmax{'num'}) { |
my $subdir = 'feedback/'.$env{'form.timestamp'}; |
my $subdir = 'feedback/'.$env{'form.timestamp'}; |
my $newattachment=&Apache::lonnet::userfileupload('addnewattach',undef,$subdir); |
my $newattachment=&Apache::lonnet::userfileupload('addnewattach',undef,$subdir); |
push(@currnewattach, $newattachment); |
push(@currnewattach, $newattachment); |
|
} else { |
|
$toolarge = '<p><span class="LC_warning">'.&mt('Attachment not included - exceeded permitted length').'</span><br /></p>'; |
} |
} |
} |
} |
my $attachmenturls; |
my $attachmenturls; |
Line 3614 ENDREDIR
|
Line 3646 ENDREDIR
|
$attachmenturls = $contrib{$idx.':attachmenturl'}; |
$attachmenturls = $contrib{$idx.':attachmenturl'}; |
} |
} |
&modify_attachments($r,\@currnewattach,\@currdelold,$symb,$idx, |
&modify_attachments($r,\@currnewattach,\@currdelold,$symb,$idx, |
$attachmenturls); |
$attachmenturls,$attachmax{'text'},$toolarge); |
return OK; |
return OK; |
} elsif ($env{'form.export'}) { |
} elsif ($env{'form.export'}) { |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
Line 3637 ENDREDIR
|
Line 3669 ENDREDIR
|
} else { |
} else { |
# ------------------------------------------------------------- Normal feedback |
# ------------------------------------------------------------- Normal feedback |
my $feedurl=$env{'form.postdata'}; |
my $feedurl=$env{'form.postdata'}; |
$feedurl=~s/^http\:\/\///; |
$feedurl=~s/^https?\:\/\///; |
$feedurl=~s/^$ENV{'SERVER_NAME'}//; |
$feedurl=~s/^$ENV{'SERVER_NAME'}//; |
$feedurl=~s/^$ENV{'HTTP_HOST'}//; |
$feedurl=~s/^$ENV{'HTTP_HOST'}//; |
$feedurl=~s/\?.+$//; |
$feedurl=~s/\?.+$//; |
Line 3703 ENDREDIR
|
Line 3735 ENDREDIR
|
} |
} |
my $options=&screen_header($feedurl,$symb); |
my $options=&screen_header($feedurl,$symb); |
if ($options) { |
if ($options) { |
&mail_screen($r,$feedurl,$options,$symb); |
&mail_screen($r,$feedurl,$options,$symb,$attachmax{'text'}); |
} else { |
} else { |
&fail_redirect($r,$feedurl); |
&fail_redirect($r,$feedurl); |
} |
} |
Line 3720 ENDREDIR
|
Line 3752 ENDREDIR
|
my $usersaw=&resource_output($feedurl); |
my $usersaw=&resource_output($feedurl); |
|
|
# Get resource answer (need to allow student to view grades for this to work) |
# Get resource answer (need to allow student to view grades for this to work) |
&Apache::lonnet::appenv(('allowed.vgr'=>'F')); |
&Apache::lonnet::appenv({'allowed.vgr'=>'F'}); |
my $usersymb = &Apache::lonenc::check_encrypt($symb); |
my $usersymb = &Apache::lonenc::check_encrypt($symb); |
my $useranswer= |
my $useranswer= |
&Apache::loncommon::get_student_answers( |
&Apache::loncommon::get_student_answers( |
Line 3729 ENDREDIR
|
Line 3761 ENDREDIR
|
&Apache::lonnet::delenv('allowed.vgr'); |
&Apache::lonnet::delenv('allowed.vgr'); |
# Get attachments, if any, and not too large |
# Get attachments, if any, and not too large |
my $attachmenturl=''; |
my $attachmenturl=''; |
|
my $toolarge=''; |
if (($env{'form.origpage'}) || ($env{'form.editdisc'}) || |
if (($env{'form.origpage'}) || ($env{'form.editdisc'}) || |
($env{'form.replydisc'})) { |
($env{'form.replydisc'})) { |
my ($symb,$idx); |
my ($symb,$idx); |
Line 3747 ENDREDIR
|
Line 3780 ENDREDIR
|
$symb=~s|(bulletin___\d+___)adm/wrapper/|$1|; |
$symb=~s|(bulletin___\d+___)adm/wrapper/|$1|; |
$attachmenturl=&construct_attachmenturl(\@currnewattach,\@keepold,$symb,$idx); |
$attachmenturl=&construct_attachmenturl(\@currnewattach,\@keepold,$symb,$idx); |
} elsif ($env{'form.attachment.filename'}) { |
} elsif ($env{'form.attachment.filename'}) { |
unless (length($env{'form.attachment'})>131072) { |
if (length($env{'form.attachment'})<=$attachmax{'num'}) { |
$attachmenturl=&Apache::lonnet::userfileupload('attachment',undef,'feedback'); |
my $now = time; |
} |
my $subdir = 'feedback/'.$now; |
|
$attachmenturl=&Apache::lonnet::userfileupload('attachment',undef,$subdir); |
|
} else { |
|
$toolarge = '<p><span class="LC_warning">'.&mt('Attachment not included - exceeded permitted length').'</span><br /></p>'; |
|
} |
} |
} |
# Filter HTML out of message (could be nasty) |
# Filter HTML out of message (could be nasty) |
my $message=&clear_out_html($env{'form.comment'}); |
my $message=&clear_out_html($env{'form.comment'}); |
Line 3792 ENDREDIR
|
Line 3829 ENDREDIR
|
} |
} |
|
|
# Receipt screen and redirect back to where came from |
# Receipt screen and redirect back to where came from |
&redirect_back($r,$feedurl,$typestyle,$numsent,$numpost,$blog,$status,$env{'form.previous'},undef,undef,undef,undef,undef,undef,$group); |
&redirect_back($r,$feedurl,$typestyle,$numsent,$numpost,$blog,$status,$env{'form.previous'},undef,undef,undef,undef,undef,undef,$group,$toolarge); |
} |
} |
return OK; |
return OK; |
} |
} |
Line 3937 sub get_resource_title {
|
Line 3974 sub get_resource_title {
|
|
|
1; |
1; |
__END__ |
__END__ |
|
|
|
|
|
=pod |
|
|
|
=head1 NAME |
|
|
|
Apache::lonfeedback.pm |
|
|
|
=head1 SYNOPSIS |
|
|
|
Handles feedback from students to instructors and system administrators. |
|
|
|
Provides a screenshot of the current resource, as well as previous attempts if the resource was a homework. |
|
|
|
Used by lonmsg.pm. |
|
|
|
This is part of the LearningOnline Network with CAPA project |
|
described at http://www.lon-capa.org. |
|
|
|
=head1 OVERVIEW |
|
|
|
None |
|
|
|
=head1 SUBROUTINES |
|
|
|
=over |
|
|
|
=item discussion_open() |
|
|
|
=item discussion_visible() |
|
|
|
=item list_discussion() |
|
|
|
=item send_feedback_link() |
|
|
|
=item send_message_link() |
|
|
|
=item action_links_bar() |
|
|
|
=item postingform_display() |
|
|
|
=item build_posting_display |
|
|
|
=item filter_regexp() |
|
|
|
=item get_post_contents() |
|
|
|
=item replicate_attachments() |
|
|
|
=item mail_screen() |
|
|
|
=item print_display_options() |
|
|
|
=item print_sortfilter_options() |
|
|
|
=item print_showposters() |
|
|
|
=item get_post_versions() |
|
|
|
=item get_post_attachments() |
|
|
|
=item fail_redirect() |
|
|
|
=item redirect_back() |
|
|
|
=item no_redirect_back() |
|
|
|
=item screen_header() |
|
|
|
=item resource_output() |
|
|
|
=item clear_out_html() |
|
|
|
=item assemble_email() |
|
|
|
=item feedback_available() |
|
|
|
=item send_msg() |
|
|
|
=item adddiscuss() |
|
|
|
=item get_discussion_info() |
|
|
|
=item show_preview() |
|
|
|
=item newline_to_br() |
|
|
|
=item generate_preview_button() |
|
|
|
=item modify_attachments() |
|
|
|
=item process_attachments() |
|
|
|
=item generate_attachments_button() |
|
|
|
=item extract_attachments() |
|
|
|
=item construct_attachmenturl() |
|
|
|
=item add_blog_checkbox() |
|
|
|
=item has_discussion() |
|
|
|
=item sort_filter_names() |
|
|
|
=item handler() |
|
|
|
=item blocked_reply_or_edit() |
|
|
|
=item wrap_symb() |
|
|
|
=item dewrapper() |
|
|
|
=item get_feedurl() |
|
|
|
=item get_feedurl_and_clean_symb() |
|
|
|
=item editing_allowed() |
|
|
|
=item check_group_priv() |
|
|
|
=item group_args() |
|
|
|
=item get_resource_title() |
|
|
|
=back |
|
|
|
=cut |