version 1.68, 2007/05/10 18:49:39
|
version 1.70, 2008/05/18 19:45:46
|
Line 74 sub readcalendar {
|
Line 74 sub readcalendar {
|
my $courseid=shift; |
my $courseid=shift; |
my $coursenum=$env{'course.'.$courseid.'.num'}; |
my $coursenum=$env{'course.'.$courseid.'.num'}; |
my $coursedom=$env{'course.'.$courseid.'.domain'}; |
my $coursedom=$env{'course.'.$courseid.'.domain'}; |
|
if ($coursenum eq '' || $coursedom eq '') { |
|
my %courseinfo=&Apache::lonnet::coursedescription($courseid); |
|
if ($coursenum eq '' && exists($courseinfo{'num'})) { |
|
$coursenum = $courseinfo{'num'}; |
|
} |
|
if ($coursedom eq '' && exists($courseinfo{'domain'})) { |
|
$coursedom = $courseinfo{'domain'}; |
|
} |
|
} |
|
|
my %thiscal=&Apache::lonnet::dump('calendar',$coursedom,$coursenum); |
my %thiscal=&Apache::lonnet::dump('calendar',$coursedom,$coursenum); |
my %returnhash=(); |
my %returnhash=(); |
foreach my $item (keys(%thiscal)) { |
foreach my $item (keys(%thiscal)) { |
Line 92 sub readcalendar {
|
Line 102 sub readcalendar {
|
|
|
my $resourcedata= |
my $resourcedata= |
&Apache::lonnet::get_courseresdata($coursenum,$coursedom); |
&Apache::lonnet::get_courseresdata($coursenum,$coursedom); |
|
if (ref($resourcedata) ne 'HASH') { |
|
return %returnhash; |
|
} |
foreach my $thiskey (keys(%$resourcedata)) { |
foreach my $thiskey (keys(%$resourcedata)) { |
if ($resourcedata->{$thiskey.'.type'}=~/^date/) { |
if ($resourcedata->{$thiskey.'.type'}=~/^date/) { |
my ($course,$middle,$part,$name)= |
my ($course,$middle,$part,$name)= |
Line 510 SERVERANNOUNCE
|
Line 523 SERVERANNOUNCE
|
$r->print ('<br /><label><input type="checkbox" name="postto_'.$host.'" /> '. |
$r->print ('<br /><label><input type="checkbox" name="postto_'.$host.'" /> '. |
$host.' <tt>'.$hostname{$host}.'</tt> '. |
$host.' <tt>'.$hostname{$host}.'</tt> '. |
'</label><a href="http://'.$hostname{$host}. |
'</label><a href="http://'.$hostname{$host}. |
'/announcement.txt" target="annowin">current</a>'); |
'/announcement.txt?time='.time.'" target="annowin">current</a>'); |
} |
} |
} |
} |
$r->print( |
$r->print( |