I build custom code in my module to save a chosen answer in every question insert to quiz_node_results_answers table, i add new column 'option_answer'

function custom_quiz_form_alter(&$form,&$form_state,$form_id) {
 //if ($form_id == 'quiz_question_answering_form') {
 $quiz_forms = array(
    'quiz_question_answering_form',
  );
  
  if (in_array($form_id, $quiz_forms)){
 //form baru
  $form['question']['option_answer'] = array(
  '#title' => t('option'),
  '#type' => 'select',
 // '#submit' => array('custom_quiz_nextpage'),
  //'#description' => 'Pilihan jawaban.',
  '#options' => array(t('A'), t('B'), t('C'), t('D'),t('E')),
);
 }

 return $form;
}

it appears in every question page during the quiz session, so how to save the select option form i made above insert to option_answer column in quiz_node_results_answers table ??

thanks

Comments

imunklovarian created an issue. See original summary.

smustgrave’s picture

Status: Active » Closed (outdated)

With D7 approaching EOL soon I've started the process of triaging the D7 queue here. Since there hasn't been any movement on this going to close out.

If needed for 7.0.x (D10+) please reopen under there