Revert "fixes for 2.6"

This reverts commit cc49fd23f68d6be215f8251504784759b386ff83.
fixes for moodle 2.6