--- loncom/interface/loncreatecourse.pm 2007/12/14 00:24:11 1.105 +++ loncom/interface/loncreatecourse.pm 2009/02/16 16:19:39 1.115 @@ -1,7 +1,7 @@ # The LearningOnline Network # Create a course # -# $Id: loncreatecourse.pm,v 1.105 2007/12/14 00:24:11 raeburn Exp $ +# $Id: loncreatecourse.pm,v 1.115 2009/02/16 16:19:39 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -27,6 +27,38 @@ # ### +=head1 NAME + +Apache::loncreatecourse.pm + +=head1 SYNOPSIS + +Allows domain coordinators to create new +courses and assign course coordinators. + +This is part of the LearningOnline Network with CAPA project +described at http://www.lon-capa.org. + +=head1 SUBROUTINES + +=over + +=item handler() + +=item print_course_creation_page() + +=item create_course() + +=item print_intro_page() + +=item upload_batchfile() + +=item process_batchfile() + +=back + +=cut + package Apache::loncreatecourse; use strict; @@ -124,10 +156,14 @@ function validate(formname) { 'stco' => "standard courses only", 'blnk' => "Blank", 'sllb' => "Syllabus", - 'navi' => "Navigate", + 'navi' => "Navigate Content", 'cid' => "Course ID", 'dmn' => "Domain", + 'dsh' => "Date Shift", 'asov' => "Additional settings, if specified below, will override cloned settings", + 'ncd' => "Do not clone date parameters", + 'prd' => 'Clone date parameters as-is', + 'shd' => 'Shift date parameters by number of days', 'assp' => "Assessment Parameters", 'oaas' => "Open all assessments", 'mssg' => "Messaging", @@ -150,7 +186,7 @@ function validate(formname) { 'audr' => "Automated drops", 'dacu' => "Duration of automated classlist updates", 'dacc' => "Default start and end dates for student access", - 'psam' => "Please select the authentication mechanism", + 'psam' => "Please select the Authentication mechanism", 'pcda' => "Please choose the default authentication method to be used by new users added to this LON-CAPA domain by the automated enrollment process", 'nech' => "Notification of enrollment changes", 'nccl' => "Notification to course coordinator via LON-CAPA message when enrollment changes occur during the automated update?", @@ -220,210 +256,248 @@ END 'Create_Course',undef, 'Create_Courses'); $r->print($start_page.$crumbs); + if ($crstype eq 'Course') { + $r->print('
ENDDOCUMENT + } elsif ($crstype eq 'Group') { $r->print(<
'); + $r->print(&mt('Assigning role of '.$crstype.' Coordinator to [_1]:', + ,''.$ccuname.':'.$ccdomain.'') + .&Apache::lonnet::assignrole($ccdomain,$ccuname,$courseid, + 'cc','','','','','createcourse').'
'); } if ($env{'form.setkeys'}) { $r->print( @@ -694,7 +777,7 @@ sub create_course { $r->print('
'.&mt('Roles will be active at next login').'.
'); } $r->print(''. + &mt("Create Another $crstype").''. &Apache::loncommon::end_page()); } @@ -713,14 +796,14 @@ sub print_intro_page { &mt('Create a new course by completing an online form.'), }, { internal_name => 'groupone', - name => &mt('Create a single collaborative group space '), + 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 .'), + &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 => - &mt('Upload an attributes file containing specifications for one or more courses or groups in XML format'), + &mt('Upload an attributes file containing specifications for one or more courses or groups in XML format.'), help => 'Batch_Creation', }, );