--- loncom/interface/lonfeedback.pm 2010/09/21 04:56:15 1.273.4.10
+++ loncom/interface/lonfeedback.pm 2009/11/26 05:21:43 1.280
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.273.4.10 2010/09/21 04:56:15 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.280 2009/11/26 05:21:43 faziophi Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -48,22 +48,13 @@ use LONCAPA;
sub discussion_open {
my ($status,$symb)=@_;
-# Advanced roles can always discuss
if ($env{'request.role.adv'}) { return 1; }
-# Get discussion closing date
- my $close=&Apache::lonnet::EXT('resource.0.discussend',$symb);
-# If it is defined and in the future, the instructor wants this discussion to be open
- if (defined($close) && $close ne '' && $close > time) {
- return 1;
- }
-# It was not explicitly open, check if the problem is available.
-# If the problem is not available, close the discussion
if (defined($status) &&
!($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER'
|| $status eq 'OPEN')) {
return 0;
}
-# The problem is available, but check if the instructor explictly closed discussion
+ my $close=&Apache::lonnet::EXT('resource.0.discussend',$symb);
if (defined($close) && $close ne '' && $close < time) {
return 0;
}
@@ -100,7 +91,7 @@ sub list_discussion {
if (not &discussion_visible($status)) {
if ($mode ne 'board') {
&Apache::lonenc::check_encrypt(\$ressymb);
- return '
'.&send_message_link($ressymb);
+ return '
- $lt{'cuse'}: | + $lt{'cuse'}:END @@ -598,7 +591,7 @@ END | - $lt{'chgt'}? + $lt{'chgt'}? |
'.&mt('NEW').' | '; } else { $$newitem{$idx} = 0; $$discussionitems[$idx] .= ' -
'; } $$discussionitems[$idx] .= ' | '. ''.$subject.' '. - $sender.' '.$vgrlink.' ('. + $sender.' '.$vgrlink.' ('. &Apache::lonlocal::locallocaltime($posttime).') | '; if ($$dischash{$toggkey}) { $$discussionitems[$idx].=''. $ctlink.' | '; } $$discussionitems[$idx].= '
'. - $message.''; + $message.''; if ($contrib{$idx.':history'}) { my @postversions = (); $$discussionitems[$idx] .= &mt('This post has been edited by the author.'); @@ -1414,9 +1397,7 @@ sub get_post_contents { my ($timesent,$attachmsg); my %currattach = (); $timesent = &Apache::lonlocal::locallocaltime($postversions[$i]); - unless (&contains_block_html($messages->{$i})) { - &newline_to_br(\$messages->{$i}); - } + &newline_to_br(\$messages->{$i}); $$messages{$i}=&Apache::lontexconvert::msgtexconverted($$messages{$i}); $$subjects{$i}=~s/\n/\
'.&Apache::lontexconvert::msgtexconverted($quote).''; } @@ -1725,8 +1708,9 @@ $latexHelp
$lt{'title'}:
-
+
END
if ( ($env{'form.editdisc'}) || ($env{'form.replydisc'}) ) {
if ($env{'form.origpage'}) {
@@ -1748,7 +1732,6 @@ END
}
} else {
$r->print(<
$lt{'soor'} | -- | $lt{'sprs'} | -- | $lt{'spur'} | -- | $lt{'spse'} | -- | $lt{'spgr'} | -- | $lt{'psub'} | +$lt{'soor'} | ++ | $lt{'sprs'} | ++ | $lt{'spur'} | ++ | $lt{'spse'} | ++ | $lt{'spgr'} | ++ | $lt{'psub'} |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -2218,7 +2201,7 @@ $start_page
- + END if (exists($env{'form.group'})) { $r->print(''); @@ -2341,7 +2324,7 @@ END - + $end_page END @@ -2444,7 +2427,7 @@ sub redirect_back { if ($previous > 0) { $qrystr = 'previous='.$previous; if ($feedurl =~ /\?register=1/) { - $feedurl .= '&'.$qrystr; + $feedurl .= '&'.$qrystr; } else { $feedurl .= '?'.$qrystr; } @@ -2453,14 +2436,14 @@ sub redirect_back { if (defined($sort)) { my $sortqry = 'sortposts='.$sort; if (($feedurl =~ /\?register=1/) || ($feedurl =~ /\?previous=/)) { - $feedurl .= '&'.$sortqry; + $feedurl .= '&'.$sortqry; } else { $feedurl .= '?'.$sortqry; } $sorttag = ''; if (defined($numpicks)) { my $userpickqry = 'totposters='.$numpicks; - $feedurl .= '&'.$userpickqry; + $feedurl .= '&'.$userpickqry; $userpicktag = ''; } else { if (ref($sectionpick) eq 'ARRAY') { @@ -2474,7 +2457,7 @@ sub redirect_back { $sectag =~ s/,$//; $sectag .= '" />'; } else { - $feedurl .= '§ionpick='.$sectionpick; + $feedurl .= '§ionpick='.$sectionpick; $sectag = ''; } if (ref($grouppick) eq 'ARRAY') { @@ -2488,7 +2471,7 @@ sub redirect_back { $grptag =~ s/,$//; $grptag .= '" />'; } else { - $feedurl .= '&grouppick='.$grouppick; + $feedurl .= '&grouppick='.$grouppick; $grptag = ''; } if (ref($rolefilter) eq 'ARRAY') { @@ -2505,7 +2488,7 @@ sub redirect_back { $feedurl .= '&rolefilter='.$rolefilter; $roletag = ''; } - $feedurl .= '&statusfilter='.$statusfilter; + $feedurl .= '&statusfilter='.$statusfilter; $statustag =''; } } @@ -2647,11 +2630,10 @@ sub screen_header { $env{'request.course.id'}. ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) { $discussoptions=' '. - + $contribdisc. + ' '. ''.&mt('Change Screenname').''; my $blockblog = &Apache::loncommon::blocking_status('blogs'); if (!$blockblog) { @@ -2665,7 +2647,7 @@ sub screen_header { .$msgoptions; } if ($discussoptions) { - $discussoptions=' '
+ $discussoptions=' |