--- loncom/interface/loncreatecourse.pm 2004/07/01 21:54:24 1.62 +++ loncom/interface/loncreatecourse.pm 2004/09/25 17:52:03 1.68 @@ -1,7 +1,7 @@ -#meserver The LearningOnline Network +# The LearningOnline Network # Create a course # -# $Id: loncreatecourse.pm,v 1.62 2004/07/01 21:54:24 www Exp $ +# $Id: loncreatecourse.pm,v 1.68 2004/09/25 17:52:03 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -53,8 +53,8 @@ sub crsdirlist { sub innercrsdirlist { my ($courseid,$which,$path)=@_; my $dirptr=16384; - unless ($which) { $which=''; } - unless ($path) { $path=''; } + unless ($which) { $which=''; } else { $which.='/'; } + unless ($path) { $path=''; } else { $path.='/'; } my %crsdata=&Apache::lonnet::coursedescription($courseid); my @listing=&Apache::lonnet::dirlist ($which,$crsdata{'domain'},$crsdata{'num'}, @@ -64,11 +64,11 @@ sub innercrsdirlist { my @unpackline = split (/\&/,$_); if ($unpackline[3]&$dirptr) { # is a directory, recurse - &innercrsdirlist($courseid,$which.'/'.$unpackline[0], - $path.'/'.$unpackline[0]); + &innercrsdirlist($courseid,$which.$unpackline[0], + $path.$unpackline[0]); } else { # is a file, put into output - push (@output,$path.'/'.$unpackline[0]); + push (@output,$path.$unpackline[0]); } } } @@ -123,7 +123,9 @@ sub copyfile { &readfile($origcrsid,$which), ( '/uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/' - => '/uploaded/'. $newcrsdata{'domain'}.'/'. $newcrsdata{'num'}.'/' + => '/uploaded/'. $newcrsdata{'domain'}.'/'. $newcrsdata{'num'}.'/', + '/public/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/' + => '/public/'. $newcrsdata{'domain'}.'/'. $newcrsdata{'num'}.'/' ))); } } @@ -278,7 +280,7 @@ sub print_course_creation_page { 'snid' => "Section Numbers and corresponding LON-CAPA section/group IDs", 'csli' => "a comma separated list of institutional section numbers, each separated by a colon from the (optional) corresponding section/group ID to be used in LON-CAPA e.g., 001:1,002:2", 'crcs' => "Crosslisted courses", - 'cscs' => "a comma separated list of course sections crosslisted with the current course, with each entry including the institutional course section name followed by a colon and then the (optional) groupID to be used in LON-CAPA, e.g., fs03ent231001:ent1,fs03bot231001:bot1,fs03zol231002:bot2", + 'cscs' => "a comma separated list of course sections crosslisted with the current course, with each entry including the institutional course section name followed by a colon and then the (optional) groupID to be used in LON-CAPA, e.g., fs03ent231001:ent1,fs03bot231001:bot1,fs03zol231002:zol2", 'crco' => "Course Content", 'cncr' => "Completely new course", 'cecr' => "Clone an existing course", @@ -356,28 +358,41 @@ $helplink