* @copyright 2011-2012 Blindside Networks Inc.
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later
 */
require_once dirname(__FILE__) . '/bbb_api/bbb_api.php';
require_once dirname(dirname(dirname(__FILE__))) . '/config.php';
require_once dirname(__FILE__) . '/lib.php';
$salt = trim($CFG->BigBlueButtonBNSecuritySalt);
$url = trim(trim($CFG->BigBlueButtonBNServerURL), '/') . '/';
echo '{ "aaData": [' . "\n";
if (isset($_GET['name']) && $_GET['name'] != '') {
    $meetingID = $_GET['name'];
    if (!isset($_GET['admin']) || ($admin = $_GET['admin']) != 'true') {
        $admin = 'false';
    }
    //To be replaced by a jquery operation
    $recordingsbn = BigBlueButtonBN::getRecordingsArray($meetingID, $url, $salt);
    $view_recording_list_actionbar_hide = get_string('view_recording_list_actionbar_hide', 'bigbluebuttonbn');
    $view_recording_list_actionbar_show = get_string('view_recording_list_actionbar_show', 'bigbluebuttonbn');
    $view_recording_list_actionbar_delete = get_string('view_recording_list_actionbar_delete', 'bigbluebuttonbn');
    if (isset($recordingsbn) && !isset($recordingsbn['messageKey'])) {
        foreach ($recordingsbn as $recording) {
            if ($admin == 'true' || $recording['published'] == 'true') {
                $meta_course = isset($recording['meta_course']) ? str_replace('"', '\\"', $recording['meta_course']) : '';
                $meta_activity = isset($recording['meta_activity']) ? str_replace('"', '\\"', $recording['meta_activity']) : '';
                $meta_description = isset($recording['meta_description']) ? str_replace('"', '\\"', $recording['meta_description']) : '';
                $actionbar = '';
                if ($admin == 'true') {
                    $deleteURL = BigBlueButtonBN::deleteRecordingsURL($recording['recordID'], $url, $salt);
                    if ($recording['published'] == 'true') {
                        $publishURL = BigBlueButtonBN::setPublishRecordingsURL($recording['recordID'], 'false', $url, $salt);
                        $actionbar = "<a id='actionbar-publish-a-" . $recording['recordID'] . "' title='" . $view_recording_list_actionbar_hide . "' href='#'><img id='actionbar-publish-img-" . $recording['recordID'] . "' src='pix/hide.gif' class='iconsmall' onClick='actionCall(\\\"" . $publishURL . "\\\", \\\"publish\\\", \\\"" . $recording['recordID'] . "\\\")'   /></a>";
Beispiel #2
0
 /**
  * Creates a link in the links tool from the given videoconference recording
  * @param int ID of the item in the plugin_bbb_meeting table
  * @param string Hash identifying the recording, as provided by the API
  * @return mixed ID of the newly created link, or false on error
  * @assert (null, null) === false
  * @assert (1, null) === false
  * @assert (null, 'abcdefabcdefabcdefabcdef') === false
  */
 public function copy_record_to_link_tool($id, $record_id)
 {
     if (empty($id) or empty($record_id)) {
         return false;
     }
     require_once api_get_path(LIBRARY_PATH) . 'link.lib.php';
     $records = BigBlueButtonBN::getRecordingsArray($id, $this->url, $this->salt);
     if (!empty($records)) {
         foreach ($records as $record) {
             if ($record['recordID'] == $record_id) {
                 if (is_array($record) && isset($record['recordID']) && isset($record['playbacks'])) {
                     foreach ($record['playbacks'] as $item) {
                         $link = new Link();
                         $params['url'] = $item['url'];
                         $params['title'] = 'bbb 1';
                         $id = $link->save($params);
                         return $id;
                     }
                 }
             }
         }
     }
     return false;
 }
function bigbluebuttonbn_view_after($bbbsession)
{
    echo '<script type="text/javascript" >' . "\n";
    echo '    var joining = "false";' . "\n";
    echo '    var bigbluebuttonbn_view = "after";' . "\n";
    echo '    var view_recording_list_recording = "' . get_string('view_recording_list_recording', 'bigbluebuttonbn') . '";' . "\n";
    echo '    var view_recording_list_course = "' . get_string('view_recording_list_course', 'bigbluebuttonbn') . '";' . "\n";
    echo '    var view_recording_list_activity = "' . get_string('view_recording_list_activity', 'bigbluebuttonbn') . '";' . "\n";
    echo '    var view_recording_list_description = "' . get_string('view_recording_list_description', 'bigbluebuttonbn') . '";' . "\n";
    echo '    var view_recording_list_date = "' . get_string('view_recording_list_date', 'bigbluebuttonbn') . '";' . "\n";
    echo '    var view_recording_list_actionbar = "' . get_string('view_recording_list_actionbar', 'bigbluebuttonbn') . '";' . "\n";
    echo '</script>' . "\n";
    $recordingsArray = BigBlueButtonBN::getRecordingsArray($bbbsession['meetingid'], $bbbsession['url'], $bbbsession['salt']);
    if (!isset($recordingsArray) || array_key_exists('messageKey', $recordingsArray)) {
        // There are no recordings for this meeting
        if ($bbbsession['flag']['record']) {
            print_string('bbbnorecordings', 'bigbluebuttonbn');
        }
    } else {
        // Actually, there are recordings for this meeting
        echo '    <center>' . "\n";
        echo '      <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">' . "\n";
        echo '        <thead>' . "\n";
        echo '        </thead>' . "\n";
        echo '        <tbody>' . "\n";
        echo '        </tbody>' . "\n";
        echo '        <tfoot>' . "\n";
        echo '        </tfoot>' . "\n";
        echo '      </table>' . "\n";
        echo '    </center>' . "\n";
    }
}
Beispiel #4
0
 /**
  * Creates a link in the links tool from the given videoconference recording
  * @param int ID of the item in the plugin_bbb_meeting table
  * @param string Hash identifying the recording, as provided by the API
  * @return mixed ID of the newly created link, or false on error
  * @assert (null, null) === false
  * @assert (1, null) === false
  * @assert (null, 'abcdefabcdefabcdefabcdef') === false
  */
 function copy_record_to_link_tool($id, $record_id)
 {
     if (empty($id) or empty($record_id)) {
         return false;
     }
     $records = BigBlueButtonBN::getRecordingsArray($id, $this->url, $this->salt);
     if (!empty($records)) {
         foreach ($records as $record) {
             //error_log($record['recordID']);
             if ($record['recordID'] == $record_id) {
                 if (is_array($record) && isset($record['recordID']) && isset($record['playbacks'])) {
                     foreach ($record['playbacks'] as $item) {
                         $link = new Link();
                         $params['url'] = $item['url'];
                         $params['title'] = 'bbb 1';
                         $id = $link->save($params);
                         return $id;
                     }
                 }
             }
         }
     }
     return false;
 }