version 1.32, 2011/05/31 02:40:05
|
version 1.36, 2012/03/15 20:53:27
|
Line 384 sub create_metadata_storage {
|
Line 384 sub create_metadata_storage {
|
$text .= 'idx_'.$colname.' ('.$colname.')'; |
$text .= 'idx_'.$colname.' ('.$colname.')'; |
push (@Columns,$text); |
push (@Columns,$text); |
} |
} |
$request .= "(".join(", ",@Columns).") TYPE=MyISAM"; |
$request .= "(".join(", ",@Columns).") ENGINE=MyISAM"; |
return $request; |
return $request; |
} |
} |
|
|
Line 463 sub store_metadata {
|
Line 463 sub store_metadata {
|
$mdata->{$fname} eq '') { |
$mdata->{$fname} eq '') { |
push(@MData,'NULL'); |
push(@MData,'NULL'); |
} else { |
} else { |
push(@MData,$mdata->{$fname}); |
push(@MData, $field->{type} eq 'DATETIME' ? |
|
sqltime($mdata->{$fname}) : $mdata->{$fname}); |
} |
} |
} else { |
} else { |
push(@MData,undef); |
push(@MData,undef); |
Line 918 sub process_dynamic_metadata {
|
Line 919 sub process_dynamic_metadata {
|
$data{$type.'_list'} = join(',',@{$resdata->{$type}}); |
$data{$type.'_list'} = join(',',@{$resdata->{$type}}); |
} |
} |
} |
} |
|
# |
|
# NOTE: usage is named sequsage elsewhere in LON-CAPA |
|
# The translation happens here |
|
# |
if (defined($resdata->{'usage'}) && |
if (defined($resdata->{'usage'}) && |
ref($resdata->{'usage'}) eq 'ARRAY') { |
ref($resdata->{'usage'}) eq 'ARRAY') { |
$data{'sequsage'} = scalar(@{$resdata->{'usage'}}); |
$data{'sequsage'} = scalar(@{$resdata->{'usage'}}); |
Line 969 sub dynamic_metadata_storage {
|
Line 974 sub dynamic_metadata_storage {
|
my $courseid = $data->{'course'}; |
my $courseid = $data->{'course'}; |
my $sections = $data->{'sections'}; |
my $sections = $data->{'sections'}; |
my $numstu = $data->{'num_students'}; |
my $numstu = $data->{'num_students'}; |
my $urlres = $data->{'urlres'}; |
my $part = $data->{'part'}; |
my $key = $courseid.'&'.$sections.'&'.$numstu.'___'.$urlres.'___stats'; |
my $symb = $data->{'symb'}; |
|
my $key = $courseid.'&'.$sections.'&'.$numstu.'&'.$part.'___'.$symb.'___stats'; |
$Store{$key} = |
$Store{$key} = |
'course='.$courseid.'&'. |
'course='.$courseid.'&'. |
'sections='.$sections.'&'. |
'sections='.$sections.'&'. |
'timestamp='.time.'&'. |
'timestamp='.time.'&'. |
'stdno='.$data->{'num_students'}.'&'. |
'part='.$part.'&'. |
|
'stdno='.$numstu.'&'. |
'avetries='.$data->{'mean_tries'}.'&'. |
'avetries='.$data->{'mean_tries'}.'&'. |
'difficulty='.$data->{'deg_of_diff'}; |
'difficulty='.$data->{'deg_of_diff'}.'&'. |
if (exists($data->{'deg_of_disc'})) { |
'disc='.$data->{'deg_of_disc'}; |
$Store{$key} .= '&'.'disc='.$data->{'deg_of_disc'}; |
|
} |
|
return %Store; |
return %Store; |
} |
} |
|
|