[LON-CAPA-cvs] cvs: modules /albertel course_info.pl

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 17 Jan 2006 20:23:22 -0000


albertel		Tue Jan 17 15:23:22 2006 EDT

  Modified files:              
    /modules/albertel	course_info.pl 
  Log:
  - better output of section counts
  - classify images
  
  
Index: modules/albertel/course_info.pl
diff -u modules/albertel/course_info.pl:1.2 modules/albertel/course_info.pl:1.3
--- modules/albertel/course_info.pl:1.2	Tue Jan 17 14:59:30 2006
+++ modules/albertel/course_info.pl	Tue Jan 17 15:23:22 2006
@@ -74,6 +74,7 @@
 		    'Supplemental' => '/coursedocs/showdoc/',
 		    'External' => '/wrapper/ext/',
 		    'Instructor Info' => '/aboutme',
+		    'Image' => '\.(jpg|gif|png|jpeg)',
 		    );
 		    
     foreach my $item (keys(%{ $hash })) {
@@ -132,14 +133,10 @@
     my $classlist = &Apache::loncoursedata::get_classlist($cdom,$cnum);
     my %sections;
     my $numsections = &Apache::loncommon::get_sections($cdom,$cnum,\%sections);
+    my $seccol = &Apache::loncoursedata::CL_SECTION();
     &log("Total \# of students: ".scalar(keys(%{ $classlist })));
     &increaselog();
     foreach my $section (sort(keys(%sections))) {
-	&log("Section: $section (".$sections{$section}.")");
-    }
-    &decreaselog();
-    my $seccol = &Apache::loncoursedata::CL_SECTION();
-    foreach my $section (sort(keys(%sections))) {
 	if ($section eq 'NONE') { $section=''; }
 	my ($active_users,$total_logins) = (0,0);
 	foreach my $user (keys(%{ $classlist })) {
@@ -151,9 +148,12 @@
 		$total_logins += $num_logins;
 	    }
 	}
-	&log("Activity for Section $section ",
-	     "$active_users have logged in $total_logins times")
+	&log("Section: $section (".$sections{$section}.")".
+	     " -- $active_users have logged in $total_logins times");
     }
+    &decreaselog();
+    foreach my $section (sort(keys(%sections))) {
+
 }
 
 my %login_cache;