diff options
author | Valentin Popov <info@valentineus.link> | 2017-11-21 10:31:23 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2017-11-21 10:31:23 +0300 |
commit | 9308f74d006527fab1735f565b6177c7cc2f18e4 (patch) | |
tree | 89b7c66a63dccb163bf0f8219be670d5c905b61a /classes | |
parent | 2c475772629bbbc7ba51fb3579aa686b63fd488f (diff) | |
download | local_billingpatch-9308f74d006527fab1735f565b6177c7cc2f18e4.tar.xz local_billingpatch-9308f74d006527fab1735f565b6177c7cc2f18e4.zip |
Additional conditions checkv0.0.1
Diffstat (limited to 'classes')
-rw-r--r-- | classes/observer.php | 6 |
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 |