@@ 63-75 (lines=13) @@ | ||
60 | * @param array $bbbsession |
|
61 | * @return string |
|
62 | */ |
|
63 | public static function get_activity_status(&$bbbsession) { |
|
64 | $now = time(); |
|
65 | if (!empty($bbbsession['bigbluebuttonbn']->openingtime) && $now < $bbbsession['bigbluebuttonbn']->openingtime) { |
|
66 | // The activity has not been opened. |
|
67 | return 'not_started'; |
|
68 | } |
|
69 | if (!empty($bbbsession['bigbluebuttonbn']->closingtime) && $now > $bbbsession['bigbluebuttonbn']->closingtime) { |
|
70 | // The activity has been closed. |
|
71 | return 'ended'; |
|
72 | } |
|
73 | // The activity is open. |
|
74 | return 'open'; |
|
75 | } |
|
76 | ||
77 | /** |
|
78 | * Helper for preparing metadata used while creating the meeting. |
@@ 3563-3575 (lines=13) @@ | ||
3560 | * @param array $bbbsession |
|
3561 | * @return string |
|
3562 | */ |
|
3563 | function bigbluebuttonbn_view_get_activity_status(&$bbbsession) { |
|
3564 | $now = time(); |
|
3565 | if (!empty($bbbsession['bigbluebuttonbn']->openingtime) && $now < $bbbsession['bigbluebuttonbn']->openingtime) { |
|
3566 | // The activity has not been opened. |
|
3567 | return 'not_started'; |
|
3568 | } |
|
3569 | if (!empty($bbbsession['bigbluebuttonbn']->closingtime) && $now > $bbbsession['bigbluebuttonbn']->closingtime) { |
|
3570 | // The activity has been closed. |
|
3571 | return 'ended'; |
|
3572 | } |
|
3573 | // The activity is open. |
|
3574 | return 'open'; |
|
3575 | } |
|
3576 | ||
3577 | /** |
|
3578 | * Set session URLs. |