version 1.14, 2004/12/10 20:41:39
|
version 1.15, 2005/03/01 22:25:59
|
Line 94 sub BuildCorrectProblemsPage {
|
Line 94 sub BuildCorrectProblemsPage {
|
my @ProblemSymbs; |
my @ProblemSymbs; |
my $total_parts = 0; |
my $total_parts = 0; |
my $title = ''; |
my $title = ''; |
if ($Apache::lonstatistics::SelectedMaps[0] ne 'all') { |
my @maps = &Apache::lonstatistics::get_selected_maps('Maps'); |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()){ |
my ($navmap,@sequences) = |
|
&Apache::lonstatistics::selected_sequences_with_assessments(); |
|
if ($maps[0] ne 'all') { |
|
foreach my $seq (@sequences) { |
if ($title eq '') { |
if ($title eq '') { |
$title = $seq->{'title'}; |
$title = $seq->compTitle; |
} else { |
} else { |
$title = 'Multiple Sequences'; |
$title = 'Multiple Sequences'; |
} |
} |
foreach my $res (@{$seq->{'contents'}}) { |
my @resources = |
next if ($res->{'type'} ne 'assessment'); |
&Apache::lonstathelpers::get_resources($navmap,$seq); |
foreach my $part (@{$res->{'parts'}}) { |
foreach my $res (@resources) { |
|
foreach my $partid (@{$res->parts}) { |
$total_parts++; |
$total_parts++; |
push(@ProblemSymbs,{symb=>$res->{'symb'}, |
push(@ProblemSymbs,{symb=>$res->symb, |
part=>$part}); |
part=>$partid}); |
} |
} |
} |
} |
} |
} |
} else { |
} else { |
$title = "All Problems"; |
$title = "All Problems"; |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()){ |
foreach my $seq (@sequences) { |
foreach my $res (@{$seq->{'contents'}}) { |
my @resources = |
next if ($res->{'type'} ne 'assessment'); |
&Apache::lonstathelpers::get_resources($navmap,$seq); |
$total_parts += scalar(@{$res->{'parts'}}); |
foreach my $res (@resources) { |
|
$total_parts += scalar(@{$res->parts}); |
} |
} |
} |
} |
} |
} |
Line 279 sub CreateInterface {
|
Line 284 sub CreateInterface {
|
## |
## |
## Environment variable initialization |
## Environment variable initialization |
my $Str; |
my $Str; |
$Str .= &Apache::lonhtmlcommon::breadcrumbs |
$Str .= &Apache::lonhtmlcommon::breadcrumbs(undef,'Correct Problems Plot'); |
(undef,'Correct Problems Plot'); |
|
$Str .= '<p>'; |
$Str .= '<p>'; |
# |
# |
$Str .= '<table cellspacing="5">'."\n"; |
$Str .= '<table cellspacing="5">'."\n"; |
Line 300 sub CreateInterface {
|
Line 304 sub CreateInterface {
|
$Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5); |
$Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5); |
$Str .= '</td><td>'."\n"; |
$Str .= '</td><td>'."\n"; |
# |
# |
my $only_seq_with_assessments = sub { |
$Str .= &Apache::lonstatistics::map_select('Maps','multiple,all',5); |
my $s=shift; |
|
if ($s->{'num_assess'} < 1) { |
|
return 0; |
|
} else { |
|
return 1; |
|
} |
|
}; |
|
$Str .= &Apache::lonstatistics::MapSelect('Maps','multiple,all',5, |
|
$only_seq_with_assessments); |
|
$Str .= '</td>'; |
$Str .= '</td>'; |
# |
# |
$Str .= '</tr>'."\n"; |
$Str .= '</tr>'."\n"; |