通过配置或数据库结束 Moodle 之旅

问题描述 投票:0回答:1

是否可以通过数据库或config.php在Moodle中针对特定主题(例如Boost)启用特定游览(例如Welcome)?

moodle moodle-theme
1个回答
0
投票

不是通过

config.php
- 有一个
forced_plugin_settings
的选项,但我认为这不会满足您的要求

https://docs.moodle.org/402/en/Configuration_file#Forcing_the_value_of_admin_settings

您可以通过 SQL 更新数据库,但您需要对数据进行 JSON 编码

主题过滤器位于

configdata

列中

例如:

SELECT configdata
FROM mdl_tool_usertours_tours

寻找

""theme"":[""boost""]

或者您可以通过 PHP 设置主题过滤器

$tour = tourinstance::instance($tourid]);
$tour->set_filter_values('theme', ['boost']);
© www.soinside.com 2019 - 2024. All rights reserved.