Diff for /loncom/interface/loncreatecourse.pm between versions 1.91 and 1.93.2.4

version 1.91, 2006/06/03 21:05:04 version 1.93.2.4, 2006/07/20 22:10:22
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)/) {
  &copydb($origcrsid,$newcrsid,$_);   &copydb($origcrsid,$newcrsid,$_);
  my $histfile=$_;  
  $histfile=~s/\.db$/\.hist/;  
  &copyfile($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 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 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'},
                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 905  sub construct_course { Line 918  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 969  sub construct_course { Line 983  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'}.
                                           ':'.$args->{'ccdomain'};
     } else {      } else {
         $cenv{'internal.courseowner'} = $args->{'curruser'};          $cenv{'internal.courseowner'} = $args->{'curruser'};
     }      }
Line 1029  sub construct_course { Line 1049  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 1168  sub construct_course { Line 1188  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 1199  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 1231  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" />'.

Removed from v.1.91  
changed lines
  Added in v.1.93.2.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>