Diff for /loncom/metadata_database/LONCAPA/lonmetadata.pm between versions 1.36 and 1.38

version 1.36, 2012/03/15 20:53:27 version 1.38, 2012/03/15 23:01:59
Line 760  sub process_reseval_data { Line 760  sub process_reseval_data {
     #      #
     # Process every stored element      # Process every stored element
     while (my ($storedkey,$value) = each(%{$evaldata})) {      while (my ($storedkey,$value) = each(%{$evaldata})) {
         my ($source,$file,$type) = split('___',$storedkey);          my (@keycomponents) = split('___',$storedkey);
         $source = &unescape($source);          my $type=pop(@keycomponents);
           my $file=&unescape(pop(@keycomponents));
           my $source = &unescape(join('___',@keycomponents));
         $file = &unescape($file);          $file = &unescape($file);
         $value = &unescape($value);          $value = &unescape($value);
          "    got ".$file."\n        ".$type." ".$source."\n";  
         if ($type =~ /^(avetries|count|difficulty|stdno|timestamp)$/) {          if ($type =~ /^(avetries|count|difficulty|stdno|timestamp)$/) {
             #              #
             # Statistics: $source is course id              # Statistics: $source is course id
Line 787  sub process_reseval_data { Line 788  sub process_reseval_data {
             # $source is $cid\_$sec\_$stdno              # $source is $cid\_$sec\_$stdno
             # $value is stat1=value&stat2=value&stat3=value,....              # $value is stat1=value&stat2=value&stat3=value,....
             #              #
             my ($cid,$sec,$stdno)=split('&',$source);              my ($cid,$sec,$stdno,$part,$instance)=split('&',$source);
             my $crssec = $cid.'&'.$sec;              my $datakey = $cid.'&'.$sec.'&'.$part.'&'.$instance;
             my @Data = split('&',$value);              my @Data = split('&',$value);
             my %Statistics;              my %Statistics;
             while (my ($key,$value) = split('=',pop(@Data))) {              while (my ($key,$value) = split('=',pop(@Data))) {
Line 799  sub process_reseval_data { Line 800  sub process_reseval_data {
             #              #
             # Only store the data if the number of students is greater              # Only store the data if the number of students is greater
             # than the data already stored              # than the data already stored
             if (! exists($DynamicData{$file}->{'stats'}->{$crssec}) ||              if (! exists($DynamicData{$file}->{'stats'}->{$datakey}) ||
                 $DynamicData{$file}->{'stats'}->{$crssec}->{'stdno'}<$stdno){                  $DynamicData{$file}->{'stats'}->{$datakey}->{'stdno'}<$stdno){
                 $DynamicData{$file}->{'stats'}->{$crssec}=\%Statistics;                  $DynamicData{$file}->{'stats'}->{$datakey}=\%Statistics;
             }              }
         }          }
     }      }
Line 976  sub dynamic_metadata_storage { Line 977  sub dynamic_metadata_storage {
     my $numstu = $data->{'num_students'};      my $numstu = $data->{'num_students'};
     my $part = $data->{'part'};      my $part = $data->{'part'};
     my $symb = $data->{'symb'};      my $symb = $data->{'symb'};
     my $key = $courseid.'&'.$sections.'&'.$numstu.'&'.$part.'___'.$symb.'___stats';      my $key = $courseid.'&'.$sections.'&'.$numstu.'&'.$part.'&'.$symb.'___stats';
     $Store{$key} =      $Store{$key} =
         'course='.$courseid.'&'.          'course='.$courseid.'&'.
         'sections='.$sections.'&'.          'sections='.$sections.'&'.

Removed from v.1.36  
changed lines
  Added in v.1.38


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