Adobe Connect Bridge Marketplace edition — initial release

This commit is contained in:
2026-09-01 22:43:54 +03:30
commit 555cd725f7
93 changed files with 20833 additions and 0 deletions
+85
View File
@@ -0,0 +1,85 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Admin setting: site-wide role × feature access matrix.
*
* @package mod_meetletacbmarketplace
* @copyright 2026 MeetLet <info@meetlet.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace mod_meetletacbmarketplace\admin;
use admin_setting;
use mod_meetletacbmarketplace\local\featureaccess;
defined('MOODLE_INTERNAL') || die();
/**
* Stores the site default feature-access JSON used when an activity does not override.
*/
class setting_featureaccess extends admin_setting {
public function __construct() {
parent::__construct(
'meetletacbmarketplace/featureaccess',
get_string('featureaccess', 'meetletacbmarketplace'),
get_string('featureaccess_desc', 'meetletacbmarketplace'),
json_encode(featureaccess::builtin_defaults(), JSON_UNESCAPED_UNICODE)
);
}
public function get_setting() {
return $this->config_read($this->name);
}
public function write_setting($data) {
if (!is_array($data)) {
$data = [];
}
$json = featureaccess::matrix_from_post($data);
return $this->config_write($this->name, $json) ? '' : get_string('errorsetting', 'admin');
}
public function output_html($data, $query = '') {
$matrix = featureaccess::builtin_defaults();
if (is_string($data) && $data !== '') {
$decoded = json_decode($data, true);
if (is_array($decoded) && !empty($decoded)) {
$matrix = featureaccess::normalize($decoded);
}
} else if (is_array($data) && !empty($data)) {
$json = featureaccess::matrix_from_post($data);
$decoded = json_decode($json, true);
if (is_array($decoded)) {
$matrix = featureaccess::normalize($decoded);
}
}
$html = access_reset_ui::toolbar('featureaccess');
$html .= featureaccess::render_matrix_html($matrix, $this->get_full_name());
return format_admin_setting(
$this,
$this->visiblename,
$html,
$this->description,
true,
'',
get_string('featureaccess_usesite', 'meetletacbmarketplace'),
$query
);
}
}