version 1.90, 2006/05/30 20:05:05
|
version 1.93.2.2, 2006/06/29 17:47:19
|
Line 238 sub copydbfiles {
|
Line 238 sub copydbfiles {
|
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)/) { |
©db($origcrsid,$newcrsid,$_); |
©db($origcrsid,$newcrsid,$_); |
my $histfile=$_; |
|
$histfile=~s/\.db$/\.hist/; |
|
©file($origcrsid,$newcrsid,$histfile); |
|
} |
} |
} |
} |
} |
} |
Line 259 sub copycoursefiles {
|
Line 256 sub copycoursefiles {
|
|
|
sub print_course_creation_page { |
sub print_course_creation_page { |
my $r=shift; |
my $r=shift; |
my $crstype = 'Group'; |
my $crstype = 'Course'; |
if ($env{'form.phase'} eq 'courseone') { |
# my $crstype = 'Group'; |
$crstype = 'Course'; |
# if ($env{'form.phase'} eq 'courseone') { |
} |
# $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 372 function validate(formname) {
|
Line 370 function validate(formname) {
|
'ndcl' => "Notification to domain coordinator via LON-CAPA message when enrollment changes occur during the automated update?", |
'ndcl' => "Notification to domain coordinator via LON-CAPA message when enrollment changes occur during the automated update?", |
'irsp' => "Include retrieval of student photographs?", |
'irsp' => "Include retrieval of student photographs?", |
'rshm' => 'Resource Space Home', |
'rshm' => 'Resource Space Home', |
|
'cgrs' => "Course Group Settings", |
|
'cgrq' => "Set a quota for the total disk space available for storage of course group portfolio files.", |
'opco' => "Open Course", |
'opco' => "Open Course", |
'ginf' => "Group Information", |
'ginf' => "Group Information", |
'gtit' => "Group Title", |
'gtit' => "Group Title", |
Line 392 function validate(formname) {
|
Line 392 function validate(formname) {
|
'gc' => "Group Coordinator", |
'gc' => "Group Coordinator", |
'gid' => "Group ID", |
'gid' => "Group ID", |
'crgr' => "Create Group", |
'crgr' => "Create Group", |
); |
'grts' => "Group Teams Settings", |
|
'grtq' => "Set a quota for the total disk space available for storage of group team portfolio files.", |
|
|
|
); |
my $js = <<END; |
my $js = <<END; |
<script type="text/javascript"> |
<script type="text/javascript"> |
var editbrowser = null; |
var editbrowser = null; |
Line 426 END
|
Line 428 END
|
&Apache::loncommon::start_page($titles{$env{'form.phase'}},$js); |
&Apache::loncommon::start_page($titles{$env{'form.phase'}},$js); |
my $end_page = |
my $end_page = |
&Apache::loncommon::end_page(); |
&Apache::loncommon::end_page(); |
my $type = $crstype; |
my $crumbs = |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs(&mt('[_1] Information', |
&Apache::lonhtmlcommon::breadcrumbs($crstype.' Information', |
$type),'Create_Course', |
'Create_Course',undef, |
undef,'Create_Courses'); |
'Create_Courses'); |
$r->print($start_page.$crumbs); |
$r->print($start_page.$crumbs); |
if ($crstype eq 'Course') { |
if ($crstype eq 'Course') { |
$r->print(<<ENDDOCUMENT); |
$r->print(<<ENDDOCUMENT); |
Line 619 $lt{'ndcl'}<br/>
|
Line 621 $lt{'ndcl'}<br/>
|
<input type="radio" name="showphotos" value="0" checked="true" />$lt{'no'} |
<input type="radio" name="showphotos" value="0" checked="true" />$lt{'no'} |
</label> |
</label> |
</p> |
</p> |
|
<p> |
|
<h2>$lt{'cgrs'}</h2> |
|
$lt{'cgrq'} |
|
<input type="text" name="crsquota" value="20" size="6" />Mb |
|
</p> |
<hr /> |
<hr /> |
<h2>$lt{'cc'}</h2> |
<h2>$lt{'cc'}</h2> |
<p> |
<p> |
Line 741 $lt{'asov'}.
|
Line 748 $lt{'asov'}.
|
<input type="text" name="reshome" size="30" value="/res/$defdom/" /> |
<input type="text" name="reshome" size="30" value="/res/$defdom/" /> |
</label> |
</label> |
</p> |
</p> |
|
<p> |
|
<h2>$lt{'grts'}</h2> |
|
$lt{'grtq'} |
|
<input type="text" name="crsquota" value="20" />Mb |
|
</p> |
<hr /> |
<hr /> |
<h2>$lt{'gc'}</h2> |
<h2>$lt{'gc'}</h2> |
<p> |
<p> |
Line 802 sub create_course {
|
Line 814 sub create_course {
|
} |
} |
} |
} |
my $logmsg; |
my $logmsg; |
my $start_page=&Apache::loncommon::start_page(&mt('Create a New [_1]',$crstype)); |
my $start_page=&Apache::loncommon::start_page('Create a New '.$crstype); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Creation Outcome','Create_Course',undef,'Create_Courses'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Creation Outcome','Create_Course',undef,'Create_Courses'); |
|
|
$r->print($start_page.$crumbs); |
$r->print($start_page.$crumbs); |
Line 817 sub create_course {
|
Line 829 sub create_course {
|
course_home => $env{'form.course_home'}, |
course_home => $env{'form.course_home'}, |
nonstandard => $env{'form.nonstandard'}, |
nonstandard => $env{'form.nonstandard'}, |
crscode => $env{'form.crscode'}, |
crscode => $env{'form.crscode'}, |
|
crsquota => $env{'form.crsquota'}, |
clonecourse => $env{'form.clonecourse'}, |
clonecourse => $env{'form.clonecourse'}, |
clonedomain => $env{'form.clonedomain'}, |
clonedomain => $env{'form.clonedomain'}, |
crsid => $env{'form.crsid'}, |
crsid => $env{'form.crsid'}, |
Line 969 sub construct_course {
|
Line 982 sub construct_course {
|
if ($args->{'crscode'}) { |
if ($args->{'crscode'}) { |
$cenv{'internal.coursecode'}=$args->{'crscode'}; |
$cenv{'internal.coursecode'}=$args->{'crscode'}; |
} |
} |
|
if ($args->{'crsquota'} ne '') { |
|
$cenv{'internal.coursequota'}=$args->{'crsquota'}; |
|
} else { |
|
$cenv{'internal.coursequota'}=$args->{'crsquota'} = 20; |
|
} |
if ($args->{'ccuname'}) { |
if ($args->{'ccuname'}) { |
$cenv{'internal.courseowner'} = $args->{'ccuname'}; |
$cenv{'internal.courseowner'} = $args->{'ccuname'}; |
} else { |
} else { |
Line 1168 sub construct_course {
|
Line 1186 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 or Group Space'); |
&Apache::loncommon::start_page('Create a New Course'); |
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 1179 sub print_intro_page {
|
Line 1197 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 1211 sub upload_batchfile {
|
Line 1229 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/Group Attributes File','Create_Course',undef,'Create_Courses'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Upload Course 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 or groups attributes file').'</h3>'); |
$r->print('<h3>'.&mt('Upload a courses 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" />'. |