From: Chris S. <san...@us...> - 2005-10-20 10:40:51
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26144 Modified Files: question_bank.php Log Message: Index: question_bank.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/question_bank.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** question_bank.php 7 Oct 2005 06:26:38 -0000 1.16 --- question_bank.php 20 Oct 2005 10:40:40 -0000 1.17 *************** *** 51,54 **** --- 51,57 ---- $RawAns = ''; + //show_array($_SESSION); + + /************************************************************ * (2) Perform any actions on entering the page *************** *** 125,128 **** --- 128,132 ---- if ($get_question) { $question = stack_question_get($source); + $_SESSION['question'] = $question; if (!$new_question) { stack_question_validate($question,$errors); *************** *** 217,228 **** ! // Preview a new version of the quiz. if ('new_version' == $action) { ! foreach ($stackQuestion as $qfield => $val) { ! if (array_key_exists($qfield,$questionInst)) { ! $question[$qfield] = $questionInst[$qfield]; ! } ! } ! unset($questionInst); $action = 'preview'; } --- 221,232 ---- ! //// Preview a new version of the quiz. if ('new_version' == $action) { ! // foreach ($stackQuestion as $qfield => $val) { ! // if (array_key_exists($qfield,$questionInst)) { ! // $question[$qfield] = $questionInst[$qfield]; ! // } ! // } ! // unset($questionInst); $action = 'preview'; } *************** *** 232,236 **** $RawAns=$_POST['RawAns']; } else { ! $error['RawAns'] = '<font color="red">You have not entered an answer!</font>'; } } --- 236,240 ---- $RawAns=$_POST['RawAns']; } else { ! $error['RawAns'] = '<font color="red">'.get_string('YouHaveNotAns','stack','').'</font>'; } } *************** *** 257,261 **** } } else { - $RawAns = $questionInst['questionAnsInst']['value']; } --- 261,264 ---- *************** *** 263,267 **** if (''!=$errors) { ! echo '<p>Could not instantiate the question, because of errors.<br />Try to edit the question instead.</p>'; $action='edit'; } --- 266,270 ---- if (''!=$errors) { ! echo '<p>'.get_string('QInstCASError','stack','').'</p>'; $action='edit'; } *************** *** 277,281 **** stack_question_add_attempt($questionInst,$this_attempt,$errors); $_SESSION['questionInst'] = $questionInst; - $_SESSION['question'] = $questionInst; // CJS We should display the question as the student should see it. Hence not //stack_display_qb_preview($questionInst); --- 280,283 ---- |