Endable moodle tour via config or database

34 Views Asked by At

Is it possible to enable a specific tour in Moodle (e.g. Welcome) for a specific theme (e.g. Boost) via the database or the config.php?

1

There are 1 best solutions below

0
On

Not via config.php - there is an option for forced_plugin_settings but I don't think this will work for your request

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

You could update the database via SQL, but you will need to JSON encode the data

The theme filter is in the column configdata

eg:

SELECT configdata
FROM mdl_tool_usertours_tours

Look for ""theme"":[""boost""]

Or you could set the theme filter via PHP

$tour = tourinstance::instance($tourid]);
$tour->set_filter_values('theme', ['boost']);