--- loncom/interface/lonfeedback.pm 2004/07/09 23:05:52 1.99
+++ loncom/interface/lonfeedback.pm 2004/09/15 20:29:37 1.99.2.7
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.99 2004/07/09 23:05:52 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.99.2.7 2004/09/15 20:29:37 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -115,30 +115,33 @@ sub list_discussion {
}
# Get discussion display default settings for user
- my %userenv = &Apache::lonnet::get('environment',['discdisplay','discmarkread'],$ENV{'user.domain'},$ENV{'user.name'});
- my $discdisplay=$userenv{'discdisplay'};
- if ($discdisplay eq 'unread') {
+ if ($ENV{'environment.discdisplay'} eq 'unread') {
$showonlyunread = 1;
}
- my $discmarkread=$userenv{'discmarkread'};
- if ($discmarkread eq 'ondisp') {
+ if ($ENV{'environment.discmarkread'} eq 'ondisp') {
$markondisp = 1;
}
# Override user's default if user specified display setting for this discussion
if (defined($dischash{$ondispkey})) {
- $markondisp = $dischash{$ondispkey};
+ unless ($dischash{$showkey} eq '') {
+ $markondisp = $dischash{$ondispkey};
+ }
}
if ($markondisp) {
$discinfo{$lastkey} = time;
}
if (defined($dischash{$showkey})) {
- $showonlyunread = $dischash{$showkey};
+ unless ($dischash{$showkey} eq '') {
+ $showonlyunread = $dischash{$showkey};
+ }
}
if (defined($dischash{$visitkey})) {
- $visit = $dischash{$visitkey};
+ unless ($dischash{$showkey} eq '') {
+ $visit = $dischash{$visitkey};
+ }
}
$visit ++;
@@ -223,13 +226,14 @@ sub list_discussion {
if ($hidden) {
$message=''.$message.'';
}
- my $screenname=&Apache::loncommon::screenname(
- $contrib{$idx.':sendername'},
- $contrib{$idx.':senderdomain'});
- my $plainname=&Apache::loncommon::nickname(
- $contrib{$idx.':sendername'},
- $contrib{$idx.':senderdomain'});
-
+# my $screenname=&Apache::loncommon::screenname(
+# $contrib{$idx.':sendername'},
+# $contrib{$idx.':senderdomain'});
+# my $plainname=&Apache::loncommon::nickname(
+# $contrib{$idx.':sendername'},
+# $contrib{$idx.':senderdomain'});
+ ($$screenname,$$plainname)=($$contrib{$idx.':screenname'},
+ $$contrib{$idx.':plainname'});
my $sender=&mt('Anonymous');
if ((!$contrib{$idx.':anonymous'}) || ($seeid)) {
$sender=&Apache::loncommon::aboutmewrapper(
@@ -552,11 +556,6 @@ sub mail_screen {
}
my $latexHelp=&Apache::loncommon::helpLatexCheatsheet();
my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders();
- my $onsubmit='';
- if ((&Apache::lonhtmlcommon::htmlareabrowser()) &&
- (!&Apache::lonhtmlcommon::htmlareablocked())) {
- $onsubmit='document.mailform.onsubmit();';
- }
my $send=&mt('Send');
$r->print(<
@@ -600,7 +599,9 @@ $htmlheader
}
if (rec) {
- $onsubmit
+ if (typeof(document.mailform.onsubmit)=='function') {
+ document.mailform.onsubmit();
+ }
document.mailform.submit();
} else {
alert('Please check a feedback type.');
@@ -782,6 +783,7 @@ sub fail_redirect {
Sorry, no recipients ...
+
Continue