Add optional endconf flag for conference moderators (#5245)

* Update index.lua
* Update app_languages.php
* Update app_config.php
* Update conference_room_edit.php
* Update app_config.php
* Update conference_room_edit.php
* Update app_languages.php
* Update index.lua
This commit is contained in:
agree 2020-05-05 00:15:16 -04:00 committed by GitHub
parent 43c431894b
commit 30be1a99a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 67 additions and 1 deletions

View File

@ -118,6 +118,11 @@
$apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "user"; $apps[$x]['permissions'][$y]['groups'][] = "user";
$y++; $y++;
$apps[$x]['permissions'][$y]['name'] = "conference_room_moderator_endconf";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$y++;
$apps[$x]['permissions'][$y]['name'] = "conference_room_schedule"; $apps[$x]['permissions'][$y]['name'] = "conference_room_schedule";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "admin";
@ -310,6 +315,10 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Wait for the moderator to join before starting the conference."; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Wait for the moderator to join before starting the conference.";
$z++; $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "moderator_endconf";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "When moderator exits end conference.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "announce_name"; $apps[$x]['db'][$y]['fields'][$z]['name'] = "announce_name";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Introduce participants as they enter the conference."; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Introduce participants as they enter the conference.";

View File

@ -527,6 +527,27 @@ $text['label-wait_for_moderator']['ru-ru'] = "Ждать модератора";
$text['label-wait_for_moderator']['sv-se'] = "Vänta på Moderator"; $text['label-wait_for_moderator']['sv-se'] = "Vänta på Moderator";
$text['label-wait_for_moderator']['uk-ua'] = "Очікування на модератора"; $text['label-wait_for_moderator']['uk-ua'] = "Очікування на модератора";
$text['label-moderator_endconf']['en-us'] = "Moderator endconf";
$text['label-moderator_endconf']['en-gb'] = "Moderator endconf";
$text['label-moderator_endconf']['ar-eg'] = "";
$text['label-moderator_endconf']['de-at'] = ""; //copied from de-de
$text['label-moderator_endconf']['de-ch'] = ""; //copied from de-de
$text['label-moderator_endconf']['de-de'] = "";
$text['label-moderator_endconf']['es-cl'] = "";
$text['label-moderator_endconf']['es-mx'] = ""; //copied from es-cl
$text['label-moderator_endconf']['fr-ca'] = ""; //copied from fr-fr
$text['label-moderator_endconf']['fr-fr'] = "";
$text['label-moderator_endconf']['he-il'] = "";
$text['label-moderator_endconf']['it-it'] = "";
$text['label-moderator_endconf']['nl-nl'] = "";
$text['label-moderator_endconf']['pl-pl'] = "";
$text['label-moderator_endconf']['pt-br'] = "";
$text['label-moderator_endconf']['pt-pt'] = "";
$text['label-moderator_endconf']['ro-ro'] = "";
$text['label-moderator_endconf']['ru-ru'] = "";
$text['label-moderator_endconf']['sv-se'] = "";
$text['label-moderator_endconf']['uk-ua'] = "";
$text['label-view']['en-us'] = "View"; $text['label-view']['en-us'] = "View";
$text['label-view']['en-gb'] = "View"; $text['label-view']['en-gb'] = "View";
$text['label-view']['ar-eg'] = ""; $text['label-view']['ar-eg'] = "";

View File

@ -66,6 +66,7 @@
$start_datetime = $_POST["start_datetime"]; $start_datetime = $_POST["start_datetime"];
$stop_datetime = $_POST["stop_datetime"]; $stop_datetime = $_POST["stop_datetime"];
$wait_mod = $_POST["wait_mod"]; $wait_mod = $_POST["wait_mod"];
$moderator_endconf = $_POST["moderator_endconf"];
$announce_name = $_POST["announce_name"]; $announce_name = $_POST["announce_name"];
$announce_recording = $_POST["announce_recording"]; $announce_recording = $_POST["announce_recording"];
$announce_count = $_POST["announce_count"]; $announce_count = $_POST["announce_count"];
@ -287,6 +288,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (strlen($record) == 0) { $record = 'false'; } if (strlen($record) == 0) { $record = 'false'; }
if (strlen($max_members) == 0) { $max_members = 0; } if (strlen($max_members) == 0) { $max_members = 0; }
if (strlen($wait_mod) == 0) { $wait_mod = 'true'; } if (strlen($wait_mod) == 0) { $wait_mod = 'true'; }
if (strlen($moderator_endconf) == 0) { $moderator_endconf = 'false'; }
if (strlen($announce_name) == 0) { $announce_name = 'true'; } if (strlen($announce_name) == 0) { $announce_name = 'true'; }
if (strlen($announce_recording) == 0) { $announce_recording = 'true'; } if (strlen($announce_recording) == 0) { $announce_recording = 'true'; }
if (strlen($announce_count) == 0) { $announce_count = 'true'; } if (strlen($announce_count) == 0) { $announce_count = 'true'; }
@ -327,6 +329,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$array['conference_rooms'][0]['start_datetime'] = $start_datetime; $array['conference_rooms'][0]['start_datetime'] = $start_datetime;
$array['conference_rooms'][0]['stop_datetime'] = $stop_datetime; $array['conference_rooms'][0]['stop_datetime'] = $stop_datetime;
$array['conference_rooms'][0]['wait_mod'] = $wait_mod; $array['conference_rooms'][0]['wait_mod'] = $wait_mod;
$array['conference_rooms'][0]['moderator_endconf'] = $moderator_endconf;
$array['conference_rooms'][0]['announce_name'] = $announce_name; $array['conference_rooms'][0]['announce_name'] = $announce_name;
$array['conference_rooms'][0]['announce_recording'] = $announce_recording; $array['conference_rooms'][0]['announce_recording'] = $announce_recording;
$array['conference_rooms'][0]['announce_count'] = $announce_count; $array['conference_rooms'][0]['announce_count'] = $announce_count;
@ -421,6 +424,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (strlen($wait_mod) > 0) { if (strlen($wait_mod) > 0) {
$array['conference_rooms'][0]['wait_mod'] = $wait_mod; $array['conference_rooms'][0]['wait_mod'] = $wait_mod;
} }
if (strlen($moderator_endconf) > 0) {
$array['conference_rooms'][0]['moderator_endconf'] = $moderator_endconf;
}
if (strlen($announce_name) > 0) { if (strlen($announce_name) > 0) {
$array['conference_rooms'][0]['announce_name'] = $announce_name; $array['conference_rooms'][0]['announce_name'] = $announce_name;
} }
@ -502,6 +508,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$start_datetime = $row["start_datetime"]; $start_datetime = $row["start_datetime"];
$stop_datetime = $row["stop_datetime"]; $stop_datetime = $row["stop_datetime"];
$wait_mod = $row["wait_mod"]; $wait_mod = $row["wait_mod"];
$moderator_endconf = $row["moderator_endconf"];
$announce_name = $row["announce_name"]; $announce_name = $row["announce_name"];
$announce_recording = $row["announce_recording"]; $announce_recording = $row["announce_recording"];
$announce_count = $row["announce_count"]; $announce_count = $row["announce_count"];
@ -569,6 +576,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (strlen($record) == 0) { $record = 'false'; } if (strlen($record) == 0) { $record = 'false'; }
if (strlen($max_members) == 0) { $max_members = 0; } if (strlen($max_members) == 0) { $max_members = 0; }
if (strlen($wait_mod) == 0) { $wait_mod = 'true'; } if (strlen($wait_mod) == 0) { $wait_mod = 'true'; }
if (strlen($moderator_endconf) == 0) { $moderator_endconf = 'false'; }
if (strlen($announce_name) == 0) { $announce_name = 'true'; } if (strlen($announce_name) == 0) { $announce_name = 'true'; }
if (strlen($announce_recording) == 0) { $announce_recording = 'true'; } if (strlen($announce_recording) == 0) { $announce_recording = 'true'; }
if (strlen($announce_count) == 0) { $announce_count = 'true'; } if (strlen($announce_count) == 0) { $announce_count = 'true'; }
@ -772,6 +780,30 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</tr>\n"; echo "</tr>\n";
} }
if (permission_exists('conference_room_moderator_endconf')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>".$text['label-moderator_endconf']."</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='moderator_endconf'>\n";
echo " <option value=''></option>\n";
if ($moderator_endconf == "true") {
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['label-true']."</option>\n";
}
if ($moderator_endconf == "false") {
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['label-false']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo "</td>\n";
echo "</tr>\n";
}
if (permission_exists('conference_room_announce_name')) { if (permission_exists('conference_room_announce_name')) {
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>".$text['label-announce_name']."</td>\n"; echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>".$text['label-announce_name']."</td>\n";

View File

@ -568,6 +568,7 @@
profile = string.lower(row["profile"]); profile = string.lower(row["profile"]);
max_members = row["max_members"]; max_members = row["max_members"];
wait_mod = row["wait_mod"]; wait_mod = row["wait_mod"];
moderator_endconf = row["moderator_endconf"];
moderator_pin = row["moderator_pin"]; moderator_pin = row["moderator_pin"];
participant_pin = row["participant_pin"]; participant_pin = row["participant_pin"];
announce_name = row["announce_name"]; announce_name = row["announce_name"];
@ -690,11 +691,14 @@
flags = flags .. "|mute"; flags = flags .. "|mute";
end end
end end
if (member_type == "moderator") then if (member_type == "moderator") then
--set as the moderator --set as the moderator
flags = flags .. "|moderator"; flags = flags .. "|moderator";
--when the moderator leaves end the conference --when the moderator leaves end the conference
--flags = flags .. "|endconf"; if (moderator_endconf == "true") then
flags = flags .. "|endconf";
end
--set the moderator controls --set the moderator controls
session:execute("set","conference_controls=moderator"); session:execute("set","conference_controls=moderator");
end end