Diff for /loncom/lond between versions 1.416 and 1.417

version 1.416, 2009/06/11 19:19:51 version 1.417, 2009/07/25 15:25:10
Line 4641  sub enrollment_enabled_handler { Line 4641  sub enrollment_enabled_handler {
 }  }
 &register_handler("autorun", \&enrollment_enabled_handler, 0, 1, 0);  &register_handler("autorun", \&enrollment_enabled_handler, 0, 1, 0);
   
   #
   #   Validate an institutional code use for a LON-CAPA course.          
   #
   # Formal Parameters:
   #   $cmd          - The command request that got us dispatched.
   #   $tail         - The tail of the command.  In this case,
   #                   this is a colon separated set of words that will be split
   #                   into:
   #                        $inst_course_id - The institutional cod3 from the
   #                                          institutions point of view.
   #                        $cdom           - The domain from the institutions
   #                                          point of view.
   #   $client       - Socket open on the client.
   # Returns:
   #    1           - Indicating processing should continue.
   #
   sub validate_instcode_handler {
       my ($cmd, $tail, $client) = @_;
       my $userinput = "$cmd:$tail";
       my ($dom,$instcode,$owner) = split(/:/, $tail);
       my $outcome=&localenroll::validate_instcode($dom,$instcode,$owner);
       &Reply($client, \$outcome, $userinput);
   
       return 1;
   }
   &register_handler("autovalidateinstcode", \&validate_instcode_handler, 0, 1, 0);
   
 #   Get the official sections for which auto-enrollment is possible.  #   Get the official sections for which auto-enrollment is possible.
 #   Since the admin people won't know about 'unofficial sections'   #   Since the admin people won't know about 'unofficial sections' 
 #   we cannot auto-enroll on them.  #   we cannot auto-enroll on them.
Line 4934  sub get_possible_instcodes_handler { Line 4961  sub get_possible_instcodes_handler {
   
     my $reply;      my $reply;
     my $cdom = $tail;      my $cdom = $tail;
     my (@codetitles,%cat_titles,%cat_order);      my (@codetitles,%cat_titles,%cat_order,@code_order);
     my $formatreply = &localenroll::possible_instcodes($cdom,      my $formatreply = &localenroll::possible_instcodes($cdom,
                                                        \@codetitles,                                                         \@codetitles,
                                                        \%cat_titles,                                                         \%cat_titles,
                                                        \%cat_order);                                                         \%cat_order,
                                                          \@code_order);
     if ($formatreply eq 'ok') {      if ($formatreply eq 'ok') {
         my $result = join('&',map {&escape($_);} (@codetitles)).':';          my $result = join('&',map {&escape($_);} (@codetitles)).':';
           $result .= join('&',map {&escape($_);} (@code_order)).':';
         foreach my $key (keys(%cat_titles)) {          foreach my $key (keys(%cat_titles)) {
             $result .= &escape($key).'='.&Apache::lonnet::freeze_escape($cat_titles{$key}).'&';              $result .= &escape($key).'='.&Apache::lonnet::freeze_escape($cat_titles{$key}).'&';
         }          }

Removed from v.1.416  
changed lines
  Added in v.1.417


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