*/ /** * Code */ require '../../inc/global.inc.php'; //SECURITY CHECK if (api_is_platform_admin()) { api_not_allowed(); } //DECLARE NEEDED LIBRARIES require_once api_get_path(LIBRARY_PATH) . 'fileManage.lib.php'; require_once api_get_path(LIBRARY_PATH) . 'fileUpload.lib.php'; require_once 'exercise_import.inc.php'; include_once '../exercise.class.php'; include_once '../question.class.php'; include_once 'qti/qti_classes.php'; //SQL table name $tbl_exercise = Database::get_course_table(TABLE_QUIZ_TEST); $tbl_question = Database::get_course_table(TABLE_QUIZ_QUESTION); $tbl_rel_exercise_question = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION); // tool libraries include_once '../exercise.class.php'; //Tool title $nameTools = get_lang('ImportExercise'); //bredcrump $interbredcrump[] = array('url' => '../exercice.php', 'name' => get_lang('Exercises')); //---------------------------------- // EXECUTE COMMAND //---------------------------------- $cmd = (isset($_REQUEST['cmd'])? $_REQUEST['cmd'] : 'show_import'); switch ($cmd) { case 'show_import' : { $display = '
'
. get_lang('Imported exercises must consist of a zip or an XML file (IMS-QTI) and be compatible with your Claroline version.') . '
'
. '