From: Chris S. <san...@us...> - 2005-06-15 20:07:18
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30180 Modified Files: Tag: frontend_dev qb_display.php question_bank.php question_bank_util.php Log Message: Index: qb_display.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/Attic/qb_display.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** qb_display.php 15 Jun 2005 17:40:04 -0000 1.1.2.1 --- qb_display.php 15 Jun 2005 20:07:09 -0000 1.1.2.2 *************** *** 1,9 **** <?php ! function print_question_bank_screen($admin, $question_bank_filter) { global $stack_root; $options = ''; include("{$stack_root}/html/qselectform.php"); ! if (!$admin) { stack_db_listquestions('edit',$question_bank_filter); --- 1,10 ---- <?php ! ! function stack_print_question_bank_screen($admin, $question_bank_filter) { global $stack_root; $options = ''; include("{$stack_root}/html/qselectform.php"); ! if ($admin) { stack_db_listquestions('edit',$question_bank_filter); *************** *** 17,21 **** } ! function print_edit_screen($question, $errors) { global $stack_root; include_once("{$stack_root}/scripts/stackAuthor.php"); --- 18,22 ---- } ! function stack_print_edit_screen($question, $errors) { global $stack_root; include_once("{$stack_root}/scripts/stackAuthor.php"); Index: question_bank_util.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/Attic/question_bank_util.php,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** question_bank_util.php 15 Jun 2005 16:58:36 -0000 1.1.2.4 --- question_bank_util.php 15 Jun 2005 20:07:09 -0000 1.1.2.5 *************** *** 44,48 **** } ! function getQuestionInst() { $questionInst = NULL; // Get any $questionInst from the current $_SESSION --- 44,48 ---- } ! function stack_get_questionInst() { $questionInst = NULL; // Get any $questionInst from the current $_SESSION *************** *** 58,61 **** --- 58,62 ---- function stack_get_question_from_post() { + global $stackQuestion; $question = NULL; *************** *** 106,108 **** --- 107,111 ---- + + ?> Index: question_bank.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/question_bank.php,v retrieving revision 1.3.2.11 retrieving revision 1.3.2.12 diff -C2 -d -r1.3.2.11 -r1.3.2.12 *** question_bank.php 15 Jun 2005 17:40:04 -0000 1.3.2.11 --- question_bank.php 15 Jun 2005 20:07:09 -0000 1.3.2.12 *************** *** 82,86 **** $database = FALSE; if ('edit_from_db'==$action or 'try_from_db'==$action or 'export_xml_db'==$action) { ! $database = TRUE; } --- 82,86 ---- $database = FALSE; if ('edit_from_db'==$action or 'try_from_db'==$action or 'export_xml_db'==$action) { ! $database = TRUE; } *************** *** 99,110 **** $get_question = FALSE; ! if ('edit' == $action ! or 'mark' == $action or 'validate' == $action ! or 'store_in_db' == $action or 'store_new_db' == $action ! or 'try' == $action or 'new_version' == $action ! or 'export_xml' == $action) { $get_question = TRUE; $source = 'default'; --- 99,110 ---- $get_question = FALSE; ! if ('edit' == $action ! or 'mark' == $action or 'validate' == $action ! or 'store_in_db' == $action or 'store_new_db' == $action ! or 'try' == $action or 'new_version' == $action ! or 'export_xml' == $action) { $get_question = TRUE; $source = 'default'; *************** *** 119,130 **** // There should be a question in the $POST or $SESSION if ($get_question) { ! $question = stack_get_question($source); ! $questionInst = getQuestionInst(); } ! if (array_key_exists('bank_filter',$_POST)) { ! $question_bank_filter = trim($_POST['bank_filter']); } else { ! $question_bank_filter = ''; } --- 119,131 ---- // There should be a question in the $POST or $SESSION if ($get_question) { ! $question = stack_get_question($source); ! $questionInst = stack_get_questionInst(); } ! ! if (array_key_exists('bank_filter',$_POST)) { ! $question_bank_filter = $_POST['bank_filter']; } else { ! $question_bank_filter = ''; } *************** *** 138,142 **** // (2.5) Export a whole list of questions. ! include('qb_export.php'); --- 139,143 ---- // (2.5) Export a whole list of questions. ! include('qb_export.php'); *************** *** 193,210 **** session_unregister('questionInst'); ! print_question_bank_screen($admin, $question_bank_filter); } //(4.2) Edit questions if ('edit' == $action) { ! print_edit_screen($question, $errors); } - - - - - include('html/pagefoot.php'); --- 194,206 ---- session_unregister('questionInst'); ! stack_print_question_bank_screen($admin, $question_bank_filter); } //(4.2) Edit questions if ('edit' == $action) { ! stack_print_edit_screen($question, $errors); } include('html/pagefoot.php'); |