version 1.137, 2004/11/15 22:48:51
|
version 1.139, 2004/11/17 16:42:39
|
Line 106 sub list_discussion {
|
Line 106 sub list_discussion {
|
my $userpickkey = $ressymb.'_userpick'; |
my $userpickkey = $ressymb.'_userpick'; |
my $toggkey = $ressymb.'_readtoggle'; |
my $toggkey = $ressymb.'_readtoggle'; |
my $readkey = $ressymb.'_read'; |
my $readkey = $ressymb.'_read'; |
|
$ressymb=$encsymb; |
my %dischash = &Apache::lonnet::get('nohist_'.$ENV{'request.course.id'}.'_discuss',[$lastkey,$showkey,$markkey,$visitkey,$ondispkey,$userpickkey,$toggkey,$readkey],$ENV{'user.domain'},$ENV{'user.name'}); |
my %dischash = &Apache::lonnet::get('nohist_'.$ENV{'request.course.id'}.'_discuss',[$lastkey,$showkey,$markkey,$visitkey,$ondispkey,$userpickkey,$toggkey,$readkey],$ENV{'user.domain'},$ENV{'user.name'}); |
my %discinfo = (); |
my %discinfo = (); |
my $showonlyunread = 0; |
my $showonlyunread = 0; |
Line 132 sub list_discussion {
|
Line 132 sub list_discussion {
|
$prevread = $dischash{$lastkey}; |
$prevread = $dischash{$lastkey}; |
} |
} |
} |
} |
&Apache::lonnet::logthis("\n last read r symb ".$lastkey); |
|
|
|
# Get information about students and non-students in course for filtering display of posts |
# Get information about students and non-students in course for filtering display of posts |
my %roleshash = (); |
my %roleshash = (); |
Line 980 sub build_posting_display {
|
Line 979 sub build_posting_display {
|
$$shown{$idx} = 1; |
$$shown{$idx} = 1; |
} else { |
} else { |
foreach my $role (@{$$roleinfo{$poster}}) { |
foreach my $role (@{$$roleinfo{$poster}}) { |
&Apache::lonnet::logthis("\n rolematch $rolematch\nrole $role"); |
|
if ($role =~ m/^$rolematch$/) { |
if ($role =~ m/^$rolematch$/) { |
$$shown{$idx} = 1; |
$$shown{$idx} = 1; |
last; |
last; |
Line 1679 sub print_sortfilter_options {
|
Line 1677 sub print_sortfilter_options {
|
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
|
|
|
&Apache::lonenc::check_encrypt(\$symb); |
my @sections = (); |
my @sections = (); |
my $section_sel = ''; |
my $section_sel = ''; |
my $numsections = 0; |
my $numsections = 0; |
Line 1815 END
|
Line 1814 END
|
sub print_showposters { |
sub print_showposters { |
my ($r,$symb,$previous,$feedurl,$sortposts) = @_; |
my ($r,$symb,$previous,$feedurl,$sortposts) = @_; |
|
|
# backward compatibility (bulletin boards used to be 'wrapped') |
&Apache::lonenc::check_encrypt(\$symb); |
my $ressymb=&wrap_symb($symb); |
|
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'}; |
} |
} |
$crs=~s/\_/\//g; |
$crs=~s/\_/\//g; |
my $seeid=&Apache::lonnet::allowed('rin',$crs); |
my $seeid=&Apache::lonnet::allowed('rin',$crs); |
my %contrib=&Apache::lonnet::restore($ressymb,$ENV{'request.course.id'}, |
my %contrib=&Apache::lonnet::restore($symb,$ENV{'request.course.id'}, |
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, |
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, |
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}); |
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}); |
my %namesort = (); |
my %namesort = (); |
Line 2445 sub modify_attachments {
|
Line 2443 sub modify_attachments {
|
if ($idx) { |
if ($idx) { |
&extract_attachments($attachmenturls,$idx,$numoldver,\$msg,\%attachments,\%currattach,$currdelold); |
&extract_attachments($attachmenturls,$idx,$numoldver,\$msg,\%attachments,\%currattach,$currdelold); |
} |
} |
|
&Apache::lonenc::check_encrypt(\$symb); |
$r->print(<<END); |
$r->print(<<END); |
<html> |
<html> |
<head> |
<head> |
Line 2901 ENDREDIR
|
Line 2900 ENDREDIR
|
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.symb'}); |
my ($symb,$feedurl)=&get_feedurl_and_clean_symb($ENV{'form.symb'}); |
my %discinfo; |
my %discinfo; |
# ------------------------ Modify setting for read/unread toggle for each post |
# ------------------------ Modify setting for read/unread toggle for each post |
if ($ENV{'form.toggoff'}) { $discinfo{$symb.'_readtoggle'}=1; } |
if ($ENV{'form.toggoff'}) { $discinfo{$symb.'_readtoggle'}=0; } |
if ($ENV{'form.toggon'}) { $discinfo{$symb.'_readtoggle'}=0; } |
if ($ENV{'form.toggon'}) { $discinfo{$symb.'_readtoggle'}=1; } |
# --------- Modify setting for identification of 'NEW' posts in this discussion |
# --------- Modify setting for identification of 'NEW' posts in this discussion |
if ($ENV{'form.markondisp'}) { |
if ($ENV{'form.markondisp'}) { |
$discinfo{$symb.'_lastread'} = time; |
$discinfo{$symb.'_lastread'} = time; |
Line 3011 ENDREDIR
|
Line 3010 ENDREDIR
|
unless (length($ENV{'form.addnewattach'})>131072) { |
unless (length($ENV{'form.addnewattach'})>131072) { |
my $subdir = 'feedback/'.$ENV{'form.timestamp'}; |
my $subdir = 'feedback/'.$ENV{'form.timestamp'}; |
my $newattachment=&Apache::lonnet::userfileupload('addnewattach',undef,$subdir); |
my $newattachment=&Apache::lonnet::userfileupload('addnewattach',undef,$subdir); |
push @currnewattach, $newattachment; |
push @currnewattach, $newattachment; |
} |
} |
} |
} |
my $attachmenturls; |
my $attachmenturls; |