protected function add_response_declaration(ImsQtiWriter $item, $question)
 {
     $result = parent::add_response_declaration($item, $question);
     $correct_response = $result->add_correctResponse();
     $mapping = $result->add_mapping();
     foreach ($question->options->answers as $answer) {
         $identifier = $answer->answer;
         if ($is_correct = $answer->fraction == 1) {
             $correct_response->add_value($identifier);
         }
         $mapping->add_mapEntry($identifier, $answer->fraction * $question->defaultgrade);
     }
     return $result;
 }