Adding delete record button

skala
Julio Montoya 13 years ago
parent fbcb4e9ab5
commit 4efa7a47fe
  1. 16
      plugin/bbb/bbb.lib.php
  2. 10
      plugin/bbb/listing.php
  3. 2
      plugin/bbb/listing.tpl

@ -152,13 +152,14 @@ class bbb {
//Fix the bbb timestamp
//$record['startTime'] = substr($record['startTime'], 0, strlen($record['startTime']) -3);
//$record['endTime'] = substr($record['endTime'], 0, strlen($record['endTime']) -3);
//.' - '.api_convert_and_format_date($record['startTime']).' - '.api_convert_and_format_date($record['endTime'])
//.' - '.api_convert_and_format_date($record['startTime']).' - '.api_convert_and_format_date($record['endTime'])
foreach ($record['playbacks'] as $item) {
$url = Display::url(get_lang('ViewRecord').' #'.$count, $item['url'], array('target' => '_blank'));
$url = Display::url(get_lang('ViewRecord'), $item['url'], array('target' => '_blank'));
//$url .= Display::url(get_lang('DeleteRecord'), api_get_self().'?action=delete_record&'.$record['recordID']);
$url .= Display::url(Display::return_icon('link.gif',get_lang('CopyToLinkTool')), api_get_self().'?action=copy_record_to_link_tool&id='.$meeting['id'].'&record_id='.$record['recordID']);
$url .= Display::url(Display::return_icon('agenda.png',get_lang('AddToCalendar')), api_get_self().'?action=add_to_calendar&id='.$meeting['id'].'&start='.api_strtotime($meeting['created_at']).'&url='.$item['url']);
$url .= Display::url(Display::return_icon('delete.png',get_lang('Delete')), api_get_self().'?action=delete_record&id='.$record['recordID']);
//$url .= api_get_self().'?action=publish&id='.$record['recordID'];
$count++;
@ -219,8 +220,7 @@ class bbb {
$pass = $this->get_user_metting_password();
//$meeting_is_running = BigBlueButtonBN::isMeetingRunning($meeting_data['id'], $this->url, $this->salt);
$info = BigBlueButtonBN::getMeetingInfoArray($meeting_data['id'], $pass, $this->url, $this->salt);
var_dump($meeting_data['id']);
if (!empty($info) && isset($info['participantCount'])) {
return $info['participantCount'];
@ -228,10 +228,8 @@ class bbb {
return 0;
}
/**
* @todo
*/
function delete_record($id) {
function delete_record($ids) {
return BigBlueButtonBN::deleteRecordings($ids, $this->url, $this->salt);
}
function copy_record_to_link_tool($id, $record_id) {

@ -20,7 +20,6 @@ $tpl = new Template($tool_name);
$bbb = new bbb();
$action = isset($_GET['action']) ? $_GET['action'] : null;
switch ($action) {
case 'add_to_calendar':
$course_info = api_get_course_info();
@ -47,8 +46,13 @@ switch ($action) {
$message = Display::return_message(get_lang('Error'), 'error');
}
break;
case 'delete_recording':
//$bbb->delete_record($_GET['id']);
case 'delete_record':
$bbb->delete_record($_GET['id']);
if ($result) {
$message = Display::return_message(get_lang('Deleted'), 'success');
} else {
$message = Display::return_message(get_lang('Error'), 'error');
}
break;
case 'end':
$bbb->end_meeting($_GET['id']);

@ -18,7 +18,7 @@
<table class="table">
<tr>
<th>#</th>
<th>{{'Date'|get_lang}}</th>
<th>{{'CreatedAt'|get_lang}}</th>
<th>{{'Status'|get_lang}}</th>
<th>{{'Records'|get_lang}}</th>
<th>{{'Actions'|get_lang}}</th>

Loading…
Cancel
Save