Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
e89a57d
)
Merge branch 'w05_MDL-25921_20_tablemissing' of git://github.com/skodak/moodle
author
Eloy Lafuente (stronk7)
<stronk7@moodle.org>
Mon, 31 Jan 2011 15:01:02 +0000
(16:01 +0100)
committer
Eloy Lafuente (stronk7)
<stronk7@moodle.org>
Mon, 31 Jan 2011 15:01:02 +0000
(16:01 +0100)
admin/modules.php
patch
|
blob
|
blame
|
history
diff --git
a/admin/modules.php
b/admin/modules.php
index
3ecb952
..
71e22bd
100644
(file)
--- a/
admin/modules.php
+++ b/
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" .
"&sesskey=".sesskey()."\" title=\"$strshowmodulecourse\">$count</a>";
- }
- else {
+ } else if ($count < 0) {
+ $countlink = get_string('error');
+ } else {
$countlink = "$count";
}