Rename marketplace plugin to meetletacbfree (mdl_modules.name limit + CI table prefixes)

This commit is contained in:
2026-09-01 23:24:11 +03:30
parent 555cd725f7
commit d987994ded
77 changed files with 1497 additions and 1322 deletions
+8 -8
View File
@@ -17,12 +17,12 @@
/**
* Activity instance 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;
use cm_info;
use context_module;
@@ -49,12 +49,12 @@ class instance {
public $meetingmap;
public static function get_from_cmid(int $cmid, int $groupid = 0): self {
list($course, $cm) = get_course_and_cm_from_cmid($cmid, 'meetletacbmarketplace');
list($course, $cm) = get_course_and_cm_from_cmid($cmid, 'meetletacbfree');
return self::from_cm($cm, $course, $groupid);
}
public static function get_from_instanceid(int $instanceid, int $groupid = 0): self {
list($course, $cm) = get_course_and_cm_from_instance($instanceid, 'meetletacbmarketplace');
list($course, $cm) = get_course_and_cm_from_instance($instanceid, 'meetletacbfree');
return self::from_cm($cm, $course, $groupid);
}
@@ -64,15 +64,15 @@ class instance {
$inst->cm = $cm;
$inst->course = $course;
$inst->context = context_module::instance($cm->id);
$inst->record = $DB->get_record('meetletacbmarketplace', ['id' => $cm->instance], '*', MUST_EXIST);
$inst->record = $DB->get_record('meetletacbfree', ['id' => $cm->instance], '*', MUST_EXIST);
$inst->groupid = $groupid;
$inst->meetingmap = $DB->get_record('meetlet_marketplace_meetings', [
$inst->meetingmap = $DB->get_record('meetletacbfree_meetings', [
'instanceid' => $inst->record->id,
'groupid' => $groupid,
]);
if (!$inst->meetingmap && $groupid !== 0) {
// Fallback to no-group mapping.
$inst->meetingmap = $DB->get_record('meetlet_marketplace_meetings', [
$inst->meetingmap = $DB->get_record('meetletacbfree_meetings', [
'instanceid' => $inst->record->id,
'groupid' => 0,
]);
@@ -87,7 +87,7 @@ class instance {
public function require_meeting(): int {
$scoid = $this->meetingscoid();
if (!$scoid) {
throw new moodle_exception('nomeeting', 'meetletacbmarketplace');
throw new moodle_exception('nomeeting', 'meetletacbfree');
}
return $scoid;
}