[LON-CAPA-cvs] cvs: modules /raeburn FIE_usage.pl

raeburn lon-capa-cvs@mail.lon-capa.org
Fri, 26 May 2006 20:31:30 -0000


raeburn		Fri May 26 16:31:30 2006 EDT

  Modified files:              
    /modules/raeburn	FIE_usage.pl 
  Log:
  Update documentation.  Needs Time::Local. Only convert dates in format YYYY-MM-DD to unixtime once for startopen and startclose from config.txt
  
  
Index: modules/raeburn/FIE_usage.pl
diff -u modules/raeburn/FIE_usage.pl:1.12 modules/raeburn/FIE_usage.pl:1.13
--- modules/raeburn/FIE_usage.pl:1.12	Fri May 26 16:06:03 2006
+++ modules/raeburn/FIE_usage.pl	Fri May 26 16:31:26 2006
@@ -13,6 +13,7 @@
 use LONCAPA::Configuration;
 use GDBM_File;
 use HTML::LCParser;
+use Time::Local;
 
 # FIE_usage.pl
 #
@@ -27,7 +28,9 @@
 # values, then they are comma separated.
 # The following keys are found in the config file:
 #
-# anonymous,domain,dc,filter,coursefilters,startenroll,courseids
+# anonymous,domain,dc,filter,coursefilters,startopen,startclose,courseids,
+# excluded_cc
+#
 # where ...
 # anonymous is set to no, if user names and owner information should be stored.
 #    the default is for anonymous to be set to yes.
@@ -58,6 +61,11 @@
 # courseids is the set of LON-CAPA courseIDs to be included in data collection
 #  e.g., msu_402683446469c4368msul1,msu_40171337dbb41aemsul1 
 #
+# excluded_cc is a comma separated list of DCs who may have been assigned CC
+#  roles in a course, but should not be defaulted to as course owner if
+#  courseowner is missing from a course's environment. (e.g., raeburn,albertel).
+#
+#
 # A stub config.txt file is included with this script in the LC_usage directory. 
 #
 # An example config file might be:
@@ -208,16 +216,16 @@
         }
     } elsif ($config{'filter'} eq 'enrollment') {
         my %coursehash = &Apache::lonnet::courseiddump($dom,'.',1,'.','.','.',1,\@hostids);
+        if ($config{'startopen'}) {
+            $config{'startopen'} = &process_date($config{'startopen'});
+            }
+        if ($config{'startclose'}) {
+            $config{'startclose'} = &process_date($config{'startclose'});
+        }
         foreach my $key (sort(keys %coursehash)) {
             my ($cdom,$cnum) = split(/_/,$key);
             my %courseenv = &Apache::lonnet::dump('environment',$cdom,$cnum);
             my $startenroll = $courseenv{'default_enrollment_start_date'};
-            if ($config{'startopen'}) {
-                $config{'startopen'} = &process_date($config{'startopen'});
-            }
-            if ($config{'startclose'}) {
-                $config{'startclose'} = &process_date($config{'startclose'});
-            }
             if ((($startenroll >= $config{'startopen'}) && ($startenroll)) &&
                  ((($startenroll <= $config{'startclose'}) || !$config{'startclose'}) && ($startenroll))) {
                 my $code = $courseenv{'internal.coursecode'};