bigbluebuttonbn_view_before($bbbsession);
} else {
    if (!empty($bigbluebuttonbn->closingtime) && $now > $bigbluebuttonbn->closingtime) {
        //CALLING AFTER
        $bigbluebuttonbn_view = 'after';
        $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array($context, $bigbluebuttonbn->presentation);
        // Initialize session variable used across views
        $SESSION->bigbluebuttonbn_bbbsession = $bbbsession;
        bigbluebuttonbn_view_after($bbbsession);
    } else {
        //GO JOINING
        $bigbluebuttonbn_view = 'join';
        $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array($bbbsession['context'], $bigbluebuttonbn->presentation, $bigbluebuttonbn->id);
        // Initialize session variable used across views
        $SESSION->bigbluebuttonbn_bbbsession = $bbbsession;
        bigbluebuttonbn_view_joining($bbbsession);
        //JavaScript variables
        $waitformoderator_ping_interval = bigbluebuttonbn_get_cfg_waitformoderator_ping_interval();
        $jsVars = array('action' => $bigbluebuttonbn_view, 'meetingid' => $bbbsession['meetingid'], 'bigbluebuttonbnid' => $bbbsession['bigbluebuttonbn']->id, 'ping_interval' => $waitformoderator_ping_interval > 0 ? $waitformoderator_ping_interval * 1000 : 15000, 'userlimit' => $bbbsession['userlimit'], 'locales' => bigbluebuttonbn_get_locales_for_ui());
        $PAGE->requires->data_for_js('bigbluebuttonbn', $jsVars);
        $jsmodule = array('name' => 'mod_bigbluebuttonbn', 'fullpath' => '/mod/bigbluebuttonbn/module.js', 'requires' => array('datasource-get', 'datasource-jsonschema', 'datasource-polling'));
        $PAGE->requires->js_init_call('M.mod_bigbluebuttonbn.view_init', array(), false, $jsmodule);
    }
}
// Finish the page
echo $OUTPUT->footer();
function bigbluebuttonbn_view_joining($bbbsession)
{
    global $CFG, $DB, $OUTPUT;
    echo $OUTPUT->heading($bbbsession['meetingname'], 3);
    echo $OUTPUT->heading($bbbsession['meetingdescription'], 5);
Пример #2
0
        echo $OUTPUT->box_start('generalbox boxaligncenter', 'dates');
        bigbluebuttonbn_view_before($bbbsession);
        echo $OUTPUT->box_end();
    } else {
        if (!$streamline->timedue || time() <= $streamline->timedue) {
            //GO JOINING
            if (bigbluebuttonbn_is_user_limit_reached($bbbsession)) {
                if (!$streamline->newwindow) {
                    print_error('view_error_userlimit_reached', 'streamline', $CFG->wwwroot . '/course/view.php?id=' . $course->id);
                } else {
                    print_error('view_error_userlimit_reached', 'streamline', $CFG->wwwroot . '/mod/streamline/view_end.php?id=' . $cm->id);
                }
            } else {
                groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/streamline/view.php?id=' . $cm->id);
                $bigbluebuttonbn_view = 'join';
                $joining = bigbluebuttonbn_view_joining($bbbsession, $context, $streamline);
            }
        } else {
            //CALLING AFTER
            $bigbluebuttonbn_view = 'after';
            echo $OUTPUT->heading(get_string('bbbfinished', 'streamline'));
            echo $OUTPUT->box_start('generalbox boxaligncenter', 'dates');
            bigbluebuttonbn_view_after($bbbsession);
            echo $OUTPUT->box_end();
        }
    }
}
//JavaScript variables
$jsVars = array('waitformoderator' => $bbbsession['textflag']['wait'], 'isadministrator' => $bbbsession['textflag']['administrator'], 'ismoderator' => $bbbsession['textflag']['moderator'], 'meetingid' => $bbbsession['meetingid'], 'joinurl' => $bbbsession['joinURL'], 'joining' => $joining ? 'true' : 'false', 'bigbluebuttonbn_view' => $bigbluebuttonbn_view, 'bigbluebuttonbnid' => $bbbsession['bigbluebuttonbnid']);
$jsmodule = array('name' => 'mod_streamline', 'fullpath' => '/mod/streamline/module.js', 'requires' => array('datasource-get', 'datasource-jsonschema', 'datasource-polling'));
$PAGE->requires->data_for_js('streamline', $jsVars);
        echo $OUTPUT->box_start('generalbox boxaligncenter', 'dates');
        bigbluebuttonbn_view_before($bbbsession);
        echo $OUTPUT->box_end();
    } else {
        if (!$bigbluebuttonbn->timedue || time() <= $bigbluebuttonbn->timedue) {
            //GO JOINING
            if (bigbluebuttonbn_is_user_limit_reached($bbbsession)) {
                if (!$bigbluebuttonbn->newwindow) {
                    print_error('view_error_userlimit_reached', 'bigbluebuttonbn', $CFG->wwwroot . '/course/view.php?id=' . $course->id);
                } else {
                    print_error('view_error_userlimit_reached', 'bigbluebuttonbn', $CFG->wwwroot . '/mod/bigbluebuttonbn/view_end.php?id=' . $cm->id);
                }
            } else {
                groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id);
                $bigbluebuttonbn_view = 'join';
                $joining = bigbluebuttonbn_view_joining($bbbsession, $context, $bigbluebuttonbn);
            }
        } else {
            //CALLING AFTER
            $bigbluebuttonbn_view = 'after';
            echo $OUTPUT->heading(get_string('bbbfinished', 'bigbluebuttonbn'));
            echo $OUTPUT->box_start('generalbox boxaligncenter', 'dates');
            bigbluebuttonbn_view_after($bbbsession);
            echo $OUTPUT->box_end();
        }
    }
}
//JavaScript variables
$jsVars = array('waitformoderator' => $bbbsession['textflag']['wait'], 'isadministrator' => $bbbsession['textflag']['administrator'], 'ismoderator' => $bbbsession['textflag']['moderator'], 'meetingid' => $bbbsession['meetingid'], 'joinurl' => $bbbsession['joinURL'], 'joining' => $joining ? 'true' : 'false', 'bigbluebuttonbn_view' => $bigbluebuttonbn_view, 'bigbluebuttonbnid' => $bbbsession['bigbluebuttonbnid']);
$jsmodule = array('name' => 'mod_bigbluebuttonbn', 'fullpath' => '/mod/bigbluebuttonbn/module.js', 'requires' => array('datasource-get', 'datasource-jsonschema', 'datasource-polling'));
$PAGE->requires->data_for_js('bigbluebuttonbn', $jsVars);