--- loncom/interface/loncreatecourse.pm 2006/06/22 11:25:56 1.92 +++ loncom/interface/loncreatecourse.pm 2006/07/19 10:08:26 1.93.2.3 @@ -1,7 +1,7 @@ # The LearningOnline Network # Create a course # -# $Id: loncreatecourse.pm,v 1.92 2006/06/22 11:25:56 www Exp $ +# $Id: loncreatecourse.pm,v 1.93.2.3 2006/07/19 10:08:26 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -256,10 +256,11 @@ sub copycoursefiles { sub print_course_creation_page { my $r=shift; - my $crstype = 'Group'; - if ($env{'form.phase'} eq 'courseone') { - $crstype = 'Course'; - } + my $crstype = 'Course'; +# my $crstype = 'Group'; +# if ($env{'form.phase'} eq 'courseone') { +# $crstype = 'Course'; +# } my $defdom=$env{'request.role.domain'}; my %host_servers = &Apache::loncommon::get_library_servers($defdom); my $course_home = '<select name="course_home" size="1">'."\n"; @@ -369,6 +370,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", @@ -389,8 +392,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 = <<END; <script type="text/javascript"> var editbrowser = null; @@ -616,6 +621,11 @@ $lt{'ndcl'}<br/> <input type="radio" name="showphotos" value="0" checked="true" />$lt{'no'} </label> </p> +<p> +<h2>$lt{'cgrs'}</h2> +$lt{'cgrq'} +<input type="text" name="crsquota" value="20" size="6" />Mb +</p> <hr /> <h2>$lt{'cc'}</h2> <p> @@ -738,6 +748,11 @@ $lt{'asov'}. <input type="text" name="reshome" size="30" value="/res/$defdom/" /> </label> </p> +<p> +<h2>$lt{'grts'}</h2> +$lt{'grtq'} +<input type="text" name="crsquota" value="20" />Mb +</p> <hr /> <h2>$lt{'gc'}</h2> <p> @@ -814,10 +829,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'}, @@ -902,13 +918,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 @@ -966,8 +983,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'}; } @@ -1026,7 +1049,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'}) { @@ -1165,7 +1188,7 @@ sub construct_course { sub print_intro_page { my $r = shift; 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 $end_page = &Apache::loncommon::end_page(); @@ -1176,11 +1199,11 @@ sub print_intro_page { short_description => &mt('Create a new course by completing an online form.'), }, - { internal_name => 'groupone', - name => &mt('Create a single collaborative group space '), - short_description => - &mt('Create a new group space for non-course use by completing an online form .'), - }, +# { internal_name => 'groupone', +# name => &mt('Create a single collaborative group space '), +# short_description => +# &mt('Create a new group space for non-course use by completing an online form .'), +# }, { internal_name => 'batchone', name => &mt('Create courses/groups by uploading an attributes file'), short_description => @@ -1208,11 +1231,11 @@ sub upload_batchfile { my $r = shift; my $start_page = &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 = &Apache::loncommon::end_page(); $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" '. 'enctype="multipart/form-data" action="/adm/createcourse">'. '<input type="file" name="coursecreatorxml" />'.