--- loncom/interface/statistics/lonstudentsubmissions.pm 2010/09/12 17:37:24 1.54.10.2
+++ loncom/interface/statistics/lonstudentsubmissions.pm 2011/11/18 22:35:33 1.54.10.4
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentsubmissions.pm,v 1.54.10.2 2010/09/12 17:37:24 raeburn Exp $
+# $Id: lonstudentsubmissions.pm,v 1.54.10.4 2011/11/18 22:35:33 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -77,7 +77,7 @@ sub BuildStudentSubmissionsPage {
'
'.&mt('Loading student data...').'
');
$r->rflush();
#
- if (exists($env{'form.problemchoice'}) &&
+ if ((exists($env{'form.problemchoice'}) || (exists($env{'form.allproblems'}))) &&
! exists($env{'form.SelectAnother'})) {
foreach my $button (@SubmitButtons) {
if ($button->{'name'} eq 'break') {
@@ -95,16 +95,32 @@ sub BuildStudentSubmissionsPage {
$r->print('
'.$/);
$r->rflush();
#
+
+ #
+ # Get resource objects
+ my $navmap = Apache::lonnavmaps::navmap->new();
+
# Determine which problems we are to analyze
my @Symbs =
&Apache::lonstathelpers::get_selected_symbs('problemchoice');
+ if (defined($navmap)) {
+ if ($env{'form.allproblems'}) {
+ my $iterator = $navmap->getIterator(undef, undef, undef, 1);
+ while (my $curRes = $iterator->next()) {
+ next if (! ref($curRes));
+ if ($curRes->is_problem) {
+ my $symb = $curRes->symb;
+ unless(grep(/^\Q$symb\E$/,@Symbs)) {
+ push(@Symbs,$symb);
+ }
+ }
+ }
+ }
+ }
foreach my $selected (@Symbs) {
$r->print(''.$/);
}
- #
- # Get resource objects
- my $navmap = Apache::lonnavmaps::navmap->new();
if (!defined($navmap)) {
$r->print(''.&mt("Internal error").'
');
return;
@@ -112,7 +128,9 @@ sub BuildStudentSubmissionsPage {
my %already_seen;
my (@Problems,$show_named);
unless (&Apache::loncommon::needs_gci_custom()) {
- $show_named = 1;
+ unless ($env{'form.anonymized'} eq 'true') {
+ $show_named = 1;
+ }
}
foreach my $symb (@Symbs) {
my $resource = $navmap->getBySymb($symb);
@@ -136,6 +154,9 @@ sub BuildStudentSubmissionsPage {
$threshold = 10;
}
}
+ unless (&Apache::loncommon::needs_gci_custom()) {
+ $threshold = 0;
+ }
#
$r->print('