|
|
|
|
@ -91,22 +91,19 @@ function lp_upload_quiz_main() { |
|
|
|
|
// variable initialisation |
|
|
|
|
$lp_id = Security::remove_XSS($_GET['lp_id']); |
|
|
|
|
|
|
|
|
|
$form = new FormValidator('upload', 'POST', api_get_self() . '?' . api_get_cidreq() . '&lp_id=' . $lp_id, '', 'enctype="multipart/form-data"'); |
|
|
|
|
$form->addElement('html', '<div><h3>' .Display::return_icon('import_excel.png', get_lang('ImportExcelQuiz'), array('style'=>'margin-bottom:-2px;'),ICON_SIZE_MEDIUM). get_lang('ImportExcelQuiz') . '</h3></div>'); |
|
|
|
|
$form->addElement('file', 'user_upload_quiz', ''); |
|
|
|
|
$form = new FormValidator('upload', 'POST', api_get_self() . '?' . api_get_cidreq() . '&lp_id=' . $lp_id, '', array('enctype' => 'multipart/form-data')); |
|
|
|
|
$form->addElement('header', get_lang('ImportExcelQuiz')); |
|
|
|
|
$form->addElement('file', 'user_upload_quiz', get_lang('FileUpload')); |
|
|
|
|
|
|
|
|
|
$link = '<a href="../exercice/quiz_template.xls">'.Display::return_icon('export_excel.png', get_lang('DownloadExcelTemplate'),null,16).get_lang('DownloadExcelTemplate'); |
|
|
|
|
|
|
|
|
|
$form->addElement('advanced_settings', $link); |
|
|
|
|
|
|
|
|
|
//button send document |
|
|
|
|
$form->addElement('style_submit_button', 'submit_upload_quiz', get_lang('Send'), 'class="upload"'); |
|
|
|
|
|
|
|
|
|
// Display the upload field |
|
|
|
|
echo '<table style="text-align: left; width: 100%;" border="0" cellpadding="2"cellspacing="2"><tbody><tr>'; |
|
|
|
|
echo '<td style="vertical-align: top; width: 25%;">'; |
|
|
|
|
echo '<a href="../exercice/quiz_template.xls">'.Display::return_icon('export_excel.png', get_lang('DownloadExcelTemplate'),null,16).get_lang('DownloadExcelTemplate').''; |
|
|
|
|
echo '</a>'; |
|
|
|
|
echo '</td>'; |
|
|
|
|
echo '</tr>'; |
|
|
|
|
echo '<tr><td>'; |
|
|
|
|
$form->display(); |
|
|
|
|
echo '</td></tr></tbody></table>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|