Diff for /loncom/interface/statistics/Attic/lonclassifystudents.pm between versions 1.1 and 1.2

version 1.1, 2002/07/27 20:50:15 version 1.2, 2006/05/30 12:46:49
Line 27 Line 27
 #  #
 # (Navigate problems for statistical reports  # (Navigate problems for statistical reports
 #  #
 # YEAR=2002  
 # 5/12,7/27  Behrouz Minaei  
 #  #
 ###  ###
   
Line 39  use Apache::lonnet(); Line 37  use Apache::lonnet();
 use Apache::lonhtmlcommon;  use Apache::lonhtmlcommon;
 use Apache::loncoursedata;  use Apache::loncoursedata;
 use GDBM_File;  use GDBM_File;
   use lib '/home/httpd/lib/perl/';
   use LONCAPA;
     
   
   
 #---- Activity log -------------------------------------------------------  #---- Activity log -------------------------------------------------------
Line 163  sub Build_log { Line 164  sub Build_log {
     my $count=0;      my $count=0;
     while ($line=<FILEID>) {      while ($line=<FILEID>) {
  my ($time,$machine,$what)=split(':',$line);   my ($time,$machine,$what)=split(':',$line);
  $what=&Apache::lonnet::unescape($what);   $what=&unescape($what);
  my @accesses=split('&',$what);   my @accesses=split('&',$what);
                         
  foreach my $access (@accesses) {   foreach my $access (@accesses) {
Line 172  sub Build_log { Line 173  sub Build_log {
   
     my ($date,$resource,$who,$domain,$post,@posts)=split(':',$access);      my ($date,$resource,$who,$domain,$post,@posts)=split(':',$access);
     if (!$resource) { next; }      if (!$resource) { next; }
     my $res=&Apache::lonnet::unescape($resource);      my $res=&unescape($resource);
     if (($res =~ /\.problem/)) {      if (($res =~ /\.problem/)) {
  $Activity->{$who.':'.$res}.=$date.'@';   $Activity->{$who.':'.$res}.=$date.'@';
                 #$r->print('<br>'.$time.':'.$who.'---'.$res);                  #$r->print('<br>'.$time.':'.$who.'---'.$res);
Line 201  sub Activity { Line 202  sub Activity {
     my $Count=0;      my $Count=0;
     while ($line=<FILEID>) {      while ($line=<FILEID>) {
  my ($time,$machine,$what)=split(':',$line);   my ($time,$machine,$what)=split(':',$line);
  $what=&Apache::lonnet::unescape($what);   $what=&unescape($what);
  my @accesses=split('&',$what);   my @accesses=split('&',$what);
  foreach my $access (@accesses) {   foreach my $access (@accesses) {
     my ($date,$resource,$who,$domain,$post,@posts)=split(':',$access);      my ($date,$resource,$who,$domain,$post,@posts)=split(':',$access);
     #if ($who ne $userid) { next; }      #if ($who ne $userid) { next; }
     if (!$resource) { next; }      if (!$resource) { next; }
     my $res=&Apache::lonnet::unescape($resource);      my $res=&unescape($resource);
     if (($res =~ /\.(sequence|problem|htm|html|page)/)) {      if (($res =~ /\.(sequence|problem|htm|html|page)/)) {
      $Count++;       $Count++;
 ###888 $r->print("<br>$Count) ".localtime($date).": $who --> $res");  ###888 $r->print("<br>$Count) ".localtime($date).": $who --> $res");
 #        if ($post) {   #        if ($post) { 
 #    $Count++;  #    $Count++;
 #    $r->print("<br><b>$Count) Sent data ".join(':',  #    $r->print("<br><b>$Count) Sent data ".join(':',
 #                              &Apache::lonnet::unescape(@posts)).'</b>');  #                              &unescape(@posts)).'</b>');
 # }  # }
 ###888 $r->rflush();  ###888 $r->rflush();
     }      }

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>