Diff for /loncom/interface/lonpopulate.pm between versions 1.11 and 1.13

version 1.11, 2004/04/16 13:26:44 version 1.13, 2004/06/09 17:01:56
Line 641  ENDTWO Line 641  ENDTWO
             </form>               </form> 
       ");        ");
   } elsif ($action eq "sections") {    } elsif ($action eq "sections") {
       my @sections = &localenroll::get_sections($enrollvar{coursecode});        my @sections = ();
         @sections = &Apache::lonnet::auto_get_sections($crs,$dom,$enrollvar{coursecode});
       my @storedsections = ();        my @storedsections = ();
       my @currsections = ();        my @currsections = ();
       my %sec_id = ();        my %sec_id = ();
Line 1289  sub print_crosslistings_response () { Line 1290  sub print_crosslistings_response () {
           my $xl = "newcross_".$i;            my $xl = "newcross_".$i;
           my $gp = "newgroupid_".$i;            my $gp = "newgroupid_".$i;
           if ( exists($ENV{"form.$xl"}) ) {            if ( exists($ENV{"form.$xl"}) ) {
               my $coursecheck = &localenroll::validate_courseID($ENV{"form.$xl"});                my $coursecheck = '';
                 $coursecheck = &Apache::lonnet::auto_validate_courseID($crs,$dom,$ENV{"form.$xl"});
               if ($coursecheck eq 'ok') {                if ($coursecheck eq 'ok') {
                   my $addcheck = &localenroll::new_course($ENV{"form.$xl"},$owner);                    my $addcheck = '';
                     $addcheck = &Apache::lonnet::auto_new_course($crs,$dom,$ENV{"form.$xl"},$owner);
                   if ($addcheck eq 'ok') {                    if ($addcheck eq 'ok') {
                      push @xlists,$ENV{"form.$xl"}.":".$ENV{"form.$gp"};                       push @xlists,$ENV{"form.$xl"}.":".$ENV{"form.$gp"};
                   } else {                    } else {
                      push @badowner,$ENV{"form.$xl"}.":".$ENV{"form.$gp"};                       push @badowner,$ENV{"form.$xl"}.":".$ENV{"form.$gp"};
                   }                     }
               } else {                } else {
                   push @badxlists, $ENV{"form.$xl"}.":".$ENV{"form.$gp"}.":".$coursecheck;                    push @badxlists, $ENV{"form.$xl"}.":".$ENV{"form.$gp"}.":".$coursecheck;
               }                }
Line 1410  sub print_sections_menu () { Line 1413  sub print_sections_menu () {
                   $seccount ++;                    $seccount ++;
               } else {                } else {
                   my $newsec = $coursecode.$ENV{"form.$secnum"};                    my $newsec = $coursecode.$ENV{"form.$secnum"};
                   my $coursecheck = &localenroll::validate_courseID($newsec);                    my $coursecheck = &Apache::lonnet::auto_validate_courseID($crs,$dom,$newsec);
                   if ($coursecheck eq 'ok') {                    if ($coursecheck eq 'ok') {
                       my $addcheck = &localenroll::new_course($newsec,$owner);                        my $addcheck = &Apache::lonnet::auto_new_course($crs,$dom,$newsec,$owner);
                       if ($addcheck eq 'ok') {                        if ($addcheck eq 'ok') {
                           push @sections,$ENV{"form.$secnum"}.":".$ENV{"form.$gp"};                            push @sections,$ENV{"form.$secnum"}.":".$ENV{"form.$gp"};
                           $seccount ++;                            $seccount ++;
Line 1587  sub print_sections_response () { Line 1590  sub print_sections_response () {
           if ( exists($ENV{"form.$sec"}) ) {            if ( exists($ENV{"form.$sec"}) ) {
               unless ( (grep/^$ENV{"form.$sec"}:/,@allsections) || (grep/^$ENV{"form.$sec"}:/,@sections) ) {                unless ( (grep/^$ENV{"form.$sec"}:/,@allsections) || (grep/^$ENV{"form.$sec"}:/,@sections) ) {
                   my $newsec = $coursecode.$ENV{"form.$sec"};                    my $newsec = $coursecode.$ENV{"form.$sec"};
                   my $coursecheck = &localenroll::validate_courseID($newsec);                    my $coursecheck = &Apache::lonnet::auto_validate_courseID($crs,$dom,$newsec);
                   if ($coursecheck eq 'ok') {                    if ($coursecheck eq 'ok') {
                       my $addcheck = &localenroll::new_course($newsec,$owner);                        my $addcheck = &Apache::lonnet::auto_new_course($crs,$dom,$newsec,$owner);
                       if ($addcheck eq 'ok') {                        if ($addcheck eq 'ok') {
                           push @sections,$ENV{"form.$sec"}.":".$ENV{"form.$gp"};                            push @sections,$ENV{"form.$sec"}.":".$ENV{"form.$gp"};
                       } else {                        } else {
Line 1763  sub print_update_result () { Line 1766  sub print_update_result () {
   
       if (@allcourses > 0) {        if (@allcourses > 0) {
           @{$affiliates{$crs}} = @allcourses;            @{$affiliates{$crs}} = @allcourses;
           &localenroll::fetch_enrollment($dom,\%affiliates,\%reply);            my $outcome = &Apache::lonnet::fetch_enrollment_query('updatenow',\%affiliates,\%reply,$crs,$dom);
           if ($reply{$crs} > 0) {            if ($reply{$crs} > 0) {
               ($changecount,$response) = &LONCAPA::Enrollment::update_LC($dom,$crs,$updateadds,$updatedrops,$autostart,$autoend,$authtype,$autharg,\@allcourses,\%LC_code,\$logmsg,\$newusermsg,"updatenow");                ($changecount,$response) = &LONCAPA::Enrollment::update_LC($dom,$crs,$updateadds,$updatedrops,$autostart,$autoend,$authtype,$autharg,\@allcourses,\%LC_code,\$logmsg,\$newusermsg,"updatenow");
           } else {            } else {
Line 2004  sub handler { Line 2007  sub handler {
             }              }
         }          }
     }      }
     
     my $reply = 0;      my $reply = 0;
     unless ($state eq "choose") { $reply = 1; }      unless ($state eq "choose") { $reply = 1; }
   

Removed from v.1.11  
changed lines
  Added in v.1.13


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