Diff for /loncom/lond between versions 1.489.2.28.2.2 and 1.489.2.28.4.1

version 1.489.2.28.2.2, 2018/04/29 00:45:43 version 1.489.2.28.4.1, 2020/04/07 19:10:31
Line 1497  sub ls_handler { Line 1497  sub ls_handler {
     }      }
  } else {   } else {
             unless (($ulsdir =~ m{^/home/httpd/lonUsers/$LONCAPA::match_domain(?:/[\w\-.@]){3}/$LONCAPA::match_name/}) ||              unless (($ulsdir =~ m{^/home/httpd/lonUsers/$LONCAPA::match_domain(?:/[\w\-.@]){3}/$LONCAPA::match_name/}) ||
                     ($ulsdir =~ m{^/home/httpd/html/(?:res|userfiles)/$LONCAPA::match_domain/$LONCAPA::match_name/})) {                      ($ulsdir =~ m{^/home/httpd/html/(?:res|userfiles)/$LONCAPA::match_domain/$LONCAPA::match_name/})) { 
                 &Failure($client,"refused\n",$userinput);                  &Failure($client,"refused\n",$userinput);
                 return 1;                  return 1;
             }              }
Line 5435  sub validate_course_section_handler { Line 5435  sub validate_course_section_handler {
 # Formal Parameters:  # Formal Parameters:
 #    $cmd     - The command request that got us dispatched.  #    $cmd     - The command request that got us dispatched.
 #    $tail    - The tail of the command.   In this case this is a colon separated  #    $tail    - The tail of the command.   In this case this is a colon separated
 #               set of values that will be split into:  #               set of words that will be split into:
 #               $inst_class  - Institutional code for the specific class section     #               $inst_class  - Institutional code for the specific class section   
 #               $ownerlist   - An escaped comma-separated list of username:domain  #               $courseowner - The escaped username:domain of the course owner 
 #                              of the course owner, and co-owner(s).  
 #               $cdom        - The domain of the course from the institution's  #               $cdom        - The domain of the course from the institution's
 #                              point of view.  #                              point of view.
 #    $client  - The socket open on the client.  #    $client  - The socket open on the client.
Line 5463  sub validate_class_access_handler { Line 5462  sub validate_class_access_handler {
 &register_handler("autovalidateclass_sec", \&validate_class_access_handler, 0, 1, 0);  &register_handler("autovalidateclass_sec", \&validate_class_access_handler, 0, 1, 0);
   
 #  #
 #   Validate course owner or co-owners(s) access to enrollment data for all sections  
 #   and crosslistings for a particular 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 values that will be split into:  
 #               $ownerlist   - An escaped comma-separated list of username:domain  
 #                              of the course owner, and co-owner(s).  
 #               $cdom        - The domain of the course from the institution's  
 #                              point of view.  
 #               $classes     - Frozen hash of institutional course sections and  
 #                              crosslistings.  
 #    $client  - The socket open on the client.  
 # Returns:  
 #    1 - continue processing.  
 #  
   
 sub validate_classes_handler {  
     my ($cmd, $tail, $client) = @_;  
     my $userinput = "$cmd:$tail";  
     my ($ownerlist,$cdom,$classes) = split(/:/, $tail);  
     my $classesref = &Apache::lonnet::thaw_unescape($classes);  
     my $owners = &unescape($ownerlist);  
     my $result;  
     eval {  
         local($SIG{__DIE__})='DEFAULT';  
         my %validations;  
         my $response = &localenroll::check_instclasses($owners,$cdom,$classesref,  
                                                        \%validations);  
         if ($response eq 'ok') {  
             foreach my $key (keys(%validations)) {  
                 $result .= &escape($key).'='.&Apache::lonnet::freeze_escape($validations{$key}).'&';  
             }  
             $result =~ s/\&$//;  
         } else {  
             $result = 'error';  
         }  
     };  
     if (!$@) {  
         &Reply($client, \$result, $userinput);  
     } else {  
         &Failure($client,"unknown_cmd\n",$userinput);  
     }  
     return 1;  
 }  
 &register_handler("autovalidateinstclasses", \&validate_classes_handler, 0, 1, 0);  
   
 #  
 #   Create a password for a new LON-CAPA user added by auto-enrollment.  #   Create a password for a new LON-CAPA user added by auto-enrollment.
 #   Only used for case where authentication method for new user is localauth  #   Only used for case where authentication method for new user is localauth
 #  #

Removed from v.1.489.2.28.2.2  
changed lines
  Added in v.1.489.2.28.4.1


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