Diff for /loncom/interface/lonstatistics.pm between versions 1.20 and 1.21

version 1.20, 2002/05/19 15:44:40 version 1.21, 2002/05/27 00:24:05
Line 31 Line 31
 # 11/1,11/4,11/16,12/14,12/16,12/18,12/20,12/31 Behrouz Minaei  # 11/1,11/4,11/16,12/14,12/16,12/18,12/20,12/31 Behrouz Minaei
 # YEAR=2002  # YEAR=2002
 # 1/22,2/1,2/6,2/25,3/2,3/6,3/17,3/21,3/22,3/26,4/7,5/6 Behrouz Minaei  # 1/22,2/1,2/6,2/25,3/2,3/6,3/17,3/21,3/22,3/26,4/7,5/6 Behrouz Minaei
 # 5/12,5/14,5/15,5/19 Behrouz Minaei  # 5/12,5/14,5/15,5/19,5/26 Behrouz Minaei
 #  #
 ###  ###
   
Line 86  my %Header = (0,"Homework Sets Order",1, Line 86  my %Header = (0,"Homework Sets Order",1,
               9,"S.D.",10,"Skew.",11,"D.F.1st",12,"D.F.2nd");                9,"S.D.",10,"Skew.",11,"D.F.1st",12,"D.F.2nd");
 my %Answer = ();  my %Answer = ();
   
   
   sub unescape {
       my $str=shift;
       $str =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
       return $str;
   }
   
   sub Activity {
       my $file="/home/minaeibi/minaei";
       my $userid='billskat';
       $r->print("<br>Using $file");
       $r->rflush();
       open(FILEID, "<$file");
       my $line;
       my @allaccess;
       while ($line=<FILEID>) {
    my ($time,$machine,$what)=split(':',$line);
    #$r->print("time=$time machine=$machine:-> $what\n");
    #$r->rflush();
    $what=&unescape($what);
    my @accesses=split('&',$what);
    foreach my $access (@accesses) {
       my ($date,$resource,$who,$domain,$post,@posts)=split(':',$access);
       if ($who ne $userid) { next; }
       #if (!$resource) { next; }
       push (@allaccess,unescape($access));
       #print $machine;
    }
       }
       @allaccess=sort(@allaccess);
       my $Count=0;
       foreach my $access (@allaccess) {
    my ($date,$resource,$who,$domain,$post,@posts)=split(':',$access);
    $Count++;
   # $r->print("$Count ".localtime($date)." $who $resource\n");
    $r->print("<br>$Count) $date: $who --> $resource");
    $r->rflush();
    if ($post) { 
       $r->print("<br><b>Sent data ".join(':',unescape(@posts)).'</b>');
    }
       }
   }
   
   
   
 sub InitAnalysis {  sub InitAnalysis {
     my ($rid, $student)=@_;      my ($rid, $student)=@_;
     my ($uname,$udom)=split(/\:/,$student);      my ($uname,$udom)=split(/\:/,$student);
Line 279  sub AnalyzeProblem { Line 324  sub AnalyzeProblem {
     my $OpSel='';      my $OpSel='';
     my $CurInt = $ENV{'form.interval'};      my $CurInt = $ENV{'form.interval'};
     if ($CurInt eq '') {$CurMap = '1';}      if ($CurInt eq '') {$CurMap = '1';}
     my $Ptr = '<b>Select number of intervals</b>'."\n".      my $Ptr = '<br><b>Select number of intervals</b>'."\n".
              '<select name="interval">'."\n";                                            '<select name="interval">'."\n";                             
     for (my $n=1;$n<=7;$n++) {                for (my $n=1;$n<=7;$n++) {          
  $Ptr .= '<option';   $Ptr .= '<option';
Line 295  sub AnalyzeProblem { Line 340  sub AnalyzeProblem {
               "\n".'<tr>'.                "\n".'<tr>'.
               "\n".'<th> # </th>'.                "\n".'<th> # </th>'.
       "\n".'<th> Problem Title </th>'.        "\n".'<th> Problem Title </th>'.
       "\n".'<th> Resouse </th>'.        "\n".'<th> Resource </th>'.
       "\n".'<th> Address </th>'.        "\n".'<th> Address </th>'.
       "\n".'</tr>';        "\n".'</tr>';
   
Line 639  sub PreStatTable { Line 684  sub PreStatTable {
     $Ptr .= '<pre>'.      $Ptr .= '<pre>'.
     '<b>  #Stdnts</b>: Total Number of Students opened the problem.<br>'.       '<b>  #Stdnts</b>: Total Number of Students opened the problem.<br>'. 
     '<b>  Tries  </b>: Total Number of Tries for solving the problem.<br>'.       '<b>  Tries  </b>: Total Number of Tries for solving the problem.<br>'. 
     '<b>  Max   </b> : Maximunm Number of Tries for solving the problem.<br>'.       '<b>  Mod    </b>: Maximunm Number of Tries for solving the problem.<br>'. 
     '<b>  Avg.   </b>: Average Number of the tries. [ Tries / #Stdnts ]<br>'.      '<b>  Mean   </b>: Average Number of the tries. [ Tries / #Stdnts ]<br>'.
     '<b>  #YES   </b>: Number of students solved the problem correctly.<br>'.       '<b>  #YES   </b>: Number of students solved the problem correctly.<br>'. 
     '<b>  #yes   </b>: Number of students solved the problem by override.<br>'.      '<b>  #yes   </b>: Number of students solved the problem by override.<br>'.
     '<b>  %Wrng  </b>: Percentage of students tried to solve the problem but'.      '<b>  %Wrng  </b>: Percentage of students tried to solve the problem but'.
Line 648  sub PreStatTable { Line 693  sub PreStatTable {
 #    '  DoDiff : Degree of Difficulty of the problem. [ Tries/(#YES+#yes+0.1) ]<br>'. Kashy formula  #    '  DoDiff : Degree of Difficulty of the problem. [ Tries/(#YES+#yes+0.1) ]<br>'. Kashy formula
     '<b>  DoDiff </b>: Degree of Difficulty of the problem. [ 1 - ((#YES+#yes) / Tries) ]<br>'. #Gerd formula      '<b>  DoDiff </b>: Degree of Difficulty of the problem. [ 1 - ((#YES+#yes) / Tries) ]<br>'. #Gerd formula
     '<b>  S.D.  </b> : Standard Deviation of the tries.'.      '<b>  S.D.  </b> : Standard Deviation of the tries.'.
     '[ sqrt(sum((Xi - Avg.)^2)) / (#Stdnts-1)'.      '[ sqrt(sum((Xi - Mean)^2)) / (#Stdnts-1)'.
     ' where Xi denotes every student\'s tries ]<br>'.      ' where Xi denotes every student\'s tries ]<br>'.
     '<b>  Skew.  </b>: Skewness of the students tries.'.      '<b>  Skew.  </b>: Skewness of the students tries.'.
  ' [ (sqrt( sum((Xi - Avg.)^3) / #Stdnts)) / (S.D.^3) ]<br>'.   ' [ (sqrt( sum((Xi - Mean)^3) / #Stdnts)) / (S.D.^3) ]<br>'.
     '<b>  Dis.F. </b>: Discrimination Factor: A Standard for '.      '<b>  Dis.F. </b>: Discrimination Factor: A Standard for '.
  'evaluating the problem according to a Criterion<br>'.   'evaluating the problem according to a Criterion<br>'.
  '<b>           [Applied Criterion in %27 Upper Students - '.   '<b>           [Applied Criterion in %27 Upper Students - '.
Line 882  sub ExtractStudentData { Line 927  sub ExtractStudentData {
 }  }
   
   
   
 # ------------------------------------------------------------ Build page table  # ------------------------------------------------------------ Build page table
 sub tracetable {  sub tracetable {
     my ($rid,$beenhere)=@_;      my ($rid,$beenhere)=@_;
Line 1460  sub CreateForm { Line 1506  sub CreateForm {
  $Ptr .= '<br><br>';   $Ptr .= '<br><br>';
  $Ptr .= '<input type=submit name=sort value="Student Assessment"/>';   $Ptr .= '<input type=submit name=sort value="Student Assessment"/>';
  $Ptr .= '</h3>';   $Ptr .= '</h3>';
    #$Ptr .= '<input type=submit name=sort value="Activity Log"/>';
    #$Ptr .= '</h3>';
  $r->print( $Ptr );   $r->print( $Ptr );
     }      }
     else {      else {
Line 1488  sub Menu { Line 1536  sub Menu {
 #    $Apache::lonxml::debug=0;  #    $Apache::lonxml::debug=0;
     &Title();      &Title();
     my $InpStr = $ENV{'form.sort'};      my $InpStr = $ENV{'form.sort'};
     if ($InpStr=~/^Analyze\_/) {      if ($InpStr eq 'Activity Log') {
    &Activity();
       }    
       elsif ($InpStr=~/^Analyze\_/) {
  &ClassList();   &ClassList();
  &ShowOpGraph($InpStr,$ENV{'form.interval'});   &ShowOpGraph($InpStr,$ENV{'form.interval'});
     }      }
Line 1505  sub Menu { Line 1556  sub Menu {
     $r->rflush();      $r->rflush();
 }  }
   
   
 sub StudentOptions {  sub StudentOptions {
     my $OpSel5='';      my $OpSel5='';
     $CurStu = $ENV{'form.student'};      $CurStu = $ENV{'form.student'};

Removed from v.1.20  
changed lines
  Added in v.1.21


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