[LON-CAPA-cvs] cvs: loncom /interface lonwhatsnew.pm /lonnet/perl lonnet.pm

www www at source.lon-capa.org
Fri Mar 16 17:16:46 EDT 2012


www		Fri Mar 16 21:16:46 2012 EDT

  Modified files:              
    /loncom/interface	lonwhatsnew.pm 
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  Store statistics
  
  
Index: loncom/interface/lonwhatsnew.pm
diff -u loncom/interface/lonwhatsnew.pm:1.104 loncom/interface/lonwhatsnew.pm:1.105
--- loncom/interface/lonwhatsnew.pm:1.104	Fri Apr 15 13:57:18 2011
+++ loncom/interface/lonwhatsnew.pm	Fri Mar 16 21:16:38 2012
@@ -1,5 +1,5 @@
 #
-# $Id: lonwhatsnew.pm,v 1.104 2011/04/15 13:57:18 bisitz Exp $
+# $Id: lonwhatsnew.pm,v 1.105 2012/03/16 21:16:38 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -999,6 +999,7 @@
             $av_attempts = $attempts/$users;
             $av_attempts = sprintf("%.2f",$av_attempts);
         }
+        &Apache::lonnet::statslog($symb,$part,$users,$av_attempts,$degdiff);
         if ((($degdiff ne '' && $degdiff >= $$threshold{'degdiff'}) || ($av_attempts ne '' && $av_attempts >= $$threshold{'av_attempts'})) && ($users >= $$threshold{'numstudents'})) {
             $stats{$part}{degdiff} = $degdiff;
             $stats{$part}{attempts} = $av_attempts;
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1159 loncom/lonnet/perl/lonnet.pm:1.1160
--- loncom/lonnet/perl/lonnet.pm:1.1159	Thu Mar 15 18:15:55 2012
+++ loncom/lonnet/perl/lonnet.pm	Fri Mar 16 21:16:46 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1159 2012/03/15 18:15:55 www Exp $
+# $Id: lonnet.pm,v 1.1160 2012/03/16 21:16:46 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -96,6 +96,7 @@
 use File::MMagic;
 use LONCAPA qw(:DEFAULT :match);
 use LONCAPA::Configuration;
+use LONCAPA::lonmetadata;
 
 use File::Copy;
 
@@ -3398,6 +3399,22 @@
     $accesshash{$from.'___'.$to.'___comefrom'}=1;
     $accesshash{$to.'___'.$from.'___goto'}=1;
 }
+
+sub statslog {
+    my ($symb,$part,$users,$av_attempts,$degdiff)=@_;
+    if ($users<2) { return; }
+    my %dynstore=&LONCAPA::lonmetadata::dynamic_metadata_storage({
+            'course'       => $env{'request.course.id'},
+            'sections'     => '"all"',
+            'num_students' => $users,
+            'part'         => $part,
+            'symb'         => $symb,
+            'mean_tries'   => $av_attempts,
+            'deg_of_diff'  => $degdiff});
+    foreach my $key (keys(%dynstore)) {
+        $accesshash{$key}=$dynstore{$key};
+    }
+}
   
 sub userrolelog {
     my ($trole,$username,$domain,$area,$tstart,$tend)=@_;




More information about the LON-CAPA-cvs mailing list