From: Juliette W. <jv...@us...> - 2005-06-14 16:01:19
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14127 Modified Files: Tag: frontend_dev question_bank.php Added Files: Tag: frontend_dev import_question_screen.php Log Message: Separated off import question screen into another file. --- NEW FILE: import_question_screen.php --- <?php /* * Welcome to STACK. A system for teaching and assessment using a * computer algebra kernel. * <br> * This file is licensed under the GPL License. * <br> * A copy of the license is in your STACK distribution called * license.txt. If you are missing this file you can obtain * it from: * http://www.stack.bham.ac.uk/license.txt * <br> * Copyright (c) 2005, Christopher James Sangwin * * @author Chris Sangwin C.J...@bh... * @author Laura Naismith L.N...@bh... * * @package Stack */ /////////////////////////////////////////////////////////////// // (1) Process Input - this sets $action, $user and $username /////////////////////////////////////////////////////////////// include('stackstd.php'); $default_action = ''; include($stack_root.'/frontend_general/process_input.php'); ////////////////////////////////////////////////////////////// // (2) Print the page. ////////////////////////////////////////////////////////////// include('html/pagehead.php'); if ('upload_xml_file' == $action) { echo nsf($errors,'upload_xml_file'); echo "Select a file to upload and edit: <br /> <form enctype='multipart/form-data' action=\"question_bank.php\"' method='POST'><br />\n <input type ='file' name='xmlfile' />\n <input type ='hidden' name='action' value='upload_xml_file' /> <input type ='submit' name='go' value='Upload'> </form>\n\n"; } include('html/pagefoot.php'); ?> Index: question_bank.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/question_bank.php,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -C2 -d -r1.3.2.2 -r1.3.2.3 *** question_bank.php 14 Jun 2005 15:50:05 -0000 1.3.2.2 --- question_bank.php 14 Jun 2005 16:01:04 -0000 1.3.2.3 *************** *** 65,74 **** // action = startover Begin again. ! if (isset($_POST['action'])) ! {$action=$_POST['action'];} ! else if (isset($_GET['action'])) ! {$action=$_GET['action'];} ! else ! {$action='startover';} include('html/pagehead.php'); --- 65,69 ---- // action = startover Begin again. ! include('html/pagehead.php'); *************** *** 466,483 **** } - if ('upload_xml_file' == $action) { - echo nsf($errors,'upload_xml_file'); - - $PostTo=$_PHP_SELF; - echo "Select a file to upload and edit: - <br /> - <form enctype='multipart/form-data' action='$_PHP_SELF' method='POST'><br />\n - <input type ='file' name='xmlfile' />\n - <input type ='hidden' name='action' value='upload_xml_file' /> - <input type ='submit' name='go' value='Upload'> - </form>\n\n"; - } - - include('html/pagefoot.php'); --- 461,464 ---- |