--- loncom/interface/lonfeedback.pm 2006/03/23 22:39:51 1.188
+++ loncom/interface/lonfeedback.pm 2006/04/10 21:55:48 1.190
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.188 2006/03/23 22:39:51 albertel Exp $
+# $Id: lonfeedback.pm,v 1.190 2006/04/10 21:55:48 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -744,17 +744,22 @@ ENDDISCUSS
}
}
} else {
+ $discussion.='
';
if (&discussion_open($status) &&
&Apache::lonnet::allowed('pch',
$env{'request.course.id'}.
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
if ($outputtarget ne 'tex') {
- $discussion.='';
- }
+ &mt('Post Discussion').' ';
+ }
}
+ $discussion.=''.
+ &mt('Send Message').' |
';
}
return $discussion;
}
@@ -1498,10 +1503,10 @@ END
END
- my $onload = 'onLoad="window.focus();setposttype();"';
+ my %onload = ('onload' => 'window.focus();setposttype();');
my $start_page=
&Apache::loncommon::start_page('Resource Feedback and Discussion',$js,
- {'add_entries' => $onload});
+ {'add_entries' => \%onload});
$r->print(< "if (window.name!='loncapaclient') { this.document.reldt.submit(); self.window.close(); }");
my $start_page=
&Apache::loncommon::start_page('New posts marked as read',undef,
{'redirect' => [2,$feedurl],
'only_body' => 1,
- 'add_entries' => $onload});
+ 'add_entries' => \%onload});
my $end_page = &Apache::loncommon::end_page();
$r->print(< 1,
- 'add_entries' => 'onLoad=\'if (window.name!="loncapaclient") { self.window.close(); }\'');
+ 'add_entries' => {'onload' => "if (window.name!='loncapaclient') { self.window.close(); }"});
if ($feedurl !~ m{^/adm/feedback}) {
$body_options{'rediect'} = [2,$feedurl];
@@ -2284,7 +2289,7 @@ sub screen_header {
'';
}
}
- if ($env{'request.course.id'}) {
+ if (($env{'request.course.id'}) && (!$env{'form.sendmessageonly'})) {
if (&discussion_open(undef,$symb) &&
&Apache::lonnet::allowed('pch',
$env{'request.course.id'}.
@@ -2975,7 +2980,7 @@ sub handler {
# --------------------------- Get query string for limited number of parameters
&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','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','sendmessageonly']);
if ($env{'form.editdisc'}) {
if (!(&editing_allowed())) {
my $symb=(split(/\:\:\:/,$env{'form.editdisc'}))[0];
@@ -3107,12 +3112,12 @@ sub handler {
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif');
- my $onload = 'onLoad=\'if (window.name!="loncapaclient") { this.document.reldt.submit(); self.window.close(); }\'';
+ my %onload = ('onload' => "if (window.name!='loncapaclient') { this.document.reldt.submit(); self.window.close(); }");
my $start_page=
&Apache::loncommon::start_page('New posts marked as read',undef,
{'redirect' => [2,$feedurl],
'only_body' => 1,
- 'add_entries' => $onload});
+ 'add_entries' => \%onload});
my $end_page = &Apache::loncommon::end_page();
$r->print (<