是否可以通过数据库或config.php在Moodle中针对特定主题(例如Boost)启用特定游览(例如Welcome)?
不是通过
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']);