Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

Commit

Permalink
display only current-course-date and display maxUsers for meeting
Browse files Browse the repository at this point in the history
  • Loading branch information
Davka committed Jun 26, 2020
1 parent e55238b commit 618e49c
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 27 deletions.
32 changes: 16 additions & 16 deletions controllers/show.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,35 @@ public function index_action()

foreach ($meetings as $meeting) {
$all_meetings++;
$seminar = null;
$course = null;
$current_course_date = null;
if ($this->plugin->meeting_plugin_installed) {
$seminar = $this->getSeminar((string)$meeting->meetingID);
$course = Course::findOneBySQL('JOIN vc_meeting_course vmc on vmc.course_id = Seminar_id
JOIN vc_meetings vm ON vm.id = vmc.meeting_id WHERE vm.remote_id = ?',
[(string)$meeting->meetingID]
);

if ($course) {
$current_course_date = CourseDate::findOneBySQL(
'range_id = ? AND UNIX_TIMESTAMP() BETWEEN date and end_time',
[$course->id]
);
}
}
$result['meetings'][] =
[
'meeting_id' => (string)$meeting->meetingID,
'meeting_name' => (string)$meeting->meetingName,
'participant_count' => (string)$meeting->participantCount,
'max_users' => (int)$meeting->maxUsers,
'video_count' => (int)$meeting->videoCount,
'listener_count' => (int)$meeting->listenerCount,
'voice_participant_count' => (int)$meeting->voiceParticipantCount,
'moderator_count' => (int)$meeting->moderatorCount,
'moderator_pw' => (string)$meeting->moderatorPW,
'is_break_out' => (string)$meeting->isBreakout === "true",
'seminar' => $seminar
'course' => $course,
'current_course_date' => $current_course_date
];

$complete_participant_count += (int)$meeting->participantCount;
Expand Down Expand Up @@ -165,17 +178,4 @@ private function buildSidebar()
);
Sidebar::Get()->addWidget($actions);
}

private function getSeminar($meeting_id) {
$sem_id = DBManager::get()->fetchColumn('SELECT Seminar_id FROM seminare JOIN vc_meeting_course vmc on vmc.course_id = Seminar_id
JOIN vc_meetings vm ON vm.id = vmc.meeting_id
WHERE vm.remote_id = ?', [$meeting_id]);

$seminar = null;

if($sem_id) {
$seminar = Seminar::GetInstance($sem_id);
}
return $seminar;
}
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simplebbbconnector",
"version": "1.2.3",
"version": "1.2.4",
"description": "To use the connector you need the api-informations for your BBB-Server.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion plugin.manifest
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginname=SimpleBBB-Connector
pluginclassname=SimpleBBBConnector
origin=Vec
version=1.2.3
version=1.2.4
studipMinVersion=4.2
21 changes: 14 additions & 7 deletions views/show/_meeting.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,29 @@
</td>
<? if ($plugin->meeting_plugin_installed) : ?>
<td>
<? if ($meeting['seminar']) : ?>
<a href="<?= URLHelper::getLink('dispatch.php/course/details/index/' . $meeting['seminar']->id) ?>"
<? if ($meeting['course']) : ?>
<a href="<?= URLHelper::getLink('dispatch.php/course/details/index/' . $meeting['course']->id) ?>"
data-dialog="size=auto">
<?= htmlReady($meeting['seminar']->getFullname()) ?>
<?= htmlReady($meeting['course']->getFullname()) ?>
</a>
<small>
<?= $meeting['seminar']->getDatesTemplate('dates/seminar_html', ['show_room' => true])?>
</small>
<? if($meeting['current_course_date']) : ?>
<small>
<?= htmlReady($meeting['current_course_date']->getFullname())?>
</small>
<? endif ?>
<? elseif ($meeting['is_break_out']): ?>
<?= _('Breakout-Raum') ?>
<? else : ?>
<?= _('Keine Angabe') ?>
<? endif ?>
</td>
<? endif ?>
<td style="text-align: center"><?= htmlReady($meeting['participant_count']) ?></td>
<td style="text-align: center">
<?= htmlReady($meeting['participant_count']) ?>
<? if ($meeting['max_users']) : ?>
<?= sprintf('/%s', htmlReady($meeting['max_users']))?>
<? endif ?>
</td>
<td style="text-align: center"><?= htmlReady($meeting['video_count']) ?></td>
<td style="text-align: center"><?= htmlReady($meeting['listener_count']) ?></td>
<td style="text-align: center"><?= htmlReady($meeting['voice_participant_count']) ?></td>
Expand Down
2 changes: 1 addition & 1 deletion views/show/_servers.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<? if ($plugin->meeting_plugin_installed) : ?>
<th><?= _('Veranstaltung') ?></th>
<? endif ?>
<th style="text-align: center"><?= _('# TN') ?></th>
<th style="text-align: center"><?= _('# TN/Max') ?></th>
<th style="text-align: center"><?= _('# Cam') ?></th>
<th style="text-align: center"><?= _('# Zuhörer') ?></th>
<th style="text-align: center"><?= _('# Audio') ?></th>
Expand Down

0 comments on commit 618e49c

Please sign in to comment.