[LON-CAPA-cvs] cvs: loncom / lond

raeburn raeburn at source.lon-capa.org
Mon Mar 20 09:53:23 EDT 2017


raeburn		Mon Mar 20 13:53:23 2017 EDT

  Modified files:              
    /loncom	lond 
  Log:
  - Domain Trust Settings
  
  
Index: loncom/lond
diff -u loncom/lond:1.534 loncom/lond:1.535
--- loncom/lond:1.534	Mon Mar 20 03:19:37 2017
+++ loncom/lond	Mon Mar 20 13:53:22 2017
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.534 2017/03/20 03:19:37 raeburn Exp $
+# $Id: lond,v 1.535 2017/03/20 13:53:22 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -65,7 +65,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.534 $'; #' stupid emacs
+my $VERSION='$Revision: 1.535 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -265,6 +265,17 @@
                putstore => {remote => 1, enroll => 1},
                queryreply => {anywhere => 1},
                querysend => {anywhere => 1},
+               querysend_activitylog => {remote => 1},
+               querysend_allusers => {remote => 1, domroles => 1},
+               querysend_courselog => {remote => 1},
+               querysend_fetchenrollment => {remote => 1},
+               querysend_getinstuser => {remote => 1},
+               querysend_getmultinstusers => {remote => 1},
+               querysend_instdirsearch => {remote => 1, domroles => 1, coaurem => 1},
+               querysend_institutionalphotos => {remote => 1},
+               querysend_portfolio_metadata => {remote => 1, content => 1},
+               querysend_userlog => {remote => 1, domroles => 1},
+               querysend_usersearch => {remote => 1, enroll => 1, coaurem => 1},
                quit => {anywhere => 1},
                readlonnetglobal => {institutiononly => 1},
                reinit => {manageronly => 1}, #not used currently
@@ -3954,7 +3965,7 @@
 #  serviced.
 #
 #  Parameters:
-#     $cmd       - COmmand keyword that initiated the request.
+#     $cmd       - Command keyword that initiated the request.
 #     $tail      - Remainder of the command after the keyword.
 #                  For this function, this consists of a query and
 #                  3 arguments that are self-documentingly labelled
@@ -3968,7 +3979,6 @@
 sub send_query_handler {
     my ($cmd, $tail, $client) = @_;
 
-
     my $userinput = "$cmd:$tail";
 
     my ($query,$arg1,$arg2,$arg3)=split(/\:/,$tail);
@@ -6542,6 +6552,18 @@
 	    $ok = 0;
 	}
         if ($ok) {
+            my $realcommand = $command;
+            if ($command eq 'querysend') {
+                my ($query,$rest)=split(/\:/,$tail,2);
+                $query=~s/\n*$//g;
+                my @possqueries = 
+                    qw(userlog courselog fetchenrollment institutionalphotos usersearch instdirsearch getinstuser getmultinstusers);
+                if (grep(/^\Q$query\E$/, at possqueries)) {
+                    $command .= '_'.$query;
+                } elsif ($query eq 'prepare activity log') {
+                    $command .= '_activitylog';
+                }
+            }
             if (ref($trust{$command}) eq 'HASH') {
                 my $donechecks;
                 if ($trust{$command}{'anywhere'}) {
@@ -6583,6 +6605,7 @@
                     }
                 }
             }
+            $command = $realcommand;
         }
 
 	if($ok) {




More information about the LON-CAPA-cvs mailing list