';
}
@@ -1745,7 +1618,7 @@ END
$comment = &unescape($env{'form.comment'});
&process_attachments(\@currnewattach,\@currdelold,\@keepold);
}
- my $latexHelp=&Apache::loncommon::helpLatexCheatsheet();
+ my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(undef,undef,1);
my $send=&mt('Send');
my $alert = &mt('Please select a feedback type.');
my $js= <$lt{'myqu'}
$latexHelp
+
+
$lt{'title'}:
-
-
+
$section_sel
-
+
$group_sel
@@ -2602,7 +2477,8 @@ sub redirect_back {
}
my $grouptag;
if ($group ne '') {
- $grouptag = ''; my $refarg;
+ $grouptag = '';
+ my $refarg;
if (exists($env{'form.ref'})) {
$refarg = '&ref='.$env{'form.ref'};
$grouptag .= '';
@@ -2732,7 +2608,7 @@ sub screen_header {
}
}
}
- if ($msgoptions) { $msgoptions='
'.&mt('Sending Messages').'
'.$msgoptions; }
+ if ($msgoptions) { $msgoptions='
'.&mt('Sending Messages').'
'.$msgoptions; }
if ($discussoptions) {
$discussoptions='
'.&mt('Discussion Contributions').'
'.$discussoptions; }
return $msgoptions.$discussoptions;
@@ -3016,9 +2892,18 @@ sub show_preview {
my $end_page = &Apache::loncommon::end_page();
- $r->print($start_page.'
'.
- ''.&mt('Subject').': '.$subject.'
'.
- $message.'
'.$end_page);
+ $r->print($start_page
+ .'
'.&mt('Preview').'
'
+ .&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
+ );
}
@@ -3051,7 +2936,7 @@ sub generate_preview_button {
return(<
$end_page
END
@@ -3374,12 +3259,18 @@ function setblogvalue() {
sub has_discussion {
my $resourcesref = shift;
my $navmap = Apache::lonnavmaps::navmap->new();
- my @allres=$navmap->retrieveResources();
- foreach my $resource (@allres) {
- if ($resource->hasDiscussion()) {
- my $ressymb = $resource->wrap_symb();
- push(@{$resourcesref}, $ressymb);
+ if (defined($navmap)) {
+ my @allres=$navmap->retrieveResources();
+ foreach my $resource (@allres) {
+ if ($resource->hasDiscussion()) {
+ 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;
}
@@ -3426,7 +3317,7 @@ sub handler {
['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 %attachmax = (
- text => '(128 KB max size)',
+ text => &mt('(128 KB max size)'),
num => 131072,
);
if ($env{'form.editdisc'}) {
@@ -3556,7 +3447,7 @@ sub handler {
my %lt = &Apache::lonlocal::texthash(
'mnpa' => 'Marked "New" posts as read in a total of',
'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) {
my $ressymb=$res;
@@ -3702,7 +3593,7 @@ ENDREDIR
&Apache::lonnet::appenv({'environment.threadeddiscussion' => 'on'});
} else {
&Apache::lonnet::del('environment',['threadeddiscussion']);
- &Apache::lonnet::delenv('environment\.threadeddiscussion');
+ &Apache::lonnet::delenv('environment.threadeddiscussion');
}
&redirect_back($r,$feedurl,&mt('Changed discussion view mode').' ',
'0','0','','',$env{'form.previous'},undef,undef,undef,
@@ -3781,7 +3672,7 @@ ENDREDIR
} else {
# ------------------------------------------------------------- Normal feedback
my $feedurl=$env{'form.postdata'};
- $feedurl=~s/^http\:\/\///;
+ $feedurl=~s/^https?\:\/\///;
$feedurl=~s/^$ENV{'SERVER_NAME'}//;
$feedurl=~s/^$ENV{'HTTP_HOST'}//;
$feedurl=~s/\?.+$//;
@@ -4086,3 +3977,131 @@ sub get_resource_title {
1;
__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