It has been detected that, in order to keep the master branch of the module working for all Moodle versions since, say, 2.7. Some conditional code, based on $CFG->branch has been added here and there.
That's simply not acceptable and proper branches should be used for every line of code.
So this is about to:
1) Decide what goes to the MOODLE_XX_STABLE branches, so people using them can do it up to now.
2) In master (3.1), kill all the conditional coding above. And its consequences. Completely.
3) Decide which politic is followed to backport future issues the the MOODLE_XX_STABLES (nothing is backported, everything is backported, only serious bugs are...).