--- loncom/interface/loncreatecourse.pm 2006/05/30 20:05:05 1.90 +++ loncom/interface/loncreatecourse.pm 2006/07/11 02:28:22 1.94 @@ -1,7 +1,7 @@ # The LearningOnline Network # Create a course # -# $Id: loncreatecourse.pm,v 1.90 2006/05/30 20:05:05 raeburn Exp $ +# $Id: loncreatecourse.pm,v 1.94 2006/07/11 02:28:22 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -238,9 +238,6 @@ sub copydbfiles { unless ($_=~/^(nohist\_|discussiontimes|classlist|versionupdate|resourcedata|\Q$origcrs_discussion\E|slots|slot_reservations|gradingqueue|reviewqueue|CODEs)/) { ©db($origcrsid,$newcrsid,$_); - my $histfile=$_; - $histfile=~s/\.db$/\.hist/; - ©file($origcrsid,$newcrsid,$histfile); } } } @@ -372,6 +369,8 @@ function validate(formname) { 'ndcl' => "Notification to domain coordinator via LON-CAPA message when enrollment changes occur during the automated update?", 'irsp' => "Include retrieval of student photographs?", '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", 'ginf' => "Group Information", 'gtit' => "Group Title", @@ -392,8 +391,10 @@ function validate(formname) { 'gc' => "Group Coordinator", 'gid' => "Group ID", '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 = < var editbrowser = null; @@ -426,10 +427,10 @@ END &Apache::loncommon::start_page($titles{$env{'form.phase'}},$js); my $end_page = &Apache::loncommon::end_page(); - my $type = $crstype; - my $crumbs = &Apache::lonhtmlcommon::breadcrumbs(&mt('[_1] Information', - $type),'Create_Course', - undef,'Create_Courses'); + my $crumbs = + &Apache::lonhtmlcommon::breadcrumbs($crstype.' Information', + 'Create_Course',undef, + 'Create_Courses'); $r->print($start_page.$crumbs); if ($crstype eq 'Course') { $r->print(< $lt{'no'}

+

+

$lt{'cgrs'}

+$lt{'cgrq'} +Mb +


$lt{'cc'}

@@ -741,6 +747,11 @@ $lt{'asov'}.

+

+

$lt{'grts'}

+$lt{'grtq'} +Mb +


$lt{'gc'}

@@ -802,7 +813,7 @@ sub create_course { } } 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'); $r->print($start_page.$crumbs); @@ -817,10 +828,11 @@ sub create_course { course_home => $env{'form.course_home'}, nonstandard => $env{'form.nonstandard'}, crscode => $env{'form.crscode'}, + crsquota => $env{'form.crsquota'}, clonecourse => $env{'form.clonecourse'}, clonedomain => $env{'form.clonedomain'}, crsid => $env{'form.crsid'}, - curruser => $env{'user.name'}, + curruser => $env{'user.name'}.':'.$env{'user.domain'}, crssections => $env{'form.crssections'}, crsxlist => $env{'form.crsxlist'}, autoadds => $env{'form.autoadds'}, @@ -905,13 +917,14 @@ sub construct_course { my $crstype = lc($args->{'crstype'}); my %cenv=(); $$courseid=&Apache::lonnet::createcourse($args->{'course_domain'}, - $args->{'cdescr'}, - $args->{'curl'}, - $args->{'course_home'}, - $args->{'nonstandard'}, - $args->{'crscode'}, - $args->{'ccuname'}, - $args->{'crstype'}); + $args->{'cdescr'}, + $args->{'curl'}, + $args->{'course_home'}, + $args->{'nonstandard'}, + $args->{'crscode'}, + $args->{'ccuname'}.':'. + $args->{'ccdomain'}, + $args->{'crstype'}); # Note: The testing routines depend on this being output; see # Utils::Course. This needs to at least be output as a comment @@ -969,8 +982,14 @@ sub construct_course { if ($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'}) { - $cenv{'internal.courseowner'} = $args->{'ccuname'}; + $cenv{'internal.courseowner'} = $args->{'ccuname'}. + ':'.$args->{'ccdomain'}; } else { $cenv{'internal.courseowner'} = $args->{'curruser'}; } @@ -1029,7 +1048,7 @@ sub construct_course { my @notified = (); if ($args->{'notify_owner'}) { if ($args->{'ccuname'} ne '') { - push(@notified,$args->{'ccuname'}.'@'.$args->{'ccdomain'}); + push(@notified,$args->{'ccuname'}.':'.$args->{'ccdomain'}); } } if ($args->{'notify_dc'}) {