[LON-CAPA-cvs] cvs: loncom / lond
foxr
lon-capa-cvs@mail.lon-capa.org
Tue, 19 Oct 2004 10:57:07 -0000
foxr Tue Oct 19 06:57:07 2004 EDT
Modified files:
/loncom lond
Log:
Remove dead code that I forgot to take out when dispatch stuff was
completed.
Index: loncom/lond
diff -u loncom/lond:1.261 loncom/lond:1.262
--- loncom/lond:1.261 Mon Oct 18 06:13:46 2004
+++ loncom/lond Tue Oct 19 06:57:06 2004
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.261 2004/10/18 10:13:46 foxr Exp $
+# $Id: lond,v 1.262 2004/10/19 10:57:06 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -57,7 +57,7 @@
my $status='';
my $lastlog='';
-my $VERSION='$Revision: 1.261 $'; #' stupid emacs
+my $VERSION='$Revision: 1.262 $'; #' stupid emacs
my $remoteVERSION;
my $currenthostid="default";
my $currentdomainid;
@@ -3959,114 +3959,7 @@
}
-#------------------- Commands not yet in spearate handlers. --------------
-
-#------------------------------- is auto-enrollment enabled?
- if ($userinput =~/^autorun/) {
- if (isClient) {
- my ($cmd,$cdom) = split(/:/,$userinput);
- my $outcome = &localenroll::run($cdom);
- print $client "$outcome\n";
- } else {
- print $client "0\n";
- }
-#------------------------------- get official sections (for auto-enrollment).
- } elsif ($userinput =~/^autogetsections/) {
- if (isClient) {
- my ($cmd,$coursecode,$cdom)=split(/:/,$userinput);
- my @secs = &localenroll::get_sections($coursecode,$cdom);
- my $seclist = &escape(join(':',@secs));
- print $client "$seclist\n";
- } else {
- print $client "refused\n";
- }
-#----------------------- validate owner of new course section (for auto-enrollment).
- } elsif ($userinput =~/^autonewcourse/) {
- if (isClient) {
- my ($cmd,$inst_course_id,$owner,$cdom)=split(/:/,$userinput);
- my $outcome = &localenroll::new_course($inst_course_id,$owner,$cdom);
- print $client "$outcome\n";
- } else {
- print $client "refused\n";
- }
-#-------------- validate course section in schedule of classes (for auto-enrollment).
- } elsif ($userinput =~/^autovalidatecourse/) {
- if (isClient) {
- my ($cmd,$inst_course_id,$cdom)=split(/:/,$userinput);
- my $outcome=&localenroll::validate_courseID($inst_course_id,$cdom);
- print $client "$outcome\n";
- } else {
- print $client "refused\n";
- }
-#--------------------------- create password for new user (for auto-enrollment).
- } elsif ($userinput =~/^autocreatepassword/) {
- if (isClient) {
- my ($cmd,$authparam,$cdom)=split(/:/,$userinput);
- my ($create_passwd,$authchk);
- ($authparam,$create_passwd,$authchk) = &localenroll::create_password($authparam,$cdom);
- print $client &escape($authparam.':'.$create_passwd.':'.$authchk)."\n";
- } else {
- print $client "refused\n";
- }
-#--------------------------- read and remove temporary files (for auto-enrollment).
- } elsif ($userinput =~/^autoretrieve/) {
- if (isClient) {
- my ($cmd,$filename) = split(/:/,$userinput);
- my $source = $perlvar{'lonDaemons'}.'/tmp/'.$filename;
- if ( (-e $source) && ($filename ne '') ) {
- my $reply = '';
- if (open(my $fh,$source)) {
- while (<$fh>) {
- chomp($_);
- $_ =~ s/^\s+//g;
- $_ =~ s/\s+$//g;
- $reply .= $_;
- }
- close($fh);
- print $client &escape($reply)."\n";
-# unlink($source);
- } else {
- print $client "error\n";
- }
- } else {
- print $client "error\n";
- }
- } else {
- print $client "refused\n";
- }
-#--------------------- read and retrieve institutional code format
-# (for support form).
- } elsif ($userinput =~/^autoinstcodeformat/) {
- if (isClient) {
- my $reply;
- my($cmd,$cdom,$course) = split(/:/,$userinput);
- my @pairs = split/\&/,$course;
- my %instcodes = ();
- my %codes = ();
- my @codetitles = ();
- my %cat_titles = ();
- my %cat_order = ();
- foreach (@pairs) {
- my ($key,$value) = split/=/,$_;
- $instcodes{&unescape($key)} = &unescape($value);
- }
- my $formatreply = &localenroll::instcode_format($cdom,\%instcodes,\%codes,\@codetitles,\%cat_titles,\%cat_order);
- if ($formatreply eq 'ok') {
- my $codes_str = &hash2str(%codes);
- my $codetitles_str = &array2str(@codetitles);
- my $cat_titles_str = &hash2str(%cat_titles);
- my $cat_order_str = &hash2str(%cat_order);
- print $client $codes_str.':'.$codetitles_str.':'.$cat_titles_str.':'.$cat_order_str."\n";
- }
- } else {
- print $client "refused\n";
- }
-# ------------------------------------------------------------- unknown command
-
- } else {
- # unknown command
- print $client "unknown_cmd\n";
- }
+ print $client "unknown_cmd\n";
# -------------------------------------------------------------------- complete
Debug("process_request - returning 1");
return 1;