/**
 * Show the export course page.
 */
function WPCW_showPage_ImportExport_export()
{
    $page = new PageBuilder(true);
    $page->showPageHeader(__('Export Training Course', 'wp_courseware'), '75%', WPCW_icon_getPageIconURL());
    // Show form of courses that can be exported.
    $form = new FormBuilder('wpcw_export');
    $form->setSubmitLabel(__('Export Course', 'wp_courseware'));
    // Course selection
    $formElem = new FormElement('export_course_id', __('Course to Export', 'wp_courseware'), true);
    $formElem->setTypeAsComboBox(WPCW_courses_getCourseList(__('--- Select a course to export ---', 'wp_courseware')));
    $form->addFormElement($formElem);
    // Options for what to export
    $formElem = new FormElement('what_to_export', __('What to Export', 'wp_courseware'), true);
    $formElem->setTypeAsRadioButtons(array('whole_course' => __('<b>All</b> - The whole course - including modules, units and quizzes.', 'wp_courseware'), 'just_course' => __('<b>Just the Course</b> - Just the course title, description and settings (no modules, units or quizzes).', 'wp_courseware'), 'course_modules' => __('<b>Course and Modules</b> - Just the course settings and module settings (no units or quizzes).', 'wp_courseware'), 'course_modules_and_units' => __('<b>Course, Modules and Units</b> - The course settings and module settings and units (no quizzes).', 'wp_courseware')));
    $form->addFormElement($formElem);
    $form->setDefaultValues(array('what_to_export' => 'whole_course'));
    if ($form->formSubmitted()) {
        // Do the full export
        if ($form->formValid()) {
            // If data is valid, export will be handled by export class.
        } else {
            $page->showListOfErrors($form->getListOfErrors(), __('Sorry, but unfortunately there were some errors. Please fix the errors and try again.', 'wp_courseware'));
        }
    }
    // Show selection menu for import/export to save pages
    WPCW_showPage_ImportExport_menu('export');
    printf('<p class="wpcw_doc_quick">');
    _e('When you export a course, you\'ll get an <b>XML file</b>, which you can then <b>import into another WordPress website</b> that\'s running <b>WP Courseware</b>.<br/> 
	    When you export the course units with a course, just the <b>HTML to render images and video</b> will be copied, but the <b>actual images and video files will not be exported</b>.', 'wp_courseware');
    printf('</p>');
    echo $form->toString();
    $page->showPageFooter();
}