[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstathelpers.pm
raeburn
raeburn at source.lon-capa.org
Sat Sep 12 16:21:30 EDT 2020
raeburn Sat Sep 12 20:21:30 2020 EDT
Modified files:
/loncom/interface/statistics lonstathelpers.pm
Log:
- Display a message instead of an empty scrollbox if there are no suitable
problems to select from.
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.78 loncom/interface/statistics/lonstathelpers.pm:1.79
--- loncom/interface/statistics/lonstathelpers.pm:1.78 Mon Sep 7 02:25:32 2020
+++ loncom/interface/statistics/lonstathelpers.pm Sat Sep 12 20:21:30 2020
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstathelpers.pm,v 1.78 2020/09/07 02:25:32 raeburn Exp $
+# $Id: lonstathelpers.pm,v 1.79 2020/09/12 20:21:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -262,8 +262,8 @@
$seq_str .= (' 'x2).
'<a target="preview" href="'.$link.'">'.&mt('view').'</a>';
$seq_str .= "</td>". &Apache::loncommon::end_data_table_row()."\n";
- $rb_count++;
}
+ $rb_count++;
}
}
}
@@ -290,6 +290,15 @@
}
}
$Str .= &Apache::loncommon::end_data_table().&Apache::loncommon::end_scrollbox()."\n";
+ if (!$rb_count) {
+ if ($byres) {
+ $Str = '<p class="LC_info">'.&mt('No gradable problems found').'</p>';
+ } elsif ($AcceptedResponseTypes eq '.') {
+ $Str = '<p class="LC_info">'.&mt('No problems found').'</p>';
+ } else {
+ $Str = '<p class="LC_info">'.&mt('No analyzable problems found').'</p>';
+ }
+ }
return $Str;
}
More information about the LON-CAPA-cvs
mailing list