--- loncom/automation/batchcreatecourse.pm 2020/07/18 13:49:53 1.40.2.1.4.1
+++ loncom/automation/batchcreatecourse.pm 2020/07/01 20:09:03 1.45
@@ -1,5 +1,5 @@
#
-# $Id: batchcreatecourse.pm,v 1.40.2.1.4.1 2020/07/18 13:49:53 raeburn Exp $
+# $Id: batchcreatecourse.pm,v 1.45 2020/07/01 20:09:03 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -90,6 +90,7 @@ use strict;
# 1
# 1
#
+#
# 1
# 1
#
@@ -165,7 +166,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.
@@ -303,7 +304,7 @@ sub parse_coursereqs {
my $role = '';
my @items = ('title','optional_id','coursecode','defaultcredits','coursehome','reshome','nonstandard','adds','drops','topmap','firstres','clonecrs','clonedom','datemode','dateshift','tinyurls','showphotos','setpolicy','setcontent','setcomment','setkeys','keyauth','disresdis','disablechat','openall','notify_owner','notify_dc','crstype','crsquota','uniquecode');
my @possroles = qw(st ad ep ta in cc co);
- my @dateitems = ('enrollstart','enrollend','accessstart','accessend');
+ my @dateitems = ('enrollstart','enrollend','accessstart','accessend','openallfrom');
my @useritems = ('autharg','authtype','firstname','generation','lastname','middlename','studentID');
my $p = HTML::Parser->new
(
@@ -467,7 +468,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'};
@@ -490,6 +495,8 @@ sub build_course {
if ($firstres eq '') {
if ($crstype eq 'Community') {
$firstres = 'nav';
+ } elsif ($crstype eq 'Placement') {
+ $firstres = 'blank';
} else {
$firstres = 'syl';
}
@@ -584,6 +591,7 @@ sub build_course {
disresdis => $details->{'disresdis'},
disablechat => $details->{'disablechat'},
openall => $details->{'openall'},
+ openallfrom => $details->{'openallfrom'},
firstres => $firstres
};
if ($details->{'textbook'}) {