Format code

pull/2487/head
Julio 9 years ago
parent 18763ca085
commit 914c0e24d8
  1. 80
      plugin/bbb/lib/bbb.lib.php
  2. 13
      plugin/bbb/listing.php

@ -139,32 +139,32 @@ class bbb
* See this file in you BBB to set up default values * See this file in you BBB to set up default values
* @param array $params Array of parameters that will be completed if not containing all expected variables * @param array $params Array of parameters that will be completed if not containing all expected variables
/var/lib/tomcat6/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties /var/lib/tomcat6/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties
* *
More record information: More record information:
http://code.google.com/p/bigbluebutton/wiki/RecordPlaybackSpecification http://code.google.com/p/bigbluebutton/wiki/RecordPlaybackSpecification
# Default maximum number of users a meeting can have. # Default maximum number of users a meeting can have.
# Doesn't get enforced yet but is the default value when the create # Doesn't get enforced yet but is the default value when the create
# API doesn't pass a value. # API doesn't pass a value.
defaultMaxUsers=20 defaultMaxUsers=20
# Default duration of the meeting in minutes. # Default duration of the meeting in minutes.
# Current default is 0 (meeting doesn't end). # Current default is 0 (meeting doesn't end).
defaultMeetingDuration=0 defaultMeetingDuration=0
# Remove the meeting from memory when the end API is called. # Remove the meeting from memory when the end API is called.
# This allows 3rd-party apps to recycle the meeting right-away # This allows 3rd-party apps to recycle the meeting right-away
# instead of waiting for the meeting to expire (see below). # instead of waiting for the meeting to expire (see below).
removeMeetingWhenEnded=false removeMeetingWhenEnded=false
# The number of minutes before the system removes the meeting from memory. # The number of minutes before the system removes the meeting from memory.
defaultMeetingExpireDuration=1 defaultMeetingExpireDuration=1
# The number of minutes the system waits when a meeting is created and when # The number of minutes the system waits when a meeting is created and when
# a user joins. If after this period, a user hasn't joined, the meeting is # a user joins. If after this period, a user hasn't joined, the meeting is
# removed from memory. # removed from memory.
defaultMeetingCreateJoinDuration=5 defaultMeetingCreateJoinDuration=5
* *
* @return mixed * @return mixed
*/ */
@ -445,6 +445,34 @@ class bbb
return false; return false;
} }
/**
* @param int $courseId
* @param int $sessionId
* @param int $status
*
* @return array
*/
public function getAllMeetingsInCourse($courseId, $sessionId, $status)
{
$conditions = array(
'where' => array(
'status = ? AND c_id = ? AND session_id = ? ' => array(
$status,
$courseId,
$sessionId,
),
),
);
$meetingList = Database::select(
'*',
$this->table,
$conditions
);
return $meetingList;
}
/** /**
* Gets all the course meetings saved in the plugin_bbb_meeting table * Gets all the course meetings saved in the plugin_bbb_meeting table
* @return array Array of current open meeting rooms * @return array Array of current open meeting rooms
@ -463,7 +491,7 @@ class bbb
), ),
), ),
); );
if ($this->hasGroupSupport()) { if ($this->hasGroupSupport()) {
$groupId = api_get_group_id(); $groupId = api_get_group_id();
$conditions = array( $conditions = array(

@ -137,12 +137,23 @@ if ($bbb->isGlobalConference() === false &&
}); });
</script>'; </script>';
$form = new FormValidator(api_get_self()); $form = new FormValidator(api_get_self().'?'.api_get_cidreq());
$groupId = api_get_group_id(); $groupId = api_get_group_id();
$groups = GroupManager::get_groups(); $groups = GroupManager::get_groups();
if ($groups) { if ($groups) {
$meetingsInGroup = $bbb->getAllMeetingsInCourse(api_get_course_int_id(), api_get_session_id(), 1);
$meetingsGroup = array_column($meetingsInGroup, 'status', 'group_id');
foreach ($groups as &$groupData) {
$itemGroupId = $groupData['id'];
if (isset($meetingsGroup[$itemGroupId]) && $meetingsGroup[$itemGroupId] == 1) {
$groupData['name'] .= ' ('.get_lang('Active').')';
}
}
$groupList[0] = get_lang('Select'); $groupList[0] = get_lang('Select');
$groupList = array_merge($groupList, array_column($groups, 'name', 'iid')); $groupList = array_merge($groupList, array_column($groups, 'name', 'iid'));
$form->addSelect('group_id', get_lang('Groups'), $groupList, ['id' => 'group_select']); $form->addSelect('group_id', get_lang('Groups'), $groupList, ['id' => 'group_select']);
$form->setDefaults(['group_id' => $groupId]); $form->setDefaults(['group_id' => $groupId]);
$formToString = $form->returnForm(); $formToString = $form->returnForm();

Loading…
Cancel
Save