version 1.48, 2002/08/28 22:42:15
|
version 1.54, 2002/11/18 20:39:46
|
Line 47 use Apache::lonhtmlcommon;
|
Line 47 use Apache::lonhtmlcommon;
|
use Apache::lonproblemanalysis; |
use Apache::lonproblemanalysis; |
use Apache::lonproblemstatistics; |
use Apache::lonproblemstatistics; |
use Apache::lonstudentassessment; |
use Apache::lonstudentassessment; |
|
use Apache::lonpercentage; |
use HTML::TokeParser; |
use HTML::TokeParser; |
use GDBM_File; |
use GDBM_File; |
|
|
Line 84 sub ProcessFormData{
|
Line 85 sub ProcessFormData{
|
&CheckFormElement($cache, 'download', 'download', 'false'); |
&CheckFormElement($cache, 'download', 'download', 'false'); |
&CheckFormElement($cache, 'StatisticsMaps', |
&CheckFormElement($cache, 'StatisticsMaps', |
'StatisticsMaps', 'All Maps'); |
'StatisticsMaps', 'All Maps'); |
|
&CheckFormElement($cache, 'StatisticsProblemSelect', |
|
'StatisticsProblemSelect', 'All Problems'); |
|
&CheckFormElement($cache, 'StatisticsPartSelect', |
|
'StatisticsPartSelect', 'All Parts'); |
if(defined($ENV{'form.Section'})) { |
if(defined($ENV{'form.Section'})) { |
my @sectionsSelected = (ref($ENV{'form.Section'}) ? |
my @sectionsSelected = (ref($ENV{'form.Section'}) ? |
@{$ENV{'form.Section'}} : |
@{$ENV{'form.Section'}} : |
Line 122 sub ProcessFormData{
|
Line 127 sub ProcessFormData{
|
'ProblemStatisticsAscend', 'Ascending'); |
'ProblemStatisticsAscend', 'Ascending'); |
&CheckFormElement($cache, 'ProblemStatisticsSort', |
&CheckFormElement($cache, 'ProblemStatisticsSort', |
'ProblemStatisticsSort', 'Homework Sets Order'); |
'ProblemStatisticsSort', 'Homework Sets Order'); |
&CheckFormElement($cache, 'DisplayLegend', 'DisplayLegend', 'Hide Legend'); |
&CheckFormElement($cache, 'DisplayLegend', 'DisplayLegend', |
|
'Hide Legend'); |
&CheckFormElement($cache, 'SortProblems', 'SortProblems', |
&CheckFormElement($cache, 'SortProblems', 'SortProblems', |
'Sort Within Sequence'); |
'Sort Within Sequence'); |
|
|
Line 239 sub SortStudents {
|
Line 245 sub SortStudents {
|
my $sortBy = ''; |
my $sortBy = ''; |
if(defined($cache->{'sort'})) { |
if(defined($cache->{'sort'})) { |
$sortBy = ':'.$cache->{'sort'}; |
$sortBy = ':'.$cache->{'sort'}; |
|
} else { |
|
$sortBy = ':fullname'; |
} |
} |
my @order = sort { $cache->{$a.$sortBy} cmp $cache->{$b.$sortBy} || |
my @order = sort { lc($cache->{$a.$sortBy}) cmp lc($cache->{$b.$sortBy}) || |
$cache->{$a.':fullname'} cmp $cache->{$b.':fullname'} } |
lc($cache->{$a.':fullname'}) cmp lc($cache->{$b.':fullname'}) } |
@sorted1Students; |
@sorted1Students; |
|
|
return \@order; |
return \@order; |
Line 318 sub PrepareData {
|
Line 326 sub PrepareData {
|
return "Unable to tie hash to db file."; |
return "Unable to tie hash to db file."; |
} |
} |
|
|
if(!$isCached) { |
# if(!$isCached) { |
my $processTopResourceMapReturn= |
my $processTopResourceMapReturn= |
&Apache::loncoursedata::ProcessTopResourceMap(\%cache, $c, $r); |
&Apache::loncoursedata::ProcessTopResourceMap(\%cache, $c); |
if($processTopResourceMapReturn ne 'OK') { |
if($processTopResourceMapReturn ne 'OK') { |
untie(%cache); |
untie(%cache); |
return $processTopResourceMapReturn; |
return $processTopResourceMapReturn; |
} |
} |
} |
# } |
|
|
if($c->aborted()) { |
if($c->aborted()) { |
untie(%cache); |
untie(%cache); |
Line 503 sub BuildStatistics {
|
Line 511 sub BuildStatistics {
|
'updateTime'); |
'updateTime'); |
my @headings=('Full Name', 'Section', 'PID', 'Domain', 'User Name', |
my @headings=('Full Name', 'Section', 'PID', 'Domain', 'User Name', |
'Last Updated'); |
'Last Updated'); |
my $spacing = ' '; |
my $spacing = ' '; |
|
|
my %reports = ('classlist' => 'Class list', |
my %reports = ('classlist' => 'Class list', |
'problem_statistics' => 'Problem Statistics', |
'problem_statistics' => 'Problem Statistics', |
'student_assessment' => 'Student Assessment', |
'student_assessment' => 'Student Assessment', |
|
'percentage' => 'Percentage Graphs', |
# 'activitylog' => 'Activity Log', |
# 'activitylog' => 'Activity Log', |
'reportSelected' => 'Class list'); |
'reportSelected' => 'Class list'); |
|
|
Line 586 sub BuildStatistics {
|
Line 596 sub BuildStatistics {
|
} elsif($GoToPage eq 'Class list') { |
} elsif($GoToPage eq 'Class list') { |
&BuildClasslist($cacheDB, $students, \@studentInformation, |
&BuildClasslist($cacheDB, $students, \@studentInformation, |
\@headings, $r); |
\@headings, $r); |
|
} elsif($GoToPage eq 'Percentage Graphs') { |
|
&Apache::lonpercentage::BuildPercentageGraph($cacheDB, $students, |
|
$courseID, $c, $r); |
} |
} |
|
|
$r->print('</form>'."\n"); |
$r->print('</form>'."\n"); |
Line 602 sub handler {
|
Line 615 sub handler {
|
|
|
# $jr = $r; |
# $jr = $r; |
|
|
|
my $loaderror=&Apache::lonnet::overloaderror($r); |
|
if ($loaderror) { return $loaderror; } |
|
$loaderror= |
|
&Apache::lonnet::overloaderror($r, |
|
$ENV{'course.'.$ENV{'request.course.id'}.'.home'}); |
|
if ($loaderror) { return $loaderror; } |
|
|
unless(&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'})) { |
unless(&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'})) { |
$ENV{'user.error.msg'}= |
$ENV{'user.error.msg'}= |
$r->uri.":vgr:0:0:Cannot view grades for complete course"; |
$r->uri.":vgr:0:0:Cannot view grades for complete course"; |