--- loncom/interface/loncreatecourse.pm 2004/09/09 19:24:01 1.67 +++ loncom/interface/loncreatecourse.pm 2004/12/08 23:27:29 1.74 @@ -1,7 +1,7 @@ # The LearningOnline Network # Create a course # -# $Id: loncreatecourse.pm,v 1.67 2004/09/09 19:24:01 albertel Exp $ +# $Id: loncreatecourse.pm,v 1.74 2004/12/08 23:27:29 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,7 +38,6 @@ use Apache::londocs; use Apache::lonlocal; use Apache::londropadd; use lib '/home/httpd/lib/perl'; -use localenroll; # ================================================ Get course directory listing @@ -139,6 +138,9 @@ sub copydb { my %newcrsdata= &Apache::lonnet::coursedescription($newcrsid); my %data=&Apache::lonnet::dump ($which,$origcrsdata{'domain'},$origcrsdata{'num'}); + foreach my $key (keys(%data)) { + if ($key=~/^internal./) { delete($data{$key}); } + } return &Apache::lonnet::put ($which,\%data,$newcrsdata{'domain'},$newcrsdata{'num'}); } @@ -204,7 +206,9 @@ sub copyresourcedb { sub copyuserfiles { my ($origcrsid,$newcrsid)=@_; foreach (&crsdirlist($origcrsid,'userfiles')) { - ©file($origcrsid,$newcrsid,$_); + if ($_ !~m|^scantron_|) { + ©file($origcrsid,$newcrsid,$_); + } } } # ========================================================== Copy all userfiles @@ -252,7 +256,7 @@ sub print_course_creation_page { ($ENV{'request.role.domain'},'clonedomain'). &Apache::loncommon::selectcourse_link ('ccrs','clonecourse','clonedomain'); - my $coursebrowserjs=&Apache::loncommon::coursebrowser_javascript(); + my $coursebrowserjs=&Apache::loncommon::coursebrowser_javascript($ENV{'request.role.domain'}); my $starttime = time; my $endtime = time+(6*30*24*60*60); # 6 months from now, approx my $enroll_table = &Apache::londropadd::date_setting_table($starttime,$endtime,'create_enrolldates'); @@ -358,28 +362,41 @@ $helplink