BU-77 modified fix to use Moodle's device detection instead