version 1.93.2.2, 2006/06/29 17:47:19
|
version 1.95, 2006/07/20 22:09:36
|
Line 236 sub copydbfiles {
|
Line 236 sub copydbfiles {
|
foreach (&crsdirlist($origcrsid)) { |
foreach (&crsdirlist($origcrsid)) { |
if ($_=~/\.db$/) { |
if ($_=~/\.db$/) { |
unless |
unless |
($_=~/^(nohist\_|discussiontimes|classlist|versionupdate|resourcedata|\Q$origcrs_discussion\E|slots|slot_reservations|gradingqueue|reviewqueue|CODEs)/) { |
($_=~/^(nohist\_|discussiontimes|classlist|versionupdate|resourcedata|\Q$origcrs_discussion\E|slots|slot_reservations|gradingqueue|reviewqueue|CODEs|groupmembership)/) { |
©db($origcrsid,$newcrsid,$_); |
©db($origcrsid,$newcrsid,$_); |
} |
} |
} |
} |
Line 256 sub copycoursefiles {
|
Line 256 sub copycoursefiles {
|
|
|
sub print_course_creation_page { |
sub print_course_creation_page { |
my $r=shift; |
my $r=shift; |
my $crstype = 'Course'; |
my $crstype = 'Group'; |
# my $crstype = 'Group'; |
if ($env{'form.phase'} eq 'courseone') { |
# if ($env{'form.phase'} eq 'courseone') { |
$crstype = 'Course'; |
# $crstype = 'Course'; |
} |
# } |
|
my $defdom=$env{'request.role.domain'}; |
my $defdom=$env{'request.role.domain'}; |
my %host_servers = &Apache::loncommon::get_library_servers($defdom); |
my %host_servers = &Apache::loncommon::get_library_servers($defdom); |
my $course_home = '<select name="course_home" size="1">'."\n"; |
my $course_home = '<select name="course_home" size="1">'."\n"; |
Line 833 sub create_course {
|
Line 832 sub create_course {
|
clonecourse => $env{'form.clonecourse'}, |
clonecourse => $env{'form.clonecourse'}, |
clonedomain => $env{'form.clonedomain'}, |
clonedomain => $env{'form.clonedomain'}, |
crsid => $env{'form.crsid'}, |
crsid => $env{'form.crsid'}, |
curruser => $env{'user.name'}, |
curruser => $env{'user.name'}.':'.$env{'user.domain'}, |
crssections => $env{'form.crssections'}, |
crssections => $env{'form.crssections'}, |
crsxlist => $env{'form.crsxlist'}, |
crsxlist => $env{'form.crsxlist'}, |
autoadds => $env{'form.autoadds'}, |
autoadds => $env{'form.autoadds'}, |
Line 918 sub construct_course {
|
Line 917 sub construct_course {
|
my $crstype = lc($args->{'crstype'}); |
my $crstype = lc($args->{'crstype'}); |
my %cenv=(); |
my %cenv=(); |
$$courseid=&Apache::lonnet::createcourse($args->{'course_domain'}, |
$$courseid=&Apache::lonnet::createcourse($args->{'course_domain'}, |
$args->{'cdescr'}, |
$args->{'cdescr'}, |
$args->{'curl'}, |
$args->{'curl'}, |
$args->{'course_home'}, |
$args->{'course_home'}, |
$args->{'nonstandard'}, |
$args->{'nonstandard'}, |
$args->{'crscode'}, |
$args->{'crscode'}, |
$args->{'ccuname'}, |
$args->{'ccuname'}.':'. |
$args->{'crstype'}); |
$args->{'ccdomain'}, |
|
$args->{'crstype'}); |
|
|
# Note: The testing routines depend on this being output; see |
# Note: The testing routines depend on this being output; see |
# Utils::Course. This needs to at least be output as a comment |
# Utils::Course. This needs to at least be output as a comment |
Line 988 sub construct_course {
|
Line 988 sub construct_course {
|
$cenv{'internal.coursequota'}=$args->{'crsquota'} = 20; |
$cenv{'internal.coursequota'}=$args->{'crsquota'} = 20; |
} |
} |
if ($args->{'ccuname'}) { |
if ($args->{'ccuname'}) { |
$cenv{'internal.courseowner'} = $args->{'ccuname'}; |
$cenv{'internal.courseowner'} = $args->{'ccuname'}. |
|
':'.$args->{'ccdomain'}; |
} else { |
} else { |
$cenv{'internal.courseowner'} = $args->{'curruser'}; |
$cenv{'internal.courseowner'} = $args->{'curruser'}; |
} |
} |
Line 1047 sub construct_course {
|
Line 1048 sub construct_course {
|
my @notified = (); |
my @notified = (); |
if ($args->{'notify_owner'}) { |
if ($args->{'notify_owner'}) { |
if ($args->{'ccuname'} ne '') { |
if ($args->{'ccuname'} ne '') { |
push(@notified,$args->{'ccuname'}.'@'.$args->{'ccdomain'}); |
push(@notified,$args->{'ccuname'}.':'.$args->{'ccdomain'}); |
} |
} |
} |
} |
if ($args->{'notify_dc'}) { |
if ($args->{'notify_dc'}) { |
Line 1186 sub construct_course {
|
Line 1187 sub construct_course {
|
sub print_intro_page { |
sub print_intro_page { |
my $r = shift; |
my $r = shift; |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Create a New Course'); |
&Apache::loncommon::start_page('Create a New Course or Group Space'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Creation Options','Create_Course',undef,'Create_Courses'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Creation Options','Create_Course',undef,'Create_Courses'); |
my $end_page = |
my $end_page = |
&Apache::loncommon::end_page(); |
&Apache::loncommon::end_page(); |
Line 1197 sub print_intro_page {
|
Line 1198 sub print_intro_page {
|
short_description => |
short_description => |
&mt('Create a new course by completing an online form.'), |
&mt('Create a new course by completing an online form.'), |
}, |
}, |
# { internal_name => 'groupone', |
{ internal_name => 'groupone', |
# name => &mt('Create a single collaborative group space '), |
name => &mt('Create a single collaborative group space '), |
# short_description => |
short_description => |
# &mt('Create a new group space for non-course use by completing an online form .'), |
&mt('Create a new group space for non-course use by completing an online form .'), |
# }, |
}, |
{ internal_name => 'batchone', |
{ internal_name => 'batchone', |
name => &mt('Create courses/groups by uploading an attributes file'), |
name => &mt('Create courses/groups by uploading an attributes file'), |
short_description => |
short_description => |
Line 1229 sub upload_batchfile {
|
Line 1230 sub upload_batchfile {
|
my $r = shift; |
my $r = shift; |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Create a New Course or Group Space'); |
&Apache::loncommon::start_page('Create a New Course or Group Space'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Upload Course Attributes File','Create_Course',undef,'Create_Courses'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Upload Course/Group Attributes File','Create_Course',undef,'Create_Courses'); |
my $end_page = |
my $end_page = |
&Apache::loncommon::end_page(); |
&Apache::loncommon::end_page(); |
$r->print($start_page.$crumbs); |
$r->print($start_page.$crumbs); |
$r->print('<h3>'.&mt('Upload a courses attributes file').'</h3>'); |
$r->print('<h3>'.&mt('Upload a courses or groups attributes file').'</h3>'); |
$r->print('<form name="batchcreate" method="post" '. |
$r->print('<form name="batchcreate" method="post" '. |
'enctype="multipart/form-data" action="/adm/createcourse">'. |
'enctype="multipart/form-data" action="/adm/createcourse">'. |
'<input type="file" name="coursecreatorxml" />'. |
'<input type="file" name="coursecreatorxml" />'. |