version 1.73, 2003/11/27 09:43:42
|
version 1.76, 2004/02/11 22:14:10
|
Line 55 use Apache::lonlocal;
|
Line 55 use Apache::lonlocal;
|
|
|
sub list_discussion { |
sub list_discussion { |
my ($mode,$status,$symb)=@_; |
my ($mode,$status,$symb)=@_; |
|
&Apache::lonnet::logthis("status is $status"); |
|
if (!($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER')) { |
|
return ''; |
|
} |
my $discussiononly=0; |
my $discussiononly=0; |
if ($mode eq 'board') { $discussiononly=1; } |
if ($mode eq 'board') { $discussiononly=1; } |
unless ($ENV{'request.course.id'}) { return ''; } |
unless ($ENV{'request.course.id'}) { return ''; } |
Line 70 sub list_discussion {
|
Line 74 sub list_discussion {
|
my $seeid=&Apache::lonnet::allowed('rin',$crs); |
my $seeid=&Apache::lonnet::allowed('rin',$crs); |
my $viewgrades=&Apache::lonnet::allowed('vgr',$crs); |
my $viewgrades=&Apache::lonnet::allowed('vgr',$crs); |
my @discussionitems=(); |
my @discussionitems=(); |
# backward compatability (bulltein boards used to be 'wrapped') |
# backward compatibility (bulletin boards used to be 'wrapped') |
my $ressymb=$symb; |
my $ressymb=$symb; |
if ($mode eq 'board') { |
if ($mode eq 'board') { |
$ressymb=~s|(bulletin___\d+___)|$1adm/wrapper|; |
$ressymb=~s|(bulletin___\d+___)|$1adm/wrapper|; |
Line 232 Attachment (128 KB max size): <input typ
|
Line 236 Attachment (128 KB max size): <input typ
|
</form> |
</form> |
ENDDISCUSS |
ENDDISCUSS |
$discussion.=&generate_preview_button(); |
$discussion.=&generate_preview_button(); |
} |
} else { |
|
if (&Apache::lonnet::allowed('pch', |
|
$ENV{'request.course.id'}. |
|
($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) { |
|
$discussion.='<table bgcolor="#BBBBBB"><tr><td><a href="/adm/feedback?replydisc='. |
|
$symb.':::" '.$target.'>'. |
|
'<img src="/adm/lonMisc/chat.gif" border="0" />'. |
|
&mt('Post Discussion').'</a></td></tr></table>'; |
|
} |
|
} |
return $discussion; |
return $discussion; |
} |
} |
|
|
Line 255 sub mail_screen {
|
Line 268 sub mail_screen {
|
} |
} |
} |
} |
my $latexHelp = Apache::loncommon::helpLatexCheatsheet(); |
my $latexHelp = Apache::loncommon::helpLatexCheatsheet(); |
|
my $send=&mt('Send'); |
$r->print(<<ENDDOCUMENT); |
$r->print(<<ENDDOCUMENT); |
<html> |
<html> |
<head> |
<head> |
Line 323 Attachment (128 KB max size): <input typ
|
Line 337 Attachment (128 KB max size): <input typ
|
</p> |
</p> |
<p> |
<p> |
<input type="hidden" name="sendit" value="1" /> |
<input type="hidden" name="sendit" value="1" /> |
<input type="button" value="Send Feedback" onClick='gosubmit();' /> |
<input type="button" value="$send" onClick='gosubmit();' /> |
</p> |
</p> |
</form> |
</form> |
ENDDOCUMENT |
ENDDOCUMENT |
Line 421 sub screen_header {
|
Line 435 sub screen_header {
|
if (&Apache::lonnet::allowed('pch', |
if (&Apache::lonnet::allowed('pch', |
$ENV{'request.course.id'}. |
$ENV{'request.course.id'}. |
($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) { |
($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) { |
$discussoptions='<input type="checkbox" name="discuss" onClick="this.form.anondiscuss.checked=false;" /> '. |
$discussoptions='<input type="checkbox" name="discuss" onClick="this.form.anondiscuss.checked=false;" '. |
|
($ENV{'form.replydisc'}?' checked="1"':'').' /> '. |
&mt('Contribution to course discussion of resource'); |
&mt('Contribution to course discussion of resource'); |
$discussoptions.='<br /><input type="checkbox" name="anondiscuss" onClick="this.form.discuss.checked=false;" /> '. |
$discussoptions.='<br /><input type="checkbox" name="anondiscuss" onClick="this.form.discuss.checked=false;" /> '. |
&mt('Anonymous contribution to course discussion of resource'). |
&mt('Anonymous contribution to course discussion of resource'). |
' <i>('.&mt('name only visible to course faculty').')</i>'; |
' <i>('.&mt('name only visible to course faculty').')</i>'; |
} |
} |
} |
} |
if ($msgoptions) { $msgoptions='<h2>'.&mt('Sending Messages').'</h2>'.$msgoptions; } |
if ($msgoptions) { $msgoptions='<h2><img src="/adm/lonMisc/feedback.gif" />'.&mt('Sending Messages').'</h2>'.$msgoptions; } |
if ($discussoptions) { |
if ($discussoptions) { |
$discussoptions='<h2>'.&mt('Discussion Contributions').'</h2>'.$discussoptions; } |
$discussoptions='<h2><img src="/adm/lonMisc/chat.gif" />'.&mt('Discussion Contributions').'</h2>'.$discussoptions; } |
return $msgoptions.$discussoptions; |
return $msgoptions.$discussoptions; |
} |
} |
|
|
Line 742 sub handler {
|
Line 757 sub handler {
|
&mt('Changed discussion status').'<br />','0','0'); |
&mt('Changed discussion status').'<br />','0','0'); |
} elsif ($ENV{'form.preview'}) { |
} elsif ($ENV{'form.preview'}) { |
# -------------------------------------------------------- User wants a preview |
# -------------------------------------------------------- User wants a preview |
|
$r->content_type('text/html'); |
|
$r->send_http_header; |
&show_preview($r); |
&show_preview($r); |
} else { |
} else { |
# ------------------------------------------------------------- Normal feedback |
# ------------------------------------------------------------- Normal feedback |
Line 770 sub handler {
|
Line 787 sub handler {
|
if ($feedurl=~/\.(problem|exam|quiz|assess|survey|form)$/) { |
if ($feedurl=~/\.(problem|exam|quiz|assess|survey|form)$/) { |
unless ($symb) { $goahead=0; } |
unless ($symb) { $goahead=0; } |
} |
} |
# backward compatability (bulltein boards used to be 'wrapped') |
# backward compatibility (bulltin boards used to be 'wrapped') |
if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) { |
if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) { |
$feedurl=~s|^/adm/wrapper||; |
$feedurl=~s|^/adm/wrapper||; |
} |
} |