[LON-CAPA-cvs] cvs: loncom /interface loncoursedata.pm

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 17 Sep 2002 15:34:42 -0000


matthew		Tue Sep 17 11:34:42 2002 EDT

  Modified files:              
    /loncom/interface	loncoursedata.pm 
  Log:
  POD added to &ProcessClasslist describing the fields in the hash.
  
  
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.31 loncom/interface/loncoursedata.pm:1.32
--- loncom/interface/loncoursedata.pm:1.31	Sat Sep 14 14:57:59 2002
+++ loncom/interface/loncoursedata.pm	Tue Sep 17 11:34:42 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # (Publication Handler
 #
-# $Id: loncoursedata.pm,v 1.31 2002/09/14 18:57:59 www Exp $
+# $Id: loncoursedata.pm,v 1.32 2002/09/17 15:34:42 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -586,7 +586,24 @@
 Output: @names
 
 @names:  An array of students whose information has been processed, and are to 
-be considered in an arbitrary order.
+be considered in an arbitrary order.  The entries in @names are of the form
+username:domain.
+
+The values in $cache are as follows:
+
+ *NOTE: for the following $name implies username:domain
+ $name.':error'                  only defined if an error occured.  Value
+                                 contains the error message
+ $name.':lastDownloadTime'       unconverted time of the last update of a
+                                 student\'s course data
+ $name.'updateTime'              coverted time of the last update of a 
+                                 student\'s course data
+ $name.':username'               username of a student
+ $name.':domain'                 domain of a student
+ $name.':fullname'               full name of a student
+ $name.':id'                     PID of a student
+ $name.':Status'                 active/expired status of a student
+ $name.':section'                section of a student
 
 =back
 
@@ -609,9 +626,8 @@
         if($c->aborted()) {
             return ();
         }
-        my $studentInformation = $classlist->{$name.':studentInformation'},
-        my $sectionData = $classlist->{$name.':sections'},
-        my $date = $classlist->{$name},
+        my $studentInformation = $classlist->{$name.':studentInformation'};
+        my $date = $classlist->{$name};
         my ($studentName,$studentDomain) = split(/\:/,$name);
 
         $cache->{$name.':username'}=$studentName;
@@ -646,6 +662,7 @@
         $courseID=~s/^(\w)/\/$1/;
 
         my $sec='';
+        my $sectionData = $classlist->{$name.':sections'};
         foreach my $key (keys (%$sectionData)) {
             my $value = $sectionData->{$key};
             if ($key=~/^$courseID(?:\/)*(\w+)*\_st$/) {
@@ -653,7 +670,7 @@
                 if($key eq $courseID.'_st') {
                     $tempsection='';
                 }
-                my ($dummy,$roleend,$rolestart)=split(/\_/,$value);
+                my (undef,$roleend,$rolestart)=split(/\_/,$value);
                 if($roleend eq $end && $rolestart eq $start) {
                     $sec = $tempsection;
                     last;