public function __construct($plugintype, $pluginname, $step)
 {
     parent::__construct($plugintype, $pluginname, $step);
     $this->legacynamemap = array('custom_template' => 'pertesttemplate');
     $revmap = qtype_coderunner::legacy_field_name_map();
     foreach ($revmap as $new => $old) {
         $this->legacynamemap[$old] = $new;
         // Invert the mapping
     }
 }
 public function process_question_answer($data)
 {
     parent::process_question_answer($data);
     $this->currentanswer = $data;
     $this->currentanswer['newid'] = $this->get_mappingid('question_answer', $data['id']);
 }