--- loncom/interface/lonrequestcourse.pm 2009/08/20 21:15:37 1.19 +++ loncom/interface/lonrequestcourse.pm 2009/08/21 13:18:46 1.20 @@ -1,7 +1,7 @@ # The LearningOnline Network # Request a course # -# $Id: lonrequestcourse.pm,v 1.19 2009/08/20 21:15:37 raeburn Exp $ +# $Id: lonrequestcourse.pm,v 1.20 2009/08/21 13:18:46 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -116,13 +116,11 @@ use LONCAPA qw(:DEFAULT :match); sub handler { my ($r) = @_; + &Apache::loncommon::content_type($r,'text/html'); + $r->send_http_header; if ($r->header_only) { - &Apache::loncommon::content_type($r,'text/html'); - $r->send_http_header; return OK; } - &Apache::loncommon::content_type($r,'text/html'); - $r->send_http_header; &Apache::lonhtmlcommon::clear_breadcrumbs(); my $dom = &get_course_dom(); @@ -159,9 +157,10 @@ sub handler { $states{'view'} = ['pick_request','details','cancel','removal']; $states{'log'} = ['filter','display']; $states{'new'} = ['courseinfo','enrollment','personnel','review','process']; + if (($action eq 'new') && ($env{'form.crstype'} eq 'official')) { unless ($env{'form.state'} eq 'crstype') { - unshift (@{$states{'new'}},'codepick'); + unshift(@{$states{'new'}},'codepick'); } } @@ -811,12 +810,19 @@ sub print_request_form { $r->print('