[LON-CAPA-cvs] cvs: doc(version_2_11_X) /loncapafiles loncapafiles.lpml loncom lond

raeburn raeburn at source.lon-capa.org
Tue Nov 3 14:06:42 EST 2020


raeburn		Tue Nov  3 19:06:42 2020 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom	lond 
    /doc/loncapafiles	loncapafiles.lpml 
  Log:
  - For 2.11
    Backport 1.1005, 1.1006
  
  
Index: loncom/lond
diff -u loncom/lond:1.489.2.28.2.1 loncom/lond:1.489.2.28.2.2
--- loncom/lond:1.489.2.28.2.1	Thu Jun 22 02:11:23 2017
+++ loncom/lond	Sun Apr 29 00:45:43 2018
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.489.2.28.2.1 2017/06/22 02:11:23 raeburn Exp $
+# $Id: lond,v 1.489.2.28.2.2 2018/04/29 00:45:43 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -64,7 +64,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.489.2.28.2.1 $'; #' stupid emacs
+my $VERSION='$Revision: 1.489.2.28.2.2 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -5435,9 +5435,10 @@
 # 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:
+#               set of values that will be split into:
 #               $inst_class  - Institutional code for the specific class section   
-#               $courseowner - The escaped username:domain of the course owner 
+#               $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.
 #    $client  - The socket open on the client.
@@ -5462,6 +5463,56 @@
 &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.
 #   Only used for case where authentication method for new user is localauth
 #
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.797.2.116 doc/loncapafiles/loncapafiles.lpml:1.797.2.117
--- doc/loncapafiles/loncapafiles.lpml:1.797.2.116	Mon Aug 31 13:22:34 2020
+++ doc/loncapafiles/loncapafiles.lpml	Tue Nov  3 19:06:42 2020
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.797.2.116 2020/08/31 13:22:34 raeburn Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.797.2.117 2020/11/03 19:06:42 raeburn Exp $ -->
 
 <!--
 
@@ -7329,6 +7329,7 @@
 compiles/tth.so.i386.perl.5.28;
 compiles/tth.so.x86_64.perl.5.28;
 compiles/tth.so.x86_64.perl.5.30;
+compiles/tth.so.x86_64.perl.5.32;
 compiles/tth.so.x86_64.sles12;
 compiles/tth.so.x86_64.sles15;
 compiles/tth.so.i386.debian5;
@@ -8349,7 +8350,7 @@
 <source>loncom/init.d/loncontrol</source>
 <target dist='default'>etc/rc.d/init.d/loncontrol</target>
 <target dist='suse9.2 suse9.3 sles9 sles10 sles11 sles12 suse10.1 suse10.2 suse10.3 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 suse13.1 suse13.2 debian5 debian6 ubuntu6 ubuntu8 ubuntu10 ubuntu12 ubuntu14 ubuntu16'>etc/init.d/loncontrol</target>
-<target dist='fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 sles15 ubuntu18 ubuntu20 rhes8 centos8 oracle7 oracle8'>home/httpd/perl/loncontrol</target>
+<target dist='fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 sles15 ubuntu18 ubuntu20 rhes8 centos8 oracle7 oracle8'>home/httpd/perl/loncontrol</target>
 <categoryname>root script</categoryname>
 <description>
 Controls the launching/halting of lonc, lond, and lonsql processes.
@@ -8358,7 +8359,7 @@
 <file>
 <source>loncom/init.d/loncontrol.service</source>
 <target dist='default'>home/httpd/perl/systemd/loncontrol.service</target>
-<target dist='fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 sles15 ubuntu18 ubuntu20 rhes8 centos8 oracle7 oracle8'>etc/systemd/system/loncontrol.service</target>
+<target dist='fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 sles15 ubuntu18 ubuntu20 rhes8 centos8 oracle7 oracle8'>etc/systemd/system/loncontrol.service</target>
 <categoryname>static conf</categoryname>
 <description>
 Controls the launching/halting of lon-capa daemons by loncontrol in systemd
@@ -8411,13 +8412,13 @@
 loncom/init.d/loncontrol
   </dependencies>
 </file>
-<file dist="fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 sles15 ubuntu18 ubuntu20 rhes8 centos8 oracle7 oracle8">
+<file dist="fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 sles15 ubuntu18 ubuntu20 rhes8 centos8 oracle7 oracle8">
 <source>loncom/init.d/loncontrol.service</source>
 <target>etc/systemd/system/loncontrol.service</target>
 <description>
 Controls the launching/halting of lon-capa daemons by loncontrol in systemd
 </description>
-  <installscript dist="fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 sles15 rhes8 centos8 oracle7 oracle8">
+  <installscript dist="fedora26 fedora27 fedora28 fedora29 fedora30 fedora31 fedora32 fedora33 sles15 rhes8 centos8 oracle7 oracle8">
 -c '/usr/bin/systemctl enable loncontrol.service'
   </installscript>
   <installscript dist="ubuntu18 ubuntu20">




More information about the LON-CAPA-cvs mailing list