Rename marketplace plugin to meetletacbfree (mdl_modules.name limit + CI table prefixes)
This commit is contained in:
@@ -4,16 +4,16 @@
|
||||
/**
|
||||
* Admin UI for voluntary MeetLet site registration (Marketplace free edition).
|
||||
*
|
||||
* @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\admin;
|
||||
namespace mod_meetletacbfree\admin;
|
||||
|
||||
use admin_setting;
|
||||
use mod_meetletacbmarketplace\local\icons;
|
||||
use mod_meetletacbmarketplace\registration\manager;
|
||||
use mod_meetletacbfree\local\icons;
|
||||
use mod_meetletacbfree\registration\manager;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
@@ -23,7 +23,7 @@ defined('MOODLE_INTERNAL') || die();
|
||||
class setting_registration extends admin_setting {
|
||||
public function __construct() {
|
||||
parent::__construct(
|
||||
'meetletacbmarketplace/registration_panel',
|
||||
'meetletacbfree/registration_panel',
|
||||
'',
|
||||
'',
|
||||
''
|
||||
@@ -45,11 +45,11 @@ class setting_registration extends admin_setting {
|
||||
$summary = manager::status_summary();
|
||||
$active = !empty($summary['active']);
|
||||
$candeactivate = !empty($summary['can_deactivate']);
|
||||
$ajaxurl = new \moodle_url('/mod/meetletacbmarketplace/ajax/registration.php');
|
||||
$scrolljsurl = new \moodle_url('/mod/meetletacbmarketplace/javascript/meetlet_modal_scroll.js', [
|
||||
$ajaxurl = new \moodle_url('/mod/meetletacbfree/ajax/registration.php');
|
||||
$scrolljsurl = new \moodle_url('/mod/meetletacbfree/javascript/meetlet_modal_scroll.js', [
|
||||
'v' => '2026090146',
|
||||
]);
|
||||
$jsurl = new \moodle_url('/mod/meetletacbmarketplace/javascript/settings_registration.js', [
|
||||
$jsurl = new \moodle_url('/mod/meetletacbfree/javascript/settings_registration.js', [
|
||||
'v' => '2026090146',
|
||||
]);
|
||||
$privacytaburl = manager::privacy_tab_url();
|
||||
@@ -58,37 +58,37 @@ class setting_registration extends admin_setting {
|
||||
|
||||
$statusbadge = \html_writer::span(
|
||||
s($summary['status_label'] ?? ($active
|
||||
? get_string('registration_status_active', 'meetletacbmarketplace')
|
||||
: get_string('registration_status_inactive', 'meetletacbmarketplace'))),
|
||||
? get_string('registration_status_active', 'meetletacbfree')
|
||||
: get_string('registration_status_inactive', 'meetletacbfree'))),
|
||||
'badge meetlet-license-badge ' . ($active ? 'meetlet-license-badge--active' : 'meetlet-license-badge--inactive'),
|
||||
['id' => 'meetlet-registration-status-badge']
|
||||
);
|
||||
|
||||
$datalist = \html_writer::tag('ul',
|
||||
\html_writer::tag('li', get_string('registration_data_item_domain', 'meetletacbmarketplace', s($summary['domain']))) .
|
||||
\html_writer::tag('li', get_string('registration_data_item_moodle', 'meetletacbmarketplace', s($summary['moodle_release']))) .
|
||||
\html_writer::tag('li', get_string('registration_data_item_plugin', 'meetletacbmarketplace', s($summary['plugin_release']))) .
|
||||
\html_writer::tag('li', get_string('registration_data_item_installation', 'meetletacbmarketplace', s($summary['installation_id']))) .
|
||||
\html_writer::tag('li', get_string('registration_data_item_sitename', 'meetletacbmarketplace', s($summary['site_company']))) .
|
||||
\html_writer::tag('li', get_string('registration_data_item_email', 'meetletacbmarketplace',
|
||||
$summary['site_admin_email'] !== '' ? s($summary['site_admin_email']) : get_string('registration_data_optional', 'meetletacbmarketplace'))),
|
||||
\html_writer::tag('li', get_string('registration_data_item_domain', 'meetletacbfree', s($summary['domain']))) .
|
||||
\html_writer::tag('li', get_string('registration_data_item_moodle', 'meetletacbfree', s($summary['moodle_release']))) .
|
||||
\html_writer::tag('li', get_string('registration_data_item_plugin', 'meetletacbfree', s($summary['plugin_release']))) .
|
||||
\html_writer::tag('li', get_string('registration_data_item_installation', 'meetletacbfree', s($summary['installation_id']))) .
|
||||
\html_writer::tag('li', get_string('registration_data_item_sitename', 'meetletacbfree', s($summary['site_company']))) .
|
||||
\html_writer::tag('li', get_string('registration_data_item_email', 'meetletacbfree',
|
||||
$summary['site_admin_email'] !== '' ? s($summary['site_admin_email']) : get_string('registration_data_optional', 'meetletacbfree'))),
|
||||
['class' => 'meetlet-registration-data']
|
||||
);
|
||||
|
||||
$why = \html_writer::div(
|
||||
\html_writer::tag('h4', get_string('registration_why_title', 'meetletacbmarketplace')) .
|
||||
\html_writer::tag('p', get_string('registration_why', 'meetletacbmarketplace')),
|
||||
\html_writer::tag('h4', get_string('registration_why_title', 'meetletacbfree')) .
|
||||
\html_writer::tag('p', get_string('registration_why', 'meetletacbfree')),
|
||||
'meetlet-guide__section'
|
||||
);
|
||||
$what = \html_writer::div(
|
||||
\html_writer::tag('h4', get_string('registration_data_title', 'meetletacbmarketplace')) .
|
||||
\html_writer::tag('p', get_string('registration_data_sent', 'meetletacbmarketplace')) .
|
||||
\html_writer::tag('h4', get_string('registration_data_title', 'meetletacbfree')) .
|
||||
\html_writer::tag('p', get_string('registration_data_sent', 'meetletacbfree')) .
|
||||
$datalist .
|
||||
\html_writer::tag('p',
|
||||
get_string(
|
||||
'registration_privacy',
|
||||
'meetletacbmarketplace',
|
||||
\html_writer::link($privacytaburl, get_string('registration_privacy_tablink', 'meetletacbmarketplace'))
|
||||
'meetletacbfree',
|
||||
\html_writer::link($privacytaburl, get_string('registration_privacy_tablink', 'meetletacbfree'))
|
||||
),
|
||||
['class' => 'mb-0']
|
||||
),
|
||||
@@ -108,12 +108,12 @@ class setting_registration extends admin_setting {
|
||||
$why .
|
||||
$what .
|
||||
\html_writer::div(
|
||||
\html_writer::tag('p', get_string('registration_status_label', 'meetletacbmarketplace') . ' ' .
|
||||
\html_writer::tag('p', get_string('registration_status_label', 'meetletacbfree') . ' ' .
|
||||
\html_writer::span($statusbadge, '', ['id' => 'meetlet-registration-status-badge'])) .
|
||||
\html_writer::tag('p', get_string('registration_domain', 'meetletacbmarketplace', s($summary['domain'])), [
|
||||
\html_writer::tag('p', get_string('registration_domain', 'meetletacbfree', s($summary['domain'])), [
|
||||
'id' => 'meetlet-registration-domain',
|
||||
]) .
|
||||
\html_writer::tag('p', get_string('registration_installation', 'meetletacbmarketplace', s($summary['installation_id'])), [
|
||||
\html_writer::tag('p', get_string('registration_installation', 'meetletacbfree', s($summary['installation_id'])), [
|
||||
'id' => 'meetlet-registration-installation',
|
||||
]) .
|
||||
\html_writer::tag('p', s($summary['product_label'] ?? ''), [
|
||||
@@ -131,12 +131,12 @@ class setting_registration extends admin_setting {
|
||||
\html_writer::tag('button',
|
||||
'<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">'
|
||||
. '<path fill="currentColor" d="M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"/></svg>'
|
||||
. \html_writer::span(get_string('registration_activate', 'meetletacbmarketplace'), 'meetlet-btn-with-icon__label'),
|
||||
. \html_writer::span(get_string('registration_activate', 'meetletacbfree'), 'meetlet-btn-with-icon__label'),
|
||||
[
|
||||
'type' => 'button',
|
||||
'class' => 'meetlet-settings-btn meetlet-btn-with-icon meetlet-license-btn--free',
|
||||
'id' => 'meetlet-registration-activate',
|
||||
'title' => get_string('registration_activate_help', 'meetletacbmarketplace'),
|
||||
'title' => get_string('registration_activate_help', 'meetletacbfree'),
|
||||
]
|
||||
),
|
||||
'',
|
||||
@@ -145,7 +145,7 @@ class setting_registration extends admin_setting {
|
||||
\html_writer::div(
|
||||
\html_writer::tag('button',
|
||||
icons::svg('refresh')
|
||||
. \html_writer::span(get_string('registration_recheck', 'meetletacbmarketplace'), 'meetlet-btn-with-icon__label'),
|
||||
. \html_writer::span(get_string('registration_recheck', 'meetletacbfree'), 'meetlet-btn-with-icon__label'),
|
||||
[
|
||||
'type' => 'button',
|
||||
'class' => 'btn btn-secondary meetlet-btn-with-icon',
|
||||
@@ -156,7 +156,7 @@ class setting_registration extends admin_setting {
|
||||
\html_writer::tag('button',
|
||||
'<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">'
|
||||
. '<path fill="currentColor" d="M12 2a10 10 0 1 0 10 10h-2a8 8 0 1 1-8-8V2zm1 5v5.6l3.2 1.9-.8 1.4L11 13.2V7h2z"/></svg>'
|
||||
. \html_writer::span(get_string('registration_deactivate', 'meetletacbmarketplace'), 'meetlet-btn-with-icon__label'),
|
||||
. \html_writer::span(get_string('registration_deactivate', 'meetletacbfree'), 'meetlet-btn-with-icon__label'),
|
||||
[
|
||||
'type' => 'button',
|
||||
'class' => 'btn btn-outline-danger meetlet-btn-with-icon',
|
||||
@@ -171,16 +171,16 @@ class setting_registration extends admin_setting {
|
||||
'id' => 'meetlet-registration-config',
|
||||
'data-ajaxurl' => $ajaxurl->out(false),
|
||||
'data-sesskey' => sesskey(),
|
||||
'data-api-input' => 'id_s_meetletacbmarketplace_registration_api_url',
|
||||
'data-label-active' => get_string('registration_status_active', 'meetletacbmarketplace'),
|
||||
'data-label-inactive' => get_string('registration_status_inactive', 'meetletacbmarketplace'),
|
||||
'data-label-domain' => get_string('registration_domain', 'meetletacbmarketplace', '__V__'),
|
||||
'data-label-installation' => get_string('registration_installation', 'meetletacbmarketplace', '__V__'),
|
||||
'data-confirm-activate-title' => get_string('registration_activate_confirm_title', 'meetletacbmarketplace'),
|
||||
'data-confirm-activate-ok' => get_string('registration_activate_confirm_ok', 'meetletacbmarketplace'),
|
||||
'data-confirm-deactivate-title' => get_string('registration_deactivate_confirm_title', 'meetletacbmarketplace'),
|
||||
'data-confirm-deactivate-ok' => get_string('registration_deactivate_confirm_ok', 'meetletacbmarketplace'),
|
||||
'data-confirm-deactivate' => get_string('registration_deactivate_confirm', 'meetletacbmarketplace'),
|
||||
'data-api-input' => 'id_s_meetletacbfree_registration_api_url',
|
||||
'data-label-active' => get_string('registration_status_active', 'meetletacbfree'),
|
||||
'data-label-inactive' => get_string('registration_status_inactive', 'meetletacbfree'),
|
||||
'data-label-domain' => get_string('registration_domain', 'meetletacbfree', '__V__'),
|
||||
'data-label-installation' => get_string('registration_installation', 'meetletacbfree', '__V__'),
|
||||
'data-confirm-activate-title' => get_string('registration_activate_confirm_title', 'meetletacbfree'),
|
||||
'data-confirm-activate-ok' => get_string('registration_activate_confirm_ok', 'meetletacbfree'),
|
||||
'data-confirm-deactivate-title' => get_string('registration_deactivate_confirm_title', 'meetletacbfree'),
|
||||
'data-confirm-deactivate-ok' => get_string('registration_deactivate_confirm_ok', 'meetletacbfree'),
|
||||
'data-confirm-deactivate' => get_string('registration_deactivate_confirm', 'meetletacbfree'),
|
||||
'hidden' => 'hidden',
|
||||
]) .
|
||||
self::confirm_modal_html(),
|
||||
@@ -191,17 +191,17 @@ class setting_registration extends admin_setting {
|
||||
}
|
||||
|
||||
protected static function confirm_modal_html(): string {
|
||||
$activatebody = \html_writer::tag('p', get_string('registration_activate_confirm_lead', 'meetletacbmarketplace'), [
|
||||
$activatebody = \html_writer::tag('p', get_string('registration_activate_confirm_lead', 'meetletacbfree'), [
|
||||
'class' => 'meetlet-modal__lead',
|
||||
]) .
|
||||
\html_writer::tag('p', get_string('registration_activate_confirm_data', 'meetletacbmarketplace'), [
|
||||
\html_writer::tag('p', get_string('registration_activate_confirm_data', 'meetletacbfree'), [
|
||||
'class' => 'meetlet-modal__keep',
|
||||
]);
|
||||
$deactivatebody = \html_writer::tag('p', get_string('registration_deactivate_confirm_lead', 'meetletacbmarketplace'), [
|
||||
$deactivatebody = \html_writer::tag('p', get_string('registration_deactivate_confirm_lead', 'meetletacbfree'), [
|
||||
'class' => 'meetlet-modal__lead',
|
||||
]) .
|
||||
\html_writer::div(
|
||||
\html_writer::tag('p', get_string('registration_deactivate_confirm_warning', 'meetletacbmarketplace'), [
|
||||
\html_writer::tag('p', get_string('registration_deactivate_confirm_warning', 'meetletacbfree'), [
|
||||
'class' => 'meetlet-modal__callout-title',
|
||||
]),
|
||||
'meetlet-modal__callout'
|
||||
@@ -219,7 +219,7 @@ class setting_registration extends admin_setting {
|
||||
'type' => 'button',
|
||||
'class' => 'meetlet-modal__close',
|
||||
'data-meetlet-modal-dismiss' => '1',
|
||||
'aria-label' => get_string('registration_modal_close', 'meetletacbmarketplace'),
|
||||
'aria-label' => get_string('registration_modal_close', 'meetletacbfree'),
|
||||
]),
|
||||
'meetlet-modal__head'
|
||||
) .
|
||||
|
||||
Reference in New Issue
Block a user