';
}
@@ -1346,9 +1348,26 @@ sub dates_from_form {
}
sub courseinfo_form {
- my ($dom,$formname,$crstype) = @_;
- my $output = '
'.&Apache::lonhtmlcommon::start_pick_box().
- &Apache::lonhtmlcommon::row_title('Course Description').
+ my ($dom,$formname,$crstype,$next) = @_;
+ my $nodescr = &mt('You must provide a (brief) course description.');
+ my $js_validate = <<"ENDJS";
+
+
+ENDJS
+
+ my $output .= $js_validate."\n".'
'.&Apache::lonhtmlcommon::start_pick_box().
+ &Apache::lonhtmlcommon::row_title('Course Description').
'';
my ($home_server_pick,$numlib) =
&Apache::loncommon::home_server_form_item($dom,'chome',
@@ -1510,7 +1529,7 @@ sub get_course_dom {
}
sub display_navbuttons {
- my ($r,$formname,$prev,$prevtext,$next,$nexttext) = @_;
+ my ($r,$formname,$prev,$prevtext,$next,$nexttext,$state) = @_;
$r->print('
');
if ($prev) {
$r->print('
@@ -1523,7 +1542,10 @@ sub display_navbuttons {
onclick="javascript:history.back()"/>
');
}
- if ($next) {
+ if ($state eq 'courseinfo') {
+ $r->print('
+ ');
+ } elsif ($next) {
$r->print('
');
@@ -1653,6 +1675,20 @@ sub print_request_outcome {
if (exists($env{'form.instcode'})) {
$instcode = $env{'form.instcode'};
}
+ my $clonecrs = '';
+ my $clonedom = '';
+ if (($env{'form.clonecrs'} =~ /^($match_courseid)$/) &&
+ ($env{'form.clonedom'} =~ /^($match_domain)$/)) {
+ my $clonehome = &Apache::lonnet::homeserver($env{'form.clonedom'},$env{'form.clonecrs'});
+ if ($clonehome ne 'no_host') {
+ my $canclone = &can_clone_course($env{'user.name'},$env{'user.domain'},
+ $env{'form.clonecrs'}, $env{'form.clonedom'});
+ if ($canclone) {
+ $clonecrs = $env{'form.clonecrs'};
+ $clonedom = $env{'form.clonedom'};
+ }
+ }
+ }
my $details = {
owner => $env{'user.name'},
domain => $env{'user.domain'},
@@ -1662,8 +1698,8 @@ sub print_request_outcome {
cdescr => $env{'form.cdescr'},
crstype => $env{'form.crstype'},
instcode => $instcode,
- clonedom => $env{'form.clonedom'},
- clonecrs => $env{'form.clonecrs'},
+ clonedom => $clonedom,
+ clonecrs => $clonecrs,
datemode => $env{'form.datemode'},
dateshift => $env{'form.dateshift'},
sectotal => $sectotal,