Rename marketplace plugin to meetletacbfree (mdl_modules.name limit + CI table prefixes)
This commit is contained in:
+25
-25
@@ -17,12 +17,12 @@
|
||||
/**
|
||||
* Plugin config helpers.
|
||||
*
|
||||
* @package mod_meetletacbmarketplace
|
||||
* @package mod_meetletacbfree
|
||||
* @copyright 2026 MeetLet
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace mod_meetletacbmarketplace\local;
|
||||
namespace mod_meetletacbfree\local;
|
||||
|
||||
/**
|
||||
* Read MeetLet / Adobe Connect global settings.
|
||||
@@ -38,35 +38,35 @@ class config {
|
||||
* API endpoint URL (may already include https://.../api/xml).
|
||||
*/
|
||||
public static function get_api_url(): string {
|
||||
return trim((string)get_config('meetletacbmarketplace', 'host'));
|
||||
return trim((string)get_config('meetletacbfree', 'host'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Meeting host domain (no protocol).
|
||||
*/
|
||||
public static function get_meet_host(): string {
|
||||
return trim((string)get_config('meetletacbmarketplace', 'meethost'));
|
||||
return trim((string)get_config('meetletacbfree', 'meethost'));
|
||||
}
|
||||
|
||||
public static function get_port(): int {
|
||||
$port = (int)get_config('meetletacbmarketplace', 'port');
|
||||
$port = (int)get_config('meetletacbfree', 'port');
|
||||
return $port > 0 ? $port : 443;
|
||||
}
|
||||
|
||||
public static function use_https(): bool {
|
||||
return (bool)get_config('meetletacbmarketplace', 'https');
|
||||
return (bool)get_config('meetletacbfree', 'https');
|
||||
}
|
||||
|
||||
public static function get_admin_login(): string {
|
||||
return (string)get_config('meetletacbmarketplace', 'admin_login');
|
||||
return (string)get_config('meetletacbfree', 'admin_login');
|
||||
}
|
||||
|
||||
public static function get_admin_password(): string {
|
||||
return (string)get_config('meetletacbmarketplace', 'admin_password');
|
||||
return (string)get_config('meetletacbfree', 'admin_password');
|
||||
}
|
||||
|
||||
public static function get_http_auth_header(): string {
|
||||
$h = trim((string)get_config('meetletacbmarketplace', 'admin_httpauth'));
|
||||
$h = trim((string)get_config('meetletacbfree', 'admin_httpauth'));
|
||||
return $h !== '' ? $h : 'Generate-Safe-Random-Token';
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class config {
|
||||
* and realign them to mlu{id}. SSO identity itself is always Moodle id.
|
||||
*/
|
||||
public static function use_email_login(): bool {
|
||||
return (bool)get_config('meetletacbmarketplace', 'email_login');
|
||||
return (bool)get_config('meetletacbfree', 'email_login');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,14 +86,14 @@ class config {
|
||||
if (!self::offline_render_active()) {
|
||||
return false;
|
||||
}
|
||||
return (bool)get_config('meetletacbmarketplace', 'auto_offline');
|
||||
return (bool)get_config('meetletacbfree', 'auto_offline');
|
||||
}
|
||||
|
||||
/**
|
||||
* Minutes between recording-sync / auto-MP4 cron runs (1–60, default 5).
|
||||
*/
|
||||
public static function cron_interval_minutes(): int {
|
||||
$v = (int)get_config('meetletacbmarketplace', 'cron_interval');
|
||||
$v = (int)get_config('meetletacbfree', 'cron_interval');
|
||||
if ($v < 1) {
|
||||
$v = 5;
|
||||
}
|
||||
@@ -114,7 +114,7 @@ class config {
|
||||
* How auto-MP4 jobs are handed to the Agent.
|
||||
*/
|
||||
public static function agent_dispatch_mode(): string {
|
||||
$v = trim((string)get_config('meetletacbmarketplace', 'agent_dispatch'));
|
||||
$v = trim((string)get_config('meetletacbfree', 'agent_dispatch'));
|
||||
return $v === self::DISPATCH_WINDOW ? self::DISPATCH_WINDOW : self::DISPATCH_IMMEDIATE;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ class config {
|
||||
* @return int[]
|
||||
*/
|
||||
public static function agent_dispatch_hours(): array {
|
||||
$raw = (string)get_config('meetletacbmarketplace', 'agent_dispatch_hours');
|
||||
$raw = (string)get_config('meetletacbfree', 'agent_dispatch_hours');
|
||||
if ($raw === '') {
|
||||
$raw = self::DEFAULT_DISPATCH_HOURS;
|
||||
}
|
||||
@@ -200,7 +200,7 @@ class config {
|
||||
public static function apply_cron_interval(): void {
|
||||
global $DB;
|
||||
$mins = self::cron_interval_minutes();
|
||||
$row = $DB->get_record('task_scheduled', ['classname' => '\\mod_meetletacbmarketplace\\task\\sync_recordings']);
|
||||
$row = $DB->get_record('task_scheduled', ['classname' => '\\mod_meetletacbfree\\task\\sync_recordings']);
|
||||
if (!$row) {
|
||||
return;
|
||||
}
|
||||
@@ -221,14 +221,14 @@ class config {
|
||||
* Configured Render Agent / offline listener base URL (may be empty).
|
||||
*/
|
||||
public static function agent_url(): string {
|
||||
return trim((string)get_config('meetletacbmarketplace', 'agent_url'));
|
||||
return trim((string)get_config('meetletacbfree', 'agent_url'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Site-wide default meeting UI language (Adobe Connect), empty = server default.
|
||||
*/
|
||||
public static function default_meeting_lang(): string {
|
||||
$v = get_config('meetletacbmarketplace', 'default_meetinglang');
|
||||
$v = get_config('meetletacbfree', 'default_meetinglang');
|
||||
if ($v === false || $v === null) {
|
||||
return '';
|
||||
}
|
||||
@@ -239,7 +239,7 @@ class config {
|
||||
* Site-wide default: block participants until host joins.
|
||||
*/
|
||||
public static function default_wait_for_host(): bool {
|
||||
return (bool)get_config('meetletacbmarketplace', 'default_waitforhost');
|
||||
return (bool)get_config('meetletacbfree', 'default_waitforhost');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -249,7 +249,7 @@ class config {
|
||||
*/
|
||||
public static function meeting_lang_options(): array {
|
||||
return [
|
||||
'' => get_string('meetinglang_default', 'meetletacbmarketplace'),
|
||||
'' => get_string('meetinglang_default', 'meetletacbfree'),
|
||||
'en' => 'English',
|
||||
'fa' => 'فارسی',
|
||||
'ar' => 'العربية',
|
||||
@@ -286,9 +286,9 @@ class config {
|
||||
return false;
|
||||
}
|
||||
$key = 'enable_' . $feature;
|
||||
$v = get_config('meetletacbmarketplace', $key);
|
||||
$v = get_config('meetletacbfree', $key);
|
||||
if ($v === false && $feature === 'mp4') {
|
||||
$legacy = get_config('meetletacbmarketplace', 'allow_manual_offline');
|
||||
$legacy = get_config('meetletacbfree', 'allow_manual_offline');
|
||||
return $legacy === false ? true : (bool)$legacy;
|
||||
}
|
||||
// ZIP is opt-in; other features default on when unset.
|
||||
@@ -305,7 +305,7 @@ class config {
|
||||
*/
|
||||
public static function feature_allow_override(string $feature): bool {
|
||||
$key = 'allow_override_' . $feature;
|
||||
$v = get_config('meetletacbmarketplace', $key);
|
||||
$v = get_config('meetletacbfree', $key);
|
||||
return $v === false ? true : (bool)$v;
|
||||
}
|
||||
|
||||
@@ -367,9 +367,9 @@ class config {
|
||||
*/
|
||||
public static function override_state_options(): array {
|
||||
return [
|
||||
self::OVERRIDE_INHERIT => get_string('settingstate_inherit', 'meetletacbmarketplace'),
|
||||
self::OVERRIDE_OFF => get_string('settingstate_disable', 'meetletacbmarketplace'),
|
||||
self::OVERRIDE_ON => get_string('settingstate_enable', 'meetletacbmarketplace'),
|
||||
self::OVERRIDE_INHERIT => get_string('settingstate_inherit', 'meetletacbfree'),
|
||||
self::OVERRIDE_OFF => get_string('settingstate_disable', 'meetletacbfree'),
|
||||
self::OVERRIDE_ON => get_string('settingstate_enable', 'meetletacbfree'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user