Rename marketplace plugin to meetletacbfree (mdl_modules.name limit + CI table prefixes)
This commit is contained in:
+18
-18
@@ -17,15 +17,15 @@
|
||||
/**
|
||||
* BBB-style participant role mapping for Adobe Connect.
|
||||
*
|
||||
* @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;
|
||||
|
||||
use context;
|
||||
use mod_meetletacbmarketplace\api\service;
|
||||
use mod_meetletacbfree\api\service;
|
||||
use stdClass;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
@@ -101,7 +101,7 @@ class roles {
|
||||
* Site-wide default participant rules from plugin config (or built-in).
|
||||
*/
|
||||
public static function get_site_default_rules(): array {
|
||||
$raw = get_config('meetletacbmarketplace', 'default_participants');
|
||||
$raw = get_config('meetletacbfree', 'default_participants');
|
||||
if (is_string($raw) && $raw !== '') {
|
||||
$decoded = json_decode($raw, true);
|
||||
if (is_array($decoded) && !empty($decoded)) {
|
||||
@@ -251,9 +251,9 @@ class roles {
|
||||
*/
|
||||
public static function adobe_role_labels(): array {
|
||||
return [
|
||||
self::ROLE_HOST => get_string('role_host', 'meetletacbmarketplace'),
|
||||
self::ROLE_PRESENTER => get_string('role_presenter', 'meetletacbmarketplace'),
|
||||
self::ROLE_PARTICIPANT => get_string('role_participant', 'meetletacbmarketplace'),
|
||||
self::ROLE_HOST => get_string('role_host', 'meetletacbfree'),
|
||||
self::ROLE_PRESENTER => get_string('role_presenter', 'meetletacbfree'),
|
||||
self::ROLE_PARTICIPANT => get_string('role_participant', 'meetletacbfree'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -270,14 +270,14 @@ class roles {
|
||||
'class' => 'generaltable meetlet-access-table meetlet-rolemapping-table',
|
||||
]);
|
||||
|
||||
$head = \html_writer::tag('th', get_string('accessrole', 'meetletacbmarketplace'));
|
||||
$head .= \html_writer::tag('th', get_string('adoberole', 'meetletacbmarketplace'));
|
||||
$head = \html_writer::tag('th', get_string('accessrole', 'meetletacbfree'));
|
||||
$head .= \html_writer::tag('th', get_string('adoberole', 'meetletacbfree'));
|
||||
$html .= \html_writer::tag('thead', \html_writer::tag('tr', $head));
|
||||
|
||||
$body = '';
|
||||
// Everyone row first.
|
||||
$body .= self::mapping_row_html(
|
||||
get_string('participant_type_all', 'meetletacbmarketplace'),
|
||||
get_string('participant_type_all', 'meetletacbfree'),
|
||||
$inputname . '[_all]',
|
||||
$matrix['_all'] ?? self::ROLE_PARTICIPANT,
|
||||
$adobelabels,
|
||||
@@ -387,15 +387,15 @@ class roles {
|
||||
public static function get_participant_data(context $context, ?stdClass $instance = null): array {
|
||||
$data = [
|
||||
'all' => [
|
||||
'name' => get_string('participant_type_all', 'meetletacbmarketplace'),
|
||||
'name' => get_string('participant_type_all', 'meetletacbfree'),
|
||||
'children' => [],
|
||||
],
|
||||
'role' => [
|
||||
'name' => get_string('participant_type_role', 'meetletacbmarketplace'),
|
||||
'name' => get_string('participant_type_role', 'meetletacbfree'),
|
||||
'children' => self::get_roles_select($context),
|
||||
],
|
||||
'user' => [
|
||||
'name' => get_string('participant_type_user', 'meetletacbmarketplace'),
|
||||
'name' => get_string('participant_type_user', 'meetletacbfree'),
|
||||
'children' => [],
|
||||
],
|
||||
];
|
||||
@@ -426,9 +426,9 @@ class roles {
|
||||
public static function get_participant_selection_data(): array {
|
||||
return [
|
||||
'type_options' => [
|
||||
'all' => get_string('participant_type_all', 'meetletacbmarketplace'),
|
||||
'role' => get_string('participant_type_role', 'meetletacbmarketplace'),
|
||||
'user' => get_string('participant_type_user', 'meetletacbmarketplace'),
|
||||
'all' => get_string('participant_type_all', 'meetletacbfree'),
|
||||
'role' => get_string('participant_type_role', 'meetletacbfree'),
|
||||
'user' => get_string('participant_type_user', 'meetletacbfree'),
|
||||
],
|
||||
'type_selected' => 'role',
|
||||
'options' => ['all' => '---------------'],
|
||||
@@ -442,10 +442,10 @@ class roles {
|
||||
* @return string|null Adobe permission-id or null if denied
|
||||
*/
|
||||
public static function resolve_adobe_role(stdClass $instance, context $context, int $userid): ?string {
|
||||
if (has_capability('mod/meetletacbmarketplace:host', $context, $userid)) {
|
||||
if (has_capability('mod/meetletacbfree:host', $context, $userid)) {
|
||||
return service::ROLE_HOST;
|
||||
}
|
||||
if (has_capability('mod/meetletacbmarketplace:presenter', $context, $userid)) {
|
||||
if (has_capability('mod/meetletacbfree:presenter', $context, $userid)) {
|
||||
return service::ROLE_PRESENTER;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user