--- loncom/interface/lonstatistics.pm 2003/03/25 22:20:25 1.65 +++ loncom/interface/lonstatistics.pm 2003/04/18 15:50:55 1.66 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstatistics.pm,v 1.65 2003/03/25 22:20:25 matthew Exp $ +# $Id: lonstatistics.pm,v 1.66 2003/04/18 15:50:55 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -51,7 +51,7 @@ Main handler for statistics and chart. use Apache::lonproblemstatistics; use Apache::lonstudentassessment; use Apache::lonpercentage; - + use Apache::lonmysql; =over 4 =cut @@ -82,6 +82,7 @@ use Apache::lonproblemanalysis(); use Apache::lonproblemstatistics(); use Apache::lonstudentassessment(); use Apache::lonpercentage; +use Apache::lonmysql; use Time::HiRes; ####################################################### @@ -908,6 +909,22 @@ sub handler { $r->print(&Apache::lonhtmlcommon::Title('Course Statistics and Charts')); $r->rflush(); # + if (! &Apache::lonmysql::verify_sql_connection()) { + my $serveradmin = $r->dir_config('lonAdmEMail'); + $r->print(<Unable to connect to database! +

+Please notify the server administrator $serveradmin. +

+Course Statistics and Charts cannot be retrieved until the database is +restarted. Your data is intact but cannot be displayed at this time. +

+ + +END + return; + } + # # Set up the statistics and chart environment &PrepareClasslist($r); &PrepareCourseData($r); @@ -919,7 +936,7 @@ sub handler { # Print main menu my %reports = ('classlist' => 'Class list', 'problem_statistics' => 'Problem Statistics', - 'student_assessment' => 'Student Assessment', + 'student_assessment' => 'Problem Status Chart', 'percentage' => 'Correct-problems Plot', 'option_response' => 'Option Response Analysis', # 'activitylog' => 'Activity Log',