version 1.36, 2002/07/29 21:19:44
|
version 1.38, 2002/08/01 20:49:06
|
Line 83 sub ProcessFormData{
|
Line 83 sub ProcessFormData{
|
&CheckFormElement($cache, 'sort', 'sort', 'fullname'); |
&CheckFormElement($cache, 'sort', 'sort', 'fullname'); |
&CheckFormElement($cache, 'download', 'download', 'false'); |
&CheckFormElement($cache, 'download', 'download', 'false'); |
|
|
|
# student assessment |
if(defined($ENV{'form.CreateStudentAssessment'}) || |
if(defined($ENV{'form.CreateStudentAssessment'}) || |
defined($ENV{'form.NextStudent'}) || |
defined($ENV{'form.NextStudent'}) || |
defined($ENV{'form.PreviousStudent'})) { |
defined($ENV{'form.PreviousStudent'})) { |
Line 110 sub ProcessFormData{
|
Line 111 sub ProcessFormData{
|
$cache->{'sectionsSelected'} = $cache->{'sectionList'}; |
$cache->{'sectionsSelected'} = $cache->{'sectionList'}; |
} |
} |
|
|
|
# Problem analysis |
|
&CheckFormElement($cache, 'Interval', 'Interval', '1'); |
|
|
|
# ProblemStatistcs |
|
&CheckFormElement($cache, 'DisplayCSVFormat', |
|
'DisplayFormat', 'Display Table Format'); |
|
&CheckFormElement($cache, 'ProblemStatisticsAscend', |
|
'ProblemStatisticsAscend', 'Ascending'); |
|
&CheckFormElement($cache, 'ProblemStatisticsMaps', |
|
'ProblemStatisticsMaps', 'All Maps'); |
|
|
|
# Search only form elements |
my @headingColumns=(); |
my @headingColumns=(); |
my @sequenceColumns=(); |
my @sequenceColumns=(); |
my $foundColumn = 0; |
my $foundColumn = 0; |
Line 128 sub ProcessFormData{
|
Line 141 sub ProcessFormData{
|
} |
} |
} |
} |
|
|
|
$cache->{'reportKey'} = 'false'; |
|
if($cache->{'reportSelected'} eq 'Analyze') { |
|
$cache->{'reportKey'} = 'Analyze'; |
|
} elsif($cache->{'reportSelected'} eq 'DoDiffGraph') { |
|
$cache->{'reportKey'} = 'DoDiffGraph'; |
|
} elsif($cache->{'reportSelected'} eq 'PercentWrongGraph') { |
|
$cache->{'reportKey'} = 'PercentWrongGraph'; |
|
} |
|
|
|
if(defined($ENV{'form.DoDiffGraph'})) { |
|
$cache->{'reportSelected'} = 'DoDiffGraph'; |
|
$cache->{'reportKey'} = 'DoDiffGraph'; |
|
} elsif(defined($ENV{'form.PercentWrongGraph'})) { |
|
$cache->{'reportSelected'} = 'PercentWrongGraph'; |
|
$cache->{'reportKey'} = 'PercentWrongGraph'; |
|
} |
|
|
foreach (keys(%ENV)) { |
foreach (keys(%ENV)) { |
if(/form\.Analyze:::/) { |
if(/form\.Analyze/) { |
# $cache->{'reportSelected'} = 'Analyze'; |
$cache->{'reportSelected'} = 'Analyze'; |
# $cache->{'reportKey'} = 'Problem Analysis'; |
$cache->{'reportKey'} = 'Analyze'; |
my ($uri, $title, $part, $problem); |
my $data; |
(undef, $uri, $title, $part, $problem)=split(':::', $_); |
(undef, $data)=split(':::', $_); |
$cache->{'AnalyzeURI'} = $uri; |
$cache->{'AnalyzeInfo'}=$data; |
$cache->{'AnalyzeTitle'} = $title; |
|
$cache->{'AnalyzePart'} = $part; |
|
$cache->{'AnalyzeProblem'} = $problem; |
|
|
|
&CheckFormElement($cache, 'Interval', 'Interval', '1'); |
|
} elsif(/form\.HeadingColumn/) { |
} elsif(/form\.HeadingColumn/) { |
my $value = $_; |
my $value = $_; |
$value =~ s/form\.//; |
$value =~ s/form\.//; |
Line 168 sub ProcessFormData{
|
Line 193 sub ProcessFormData{
|
$cache->{'DefaultColumns'} = 'false'; |
$cache->{'DefaultColumns'} = 'false'; |
|
|
return; |
return; |
|
|
# Select page to display |
|
if(defined($ENV{'form.ProblemStatistics'}) || |
|
defined($ENV{'form.ProblemStatisticsRecalculate'}) || |
|
defined($ENV{'form.DisplayCSVFormat'})) { |
|
$cache->{'GoToPage'} = 'ProblemStatistics'; |
|
&CheckFormElement($cache, 'DisplayCSVFormat', |
|
'DisplayFormat', 'Display Table Format'); |
|
&CheckFormElement($cache, 'Ascend','ProblemStatisticsAscend', |
|
'Ascending'); |
|
&CheckFormElement($cache, 'Maps', 'ProblemStatisticsMap', |
|
'All Maps'); |
|
} elsif(defined($ENV{'form.ProblemAnalysis'})) { |
|
$cache->{'GoToPage'} = 'ProblemAnalysis'; |
|
&CheckFormElement($cache, 'Interval', 'Interval', '1'); |
|
} elsif(defined($ENV{'form.DoDiffGraph'})) { |
|
$cache->{'GoToPage'} = 'DoDiffGraph'; |
|
} elsif(defined($ENV{'form.PercentWrongGraph'})) { |
|
$cache->{'GoToPage'} = 'PercentWrongGraph'; |
|
} elsif(defined($ENV{'form.ActivityLog'})) { |
|
$cache->{'GoToPage'} = 'ActivityLog'; |
|
} else { |
|
$cache->{'GoToPage'} = 'Menu'; |
|
} |
|
|
|
&CheckFormElement($cache, 'Status', 'Status', 'Active'); |
|
|
|
return; |
|
} |
} |
|
|
=pod |
=pod |
Line 296 sub SpaceColumns {
|
Line 293 sub SpaceColumns {
|
} |
} |
|
|
sub PrepareData { |
sub PrepareData { |
my ($c, $cacheDB, $studentInformation, $headings)=@_; |
my ($c, $cacheDB, $studentInformation, $headings,$r)=@_; |
|
|
# Test for access to the cache data |
# Test for access to the cache data |
my $courseID=$ENV{'request.course.id'}; |
my $courseID=$ENV{'request.course.id'}; |
Line 313 sub PrepareData {
|
Line 310 sub PrepareData {
|
|
|
# Download class list information if not using cached data |
# Download class list information if not using cached data |
my %cache; |
my %cache; |
unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT,0640)) { |
unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT(),0640)) { |
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); |
&Apache::loncoursedata::ProcessTopResourceMap(\%cache, $c, $r); |
if($processTopResourceMapReturn ne 'OK') { |
if($processTopResourceMapReturn ne 'OK') { |
untie(%cache); |
untie(%cache); |
return $processTopResourceMapReturn; |
return $processTopResourceMapReturn; |
Line 439 sub BuildClasslist {
|
Line 436 sub BuildClasslist {
|
my ($cacheDB,$students,$studentInformation,$headings)=@_; |
my ($cacheDB,$students,$studentInformation,$headings)=@_; |
|
|
my %cache; |
my %cache; |
unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) { |
unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) { |
return '<html><body>Unable to tie database.</body></html>'; |
return '<html><body>Unable to tie database.</body></html>'; |
} |
} |
|
|
Line 542 sub BuildStatistics {
|
Line 539 sub BuildStatistics {
|
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', |
|
'activitylog' => 'Activity Log', |
'reportSelected' => 'Class list'); |
'reportSelected' => 'Class list'); |
|
|
my %cache; |
my %cache; |
Line 551 sub BuildStatistics {
|
Line 549 sub BuildStatistics {
|
|
|
my ($returnValue, $students) = &PrepareData($c, $cacheDB, |
my ($returnValue, $students) = &PrepareData($c, $cacheDB, |
\@studentInformation, |
\@studentInformation, |
\@headings); |
\@headings,$r); |
if($returnValue ne 'OK') { |
if($returnValue ne 'OK') { |
$r->print('<html><body>'.$returnValue."\n".'</body></html>'); |
$r->print('<html><body>'.$returnValue."\n".'</body></html>'); |
return OK; |
return OK; |
} |
} |
|
|
my $GoToPage; |
my $GoToPage; |
if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) { |
if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) { |
$GoToPage = $cache{'reportSelected'}; |
$GoToPage = $cache{'reportSelected'}; |
$reports{'reportSelected'} = $cache{'reportSelected'}; |
$reports{'reportSelected'} = $cache{'reportSelected'}; |
# if(defined($cache{'reportKey'}) && $cache{'reportKey'} ne 'false') { |
if(defined($cache{'reportKey'}) && |
# $reports{$cache{'reportKey'}} = $cache{'reportSelected'}; |
!exists($reports{$cache{'reportKey'}}) && |
# } |
$cache{'reportKey'} ne 'false') { |
|
$reports{$cache{'reportKey'}} = $cache{'reportSelected'}; |
|
} |
|
|
if(defined($cache{'OptionResponses'})) { |
if(defined($cache{'OptionResponses'})) { |
$reports{'problem_analysis'} = 'Problem Analysis'; |
$reports{'problem_analysis'} = 'Problem Analysis'; |
Line 592 sub BuildStatistics {
|
Line 592 sub BuildStatistics {
|
} elsif($GoToPage eq 'Student Assessment') { |
} elsif($GoToPage eq 'Student Assessment') { |
$r->print( |
$r->print( |
&Apache::lonstudentassessment::BuildStudentAssessmentPage($cacheDB, |
&Apache::lonstudentassessment::BuildStudentAssessmentPage($cacheDB, |
$students, |
$students, |
$courseID, |
$courseID, |
'Statistics', |
'Statistics', |
\@headings, |
\@headings, |
$spacing, |
$spacing, |
\@studentInformation, |
\@studentInformation, |
$r, $c)); |
$r, $c)); |
} elsif($GoToPage eq 'Analyze') { |
} elsif($GoToPage eq 'Analyze') { |
$r->print(&Apache::lonproblemanalysis::BuildAnalyzePage($cacheDB, |
$r->print(&Apache::lonproblemanalysis::BuildAnalyzePage($cacheDB, |
$students, |
$students, |
$courseID)); |
$courseID,$r)); |
} elsif($GoToPage eq 'DoDiffGraph') { |
} elsif($GoToPage eq 'DoDiffGraph') { |
&Apache::lonproblemstatistics::BuildDiffGraph($r); |
&Apache::lonproblemstatistics::BuildDiffGraph($r); |
} elsif($GoToPage eq 'PercentWrongGraph') { |
} elsif($GoToPage eq 'PercentWrongGraph') { |