version 1.39, 2013/12/25 09:52:47
|
version 1.42, 2016/08/25 22:33:06
|
Line 83 use strict;
|
Line 83 use strict;
|
# <showphotos></showphotos> |
# <showphotos></showphotos> |
# <setpolicy>1</setpolicy> |
# <setpolicy>1</setpolicy> |
# <setcontent>1</setcontent> |
# <setcontent>1</setcontent> |
|
# <setcomment>1</setcomment> |
# <setkeys>0</setkeys> |
# <setkeys>0</setkeys> |
# <keyauth>keyadmin:msu</keyauth> |
# <keyauth>keyadmin:msu</keyauth> |
# <disresdis>1</disresdis> |
# <disresdis>1</disresdis> |
Line 152 use strict;
|
Line 153 use strict;
|
# |
# |
# Many of these are binary options (corresponding to either checkboxes or |
# Many of these are binary options (corresponding to either checkboxes or |
# radio buttons in the interactive CCRS page). Examples include: |
# radio buttons in the interactive CCRS page). Examples include: |
# setpolicy, setcontent, setkeys, disableresdis, disablechat, openall, |
# setpolicy, setcontent, setcomment, setkeys, disableresdis, disablechat, openall, |
# uniquecode |
# uniquecode |
# |
# |
# A value of 1 between opening and closing tags is equivalent to a |
# A value of 1 between opening and closing tags is equivalent to a |
Line 163 use strict;
|
Line 164 use strict;
|
# firstres can be nav, syl, or blank for "Navigate Contents", Syllabus, or |
# firstres can be nav, syl, or blank for "Navigate Contents", Syllabus, or |
# no entry respectively. |
# 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 |
# crsquota is the total disk space permitted for course group portfolio files |
# in all course groups. |
# in all course groups. |
Line 266 sub parse_coursereqs {
|
Line 267 sub parse_coursereqs {
|
my $xlist = 0; |
my $xlist = 0; |
my $userkey = ''; |
my $userkey = ''; |
my $role = ''; |
my $role = ''; |
my @items = ('title','optional_id','coursecode','defaultcredits','coursehome','reshome','nonstandard','adds','drops','topmap','firstres','clonecrs','clonedom','datemode','dateshift','showphotos','setpolicy','setcontent','setkeys','keyauth','disresdis','disablechat','openall','notify_owner','notify_dc','crstype','crsquota','uniquecode'); |
my @items = ('title','optional_id','coursecode','defaultcredits','coursehome','reshome','nonstandard','adds','drops','topmap','firstres','clonecrs','clonedom','datemode','dateshift','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 @possroles = qw(st ad ep ta in cc co); |
my @dateitems = ('enrollstart','enrollend','accessstart','accessend'); |
my @dateitems = ('enrollstart','enrollend','accessstart','accessend'); |
my @useritems = ('autharg','authtype','firstname','generation','lastname','middlename','studentID'); |
my @useritems = ('autharg','authtype','firstname','generation','lastname','middlename','studentID'); |
Line 428 sub build_course {
|
Line 429 sub build_course {
|
$rolenames = $longroles->{'Community'}; |
$rolenames = $longroles->{'Community'}; |
} |
} |
} else { |
} else { |
$crstype = 'Course'; |
if ($details->{'crstype'} eq 'Placement') { |
|
$crstype = $details->{'crstype'}; |
|
} else { |
|
$crstype = 'Course'; |
|
} |
$ccrole = 'cc'; |
$ccrole = 'cc'; |
if (ref($longroles) eq 'HASH') { |
if (ref($longroles) eq 'HASH') { |
$rolenames = $longroles->{'Course'}; |
$rolenames = $longroles->{'Course'}; |
Line 451 sub build_course {
|
Line 456 sub build_course {
|
if ($firstres eq '') { |
if ($firstres eq '') { |
if ($crstype eq 'Community') { |
if ($crstype eq 'Community') { |
$firstres = 'nav'; |
$firstres = 'nav'; |
|
} elsif ($crstype eq 'Placement') { |
|
$firstres = 'blank'; |
} else { |
} else { |
$firstres = 'syl'; |
$firstres = 'syl'; |
} |
} |
Line 534 sub build_course {
|
Line 541 sub build_course {
|
endaccess => $details->{'accessend'}, |
endaccess => $details->{'accessend'}, |
setpolicy => $details->{'setpolicy'}, |
setpolicy => $details->{'setpolicy'}, |
setcontent => $details->{'setcontent'}, |
setcontent => $details->{'setcontent'}, |
|
setcomment => $details->{'setcomment'}, |
reshome => $reshome, |
reshome => $reshome, |
setkeys => $details->{'setkeys'}, |
setkeys => $details->{'setkeys'}, |
keyauth => $details->{'keyauth'}, |
keyauth => $details->{'keyauth'}, |
Line 542 sub build_course {
|
Line 550 sub build_course {
|
openall => $details->{'openall'}, |
openall => $details->{'openall'}, |
firstres => $firstres |
firstres => $firstres |
}; |
}; |
|
if ($details->{'textbook'}) { |
|
$courseargs->{'textbook'} = $details->{'textbook'}; |
|
} |
my %host_servers = &Apache::lonnet::get_servers($cdom,'library'); |
my %host_servers = &Apache::lonnet::get_servers($cdom,'library'); |
if (! exists($host_servers{$details->{'coursehome'}})) { |
if (! exists($host_servers{$details->{'coursehome'}})) { |
$$logmsg .= &mt('Invalid home server for course').': '.$details->{'coursehome'}; |
$$logmsg .= &mt('Invalid home server for course').': '.$details->{'coursehome'}; |