function questions_import_form in Quiz 6.3
Same name and namespace in other branches
- 6.6 includes/questions_import/questions_import.admin.inc \questions_import_form()
1 string reference to 'questions_import_form'
- questions_import_menu in includes/
questions_import/ questions_import.module - Implementation of hook_menu
File
- includes/
questions_import/ questions_import.admin.inc, line 14
Code
function questions_import_form() {
$form['#attributes'] = array(
'enctype' => 'multipart/form-data',
);
$form['quiz_node'] = array(
'#type' => 'select',
'#title' => t('Quiz Node'),
'#options' => questions_import_quiz_node(),
'#description' => t('Select the quiz node under which you want to add questions'),
'#required' => TRUE,
);
$form['question_type'] = array(
'#type' => 'select',
'#title' => t('Question type'),
'#options' => questions_import_question_type(),
'#description' => t('Select the quiz question type you wish to upload'),
'#required' => TRUE,
);
$form['import_type'] = array(
'#type' => 'select',
'#title' => t('Import type'),
'#options' => questions_import_type(),
'#description' => t('Select the import type csv, XML'),
'#required' => TRUE,
);
$form['field_separator'] = array(
'#type' => 'textfield',
'#title' => t('Field Separator'),
'#default_value' => t(','),
'#description' => t('Special character used to separator the fields usually , : or ; '),
'#size' => 3,
'#required' => TRUE,
);
//'upload' index will be used in file_check_upload()
$form['upload'] = array(
'#type' => 'file',
'#title' => t('Upload'),
'#size' => 30,
'#description' => t('Upload the file that has quiz questions'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('import'),
);
$form['#validate'][] = 'questions_import_form_validate';
$form['#submit'][] = 'questions_import_form_submit';
return $form;
}