--- loncom/interface/loncreatecourse.pm 2006/01/16 23:11:50 1.85 +++ loncom/interface/loncreatecourse.pm 2006/05/30 12:46:09 1.89 @@ -1,7 +1,7 @@ # The LearningOnline Network # Create a course # -# $Id: loncreatecourse.pm,v 1.85 2006/01/16 23:11:50 albertel Exp $ +# $Id: loncreatecourse.pm,v 1.89 2006/05/30 12:46:09 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,6 +38,7 @@ use Apache::londocs; use Apache::lonlocal; use Apache::londropadd; use lib '/home/httpd/lib/perl'; +use LONCAPA; # ================================================ Get course directory listing @@ -57,7 +58,7 @@ sub innercrsdirlist { my %crsdata=&Apache::lonnet::coursedescription($courseid); my @listing=&Apache::lonnet::dirlist ($which,$crsdata{'domain'},$crsdata{'num'}, - &Apache::loncommon::propath($crsdata{'domain'},$crsdata{'num'})); + &propath($crsdata{'domain'},$crsdata{'num'})); foreach (@listing) { unless ($_=~/^\./) { my @unpackline = split (/\&/,$_); @@ -234,7 +235,7 @@ sub copydbfiles { foreach (&crsdirlist($origcrsid)) { if ($_=~/\.db$/) { unless - ($_=~/^(nohist\_|discussiontimes|classlist|versionupdate|resourcedata|\Q$origcrs_discussion\E|slots|slot_reservations|(grading|review)queue|CODEs)/) { + ($_=~/^(nohist\_|discussiontimes|classlist|versionupdate|resourcedata|\Q$origcrs_discussion\E|slots|slot_reservations|gradingqueue|reviewqueue|CODEs)/) { ©db($origcrsid,$newcrsid,$_); my $histfile=$_; $histfile=~s/\.db$/\.hist/; @@ -269,7 +270,6 @@ sub print_course_creation_page { } $course_home .= "\n\n"; my $domform = &Apache::loncommon::select_dom_form($defdom,'ccdomain'); - my $bodytag=&Apache::loncommon::bodytag('Create a New Course'); my $helplink=&Apache::loncommon::help_open_topic('Create_Course',&mt('Help on Creating Courses')); my $cloneform=&Apache::loncommon::select_dom_form ($env{'request.role.domain'},'clonedomain'). @@ -351,11 +351,8 @@ sub print_course_creation_page { 'rshm' => 'Resource Space Home', 'opco' => "Open Course" ); - my $html=&Apache::lonxml::xmlbegin(); - $r->print(< - $coursebrowserjs -The LearningOnline Network with CAPA - -$bodytag +END + + my $start_page = + &Apache::loncommon::start_page('Create a New Course',$js); + my $end_page = + &Apache::loncommon::end_page(); + + $r->print(<

$lt{'cinf'}

@@ -582,8 +585,7 @@ $lt{'ndcl'}

- - +$end_page ENDDOCUMENT } @@ -621,15 +623,8 @@ sub create_course { } my $logmsg; - my $html=&Apache::lonxml::xmlbegin(); - my $bodytag=&Apache::loncommon::bodytag('Create a New Course'); - $r->print(< -The LearningOnline Network with CAPA - -$bodytag -ENDENHEAD + my $start_page=&Apache::loncommon::start_page('Create a New Course'); + $r->print($start_page); my $args = { ccuname => $ccuname, @@ -683,7 +678,7 @@ ENDENHEAD - '); + '.&Apache::loncommon::end_page()); return; } # Check the proposed home server for the course @@ -691,7 +686,7 @@ ENDENHEAD ($env{'request.role.domain'}); if (! exists($host_servers{$env{'form.course_home'}})) { $r->print(&mt('Invalid home server for course').': '. - $env{'form.course_home'}.''); + $env{'form.course_home'}.&Apache::loncommon::end_page()); return; } my ($courseid,$crsudom,$crsunum); @@ -711,7 +706,10 @@ ENDENHEAD } # Flush the course logs so reverse user roles immediately updated &Apache::lonnet::flushcourselogs(); - $r->print('

'.&mt('Roles will be active at next login').'.

'); + $r->print('

'.&mt('Roles will be active at next login').'.

'. + '

'. + &mt('Create Another Course').'

'. + &Apache::loncommon::end_page()); } sub construct_course {