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
|
patch
| inline |
side by side
(parent:
0e4f7b4
)
course completion: MDL-2631 Prevent error when no roles are available
author
Aaron Barnes
<aaronb@catalyst.net.nz>
Wed, 4 Aug 2010 02:21:19 +0000
(
02:21
+0000)
committer
Aaron Barnes
<aaronb@catalyst.net.nz>
Wed, 4 Aug 2010 02:21:19 +0000
(
02:21
+0000)
course/completion.php
patch
|
blob
|
blame
|
history
diff --git
a/course/completion.php
b/course/completion.php
index
137f084
..
861a576
100644
(file)
--- a/
course/completion.php
+++ b/
course/completion.php
@@
-132,6
+132,10
@@
if ($form->is_cancelled()){
$aggregation->insert();
// Role aggregation
+ if (empty($data->role_aggregation)) {
+ $data->role_aggregation = 0;
+ }
+
$aggregation = new completion_aggregation();
$aggregation->course = $data->id;
$aggregation->criteriatype = COMPLETION_CRITERIA_TYPE_ROLE;