#
# $Id: lonwhatsnew.pm,v 1.2 2005/04/07 03:58:02 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
#
# LON-CAPA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LON-CAPA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LON-CAPA; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# /home/httpd/html/adm/gpl.txt
#
# http://www.lon-capa.org/
#
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(<
|
|
|
|