[LON-CAPA-cvs] cvs: loncom / lond /enrollment Autoenroll.pl /interface loncreatecourse.pm lonmodifycourse.pm lonparmset.pm lonpickcourse.pm lonsupportreq.pm /lonnet/perl lonnet.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Sat, 27 Nov 2004 17:23:09 -0000


This is a MIME encoded message

--raeburn1101576189
Content-Type: text/plain

raeburn		Sat Nov 27 12:23:09 2004 EDT

  Modified files:              
    /loncom	lond 
    /loncom/lonnet/perl	lonnet.pm 
    /loncom/enrollment	Autoenroll.pl 
    /loncom/interface	lonpickcourse.pm lonmodifycourse.pm 
                     	loncreatecourse.pm lonparmset.pm lonsupportreq.pm 
  Log:
  Adding storage of course owner to nohist_courseids.db.  Pick course can permits use of institutional code and/or username of course owner as filters.  
  
  
--raeburn1101576189
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20041127122309.txt"

Index: loncom/lond
diff -u loncom/lond:1.265 loncom/lond:1.266
--- loncom/lond:1.265	Tue Nov  2 18:13:18 2004
+++ loncom/lond	Sat Nov 27 12:23:08 2004
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.265 2004/11/02 23:13:18 albertel Exp $
+# $Id: lond,v 1.266 2004/11/27 17:23:08 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -58,7 +58,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.265 $'; #' stupid emacs
+my $VERSION='$Revision: 1.266 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -3119,7 +3119,7 @@
 
     my $userinput = "$cmd:$tail";
 
-    my ($udom, $what) = split(/:/, $tail);
+    my ($udom, $what) = split(/:/, $tail,2);
     chomp($what);
     my $now=time;
     my @pairs=split(/\&/,$what);
@@ -3127,8 +3127,8 @@
     my $hashref = &tie_domain_hash($udom, "nohist_courseids", &GDBM_WRCREAT());
     if ($hashref) {
 	foreach my $pair (@pairs) {
-	    my ($key,$descr,$inst_code)=split(/=/,$pair);
-	    $hashref->{$key}=$descr.':'.$inst_code.':'.$now;
+            my ($key,$courseinfo) = split(/=/,$pair);
+	    $hashref->{$key}=$courseinfo.':'.$now;
 	}
 	if (untie(%$hashref)) {
 	    &Reply( $client, "ok\n", $userinput);
@@ -3176,32 +3176,59 @@
 
     my $userinput = "$cmd:$tail";
 
-    my ($udom,$since,$description) =split(/:/,$tail);
+    my ($udom,$since,$description,$instcodefilter,$ownerfilter) =split(/:/,$tail);
     if (defined($description)) {
 	$description=&unescape($description);
     } else {
 	$description='.';
     }
+    if (defined($instcodefilter)) {
+        $instcodefilter=&unescape($instcodefilter);
+    } else {
+        $instcodefilter='.';
+    }
+    if (defined($ownerfilter)) {
+        $ownerfilter=&unescape($ownerfilter);
+    } else {
+        $ownerfilter='.';
+    }
+
     unless (defined($since)) { $since=0; }
     my $qresult='';
     my $hashref = &tie_domain_hash($udom, "nohist_courseids", &GDBM_WRCREAT());
     if ($hashref) {
 	while (my ($key,$value) = each(%$hashref)) {
-	    my ($descr,$lasttime,$inst_code);
-	    if ($value =~ m/^([^\:]*):([^\:]*):(\d+)$/) {
+	    my ($descr,$lasttime,$inst_code,$owner);
+            if ($value =~  m/^([^\:]*):([^\:]*):([^\:]*):(\d+)$/) {
+                ($descr,$inst_code,$owner,$lasttime)=($1,$2,$3,$4);
+	    } elsif ($value =~ m/^([^\:]*):([^\:]*):(\d+)$/) {
 		($descr,$inst_code,$lasttime)=($1,$2,$3);
 	    } else {
 		($descr,$lasttime) = split(/\:/,$value);
 	    }
 	    if ($lasttime<$since) { next; }
-	    if ($description eq '.') {
-		$qresult.=$key.'='.$descr.':'.$inst_code.'&';
-	    } else {
-		my $unescapeVal = &unescape($descr);
-		if (eval('$unescapeVal=~/\Q$description\E/i')) {
-		    $qresult.=$key.'='.$descr.':'.$inst_code.'&';
+            my $match = 1;
+	    unless ($description eq '.') {
+		my $unescapeDescr = &unescape($descr);
+		unless (eval('$unescapeDescr=~/\Q$description\E/i')) {
+                    $match = 0;
 		}
+            }
+            unless ($instcodefilter eq '.' || !defined($instcodefilter)) {
+                my $unescapeInstcode = &unescape($inst_code);
+                unless (eval('$unescapeInstcode=~/\Q$instcodefilter\E/i')) {
+                    $match = 0;
+                }
 	    }
+            unless ($ownerfilter eq '.' || !defined($ownerfilter)) {
+                my $unescapeOwner = &unescape($owner);
+                unless (eval('$unescapeOwner=~/\Q$ownerfilter\E/i')) {
+                    $match = 0;
+                }
+            }
+            if ($match == 1) {
+                $qresult.=$key.'='.$descr.':'.$inst_code.':'.$owner.'&';
+            }
 	}
 	if (untie(%$hashref)) {
 	    chop($qresult);
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.570 loncom/lonnet/perl/lonnet.pm:1.571
--- loncom/lonnet/perl/lonnet.pm:1.570	Wed Nov 17 11:40:00 2004
+++ loncom/lonnet/perl/lonnet.pm	Sat Nov 27 12:23:08 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.570 2004/11/17 16:40:00 albertel Exp $
+# $Id: lonnet.pm,v 1.571 2004/11/27 17:23:08 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -38,7 +38,7 @@
 qw(%perlvar %hostname %homecache %badServerCache %hostip %iphost %spareid %hostdom 
    %libserv %pr %prp %metacache %packagetab %titlecache %courseresversioncache %resversioncache
    %courselogs %accesshash %userrolehash $processmarker $dumpcount 
-   %coursedombuf %coursenumbuf %coursehombuf %coursedescrbuf %courseinstcodebuf %courseresdatacache 
+   %coursedombuf %coursenumbuf %coursehombuf %coursedescrbuf %courseinstcodebuf %courseownerbuf %courseresdatacache 
    %userresdatacache %getsectioncache %domaindescription %domain_auth_def %domain_auth_arg_def 
    %domain_lang_def %domain_city %domain_longi %domain_lati $tmpdir $_64bit);
 
@@ -1490,12 +1490,12 @@
         if ($courseidbuffer{$coursehombuf{$crsid}}) {
            $courseidbuffer{$coursehombuf{$crsid}}.='&'.
 			 &escape($crsid).'='.&escape($coursedescrbuf{$crsid}).
-                         '='.&escape($courseinstcodebuf{$crsid});
+                         ':'.&escape($courseinstcodebuf{$crsid}).':'.&escape($courseownerbuf{$crsid});
         } else {
            $courseidbuffer{$coursehombuf{$crsid}}=
 			 &escape($crsid).'='.&escape($coursedescrbuf{$crsid}).
-                         '='.&escape($courseinstcodebuf{$crsid});
-        }    
+                         ':'.&escape($courseinstcodebuf{$crsid}).':'.&escape($courseownerbuf{$crsid});
+        }
     }
 #
 # Write course id database (reverse lookup) to homeserver of courses 
@@ -1570,6 +1570,8 @@
        $ENV{'course.'.$ENV{'request.course.id'}.'.description'};
     $courseinstcodebuf{$ENV{'request.course.id'}}=
        $ENV{'course.'.$ENV{'request.course.id'}.'.internal.coursecode'};
+    $courseownerbuf{$ENV{'request.course.id'}}=
+       $ENV{'course.'.$ENV{'request.course.id'}.'.internal.courseowner'};
     if (defined $courselogs{$ENV{'request.course.id'}}) {
 	$courselogs{$ENV{'request.course.id'}}.='&'.$what;
     } else {
@@ -1713,7 +1715,7 @@
 }
 
 sub courseiddump {
-    my ($domfilter,$descfilter,$sincefilter,$hostidflag,$hostidref)=@_;
+    my ($domfilter,$descfilter,$sincefilter,$instcodefilter,$ownerfilter,$hostidflag,$hostidref)=@_;
     my %returnhash=();
     unless ($domfilter) { $domfilter=''; }
     foreach my $tryserver (keys %libserv) {
@@ -1721,7 +1723,8 @@
 	    if ((!$domfilter) || ($hostdom{$tryserver} eq $domfilter)) {
 	        foreach (
                  split(/\&/,&reply('courseiddump:'.$hostdom{$tryserver}.':'.
-			       $sincefilter.':'.&escape($descfilter),
+			       $sincefilter.':'.&escape($descfilter).':'.
+                               &escape($instcodefilter).':'.&escape($ownerfilter),
                                $tryserver))) {
 		    my ($key,$value)=split(/\=/,$_);
                     if (($key) && ($value)) {
@@ -3687,7 +3690,7 @@
 # ---------------------------------------------------------- Make/modify course
 
 sub createcourse {
-    my ($udom,$description,$url,$course_server,$nonstandard,$inst_code)=@_;
+    my ($udom,$description,$url,$course_server,$nonstandard,$inst_code,$course_owner)=@_;
     $url=&declutter($url);
     my $cid='';
     unless (&allowed('ccc',$udom)) {
@@ -3722,7 +3725,7 @@
 # ----------------------------------------------------------------- Course made
 # log existence
     &courseidput($udom,&escape($udom.'_'.$uname).'='.&escape($description).
-                 '='.&escape($inst_code),$uhome);
+                 ':'.&escape($inst_code).':'.&escape($course_owner),$uhome);
     &flushcourselogs();
 # set toplevel url
     my $topurl=$url;
Index: loncom/enrollment/Autoenroll.pl
diff -u loncom/enrollment/Autoenroll.pl:1.11 loncom/enrollment/Autoenroll.pl:1.12
--- loncom/enrollment/Autoenroll.pl:1.11	Thu Jun 17 14:31:24 2004
+++ loncom/enrollment/Autoenroll.pl	Sat Nov 27 12:23:09 2004
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 #
 #Automated Enrollment script
-# $Id: Autoenroll.pl,v 1.11 2004/06/17 18:31:24 raeburn Exp $
+# $Id: Autoenroll.pl,v 1.12 2004/11/27 17:23:09 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -50,7 +50,7 @@
         if (! &localenroll::run($dom)) { next; }
         $ENV{'user.domain'} = $dom;
     # Determine the courses
-        my %courses = &Apache::lonnet::courseiddump($dom,'.',1,1,\@hostids); 
+        my %courses = &Apache::lonnet::courseiddump($dom,'.',1,'.','.',1,\@hostids); 
         my %affiliates = ();
         my %enrollvar = ();
         my %reply = ();
@@ -122,6 +122,7 @@
 # Now go through classes and perform required enrollment changes.
         open (my $fh,">>$logfile");
         print $fh "********************\n".localtime(time)." Enrollment messages start --\n";
+        print $fh "Response from fetch_enrollment_query was $outcome\n";
         foreach my $crs (sort keys %enrollvar) {
             my $logmsg = '';
             my $newusermsg = '';
Index: loncom/interface/lonpickcourse.pm
diff -u loncom/interface/lonpickcourse.pm:1.19 loncom/interface/lonpickcourse.pm:1.20
--- loncom/interface/lonpickcourse.pm:1.19	Tue Nov 23 13:03:04 2004
+++ loncom/interface/lonpickcourse.pm	Sat Nov 27 12:23:09 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Pick a course
 #
-# $Id: lonpickcourse.pm,v 1.19 2004/11/23 18:03:04 raeburn Exp $
+# $Id: lonpickcourse.pm,v 1.20 2004/11/27 17:23:09 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -53,7 +53,7 @@
         ($ENV{'QUERY_STRING'},['domainfilter','descriptfilter',
 			       'sincefilter','form','cnumelement',
 			       'cdomelement','cnameelement','roleelement',
-                               'pickedcourse']);
+                               'pickedcourse','instcodefilter','ownerfilter']);
 # domain filter and selection
     my $domainfilter=$ENV{'form.domainfilter'};
     $domainfilter=~s/\W//g;
@@ -64,6 +64,14 @@
     my $descriptfilter=$ENV{'form.descriptfilter'};
     unless ($descriptfilter) { $descriptfilter=''; }
     my $listdescript=&HTML::Entities::encode($descriptfilter,'<>&"');
+# institutional code filter
+    my $instcodefilter=$ENV{'form.instcodefilter'};
+    unless ($instcodefilter) { $instcodefilter=''; }
+    my $listinstcode=&HTML::Entities::encode($instcodefilter,'<>&"');
+# course owner filter
+    my $ownerfilter=$ENV{'form.ownerfilter'};
+    unless ($ownerfilter) { $ownerfilter=''; }
+    my $listowner=&HTML::Entities::encode($ownerfilter,'<>&"');
 # last course activity filter and selection
     my $sincefilter=$ENV{'form.sincefilter'};
     $sincefilter=~s/[^\d-]//g;
@@ -98,7 +106,9 @@
     my %lt=&Apache::lonlocal::texthash(
 				       'cac' => 'Course Activity',
 				       'cde' => 'Course Description',
-				       'cdo' => 'Course Domain');
+				       'cdo' => 'Course Domain',
+                                       'cin' => 'Course Institutional Code',
+                                       'cow' => "Course Owner's usename");
     my ($name_code,$name_input);
     if (defined($ENV{'form.cnameelement'}) && $ENV{'form.cnameelement'} ne '') {
 	$name_code = "opener.document.$ENV{'form.form'}.$ENV{'form.cnameelement'}.value=cdesc;";
@@ -173,6 +183,12 @@
 <br />
 $lt{'cdo'}: $domainselectform
 <br />
+$lt{'cin'}:
+<input type="text" name="instcodefilter" size="10" value="$listinstcode" />
+<br />
+$lt{'cow'}:
+<input type="text" name="ownerfilter" size="10" value="$listowner" />
+<br />
 $lt{'cde'}:
 <input type="text" name="descriptfilter" size="40" value="$listdescript" />
 <p><input type="submit" name="gosearch" value="Search" /></p>
@@ -184,10 +200,12 @@
         $r->print(&mt('Searching').' ...<br />&nbsp;<br />');
         $r->rflush();
 	unless ($descriptfilter) { $descriptfilter='.'; }
+        unless ($instcodefilter) { $instcodefilter='.'; }
+        unless ($ownerfilter) { $ownerfilter='.'; }
         my $timefilter=($sincefilter==-1?1:time-$sincefilter);
 	my %courses=
 	    &Apache::lonnet::courseiddump
-	    ($domainfilter,$descriptfilter,$timefilter);
+	    ($domainfilter,$descriptfilter,$timefilter,$instcodefilter,$ownerfilter);
 	$r->print('<form name="courselist">');
 	my %by_descrip;
 	foreach my $course (keys %courses) {
Index: loncom/interface/lonmodifycourse.pm
diff -u loncom/interface/lonmodifycourse.pm:1.13 loncom/interface/lonmodifycourse.pm:1.14
--- loncom/interface/lonmodifycourse.pm:1.13	Tue Nov 23 02:02:32 2004
+++ loncom/interface/lonmodifycourse.pm	Sat Nov 27 12:23:09 2004
@@ -45,7 +45,7 @@
     );
                                                                                       
 # Determine the courses
-    my %courseIDs = &Apache::lonnet::courseiddump($dom,'.',1);
+    my %courseIDs = &Apache::lonnet::courseiddump($dom,'.',1,'.','.');
     &print_header($r,$tasklongref);
     $r->print(<<ENDBLOCK);
 <form action="/adm/modifycourse" method="post" name="cmod">
@@ -65,23 +65,19 @@
     foreach my $key (sort keys %courseIDs) {
 # Get current code
         my $crs;
-        my $currcode;
-        if ($key =~ m/^($dom)_(\w+)$/) {
+        my ($description,$currcode,$owner);
+        if ($courseIDs{$key} =~ m/^([^:]*):([^:]+)/ ) {
+            $currcode = $2;
+        } elsif ($key =~ m/^($dom)_(\w+)$/) {
             $crs = $2;
             my %settings = &Apache::lonnet::get('environment',['internal.coursecode'],$dom,$crs);
             if (defined($settings{'internal.coursecode'}) ) {
                 $currcode = $settings{'internal.coursecode'};
-                if ($currcode eq '') {
-                    $currcode = "___".$iter;
-                    $iter ++;
-                }
-	    } else {
-                $currcode = "___".$iter;
-                $iter ++;
             }
-        } else {
+        }
+        if ($currcode eq '') {
             $currcode = "___".$iter;
-            $iter ++;
+                $iter ++;
         }
         unless (grep/^$currcode$/,@codes) {
             push @codes,$currcode;
@@ -99,15 +95,22 @@
             unless ($code =~m/^___\d+$/) {  $showcode = $code; }
             if ($item =~ m/^($dom)_(\w+)$/) {
                 $crs = $2;
-                if ($courseIDs{$item} =~ /^([^:]*):/) {
+                if ($courseIDs{$item} =~ /^([^:]*):([^:]*):([^:]*)/) {
+                    $description = &Apache::lonnet::unescape($1);
+                    $owner = &Apache::lonnet::unescape($3);
+                } elsif ($courseIDs{$item} =~ /^([^:]*):([^:]*)$/) {
                     $description = &Apache::lonnet::unescape($1);
                 } else {   
                     $description = &Apache::lonnet::unescape($courseIDs{$item});
                 }
 # Get course owner
-                my %settings = &Apache::lonnet::get('environment',['internal.courseowner'],$dom,$crs);
-                if ( defined($settings{'internal.courseowner'}) ) {
-                    $owner = $settings{'internal.courseowner'};
+                if ($owner eq '') {
+                    my %settings = &Apache::lonnet::get('environment',['internal.courseowner'],$dom,$crs);
+                    if ( defined($settings{'internal.courseowner'}) ) {
+                        $owner = $settings{'internal.courseowner'};
+                    }
+                }
+                unless ($owner eq '') {
                     $ownername = &Apache::loncommon::plainname($owner,$dom);
                 }
                 $r->print("<option value=\"$crs\">$showcode -- $description ---------- $ownername");
@@ -139,6 +142,7 @@
     } else {
         $ok_course = &check_course($dom,$course);
     }
+    print STDERR "Response was $ok_course for $dom,$course\n";
 
     unless ($ok_course eq 'ok') {
         &print_header($r,$tasklongref,'',\$javascript_validations);
@@ -333,13 +337,13 @@
             my $colflag = $i%2;
             $ownertable .= "<tr bgcolor=\"$bgcolors[$colflag]\" align=\"left\">";
             if ($local_ccs[$i] eq $enrollvar{'courseowner'}) {
-                  $ownertable .= "<td><input type=\"radio\" name=\"courseowner\" value=\"$i\" checked=\"true\"/></td>";
+                  $ownertable .= "<td><input type=\"radio\" name=\"courseowner\" value=\"$local_ccs[$i]\" checked=\"true\"/></td>";
             } else {
-                $ownertable .= "<td><input type=\"radio\" name=\"courseowner\" value=\"$i\" /></td>";
+                $ownertable .= "<td><input type=\"radio\" name=\"courseowner\" value=\"$local_ccs[$i]\" /></td>";
             }
             $ownertable .= "
                  <td>$pname{$local_ccs[$i]}</td>
-                 <td><input type=\"hidden\" name=\"username_$i\" value=\"$local_ccs[$i]\" />$local_ccs[$i]</td>
+                 <td>$local_ccs[$i]</td>
                  <td>$cc_status{$local_ccs[$i]} $lt{'ccor'}</td></tr>";
         }
         $ownertable .= "</table>
@@ -505,12 +509,9 @@
     }
 
     if ( exists($ENV{'form.courseowner'}) ) {
-         my $ownerparam = 'username_'.$ENV{'form.courseowner'};
-         if ( exists($ENV{"form.$ownerparam"}) ) {  
-            $newattr{'courseowner'}=$ENV{"form.$ownerparam"};
-            unless ( $newattr{'courseowner'} eq $currattr{'courseowner'} ) {
-                $changeowner = 1;
-            }
+        $newattr{'courseowner'}=$ENV{'form.courseowner'};
+        unless ( $newattr{'courseowner'} eq $currattr{'courseowner'} ) {
+            $changeowner = 1;
         } 
     }
 													      
@@ -518,10 +519,12 @@
         $newattr{'coursecode'}=$ENV{'form.coursecode'};
         unless ( $newattr{'coursecode'} eq $currattr{'coursecode'} ) {
             $changecode = 1;
-            my $courseid_entry = &Apache::lonnet::escape($dom.'_'.$crs).'='.&Apache::lonnet::escape($description).'='.&Apache::lonnet::escape($ENV{'form.coursecode'});
-            &Apache::lonnet::courseidput($dom,$courseid_entry,&Apache::lonnet::homeserver($crs,$dom));
         }
     }
+    if ($changeowner == 1 || $changecode == 1) {
+        my $courseid_entry = &Apache::lonnet::escape($dom.'_'.$crs).'='.&Apache::lonnet::escape($description).':'.&Apache::lonnet::escape($ENV{'form.coursecode'}).':'.&Apache::lonnet::escape($ENV{'form.courseowner'});
+        &Apache::lonnet::courseidput($dom,$courseid_entry,&Apache::lonnet::homeserver($crs,$dom));
+    }
 
     foreach (@params) {
         if ($currattr{$_} eq $newattr{$_}) {
@@ -697,7 +700,7 @@
 
 sub check_course {
     my ($dom,$course) = @_;
-    my %courseIDs = &Apache::lonnet::courseiddump($dom,'.',1);
+    my %courseIDs = &Apache::lonnet::courseiddump($dom,'.',1,'.','.');
     foreach my $key (sort keys %courseIDs) {
         if ($key =~ m/^($dom)_(\w+)$/) {
             if ($2 eq $course) {
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.70 loncom/interface/loncreatecourse.pm:1.71
--- loncom/interface/loncreatecourse.pm:1.70	Tue Nov 23 01:58:34 2004
+++ loncom/interface/loncreatecourse.pm	Sat Nov 27 12:23:09 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Create a course
 #
-# $Id: loncreatecourse.pm,v 1.70 2004/11/23 06:58:34 raeburn Exp $
+# $Id: loncreatecourse.pm,v 1.71 2004/11/27 17:23:09 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -613,7 +613,8 @@
                                                $cdescr,$curl,
                                                $ENV{'form.course_home'},
                                                $ENV{'form.nonstandard'},
-                                               $ENV{'form.crscode'});
+                                               $ENV{'form.crscode'},
+                                               $ENV{'form.ccuname'});
 
     # Note: The testing routines depend on this being output; see 
     # Utils::Course. This needs to at least be output as a comment
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.178 loncom/interface/lonparmset.pm:1.179
--- loncom/interface/lonparmset.pm:1.178	Wed Nov 24 09:57:07 2004
+++ loncom/interface/lonparmset.pm	Sat Nov 27 12:23:09 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.178 2004/11/24 14:57:07 raeburn Exp $
+# $Id: lonparmset.pm,v 1.179 2004/11/27 17:23:09 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1551,6 +1551,10 @@
                 if ($name eq 'cloners') {
                     &change_clone($value,\@oldcloner);
                 }
+                # Flush the course logs so course description is immediately updated
+                if ($name eq 'description' && defined($value)) {
+                    &Apache::lonnet::flushcourselogs();
+                }
             } else {
                 $setoutput.=&mt('Unable to set').' <b>'.$name.'</b> '.&mt('to').
 		    ' <b>'.$value.'</b> '.&mt('due to').' '.$put_result.'.<br />';
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.10 loncom/interface/lonsupportreq.pm:1.11
--- loncom/interface/lonsupportreq.pm:1.10	Wed Nov  3 19:57:25 2004
+++ loncom/interface/lonsupportreq.pm	Sat Nov 27 12:23:09 2004
@@ -765,9 +765,9 @@
 
 sub retrieve_instcodes {
     my ($coursecodes,$codedom,$totcodes) = @_;
-    my %courses = &Apache::lonnet::courseiddump($codedom,'.',1);
+    my %courses = &Apache::lonnet::courseiddump($codedom,'.',1,'.','.');
     foreach my $course (keys %courses) {
-        if ($courses{$course} =~ m/^[^:]*:([^:]+)$/) {
+        if ($courses{$course} =~ m/^[^:]*:([^:]+)/) {
             $$coursecodes{$course} = &Apache::lonnet::unescape($1);
             $totcodes ++;
         }

--raeburn1101576189--