--- loncom/interface/lonsyllabus.pm 2002/08/27 16:49:20 1.4 +++ loncom/interface/lonsyllabus.pm 2006/03/07 21:36:20 1.47 @@ -1,7 +1,7 @@ # The LearningOnline Network # Syllabus # -# $Id: lonsyllabus.pm,v 1.4 2002/08/27 16:49:20 www Exp $ +# $Id: lonsyllabus.pm,v 1.47 2006/03/07 21:36:20 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,56 +32,348 @@ use strict; use Apache::Constants qw(:common); use Apache::loncommon; use Apache::lonnet; +use Apache::lontexconvert; +use Apache::lonfeedback; +use Apache::lonannounce; +use Apache::lonlocal; +use Apache::lonhtmlcommon; +use Apache::lonspeller(); sub handler { my $r = shift; - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; return OK if $r->header_only; + my $target=$env{'form.grade_target'}; +# --------------------------------------------------- Get course info from URL + my (undef,undef,$cdom,$cnum)=split(/\//,$r->uri); +# ------------------------------------------------------------ Get query string + &Apache::loncommon::get_unprocessed_cgi + ($ENV{'QUERY_STRING'},['forcestudent','register','forceedit','wrapperdisplay']); +# ----------------------------------------------------- Is this even a course? + my $homeserver=&Apache::lonnet::homeserver($cnum,$cdom); + if ($homeserver eq 'no_host') { + &Apache::loncommon::content_type($r,'text/html'); + $r->send_http_header; + $r->print('
'.&mt('No syllabus available').''); + return OK; + } +# ------------------------------------- There is such a course, get environment + my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum); # ------------------------------------------------------------ Print the screen - $r->print(<