version 1.9, 2003/05/21 16:26:46
|
version 1.10, 2003/05/21 19:15:41
|
Line 33 use Apache::Constants qw(:common);
|
Line 33 use Apache::Constants qw(:common);
|
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::lonhtmlcommon(); |
use Apache::lonhtmlcommon(); |
|
|
|
sub editfield { |
|
my ($r,$start,$end,$text)=@_; |
|
# Deal with date forms |
|
my $startdateform = &Apache::lonhtmlcommon::date_setter('anno', |
|
'startdate', |
|
$start); |
|
my $enddateform = &Apache::lonhtmlcommon::date_setter('anno', |
|
'enddate', |
|
$end); |
|
|
|
$r->print(<<ENDFORM); |
|
<form name="anno" method="post"> |
|
<input type="hidden" value='' name="action" > |
|
<table><tr><td>Starting date:</td><td>$startdateform</td></tr> |
|
<tr><td>Ending date:</td><td>$enddateform</td></tr></table> |
|
<textarea name="msg" rows="4" cols="60">$text</textarea> |
|
<input type="button" onClick="trysubmit()" value="Post Announcement"><hr> |
|
ENDFORM |
|
} |
|
|
sub readcalendar { |
sub readcalendar { |
my $courseid=shift; |
my $courseid=shift; |
my $coursenum=$ENV{'course.'.$courseid.'.num'}; |
my $coursenum=$ENV{'course.'.$courseid.'.num'}; |
Line 182 ENDDOCUMENT
|
Line 202 ENDDOCUMENT
|
$tomorrowhash{'day'}++; |
$tomorrowhash{'day'}++; |
my $tomorrow=&Apache::loncommon::maketime(%tomorrowhash); |
my $tomorrow=&Apache::loncommon::maketime(%tomorrowhash); |
|
|
# Deal with date forms |
&editfield($r,$today,$tomorrow,''); |
my $startdateform = &Apache::lonhtmlcommon::date_setter('anno', |
|
'startdate', |
|
$today); |
|
my $enddateform = &Apache::lonhtmlcommon::date_setter('anno', |
|
'enddate', |
|
$tomorrow); |
|
# |
|
|
|
$r->print(<<ENDFORM); |
|
<form name="anno" method="post"> |
|
<input type="hidden" value='' name="action" > |
|
<table><tr><td>Starting date:</td><td>$startdateform</td></tr> |
|
<tr><td>Ending date:</td><td>$enddateform</td></tr></table> |
|
<textarea name="msg" rows="4" cols="60"> |
|
</textarea> |
|
<input type="button" onClick="trysubmit()" value="Post Announcement"><hr> |
|
ENDFORM |
|
} |
} |
# ----------------------------------------------------- Summarize all calendars |
# ----------------------------------------------------- Summarize all calendars |
my %allcal=(); |
my %allcal=(); |