[LON-CAPA-cvs] cvs: loncom /interface loncoursedata.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Wed, 16 Oct 2002 13:43:34 -0000
matthew Wed Oct 16 09:43:34 2002 EDT
Modified files:
/loncom/interface loncoursedata.pm
Log:
changed &get_classlist to update the classlist if the users information is
available. Tested on data and appears to work properly. If the users
information is not found the file is not updated.
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.35 loncom/interface/loncoursedata.pm:1.36
--- loncom/interface/loncoursedata.pm:1.35 Mon Oct 14 15:06:21 2002
+++ loncom/interface/loncoursedata.pm Wed Oct 16 09:43:34 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: loncoursedata.pm,v 1.35 2002/10/14 19:06:21 matthew Exp $
+# $Id: loncoursedata.pm,v 1.36 2002/10/16 13:43:34 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1443,9 +1443,18 @@
firstname middlename/});
$id = $info{'id'};
}
- # At this point, if we have the data (check for 'not available's
- # we could put it back into the classlist.db file.
- # We have not decided to do that yet.
+ # Update the classlist with this students information
+ if ($fullname ne 'not available') {
+ my $enrolldata = join(':',$end,$start,$id,$section,$fullname);
+ my $reply=&Apache::lonnet::cput('classlist',
+ {$student => $enrolldata},
+ $cdom,$cnum);
+ if ($reply !~ /^(ok|delayed)/) {
+ &Apache::lonnet::logthis('Unable to update classlist for '.
+ 'student '.$sname.':'.$sdom.
+ ' error:'.$reply);
+ }
+ }
}
my $status='Expired';
if(((!$end) || $now < $end) && ((!$start) || ($now > $start))) {
@@ -1466,4 +1475,5 @@
1;
__END__
+