version 1.185, 2006/03/15 22:06:08
|
version 1.186, 2006/03/19 21:43:21
|
Line 1303 sub mail_screen {
|
Line 1303 sub mail_screen {
|
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']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['subject','comment','currnewattach','addnewattach','deloldattach','delnewattach','timestamp','idx','anondiscuss','discuss','blog']); |
} |
} |
my $bodytag=&Apache::loncommon::bodytag('Resource Feedback and Discussion', |
|
'','onLoad="window.focus();setposttype();"'); |
|
my $title=&Apache::lonnet::gettitle($feedurl); |
my $title=&Apache::lonnet::gettitle($feedurl); |
if (!$title) { $title = $feedurl; } |
if (!$title) { $title = $feedurl; } |
my $quote=''; |
my $quote=''; |
Line 1442 END
|
Line 1441 END
|
&process_attachments(\@currnewattach,\@currdelold,\@keepold); |
&process_attachments(\@currnewattach,\@currdelold,\@keepold); |
} |
} |
my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(); |
my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(); |
my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders(); |
|
my $send=&mt('Send'); |
my $send=&mt('Send'); |
my $html=&Apache::lonxml::xmlbegin(); |
my $js= <<END; |
$r->print(<<END); |
|
$html |
|
<head> |
|
<title>The LearningOnline Network with CAPA</title> |
|
<meta http-equiv="pragma" content="no-cache"></meta> |
|
$htmlheader |
|
<script type="text/javascript"> |
<script type="text/javascript"> |
//<!-- |
//<!-- |
function gosubmit() { |
function gosubmit() { |
Line 1504 $htmlheader
|
Line 1496 $htmlheader
|
$anonscript |
$anonscript |
//--> |
//--> |
</script> |
</script> |
</head> |
END |
$bodytag |
|
|
my $onload = 'onLoad="window.focus();setposttype();"'; |
|
my $start_page= |
|
&Apache::loncommon::start_page('Resource Feedback and Discussion',$js, |
|
{'add_entries' => $onload}); |
|
|
|
$r->print(<<END); |
|
$start_page |
<h2><tt>$title</tt></h2> |
<h2><tt>$title</tt></h2> |
<form action="/adm/feedback" method="post" name="mailform" |
<form action="/adm/feedback" method="post" name="mailform" |
enctype="multipart/form-data"> |
enctype="multipart/form-data"> |
Line 1602 END
|
Line 1601 END
|
} |
} |
$r->print(&generate_preview_button(). |
$r->print(&generate_preview_button(). |
&Apache::lonhtmlcommon::htmlareaselectactive('comment'). |
&Apache::lonhtmlcommon::htmlareaselectactive('comment'). |
'</body></html>'); |
&Apache::loncommon::end_page()); |
|
|
} |
} |
|
|
sub print_display_options { |
sub print_display_options { |
Line 1978 sub print_showposters {
|
Line 1978 sub print_showposters {
|
$env{'course.'.$env{'request.course.id'}.'.num'}); |
$env{'course.'.$env{'request.course.id'}.'.num'}); |
my %namesort = (); |
my %namesort = (); |
my %postcounts = (); |
my %postcounts = (); |
my %lt=&Apache::lonlocal::texthash( |
|
'diso' => 'Discussion filtering options', |
|
); |
|
my $bodytag=&Apache::loncommon::bodytag('Discussion options', |
|
'',''); |
|
if ($contrib{'version'}) { |
if ($contrib{'version'}) { |
for (my $idx=1;$idx<=$contrib{'version'};$idx++) { |
for (my $idx=1;$idx<=$contrib{'version'};$idx++) { |
my $hidden=($contrib{'hidden'}=~/\.$idx\./); |
my $hidden=($contrib{'hidden'}=~/\.$idx\./); |
Line 2014 sub print_showposters {
|
Line 2010 sub print_showposters {
|
} |
} |
} |
} |
} |
} |
my $html=&Apache::lonxml::xmlbegin(); |
|
|
my $start_page = &Apache::loncommon::start_page('Discussion options'); |
|
|
$r->print(<<END); |
$r->print(<<END); |
$html |
$start_page |
<head> |
|
<title>$lt{'diso'}</title> |
|
<meta http-equiv="pragma" content="no-cache" /> |
|
</head> |
|
$bodytag |
|
<form name="pickpostersform" method="post"> |
<form name="pickpostersform" method="post"> |
<table border="0"> |
<table border="0"> |
<tr> |
<tr> |
Line 2048 END
|
Line 2041 END
|
} |
} |
} |
} |
} |
} |
|
|
|
my $end_page = &Apache::loncommon::end_page(); |
$r->print(<<END); |
$r->print(<<END); |
</table> |
</table> |
</td> |
</td> |
Line 2058 END
|
Line 2053 END
|
<input type="hidden" name="userpick" value="$symb" /> |
<input type="hidden" name="userpick" value="$symb" /> |
<input type="button" name="store" value="Display posts" onClick="javascript:document.pickpostersform.submit()" /> |
<input type="button" name="store" value="Display posts" onClick="javascript:document.pickpostersform.submit()" /> |
</form> |
</form> |
</body> |
$end_page |
</html> |
|
END |
END |
} |
} |
|
|
Line 2067 sub get_post_versions {
|
Line 2061 sub get_post_versions {
|
my ($versions,$incoming,$htmldecode,$numver) = @_; |
my ($versions,$incoming,$htmldecode,$numver) = @_; |
if ($incoming =~ /^<version num="0">/) { |
if ($incoming =~ /^<version num="0">/) { |
my $p = HTML::LCParser->new(\$incoming); |
my $p = HTML::LCParser->new(\$incoming); |
my $done = 0; |
my $done = 0; |
|
|
while ( (my $token = $p->get_tag("version")) && (!$done)) { |
while ( (my $token = $p->get_tag("version")) && (!$done)) { |
my $num = $token->[1]{num}; |
my $num = $token->[1]{num}; |
my $text = $p->get_text("/version"); |
my $text = $p->get_text("/version"); |
Line 2128 sub fail_redirect {
|
Line 2123 sub fail_redirect {
|
my ($r,$feedurl) = @_; |
my ($r,$feedurl) = @_; |
if ($feedurl=~/^\/adm\//) { $feedurl.='?register=1' }; |
if ($feedurl=~/^\/adm\//) { $feedurl.='?register=1' }; |
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif'); |
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif'); |
my $html=&Apache::lonxml::xmlbegin(); |
$r->print(&Apache::loncommon::start_page('Feedback not sent',undef, |
$r->print (<<ENDFAILREDIR); |
{'redirect' => [2,$feedurl], |
$html |
'only_body' => 1,})); |
<head> |
$r->print(<<ENDFAILREDIR); |
<title>Feedback not sent</title> |
|
<meta http-equiv="pragma" content="no-cache" /> |
|
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" /> |
|
</head> |
|
<body bgcolor="#FFFFFF"> |
|
<img align="right" src="$logo" /> |
<img align="right" src="$logo" /> |
<b>Sorry, no recipients ...</b> |
<b>Sorry, no recipients ...</b> |
<br /><a href="$feedurl">Continue</a> |
<br /><a href="$feedurl">Continue</a> |
</body> |
|
</html> |
|
ENDFAILREDIR |
ENDFAILREDIR |
|
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
sub redirect_back { |
sub redirect_back { |
Line 2216 sub redirect_back {
|
Line 2205 sub redirect_back {
|
} |
} |
$feedurl=&Apache::lonenc::check_encrypt($feedurl); |
$feedurl=&Apache::lonenc::check_encrypt($feedurl); |
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif'); |
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif'); |
my $html=&Apache::lonxml::xmlbegin(); |
my $onload = 'onLoad=\'if (window.name!="loncapaclient") { this.document.reldt.submit(); self.window.close(); }\''; |
$r->print (<<ENDREDIR); |
my $start_page= |
$html |
&Apache::loncommon::start_page('New posts marked as read',undef, |
<head> |
{'redirect' => [2,$feedurl], |
<title>Feedback sent</title> |
'only_body' => 1, |
<meta http-equiv="pragma" content="no-cache" /> |
'add_entries' => $onload}); |
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" /> |
my $end_page = &Apache::loncommon::end_page(); |
</head> |
|
<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { this.document.reldt.submit(); self.window.close(); }'> |
$r->print(<<ENDREDIR); |
|
$start_page |
<img align="right" src="$logo" /> |
<img align="right" src="$logo" /> |
$typestyle |
$typestyle |
<b>Sent $sendsomething message(s), and $sendposts post(s).</b> |
<b>Sent $sendsomething message(s), and $sendposts post(s).</b> |
Line 2239 $sectag
|
Line 2229 $sectag
|
$userpicktag |
$userpicktag |
</form> |
</form> |
<br /><a href="$feedurl">Continue</a> |
<br /><a href="$feedurl">Continue</a> |
</body> |
$end_page |
</html> |
|
ENDREDIR |
ENDREDIR |
} |
} |
|
|
Line 3125 END
|
Line 3114 END
|
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif'); |
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif'); |
my $html=&Apache::lonxml::xmlbegin(); |
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}); |
|
my $end_page = &Apache::loncommon::end_page(); |
$r->print (<<ENDREDIR); |
$r->print (<<ENDREDIR); |
$html |
$start_page |
<head> |
|
<title>New posts marked as read</title> |
|
<meta http-equiv="pragma" content="no-cache" /> |
|
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" /> |
|
</head> |
|
<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { this.document.reldt.submit(); self.window.close(); }'> |
|
<img align="right" src="$logo" /> |
<img align="right" src="$logo" /> |
$textline |
$textline |
<form name="reldt" action="$feedurl" target="loncapaclient"> |
<form name="reldt" action="$feedurl" target="loncapaclient"> |
</form> |
</form> |
<br /><a href="$feedurl">Continue</a> |
<br /><a href="$feedurl">Continue</a> |
</body> |
$end_page |
</html> |
|
ENDREDIR |
ENDREDIR |
return OK; |
return OK; |
} elsif ($env{'form.modifydisp'}) { |
} elsif ($env{'form.modifydisp'}) { |