From: Juliette W. <jv...@us...> - 2005-06-15 16:40:07
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9092 Modified Files: Tag: frontend_dev question_bank.php Log Message: Minor changes Index: question_bank.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/question_bank.php,v retrieving revision 1.3.2.6 retrieving revision 1.3.2.7 diff -C2 -d -r1.3.2.6 -r1.3.2.7 *** question_bank.php 15 Jun 2005 16:01:30 -0000 1.3.2.6 --- question_bank.php 15 Jun 2005 16:39:53 -0000 1.3.2.7 *************** *** 68,93 **** include('html/pagehead.php'); ! if ('admin' == $user['username']) { $admin = TRUE; } ! if ('startover' == $action) { ! $action = 'questionbank_screen'; } ! $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'; ! } else if ('edit_from_db'==$action or 'try_from_db'==$action or 'export_xml_db'==$action) { ! $source = 'database'; ! $get_question = TRUE; ! } else if ('start_new' == $action) { ! $get_question = TRUE; ! $source = 'new'; } --- 68,116 ---- include('html/pagehead.php'); ! $admin = FALSE; ! if ('admin' == $user['username']) { $admin = TRUE; } ! $new_question = FALSE; ! if ('start_new' == $action) { ! $new_question = TRUE; } ! ! $database = FALSE; ! if ('edit_from_db'==$action or 'try_from_db'==$action or 'export_xml_db'==$action) { ! $database = TRUE; ! } ! ! if ('edit_from_db' == $action or 'edit_new' == $action) { ! $action = 'edit'; ! } ! ! if ('try_from_db' == $action) { ! $action = 'try'; ! } ! ! if ('export_xml_db' == $action) { ! $action = 'export_xml'; ! } ! $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 ! or 'start_new' == $action) { $get_question = TRUE; $source = 'default'; ! if ($database) { ! $source = 'database'; ! } else if ($new_question) { ! $source = 'new'; ! } } *************** *** 155,161 **** // Change 'edit_from_db' to 'edit'. We are done here. ! if ('edit_from_db'==$action) { ! $action='edit'; ! } // Delete a $question --- 178,182 ---- // Change 'edit_from_db' to 'edit'. We are done here. ! // Delete a $question *************** *** 185,189 **** // These branches need the question to be validated ! if ('edit' == $action or 'try_from_db' == $action or 'try'==$action or 'export_xml_db'==$action or 'export_xml'==$action) { stack_question_validate($question,$errors); } --- 206,210 ---- // These branches need the question to be validated ! if ('edit' == $action or 'try'==$action or 'export_xml'==$action) { stack_question_validate($question,$errors); } *************** *** 214,218 **** // If we have just taken a question from the db, we need to instantiate it. ! if ('try_from_db'==$action) { if (''==$errors) { $action='validate'; --- 235,239 ---- // If we have just taken a question from the db, we need to instantiate it. ! if ('try'==$action && $database) { if (''==$errors) { $action='validate'; *************** *** 358,362 **** } ! if ('export_xml_db' == $action or 'export_xml' == $action) { include_once("{$stack_root}/scripts/stackXML.php"); --- 379,383 ---- } ! if ('export_xml' == $action) { include_once("{$stack_root}/scripts/stackXML.php"); |