version 1.83, 2004/04/06 15:45:13
|
version 1.84, 2004/04/16 21:43:56
|
Line 55 use Apache::loncommon();
|
Line 55 use Apache::loncommon();
|
use Apache::lonhtmlcommon; |
use Apache::lonhtmlcommon; |
use Apache::loncoursedata; |
use Apache::loncoursedata; |
use Apache::lonstatistics; |
use Apache::lonstatistics; |
|
use LONCAPA::lonmetadata(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Spreadsheet::WriteExcel; |
use Spreadsheet::WriteExcel; |
use Apache::lonstathelpers(); |
use Apache::lonstathelpers(); |
Line 1453 sub get_statistics {
|
Line 1454 sub get_statistics {
|
} |
} |
# |
# |
# Store in metadata if computations were done for all students |
# Store in metadata if computations were done for all students |
if ($Apache::lonstatistics::SelectedSections[0] eq 'all' && |
if ($data->{'num_students'} > 1) { |
$data->{'num_students'} > 1) { |
my @Sections = @Apache::lonstatistics::SelectedSections; |
my %storestats; |
my $sections = '"'.join(' ',@Sections).'"'; |
# |
$sections =~ s/&+/_/g; # Ensure no special characters |
|
$data->{'sections'}=$sections; |
|
$data->{'course'} = $ENV{'request.course.id'}; |
my $urlres=(&Apache::lonnet::decode_symb($resource->{'symb'}))[2]; |
my $urlres=(&Apache::lonnet::decode_symb($resource->{'symb'}))[2]; |
|
$data->{'urlres'}=$urlres; |
|
my %storestats = |
|
&LONCAPA::lonmetadata::dynamic_metadata_storage($data); |
my ($dom,$user) = $urlres=~/^(\w+)\/(\w+)/; |
my ($dom,$user) = $urlres=~/^(\w+)\/(\w+)/; |
my $preamble = $courseid.'___'.$urlres.'___'; |
|
# |
|
$storestats{$preamble.'timestamp'} = time; |
|
$storestats{$preamble.'stdno'} = $data->{'num_students'}; |
|
$storestats{$preamble.'avetries'} = $data->{'mean_tries'}; |
|
$storestats{$preamble.'difficulty'} = $data->{'deg_of_diff'}; |
|
if ($SelectedFields{'deg_of_disc'}) { |
|
$storestats{$preamble.'discrimination'} = $data->{'deg_of_disc'}; |
|
} |
|
# |
|
&Apache::lonnet::put('nohist_resevaldata',\%storestats,$dom,$user); |
&Apache::lonnet::put('nohist_resevaldata',\%storestats,$dom,$user); |
} |
} |
return $data; |
return $data; |