[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm
www
lon-capa-cvs@mail.lon-capa.org
Mon, 03 Nov 2003 20:34:54 -0000
www Mon Nov 3 15:34:54 2003 EDT
Modified files:
/loncom/interface lonfeedback.pm
Log:
Just saving my work, not a good idea yet.
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.64 loncom/interface/lonfeedback.pm:1.65
--- loncom/interface/lonfeedback.pm:1.64 Mon Oct 20 20:22:23 2003
+++ loncom/interface/lonfeedback.pm Mon Nov 3 15:34:54 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.64 2003/10/21 00:22:23 www Exp $
+# $Id: lonfeedback.pm,v 1.65 2003/11/03 20:34:54 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -313,45 +313,46 @@
}
sub screen_header {
- my ($feedurl) = @_;
- my $msgoptions='';
- my $discussoptions='';
- if (($feedurl=~/^\/res\//) && ($feedurl!~/^\/res\/adm/)) {
- $msgoptions=
- '<p><input type="checkbox" name="author" /> '.
- &mt('Feedback to resource author').'</p>';
- }
- if (&feedback_available(1)) {
- $msgoptions.=
- '<br /><input type="checkbox" name="question" /> '.
- &mt('Question about resource content');
- }
- if (&feedback_available(0,1)) {
- $msgoptions.=
- '<br /><input type="checkbox" name="course" /> '.
- &mt('Question/Comment/Feedback about course content');
- }
- if (&feedback_available(0,0,1)) {
- $msgoptions.=
- '<br /><input type="checkbox" name="policy" /> '.
- &mt('Question/Comment/Feedback about course policy');
- }
-
- if ($ENV{'request.course.id'}) {
- if (&Apache::lonnet::allowed('pch',
- $ENV{'request.course.id'}.
- ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
- $discussoptions='<input type="checkbox" name="discuss" onClick="this.form.anondiscuss.checked=false;" /> '.
- &mt('Contribution to course discussion of resource');
- $discussoptions.='<br /><input type="checkbox" name="anondiscuss" onClick="this.form.discuss.checked=false;" /> '.
- &mt('Anonymous contribution to course discussion of resource').
- ' <i>('.&mt('name only visible to course faculty').')</i>';
+ my ($feedurl) = @_;
+ my $msgoptions='';
+ my $discussoptions='';
+ unless ($ENV{'form.replydisc'}) {
+ if (($feedurl=~/^\/res\//) && ($feedurl!~/^\/res\/adm/)) {
+ $msgoptions=
+ '<p><input type="checkbox" name="author" /> '.
+ &mt('Feedback to resource author').'</p>';
+ }
+ if (&feedback_available(1)) {
+ $msgoptions.=
+ '<br /><input type="checkbox" name="question" /> '.
+ &mt('Question about resource content');
+ }
+ if (&feedback_available(0,1)) {
+ $msgoptions.=
+ '<br /><input type="checkbox" name="course" /> '.
+ &mt('Question/Comment/Feedback about course content');
+ }
+ if (&feedback_available(0,0,1)) {
+ $msgoptions.=
+ '<br /><input type="checkbox" name="policy" /> '.
+ &mt('Question/Comment/Feedback about course policy');
+ }
+ }
+ if ($ENV{'request.course.id'}) {
+ if (&Apache::lonnet::allowed('pch',
+ $ENV{'request.course.id'}.
+ ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
+ $discussoptions='<input type="checkbox" name="discuss" onClick="this.form.anondiscuss.checked=false;" /> '.
+ &mt('Contribution to course discussion of resource');
+ $discussoptions.='<br /><input type="checkbox" name="anondiscuss" onClick="this.form.discuss.checked=false;" /> '.
+ &mt('Anonymous contribution to course discussion of resource').
+ ' <i>('.&mt('name only visible to course faculty').')</i>';
}
- }
- if ($msgoptions) { $msgoptions='<h2>'.&mt('Sending Messages').'</h2>'.$msgoptions; }
- if ($discussoptions) {
- $discussoptions='<h2>'.&mt('Discussion Contributions').'</h2>'.$discussoptions; }
- return $msgoptions.$discussoptions;
+ }
+ if ($msgoptions) { $msgoptions='<h2>'.&mt('Sending Messages').'</h2>'.$msgoptions; }
+ if ($discussoptions) {
+ $discussoptions='<h2>'.&mt('Discussion Contributions').'</h2>'.$discussoptions; }
+ return $msgoptions.$discussoptions;
}
sub resource_output {
@@ -522,6 +523,9 @@
$ENV{'environment.lastname'}.' '.
$ENV{'enrironment.generation'},
'attachmenturl'=> $attachmenturl);
+ if ($ENV{'form.replydisc'}) {
+ $contrib{'replyto'}=$ENV{'form.replydisc'};
+ }
if ($anon) {
$contrib{'anonymous'}='true';
}
@@ -563,10 +567,11 @@
}
sub generate_preview_button {
+ my $pre=&mt("Show Preview");
return(<<ENDPREVIEW);
<form name="preview" action="/adm/feedback?preview=1" method="post" target="preview">
<input type="hidden" name="comment" />
-<input type="button" value="Show Preview"
+<input type="button" value="$pre"
onClick="this.form.comment.value=document.mailform.comment.value;this.form.submit();" />
</form>
ENDPREVIEW
@@ -582,7 +587,7 @@
# --------------------------- Get query string for limited number of parameters
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
- ['hide','unhide','deldisc','postdata','preview']);
+ ['hide','unhide','deldisc','postdata','preview','replydisc']);
if (($ENV{'form.hide'}) || ($ENV{'form.unhide'})) {
# ----------------------------------------------------------------- Hide/unhide