Diff for /loncom/interface/loncreatecourse.pm between versions 1.90 and 1.94

version 1.90, 2006/05/30 20:05:05 version 1.94, 2006/07/11 02:28:22
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)/) {
  &copydb($origcrsid,$newcrsid,$_);   &copydb($origcrsid,$newcrsid,$_);
  my $histfile=$_;  
  $histfile=~s/\.db$/\.hist/;  
  &copyfile($origcrsid,$newcrsid,$histfile);  
      }       }
  }   }
     }      }
Line 372  function validate(formname) { Line 369  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 391  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 427  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 620  $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 747  $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 813  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 828  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 917  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 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'}.
                                           ':'.$args->{'ccdomain'};
     } else {      } else {
         $cenv{'internal.courseowner'} = $args->{'curruser'};          $cenv{'internal.courseowner'} = $args->{'curruser'};
     }      }
Line 1029  sub construct_course { Line 1048  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'}) {

Removed from v.1.90  
changed lines
  Added in v.1.94


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