version 1.51, 2006/04/10 19:59:54
|
version 1.54, 2006/08/16 19:40:46
|
Line 38 use Apache::lonannounce;
|
Line 38 use Apache::lonannounce;
|
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonhtmlcommon; |
use Apache::lonhtmlcommon; |
use Apache::lonspeller(); |
use Apache::lonspeller(); |
|
use HTML::Entities(); |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
Line 128 sub handler {
|
Line 129 sub handler {
|
my $day = &Apache::lonannounce::showday(time,2, |
my $day = &Apache::lonannounce::showday(time,2, |
&Apache::lonannounce::readcalendar($cdom.'_'.$cnum)); |
&Apache::lonannounce::readcalendar($cdom.'_'.$cnum)); |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
$r->print($day. &Apache::lonrss::advertisefeeds($cnum,$cdom)); |
$r->print($day. &Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit)); |
} else { |
} else { |
$r->print(&Apache::lonxml::xmlparse($r,'tex',$day)); |
$r->print(&Apache::lonxml::xmlparse($r,'tex',$day)); |
} |
} |
Line 177 sub handler {
|
Line 178 sub handler {
|
# ----------------------------------------------------- Only if not public call |
# ----------------------------------------------------- Only if not public call |
if ($env{'user.environment'}) { |
if ($env{'user.environment'}) { |
# does this user have privileges to post, etc? |
# does this user have privileges to post, etc? |
if ($env{'request.course.id'}) { |
if ($env{'request.course.id'} |
|
&& $cdom eq $env{'course.'.$env{'request.course.id'}.'.domain'} |
|
&& $cnum eq $env{'course.'.$env{'request.course.id'}.'.num'}) { |
$allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'}); |
$allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'}); |
$privileged=$allowed; |
$privileged=$allowed; |
if (($syllabus{'uploaded.lastmodified'}) && (!$forceedit)) { |
if (($syllabus{'uploaded.lastmodified'}) && (!$forceedit)) { |
Line 319 sub handler {
|
Line 322 sub handler {
|
if ($allowed) { |
if ($allowed) { |
$r->print( |
$r->print( |
'<br /><textarea cols="80" rows="12" name="'.$_.'" id="'.$_.'">'. |
'<br /><textarea cols="80" rows="12" name="'.$_.'" id="'.$_.'">'. |
$syllabus{$_}. |
&HTML::Entities::encode($syllabus{$_},'"&<>'). |
'</textarea> <input type="submit" name="storesyl" value="Store" />'); |
'</textarea> <input type="submit" name="storesyl" value="Store" />'); |
} |
} |
} |
} |