[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstudentassessment.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 21 Dec 2006 02:53:42 -0000
albertel Wed Dec 20 21:53:42 2006 EDT
Modified files:
/loncom/interface/statistics lonstudentassessment.pm
Log:
- when errors occur getting data for chrt display it
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.143 loncom/interface/statistics/lonstudentassessment.pm:1.144
--- loncom/interface/statistics/lonstudentassessment.pm:1.143 Fri Aug 18 11:15:38 2006
+++ loncom/interface/statistics/lonstudentassessment.pm Wed Dec 20 21:53:42 2006
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentassessment.pm,v 1.143 2006/08/18 15:15:38 raeburn Exp $
+# $Id: lonstudentassessment.pm,v 1.144 2006/12/21 02:53:42 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -843,12 +843,17 @@
my @tmp = &Apache::loncoursedata::get_current_state
($student->{'username'},$student->{'domain'},undef,
$env{'request.course.id'});
- if ((scalar @tmp > 0) && ($tmp[0] !~ /^error:/)) {
+ if ((scalar @tmp > 0) && ($tmp[0] !~ /^error:(.*)/)) {
%StudentsData = @tmp;
- }
- if (scalar(@tmp) < 1) {
+ } else {
+ my $error = $1;
+ if (scalar(@tmp) < 1) {
+ $Str .= '<font color="blue">No Course Data</font>'."\n";
+ } else {
+ $Str .= '<span class="LC_error">Error getting student data ('.
+ $error.') </span>'."\n";
+ }
$nodata_count++;
- $Str .= '<font color="blue">No Course Data</font>'."\n";
$r->print($Str);
$r->rflush();
return;