Use new var plugin instead of module
Adapted to moodle >= 2.6