--- loncom/automation/batchcreatecourse.pm 2013/12/25 09:52:47 1.39 +++ loncom/automation/batchcreatecourse.pm 2016/04/02 04:30:47 1.41 @@ -1,5 +1,5 @@ # -# $Id: batchcreatecourse.pm,v 1.39 2013/12/25 09:52:47 raeburn Exp $ +# $Id: batchcreatecourse.pm,v 1.41 2016/04/02 04:30:47 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -163,7 +163,7 @@ use strict; # firstres can be nav, syl, or blank for "Navigate Contents", Syllabus, or # no entry respectively. # -# crstype can be Course or Community +# crstype can be Course, Community or Placement # # crsquota is the total disk space permitted for course group portfolio files # in all course groups. @@ -428,7 +428,11 @@ sub build_course { $rolenames = $longroles->{'Community'}; } } else { - $crstype = 'Course'; + if ($details->{'crstype'} eq 'Placement') { + $crstype = $details->{'crstype'}; + } else { + $crstype = 'Course'; + } $ccrole = 'cc'; if (ref($longroles) eq 'HASH') { $rolenames = $longroles->{'Course'}; @@ -451,6 +455,8 @@ sub build_course { if ($firstres eq '') { if ($crstype eq 'Community') { $firstres = 'nav'; + } elsif ($crstype eq 'Placement') { + $firstres = 'blank'; } else { $firstres = 'syl'; } @@ -542,6 +548,9 @@ sub build_course { openall => $details->{'openall'}, firstres => $firstres }; + if ($details->{'textbook'}) { + $courseargs->{'textbook'} = $details->{'textbook'}; + } my %host_servers = &Apache::lonnet::get_servers($cdom,'library'); if (! exists($host_servers{$details->{'coursehome'}})) { $$logmsg .= &mt('Invalid home server for course').': '.$details->{'coursehome'};