version 1.39, 2013/12/25 09:52:47
|
version 1.40.2.3, 2020/05/22 20:55:45
|
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> |
# <disablechat>1</disablechat> |
# <disablechat>1</disablechat> |
# <openall></openall> |
# <openall></openall> |
|
# <openallfrom></openallfrom> |
# <notify_dc>1</notify_dc> |
# <notify_dc>1</notify_dc> |
# <notify_owner>1</notify_owner> |
# <notify_owner>1</notify_owner> |
# <owner> |
# <owner> |
Line 152 use strict;
|
Line 154 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 210 sub create_courses {
|
Line 212 sub create_courses {
|
$longroles{'Community'}{$1} = $3; |
$longroles{'Community'}{$1} = $3; |
} |
} |
} |
} |
my ($logmsg,$keysmsg,$newusermsg,$addresult,%codehash); |
my ($logmsg,$keysmsg,$newusermsg,$addresult,%codehash,%instcodes); |
my %enrollcount = (); |
my %enrollcount = (); |
my $newcoursedir = LONCAPA::tempdir().'/addcourse/'.$dom.'/'.$context; |
my $newcoursedir = LONCAPA::tempdir().'/addcourse/'.$dom.'/'.$context; |
if ($context eq 'auto') { |
if ($context eq 'auto') { |
Line 238 sub create_courses {
|
Line 240 sub create_courses {
|
if ($code) { |
if ($code) { |
$codehash{$courseid} = $code; |
$codehash{$courseid} = $code; |
} |
} |
|
if ($details{$num}{'coursecode'} ne '') { |
|
push(@{$instcodes{$details{$num}{'coursecode'}}},$courseid); |
|
} |
} |
} |
} |
} |
} |
} |
} |
} |
} |
} |
return ($output,$logmsg,$keysmsg,\%codehash); |
return ($output,$logmsg,$keysmsg,\%codehash,\%instcodes); |
} |
} |
|
|
############################################################# |
############################################################# |
Line 266 sub parse_coursereqs {
|
Line 271 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','openallfrom'); |
my @useritems = ('autharg','authtype','firstname','generation','lastname','middlename','studentID'); |
my @useritems = ('autharg','authtype','firstname','generation','lastname','middlename','studentID'); |
my $p = HTML::Parser->new |
my $p = HTML::Parser->new |
( |
( |
Line 534 sub build_course {
|
Line 539 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'}, |
disresdis => $details->{'disresdis'}, |
disresdis => $details->{'disresdis'}, |
disablechat => $details->{'disablechat'}, |
disablechat => $details->{'disablechat'}, |
openall => $details->{'openall'}, |
openall => $details->{'openall'}, |
|
openallfrom => $details->{'openallfrom'}, |
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'}; |