version 1.222, 2006/11/29 04:25:23
|
version 1.223, 2006/11/29 19:31:48
|
Line 93 sub list_discussion {
|
Line 93 sub list_discussion {
|
} |
} |
} |
} |
|
|
|
my ($blocked,$blocktext) = &blocking_posts('boards',1); |
|
if ($blocked) { |
|
return $blocktext; |
|
} |
|
|
my @bgcols = ("#cccccc","#eeeeee"); |
my @bgcols = ("#cccccc","#eeeeee"); |
my $discussiononly=0; |
my $discussiononly=0; |
if ($mode eq 'board') { $discussiononly=1; } |
if ($mode eq 'board') { $discussiononly=1; } |
Line 791 sub action_links_bar {
|
Line 796 sub action_links_bar {
|
return $discussion; |
return $discussion; |
} |
} |
|
|
|
sub blocking_posts { |
|
my ($type,$showstatus) = @_; |
|
my %setters; |
|
my ($blocked,$output); |
|
my ($startblock,$endblock) = |
|
&Apache::loncommon::blockcheck(\%setters,$type); |
|
if ($startblock && $endblock) { |
|
$blocked = 1; |
|
if ($showstatus) { |
|
my $showstart = &Apache::lonlocal::locallocaltime($startblock); |
|
my $showend = &Apache::lonlocal::locallocaltime($endblock); |
|
$output = &mt('Discussion postings will not be viewable for resources in this course between [_1] and [_2] because communication is being blocked.',$showstart, $showend).'<br />'. |
|
&Apache::loncommon::build_block_table($startblock,$endblock, |
|
\%setters); |
|
} |
|
} |
|
return ($blocked,$output); |
|
} |
|
|
sub postingform_display { |
sub postingform_display { |
my ($mode,$ressymb,$now,$subject,$comment,$outputtarget,$attachnum, |
my ($mode,$ressymb,$now,$subject,$comment,$outputtarget,$attachnum, |
$currnewattach,$currdelold,$group) = @_; |
$currnewattach,$currdelold,$group) = @_; |
Line 2543 sub screen_header {
|
Line 2567 sub screen_header {
|
&Apache::lonnet::allowed('pch', |
&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='<label><input type="radio" name="discuss" value="nonanon" checked="checked" /> '. |
my ($blocked) = &blocking_posts('boards'); |
&mt('Contribution to course discussion of resource'); |
if (!$blocked) { |
$discussoptions.='</label><br /><label><input type="radio" name="discuss" value="anon" /> '. |
$discussoptions='<label><input type="radio" name="discuss" value="nonanon" checked="checked" /> '. |
&mt('Anonymous contribution to course discussion of resource'). |
&mt('Contribution to course discussion of resource'); |
' <i>('.&mt('name only visible to course faculty').')</i></label> '. |
$discussoptions.='</label><br /><label><input type="radio" name="discuss" value="anon" /> '. |
'<a href="/adm/preferences?action=changescreenname">'.&mt('Change Screenname').'</a>'; |
&mt('Anonymous contribution to course discussion of resource'). |
|
' <i>('.&mt('name only visible to course faculty').')</i></label> '. |
|
'<a href="/adm/preferences?action=changescreenname">'.&mt('Change Screenname').'</a>'; |
|
} |
|
} |
|
my ($blockblog) = &blocking_posts('blogs'); |
|
if (!$blockblog) { |
|
$discussoptions.='<br /><label><input type="checkbox" name="blog" /> '. |
|
&mt('Add to my public course blog').'</label>'; |
} |
} |
$discussoptions.='<br /><label><input type="checkbox" name="blog" /> '. |
|
&mt('Add to my public course blog').'</label>'; |
|
} |
} |
if ($msgoptions) { $msgoptions='<h2><img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/feedback.gif').'" />'.&mt('Sending Messages').'</h2>'.$msgoptions; } |
if ($msgoptions) { $msgoptions='<h2><img src="'.&Apache::loncommon::lonhttpdurl('/adm/lonMisc/feedback.gif').'" />'.&mt('Sending Messages').'</h2>'.$msgoptions; } |
if ($discussoptions) { |
if ($discussoptions) { |