Diff for /loncom/interface/lonstatistics.pm between versions 1.25 and 1.26

version 1.25, 2002/05/31 13:47:01 version 1.26, 2002/05/31 16:02:11
Line 89  my %Answer = (); Line 89  my %Answer = ();
   
   
 sub Activity {  sub Activity {
     my $file="/home/minaeibi/minaei";      my $file="/home/minaeibi/activity.log";
     my $userid='billskat';      my $userid='adamsde1';
     $r->print("<br>Using $file");      $r->print("<br>Using $file");
     $r->rflush();      $r->rflush();
     open(FILEID, "<$file");      open(FILEID, "<$file");
Line 106  sub Activity { Line 106  sub Activity {
     if ($who ne $userid) { next; }      if ($who ne $userid) { next; }
     if (!$resource) { next; }      if (!$resource) { next; }
     my $res=&Apache::lonnet::unescape($resource);      my $res=&Apache::lonnet::unescape($resource);
  #if (($key=~/\.(\w+)\.(\w+)\.submission$/)) {      if (($res =~ /\.(problem|htm|html)/)) {
        #if ($meta=~/\.(problem|exam|quiz|assess|survey|form)$/) {  
  #   foreach my $Key(split(/\,/,&Apache::lonnet::metadata($meta,'keys'))) {  
  #       if ($Key=~/^stores\_(\w+)\_tries$/) {  
   
    # if (($res =~ /^\/res\/adm/)) {  
  $Count++;   $Count++;
  $r->print("<br>$Count) $date: $who --> $res");   $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>');  #                              &Apache::lonnet::unescape(@posts)).'</b>');
  }  # }
  $r->rflush();   $r->rflush();
  #    }      }
  ##    push (@allaccess,unescape($access));   ##    push (@allaccess,unescape($access));
     #print $machine;      #print $machine;
  }   }
Line 1406  sub setbgcolor { Line 1401  sub setbgcolor {
     }      }
 }  }
   
   
   
 # my $CacheDB = "/home/httpd/perl/tmp/$ENV{'user.name'}".  # my $CacheDB = "/home/httpd/perl/tmp/$ENV{'user.name'}".
 #                  "_$ENV{'user.domain'}_$cid\_classlist.db";  #                  "_$ENV{'user.domain'}_$cid\_classlist.db";
 # if (-e "$CacheDB") {  # if (-e "$CacheDB") {
Line 1438  sub ClassList { Line 1431  sub ClassList {
     $firstres=$hash{'map_start_/res/'.$ENV{'request.course.uri'}};      $firstres=$hash{'map_start_/res/'.$ENV{'request.course.uri'}};
     $lastres=$hash{'map_finish_/res/'.$ENV{'request.course.uri'}};      $lastres=$hash{'map_finish_/res/'.$ENV{'request.course.uri'}};
     if (($firstres) && ($lastres)) {      if (($firstres) && ($lastres)) {
 # my %students = &Apache::lonnet::dump('classlist',$cdom,$cnum);  
 #    $Apache::lonxml::debug=1;  
 #    &Apache::lonhomework::showhash(%students);  
 #    $Apache::lonxml::debug=0;  
 # my $StudNo = 0;  
 # my $now=time;  
 # my ($temp)=keys(%students);  
 # unless ($temp=~/^error\:/) {  
 #    foreach my $KeyPoint(sort keys(%students)) {  
   
   
  my $StudNo = 0;   my $StudNo = 0;
  my $now=time;   my $now=time;
   
  my %classlist=&Apache::lonnet::dump('classlist',$cdom,$cnum);   my %classlist=&Apache::lonnet::dump('classlist',$cdom,$cnum);
   
  my ($checkForError)=keys(%classlist);   my ($checkForError)=keys(%classlist);
  if($checkForError=~/^(con_lost|error|no_such_host)/i) {   if($checkForError=~/^(con_lost|error|no_such_host)/i) {
     $r->print('<h1>Could not access course data</h1>');      $r->print('<h1>Could not access course data</h1>');
  } else {   } else {
     foreach my $name (keys (%classlist)) {      foreach my $name (sort keys (%classlist)) {
  my $value=$classlist{$name};   my $value=$classlist{$name};
  my ($end,$start)=split(/\:/,$value);   my ($end,$start)=split(/\:/,$value);
  my $active=1;   my $active=1;
Line 1560  sub CreateForm { Line 1542  sub CreateForm {
   
 sub Menu {  sub Menu {
     &initial();      &initial();
   #    my $fn=$ENV{'request.course.fn'};
   #    $r->print( '<br>'.$fn.'<br>' );
   
 #    $Apache::lonxml::debug=1;  #    $Apache::lonxml::debug=1;
 #    &Apache::lonhomework::showhash(%ENV);  #    &Apache::lonhomework::showhash(%ENV);
 #    $Apache::lonxml::debug=0;  #    $Apache::lonxml::debug=0;
   
     &Title();      &Title();
     my $InpStr = $ENV{'form.sort'};      my $InpStr = $ENV{'form.sort'};
     if ($InpStr eq 'Activity Log') {      if ($InpStr eq 'Activity Log') {

Removed from v.1.25  
changed lines
  Added in v.1.26


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