aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/observer.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/observer.php b/classes/observer.php
index cfa1829..8c80fab 100644
--- a/classes/observer.php
+++ b/classes/observer.php
@@ -53,7 +53,11 @@ class observer {
*/
private static function monkey_patch_bigbluebuttonbn($instanceid = 0) {
global $DB;
+
$module = $DB->get_record("bigbluebuttonbn", array("id" => $instanceid));
- $DB->set_field("event", "timeduration", ($module->closingtime - $module->openingtime), array("modulename" => "bigbluebuttonbn", "instance" => $instanceid));
+
+ if ($module->closingtime != 0) {
+ $DB->set_field("event", "timeduration", ($module->closingtime - $module->openingtime), array("modulename" => "bigbluebuttonbn", "instance" => $instanceid));
+ }
}
} \ No newline at end of file