Browse files

Merge branch 'w05_MDL-25921_20_tablemissing' of git://github.com/skod…

…ak/moodle
  • Loading branch information...
2 parents e89a57d + c259e5f commit 133a9b738eb797a9e166e3945ecfc363e2519f19 @stronk7 stronk7 committed Jan 31, 2011
Showing with 8 additions and 3 deletions.
  1. +8 −3 admin/modules.php
View
11 admin/modules.php
@@ -141,12 +141,17 @@
$settings = "";
}
- $count = $DB->count_records_select($module->name, "course<>0");
+ try {
+ $count = $DB->count_records_select($module->name, "course<>0");
+ } catch (dml_exception $e) {
+ $count = -1;
+ }
if ($count>0) {
$countlink = "<a href=\"{$CFG->wwwroot}/course/search.php?modulelist=$module->name" .
"&amp;sesskey=".sesskey()."\" title=\"$strshowmodulecourse\">$count</a>";
- }
- else {
+ } else if ($count < 0) {
+ $countlink = get_string('error');
+ } else {
$countlink = "$count";
}

0 comments on commit 133a9b7

Please sign in to comment.