package Apache::lonwhatsnew;
use strict;
use lib qw(/home/httpd/lib/perl);
use Apache::lonnet;
use Apache::loncommon;
use Apache::lonhtmlcommon;
use Apache::lonlocal;
use Apache::loncoursedata;
use Apache::lonnavmaps;
use Apache::Constants qw(:common :http);
use Time::Local;
#----------------------------
# handler
#
#----------------------------
sub handler {
my $r = shift;
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['command']);
my $command = $ENV{'form.command'};
if ($command eq '') {
$command = "info";
}
$r->print(&display_header());
if (! (($ENV{'request.course.fn'}) && (&Apache::lonnet::allowed('vsa',$ENV{'request.course.id'})))) {
# Not in a course, or not allowed to modify parms
$ENV{'user.error.msg'}="/adm/whatsnew:vsa:0:0:Cannot display student activity";
return HTTP_NOT_ACCEPTABLE;
}
&display_main_box($r,$command);
}
#------------------------------
# display_main_box
#
# Display all the elements within the main box
#------------------------------
sub display_main_box {
my ($r,$command) = @_;
my $domain=&Apache::loncommon::determinedomain();
my $tabbg=&Apache::loncommon::designparm('coordinator.tabbg',$domain);
$r->print(<
|
END_OF_BLOCK
&display_nav_box($r,$command);
$r->print(' | | ');
$r->print('');
if ($command eq 'config') {
&display_config_box($r);
} else {
&display_actions_box($r);
}
$r->print(<
|
|
|
|