version 1.158, 2005/04/07 07:34:52
|
version 1.159, 2005/04/11 01:07:26
|
Line 2866 sub has_discussion {
|
Line 2866 sub has_discussion {
|
my @allres=$navmap->retrieveResources(); |
my @allres=$navmap->retrieveResources(); |
foreach my $resource (@allres) { |
foreach my $resource (@allres) { |
if ($resource->hasDiscussion()) { |
if ($resource->hasDiscussion()) { |
my $ressymb; |
my $ressymb = $resource->symb(); |
if ($resource->symb() =~ m-(___adm/\w+/\w+)/(\d+)/bulletinboard$-) { |
if ($resource->symb() =~ m-(___adm/\w+/\w+/)(\d+)(/bulletinboard)$-) { |
$ressymb = 'bulletin___'.$2.$1.'/'.$2.'/bulletinboard'; |
$ressymb = 'bulletin___'.$2.$1.$2.$3; |
} else { |
} else { |
$ressymb = $resource->symb(); |
$ressymb = $resource->symb(); |
} |
} |
Line 3030 END
|
Line 3030 END
|
'twnp' => 'There are currently no resources or bulletin boards with unread discussion postings.' |
'twnp' => 'There are currently no resources or bulletin boards with unread discussion postings.' |
); |
); |
foreach (@resources) { |
foreach (@resources) { |
# backward compatibility (bulletin boards used to be 'wrapped') |
|
my $ressymb=$_; |
my $ressymb=$_; |
&Apache::lonenc::check_decrypt(\$ressymb); |
&Apache::lonenc::check_decrypt(\$ressymb); |
|
# backward compatibility (bulletin boards used to be 'wrapped') |
if ($ressymb =~ m/bulletin___\d+___/) { |
if ($ressymb =~ m/bulletin___\d+___/) { |
unless ($ressymb =~ m|bulletin___\d+___adm/wrapper|) { |
$ressymb = &wrap_symb($ressymb); |
$ressymb=~s|(bulletin___\d+___)|$1adm/wrapper/|; |
|
} |
|
} |
} |
my $lastkey = $ressymb.'_lastread'; |
my $lastkey = $ressymb.'_lastread'; |
$discinfo{$lastkey} = $env{'form.navtime'}; |
$discinfo{$lastkey} = $env{'form.navtime'}; |
Line 3258 ENDREDIR
|
Line 3256 ENDREDIR
|
unless ($symb) { $goahead=0; } |
unless ($symb) { $goahead=0; } |
} |
} |
# backward compatibility (bulletin boards used to be 'wrapped') |
# backward compatibility (bulletin boards used to be 'wrapped') |
if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) { |
&dewrapper(\$feedurl); |
$feedurl=~s|^/adm/wrapper||; |
|
} |
|
if (!$goahead) { |
if (!$goahead) { |
# Ambiguous Problem Resource |
# Ambiguous Problem Resource |
$r->internal_redirect('/adm/ambiguous'); |
$r->internal_redirect('/adm/ambiguous'); |