version 1.7, 2003/02/28 16:16:59
|
version 1.14, 2003/09/15 19:56:44
|
Line 33 use Apache::Constants qw(:common);
|
Line 33 use Apache::Constants qw(:common);
|
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::lontexconvert; |
use Apache::lontexconvert; |
use Apache::lonxml; |
|
use Apache::lonfeedback; |
use Apache::lonfeedback; |
|
|
sub handler { |
sub handler { |
Line 51 ENDDOCUMENT
|
Line 50 ENDDOCUMENT
|
my (undef,undef,undef,undef,$marker)=split(/\//,$r->uri); |
my (undef,undef,undef,undef,$marker)=split(/\//,$r->uri); |
# Is this even in a course? |
# Is this even in a course? |
unless ($ENV{'request.course.id'}) { |
unless ($ENV{'request.course.id'}) { |
$r->print('<body>Not in a course</body>'); |
$r->print('</head><body>Not in a course</body></html>'); |
return OK; |
return OK; |
} |
} |
|
|
Line 90 ENDDOCUMENT
|
Line 89 ENDDOCUMENT
|
# --------------------------------------- There is such a user, get environment |
# --------------------------------------- There is such a user, get environment |
|
|
$r->print('</head>'.&Apache::loncommon::bodytag |
$r->print('</head>'.&Apache::loncommon::bodytag |
("Bulletin Board/Discussion",$forcestudent,$addentries,'',$dom)); |
("Bulletin Board/Discussion",$forcestudent,$addentries,'',$dom, |
|
$ENV{'form.register'})); |
|
|
my $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}); |
my $allowed=&Apache::lonnet::allowed('mdc',$ENV{'request.course.id'}); |
|
|
if ($forcestudent) { $allowed=0; } |
if ($forcestudent) { $allowed=0; } |
|
|
if ($allowed) { |
if ($allowed) { |
$r->print( |
$r->print( |
'<p>'. |
'<p>'. |
&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'<br /><a href="'.$r->uri.'?forcestudent=1">Show Public View</a>'. |
&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'<br /><a href="'.$r->uri.'?forcestudent=1"><font size="+1">Show Student View</font></a>'. |
&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'</p>'); |
&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'</p>'); |
} |
} |
if (($ENV{'form.uploaddoc.filename'}) && |
if (($ENV{'form.uploaddoc.filename'}) && |
($ENV{'form.storeupl'}) && ($allowed)) { |
($ENV{'form.storeupl'}) && ($allowed)) { |
if ($ENV{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/) { |
if ($ENV{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/i) { |
$syllabus{'uploaded.photourl'}= |
$syllabus{'uploaded.photourl'}= |
&Apache::lonnet::userfileupload('uploaddoc',1); |
&Apache::lonnet::userfileupload('uploaddoc',1); |
} |
} |
Line 142 ENDDOCUMENT
|
Line 142 ENDDOCUMENT
|
my $message=$syllabus{$_}; |
my $message=$syllabus{$_}; |
$message=~s/\n/\<br \/\>/g; |
$message=~s/\n/\<br \/\>/g; |
$message |
$message |
=~s/(http\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g; |
=~s/(https*\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g; |
$message=&Apache::lontexconvert::msgtexconverted($message); |
$message=&Apache::lontexconvert::msgtexconverted($message); |
unless ($_ eq 'aaa_title') { |
unless ($_ eq 'aaa_title') { |
if (($_ ne 'bbb_content') || ($allowed)) { |
if (($_ ne 'bbb_content') || ($allowed)) { |
Line 173 ENDDOCUMENT
|
Line 173 ENDDOCUMENT
|
} else { |
} else { |
$r->print('<p>No page information provided.</p>'); |
$r->print('<p>No page information provided.</p>'); |
} |
} |
$r->print(&Apache::lonxml::xmlend(1,'bulletin___'.$marker.'___'. |
$r->print(&Apache::lonfeedback::list_discussion |
'adm/wrapper'.$r->uri).'</body></html>'); |
('board','OPEN','bulletin___'.$marker.'___'. |
|
'adm/wrapper'.$r->uri).'</body></html>'); |
return OK; |
return OK; |
} |
} |
|
|