version 1.186, 2006/03/19 21:43:21
|
version 1.187, 2006/03/21 18:37:25
|
Line 1253 END
|
Line 1253 END
|
} |
} |
} |
} |
if ($type eq 'allversions') { |
if ($type eq 'allversions') { |
$discussion.=('</ul></body></html>'); |
$discussion.='</ul>'; |
return $discussion; |
return $discussion; |
} else { |
} else { |
return; |
return; |
Line 1613 sub print_display_options {
|
Line 1613 sub print_display_options {
|
my $function = &Apache::loncommon::get_users_function(); |
my $function = &Apache::loncommon::get_users_function(); |
my $tabcolor = &Apache::loncommon::designparm($function.'.tabbg', |
my $tabcolor = &Apache::loncommon::designparm($function.'.tabbg', |
$env{'user.domain'}); |
$env{'user.domain'}); |
my $bodytag=&Apache::loncommon::bodytag('Discussion options', |
|
'',''); |
|
|
|
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
'dido' => 'Discussion display options', |
|
'pref' => 'Display Preference', |
'pref' => 'Display Preference', |
'curr' => 'Current setting ', |
'curr' => 'Current setting ', |
'actn' => 'Action', |
'actn' => 'Action', |
Line 1675 sub print_display_options {
|
Line 1672 sub print_display_options {
|
$currtogg = $lt{'toggon'}; |
$currtogg = $lt{'toggon'}; |
$disctogg = 'toggon'; |
$disctogg = 'toggon'; |
} |
} |
my $html=&Apache::lonxml::xmlbegin(); |
|
$r->print(<<END); |
my $js = <<END; |
$html |
<script type="text/javascript"> |
<head> |
|
<title>$lt{'dido'}</title> |
|
<meta http-equiv="pragma" content="no-cache" /> |
|
<script> |
|
function discdispChk(caller) { |
function discdispChk(caller) { |
var disctogg = '$toggchg' |
var disctogg = '$toggchg' |
if (caller == 0) { |
if (caller == 0) { |
Line 1748 function setDisp() {
|
Line 1741 function setDisp() {
|
} |
} |
} |
} |
</script> |
</script> |
</head> |
END |
$bodytag |
|
<form name="modifydisp" method="post" action="/adm/feedback"> |
|
|
my $start_page = |
|
&Apache::loncommon::start_page('Discussion display options',$js); |
|
my $end_page = |
|
&Apache::loncommon::end_page(); |
|
$r->print(<<END); |
|
<form name="modifydisp" method="POSTx" action="/adm/feedback"> |
$lt{'sdpf'}<br/> $lt{'prca'} <ol><li>$lt{'whpo'}</li><li>$lt{'unwh'}</li><li>$lt{'wipa'}</li></ol> |
$lt{'sdpf'}<br/> $lt{'prca'} <ol><li>$lt{'whpo'}</li><li>$lt{'unwh'}</li><li>$lt{'wipa'}</li></ol> |
<br /> |
<br /> |
<table border="0" cellpadding="0" cellspacing="0"> |
<table border="0" cellpadding="0" cellspacing="0"> |
Line 1800 $lt{'sdpf'}<br/> $lt{'prca'} <ol><li>$l
|
Line 1799 $lt{'sdpf'}<br/> $lt{'prca'} <ol><li>$l
|
<br /> |
<br /> |
<br /> |
<br /> |
</form> |
</form> |
</body> |
$end_page |
</html> |
|
END |
END |
return; |
return; |
} |
} |
Line 1838 sub print_sortfilter_options {
|
Line 1836 sub print_sortfilter_options {
|
my $function = &Apache::loncommon::get_users_function(); |
my $function = &Apache::loncommon::get_users_function(); |
my $tabcolor = &Apache::loncommon::designparm($function.'.tabbg', |
my $tabcolor = &Apache::loncommon::designparm($function.'.tabbg', |
$env{'user.domain'}); |
$env{'user.domain'}); |
my $bodytag=&Apache::loncommon::bodytag('Discussion options', |
|
'',''); |
|
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
'diso' => 'Discussion sorting and filtering options', |
|
'diop' => 'Display Options', |
'diop' => 'Display Options', |
'curr' => 'Current setting ', |
'curr' => 'Current setting ', |
'actn' => 'Action', |
'actn' => 'Action', |
Line 1858 sub print_sortfilter_options {
|
Line 1853 sub print_sortfilter_options {
|
my %role_types = (); |
my %role_types = (); |
my %status_types = (); |
my %status_types = (); |
&sort_filter_names(\%sort_types,\%role_types,\%status_types); |
&sort_filter_names(\%sort_types,\%role_types,\%status_types); |
my $html=&Apache::lonxml::xmlbegin(); |
|
$r->print(<<END); |
my $js = <<END; |
$html |
|
<head> |
|
<title>$lt{'diso'}</title> |
|
<meta http-equiv="pragma" content="no-cache" /> |
|
<script type="text/javascript"> |
<script type="text/javascript"> |
function verifyFilter() { |
function verifyFilter() { |
var rolenum = 0 |
var rolenum = 0 |
Line 1888 function verifyFilter() {
|
Line 1879 function verifyFilter() {
|
document.modifyshown.submit(); |
document.modifyshown.submit(); |
} |
} |
</script> |
</script> |
</head> |
END |
$bodytag |
|
<form name="modifyshown" method="post" action="/adm/feedback"> |
my $start_page= |
|
&Apache::loncommon::start_page('Discussion options',$js); |
|
my $end_page= |
|
&Apache::loncommon::end_page(); |
|
|
|
$r->print(<<END); |
|
$start_page |
|
<form name="modifyshown" method="POST" action="/adm/feedback"> |
<b>$lt{'diso'}</b><br/> $lt{'prca'} |
<b>$lt{'diso'}</b><br/> $lt{'prca'} |
<br /><br /> |
<br /><br /> |
<table border="0"> |
<table border="0"> |
Line 1955 $bodytag
|
Line 1953 $bodytag
|
<br /> |
<br /> |
<br /> |
<br /> |
</form> |
</form> |
</body> |
$end_page |
</html> |
|
END |
END |
} |
} |
|
|
Line 2129 sub fail_redirect {
|
Line 2126 sub fail_redirect {
|
$r->print(<<ENDFAILREDIR); |
$r->print(<<ENDFAILREDIR); |
<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> |
|
ENDFAILREDIR |
ENDFAILREDIR |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
Line 2228 $roletag
|
Line 2224 $roletag
|
$sectag |
$sectag |
$userpicktag |
$userpicktag |
</form> |
</form> |
<br /><a href="$feedurl">Continue</a> |
|
$end_page |
$end_page |
ENDREDIR |
ENDREDIR |
} |
} |
Line 2236 ENDREDIR
|
Line 2231 ENDREDIR
|
sub no_redirect_back { |
sub no_redirect_back { |
my ($r,$feedurl) = @_; |
my ($r,$feedurl) = @_; |
my $nofeed=&mt('Sorry, no feedback possible on this resource ...'); |
my $nofeed=&mt('Sorry, no feedback possible on this resource ...'); |
my $continue=&mt('Continue'); |
|
my $html=&Apache::lonxml::xmlbegin(); |
my %body_options = ('only_body' => 1, |
$r->print (<<ENDNOREDIR); |
'add_entries' => 'onLoad=\'if (window.name!="loncapaclient") { self.window.close(); }\''); |
$html |
|
<head> |
if ($feedurl !~ m{^/adm/feedback}) { |
<title>Feedback not sent</title> |
$body_options{'rediect'} = [2,$feedurl]; |
<meta http-equiv="pragma" content="no-cache" /> |
|
ENDNOREDIR |
|
|
|
if ($feedurl!~/^\/adm\/feedback/) { |
|
$r->print('<meta HTTP-EQUIV="Refresh" CONTENT="2; url='. |
|
&Apache::lonenc::check_encrypt($feedurl).'">'); |
|
} |
} |
|
my $start_page= |
|
&Apache::loncommon::start_page('Feedback not sent',undef, |
|
\%body_options); |
|
|
|
my $end_page = &Apache::loncommon::end_page(); |
|
|
$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'); |
$r->print (<<ENDNOREDIRTWO); |
$r->print (<<ENDNOREDIRTWO); |
Line 2256 ENDNOREDIR
|
Line 2251 ENDNOREDIR
|
<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { self.window.close(); }'> |
<body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { self.window.close(); }'> |
<img align="right" src="$logo" /> |
<img align="right" src="$logo" /> |
<b>$nofeed</b> |
<b>$nofeed</b> |
<br /><a href="$feedurl">$continue</a> |
<br /> |
</body> |
$end_page |
</html> |
|
ENDNOREDIRTWO |
ENDNOREDIRTWO |
} |
} |
|
|
Line 2607 sub adddiscuss {
|
Line 2601 sub adddiscuss {
|
# ----------------------------------------------------------- Preview function |
# ----------------------------------------------------------- Preview function |
|
|
sub show_preview { |
sub show_preview { |
my $r=shift; |
my ($r) = @_; |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
my $message=&clear_out_html($env{'form.comment'}); |
my $message=&clear_out_html($env{'form.comment'}); |
Line 2617 sub show_preview {
|
Line 2611 sub show_preview {
|
my $subject=&clear_out_html($env{'form.subject'}); |
my $subject=&clear_out_html($env{'form.subject'}); |
$subject=~s/\n/\<br \/\>/g; |
$subject=~s/\n/\<br \/\>/g; |
$subject=&Apache::lontexconvert::msgtexconverted($subject); |
$subject=&Apache::lontexconvert::msgtexconverted($subject); |
my $html=&Apache::lonxml::xmlbegin(); |
my $start_page= |
$r->print($html.'<head>'. |
&Apache::loncommon::start_page('Preview',undef, |
'</head><body><table border="2"><tr><td>'. |
{'only_body' => 1,}); |
|
|
|
my $end_page = &Apache::loncommon::end_page(); |
|
|
|
$r->print($start_page.'<table border="2"><tr><td>'. |
'<b>Subject:</b> '.$subject.'<br /><br />'. |
'<b>Subject:</b> '.$subject.'<br /><br />'. |
$message.'</td></tr></table></body></html>'); |
$message.'</td></tr></table>'.$end_page); |
} |
} |
|
|
|
|
Line 2669 sub modify_attachments {
|
Line 2667 sub modify_attachments {
|
$subject=&Apache::lontexconvert::msgtexconverted($subject); |
$subject=&Apache::lontexconvert::msgtexconverted($subject); |
my $timestamp=$env{'form.timestamp'}; |
my $timestamp=$env{'form.timestamp'}; |
my $numoldver=$env{'form.numoldver'}; |
my $numoldver=$env{'form.numoldver'}; |
my $bodytag=&Apache::loncommon::bodytag('Discussion Post Attachments', |
|
'',''); |
|
my $msg = ''; |
my $msg = ''; |
my %attachments = (); |
my %attachments = (); |
my %currattach = (); |
my %currattach = (); |
Line 2678 sub modify_attachments {
|
Line 2675 sub modify_attachments {
|
&extract_attachments($attachmenturls,$idx,$numoldver,\$msg,\%attachments,\%currattach,$currdelold); |
&extract_attachments($attachmenturls,$idx,$numoldver,\$msg,\%attachments,\%currattach,$currdelold); |
} |
} |
&Apache::lonenc::check_encrypt(\$symb); |
&Apache::lonenc::check_encrypt(\$symb); |
my $html=&Apache::lonxml::xmlbegin(); |
my $js = <<END; |
$r->print(<<END); |
<script type="text/javascript"> |
$html |
|
<head> |
|
<title>Managing Attachments</title> |
|
<script> |
|
function setAction () { |
function setAction () { |
document.modattachments.action = document.modattachments.origpage.value; |
document.modattachments.action = document.modattachments.origpage.value; |
document.modattachments.submit(); |
document.modattachments.submit(); |
} |
} |
</script> |
</script> |
</head> |
END |
$bodytag |
|
|
my $start_page = |
|
&Apache::loncommon::start_page('Discussion Post Attachments',$js); |
|
my $end_page = |
|
&Apache::loncommon::end_page(); |
|
|
|
$r->print(<<END); |
<form name="modattachments" method="post" enctype="multipart/form-data" action="/adm/feedback?attach=$symb"> |
<form name="modattachments" method="post" enctype="multipart/form-data" action="/adm/feedback?attach=$symb"> |
<table border="2"> |
<table border="2"> |
<tr> |
<tr> |
Line 2743 END
|
Line 2742 END
|
$r->print(<<END); |
$r->print(<<END); |
<input type="button" name="rtntoedit" value="Store Changes" onClick="setAction()"/> |
<input type="button" name="rtntoedit" value="Store Changes" onClick="setAction()"/> |
</form> |
</form> |
</body> |
$end_page |
</html> |
|
END |
END |
return; |
return; |
} |
} |
Line 3015 sub handler {
|
Line 3013 sub handler {
|
} |
} |
if ($env{'form.allversions'}) { |
if ($env{'form.allversions'}) { |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
|
&Apache::loncommon::no_cache($r); |
$r->send_http_header; |
$r->send_http_header; |
my $html=&Apache::lonxml::xmlbegin(); |
|
my $bodytag=&Apache::loncommon::bodytag('Discussion Post Versions'); |
$r->print(&Apache::loncommon::start_page('Discussion Post Versions')); |
$r->print(<<END); |
|
$html |
|
<head> |
|
<title>Post Versions</title> |
|
<meta http-equiv="pragma" content="no-cache" /> |
|
</head> |
|
$bodytag |
|
END |
|
my $crs='/'.$env{'request.course.id'}; |
my $crs='/'.$env{'request.course.id'}; |
if ($env{'request.course.sec'}) { |
if ($env{'request.course.sec'}) { |
$crs.='_'.$env{'request.course.sec'}; |
$crs.='_'.$env{'request.course.sec'}; |
Line 3046 END
|
Line 3038 END
|
$env{'course.'.$env{'request.course.id'}.'.num'}); |
$env{'course.'.$env{'request.course.id'}.'.num'}); |
$r->print(&get_post_contents(\%contrib,$idx,$seeid,'allversions',\%messages,\%subjects,\%allattachments,\%attachmsgs,\%imsfiles,\$screenname,\$plainname)); |
$r->print(&get_post_contents(\%contrib,$idx,$seeid,'allversions',\%messages,\%subjects,\%allattachments,\%attachmsgs,\%imsfiles,\$screenname,\$plainname)); |
} |
} |
|
$r->print(&Apache::loncommon::end_page()); |
return OK; |
return OK; |
} |
} |
if ($env{'form.posterlist'}) { |
if ($env{'form.posterlist'}) { |
Line 3127 $start_page
|
Line 3120 $start_page
|
$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 /> |
$end_page |
$end_page |
ENDREDIR |
ENDREDIR |
return OK; |
return OK; |