version 1.85, 2014/06/16 01:42:22
|
version 1.87, 2015/05/21 23:40:09
|
Line 939 END
|
Line 939 END
|
if ($action eq 'new') { |
if ($action eq 'new') { |
my $jsextra; |
my $jsextra; |
if (($state eq 'courseinfo') || ($state eq 'codepick')) { |
if (($state eq 'courseinfo') || ($state eq 'codepick')) { |
$jsextra = "\n".&Apache::loncommon::coursebrowser_javascript($dom); |
$jsextra = "\n".&Apache::loncommon::coursebrowser_javascript($dom,'','','','','', |
|
$newinstcode); |
} elsif ($state eq 'enrollment') { |
} elsif ($state eq 'enrollment') { |
if (($env{'form.crstype'} eq 'official') && |
if (($env{'form.crstype'} eq 'official') && |
(&Apache::lonnet::auto_run('',$dom))) { |
(&Apache::lonnet::auto_run('',$dom))) { |
Line 2788 sub print_review {
|
Line 2789 sub print_review {
|
|
|
my $enrollrow_title = &mt('Default Access Dates').'<br />'. |
my $enrollrow_title = &mt('Default Access Dates').'<br />'. |
'('.&Apache::lonnet::plaintext('st',$category).')'; |
'('.&Apache::lonnet::plaintext('st',$category).')'; |
|
my $instcode; |
if ($env{'form.crstype'} eq 'official') { |
if ($env{'form.crstype'} eq 'official') { |
if ((ref($codetitles) eq 'ARRAY') && (ref($cat_titles) eq 'HASH')) { |
if ((ref($codetitles) eq 'ARRAY') && (ref($cat_titles) eq 'HASH')) { |
foreach my $title (@{$codetitles}) { |
foreach my $title (@{$codetitles}) { |
Line 2803 sub print_review {
|
Line 2805 sub print_review {
|
} |
} |
} |
} |
} |
} |
|
if (ref($code_order) eq 'ARRAY') { |
|
foreach my $item (@{$code_order}) { |
|
$instcode .= $env{'form.instcode_'.$item}; |
|
} |
|
} |
$inst_headers .= '<th>'.&mt('Credits').'</th>'; |
$inst_headers .= '<th>'.&mt('Credits').'</th>'; |
if ($instcredits) { |
if ($instcredits) { |
$inst_values .= '<td>'.$instcredits.'</td>'; |
$inst_values .= '<td>'.$instcredits.'</td>'; |
Line 2890 sub print_review {
|
Line 2897 sub print_review {
|
($env{'form.clonedom'} =~ /^$match_domain$/)) { |
($env{'form.clonedom'} =~ /^$match_domain$/)) { |
my $canclone = &Apache::loncoursequeueadmin::can_clone_course($uname, |
my $canclone = &Apache::loncoursequeueadmin::can_clone_course($uname, |
$udom,$env{'form.clonecrs'},$env{'form.clonedom'}, |
$udom,$env{'form.clonecrs'},$env{'form.clonedom'}, |
$env{'form.crstype'}); |
$env{'form.crstype'},$dom,$instcode); |
if ($canclone) { |
if ($canclone) { |
my %courseenv = &Apache::lonnet::userenvironment($env{'form.clonedom'}, |
my %courseenv = &Apache::lonnet::userenvironment($env{'form.clonedom'}, |
$env{'form.clonecrs'},('description','internal.coursecode')); |
$env{'form.clonecrs'},('description','internal.coursecode')); |
Line 3588 sub print_request_outcome {
|
Line 3595 sub print_request_outcome {
|
my $canclone = |
my $canclone = |
&Apache::loncoursequeueadmin::can_clone_course($env{'user.name'}, |
&Apache::loncoursequeueadmin::can_clone_course($env{'user.name'}, |
$env{'user.domain'},$env{'form.clonecrs'},$env{'form.clonedom'}, |
$env{'user.domain'},$env{'form.clonecrs'},$env{'form.clonedom'}, |
$crstype); |
$crstype,$dom,$instcode); |
if ($canclone) { |
if ($canclone) { |
$clonecrs = $env{'form.clonecrs'}; |
$clonecrs = $env{'form.clonecrs'}; |
$clonedom = $env{'form.clonedom'}; |
$clonedom = $env{'form.clonedom'}; |
Line 3670 sub process_request {
|
Line 3677 sub process_request {
|
$dom,$crstype,$limit,\$message); |
$dom,$crstype,$limit,\$message); |
} elsif ($val eq 'validate') { |
} elsif ($val eq 'validate') { |
my ($inststatuslist,$validationchk,$validation,%custominfo); |
my ($inststatuslist,$validationchk,$validation,%custominfo); |
|
if (ref($details) eq 'HASH') { |
|
if ($details->{'clonecrs'}) { |
|
$custominfo{'_LC_clonefrom'} = $details->{'clonedom'}.'_'.$details->{'clonecrs'}; |
|
} |
|
} |
if (@inststatuses > 0) { |
if (@inststatuses > 0) { |
$inststatuslist = join(',',@inststatuses); |
$inststatuslist = join(',',@inststatuses); |
} |
} |
Line 3762 sub process_request {
|
Line 3774 sub process_request {
|
&mt('Your request is being processed; this page will update when processing is complete.'). |
&mt('Your request is being processed; this page will update when processing is complete.'). |
'</div>'); |
'</div>'); |
$r->rflush(); |
$r->rflush(); |
|
if (ref($details) eq 'HASH') { |
|
if ($details->{'clonecrs'}) { |
|
$customitems{'_LC_clonefrom'} = $details->{'clonedom'}.'_'.$details->{'clonecrs'}; |
|
} |
|
} |
my ($result,$postprocess) = &Apache::loncoursequeueadmin::course_creation($dom,$cnum, |
my ($result,$postprocess) = &Apache::loncoursequeueadmin::course_creation($dom,$cnum, |
'autocreate',$details,\$logmsg,\$newusermsg,\$addresult, |
'autocreate',$details,\$logmsg,\$newusermsg,\$addresult, |
\$enrollcount,\$response,\$keysmsg,\%domdefs,\%longroles, |
\$enrollcount,\$response,\$keysmsg,\%domdefs,\%longroles, |
Line 4452 sub print_textbook_form {
|
Line 4469 sub print_textbook_form {
|
my ($clonedom,$clonecrs) = split(/_/,$item); |
my ($clonedom,$clonecrs) = split(/_/,$item); |
if (ref($prefab{$type}{$item}) eq 'HASH') { |
if (ref($prefab{$type}{$item}) eq 'HASH') { |
if (&Apache::loncoursequeueadmin::can_clone_course($env{'user.name'}, |
if (&Apache::loncoursequeueadmin::can_clone_course($env{'user.name'}, |
$env{'user.domain'},$clonecrs,$clonedom,$crstype)) { |
$env{'user.domain'},$clonecrs,$clonedom,$crstype,$dom)) { |
|
|
my $num = $prefab{$type}{$item}{'order'}; |
my $num = $prefab{$type}{$item}{'order'}; |
$ordered{$type}{$num} = $item; |
$ordered{$type}{$num} = $item; |
Line 4794 sub process_textbook_request {
|
Line 4811 sub process_textbook_request {
|
if (&Apache::lonnet::homeserver($clonecrs,$clonedom) ne 'no_host') { |
if (&Apache::lonnet::homeserver($clonecrs,$clonedom) ne 'no_host') { |
my $canclone = |
my $canclone = |
&Apache::loncoursequeueadmin::can_clone_course($env{'user.name'}, |
&Apache::loncoursequeueadmin::can_clone_course($env{'user.name'}, |
$env{'user.domain'},$clonecrs,$clonedom,$crstype); |
$env{'user.domain'},$clonecrs,$clonedom,$crstype,$dom); |
unless ($canclone) { |
unless ($canclone) { |
undef($clonecrs); |
undef($clonecrs); |
undef($clonedom); |
undef($clonedom); |