This page
https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5#Supporting_both_Ionic_3_and_Ionic_5
Has text that says
"You can also have a single file with different HTML depending on the appversioncode, that’s up to you."
How can that be done?
The choice group code is like this
public static function mobile_init($args) { global $CFG; $args = (object) $args; $foldername = $args->appversioncode >= 3950 ? 'latest' : 'ionic3'; return [ 'templates' => [], 'javascript' => file_get_contents($CFG->dirroot . "/mod/choicegroup/mobile/js/$foldername/init.js"), ]; }
https://github.com/dpalou/moodle-mod_choicegroup/blob/2bfb0872e070966bf8ff640f6d5a8255dbb3b583/classes/output/mobile.php#L47
Which would translate to this in my question type
https://github.com/marcusgreen/moodle-qtype_gapfill/blob/master/classes/output/mobile.php
In the spirit of social constructivism, me explaining it here has given me a clue as to where I ought to look next, but if anyone can
shortcut my next step that would be great.