Update of /cvsroot/stack/ODE In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5295 Modified Files: DisplayODE.php debug.php displaychat.php equivchecklocate.php execmathscoms.php execnonmathcoms.php formbuttons.php index.php todo.txt Log Message: ECP 17/04/2008: Hints now displaying properly, even for first line. Some minor display changes made also. Index: todo.txt =================================================================== RCS file: /cvsroot/stack/ODE/todo.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** todo.txt 4 Apr 2008 10:44:10 -0000 1.10 --- todo.txt 17 Apr 2008 19:48:29 -0000 1.11 *************** *** 1,50 **** - ==To do before MEE: [person]{urgency}== - <<<<<<< todo.txt - x. [ECP]{necessary} Finish implementing ATEquationfun fully - -> Done (~95% - for 100% testing need to add more answertests to test suite) ! ***1a Once done, need to change equivchecklocate's definition of 'errors' to require both matheq and misapp to be true before setting ! errors as false. Some changes to displaychat may also be needed to show the necessary error messages for the different types once ! they have been set up. ! ***2. [ECP]{necessary} Add in capacity to provide feedback on misapp errors. Requires: 1. ! *. [ECP]{necessary} Create new model solutions for the trial - i.e. more questions. ! -> More first order simple problems written ! x Write FOETh.html - theory for exact 1st ODEs. ! **3'. [ECP]{necessary} Show hints may not be working properly - check this out. ! x. [CJS]{highly preferable} Figure out/explain how to set up constrained random generation of constants, in e.g. TrialODE1 -> ! Implemented successfully, each id gets a unique set of random numbers at present ! *4. [ECP]{necessary} Create new model solutions for the trial - i.e. more questions. ! -> More first order simple problems written ! Why are these not automatically generated from one file? ! Why are these not in the Data directory? ! **4b Temporarily remove all 'WE only' lines of working from model solutions ! 5. [ECP]{preferable} Add in further mathematical operations, 'find IF', 'solve by quadratic equation', ... ! 6. [ECP]{preferable} Improve user interface (inc java drop-down menus), add in saving of ids given along with acceptance of T&Cs etc. ! -> Partially done, index.php now includes drop-down menus ! 7. [ECP]{not essential} Expand model solutions to include worked examples. Generate code which displays worked solution from model. ! -> Started, currently all new model solutions include 'WE only' options, but the facility to use this at need has not been implemented ! so they will be commented out for now, as per 4b. ! 8. [ECP]{not essential} Add in an option to allow feedback to be given/displayed _only_ on command. ! 9. [ECP]{ideally} Set 'next step' as the default button, not 'Hide/Unhide'. ! 10. [ECP]{ideally} formbuttons.php : move the hide-unhide option further up the page. At present moving it causes it to stop working! ! Easy; define start of form far higher up the display page and move h/u button... ! x Change 'PartFracEqn' (which allows checking for PF-ing of equations) to work for various ATs, such as int/diff as well ! -> Partially done, see 1. above x [Temporary measure] add in code to find out what browser is being used, and change the <=> display command appropriately. -> No --- 1,67 ---- ! 1. Write script for tutorial recording ! -> Done, just need to review after all options added in pre-Monday ! 2a Write more questions for harder first order problems. ! b Also for second order? ! -> Not for now... ! 3. Although randomisation works on localhosts it doesn't work online! ! -> Hoping this was caused by variables with >2 letter names, changed this - check! ! 4a Add contact e-mail address, as well as online tutorial and additional help files (common entry formats, FAQs, ...) ! b Sort out my university webspace, put some info on there and links to/from the site etc, for anyone browsing for my work etc. ! -> Done, just needs uploading ! 5. Add in further mathematical operations, 'find IF', 'solve by quadratic equation', ... ! -> IF added, others seem to only be necessary for second order problems, so not added for now... ! 6. Add complete sets of tests to testsuite for ATEquations ! 7a Add in filter to generate specific Feedback for the different types of AnswerNotes ATEquations returns ! b Possibly add in checkbox when 'Other option' selected, as to whether AlgEquiv should be checked ! 8. 'Show hints' may not be working properly - check this out. ! -> This now works, but if the last previous line of working is hidden so hint will be too. Theoretically it should be possible to have ! the last not-hidden line show its hint, but for now we will assume that the last line of working will never be hidden! ! 9. Expand model solutions to include worked examples. Generate code which displays worked solution from model. -> Started, currently ! all new model solutions include 'WE only' options, but the facility to use this at need has not been implemented so they will be ! commented out for now, as per 4b. ** Temporarily commented out all 'WE only' lines of working from model solutions, until 3b done ! 10. Add in an option to allow feedback to be given/displayed _only_ on command. ! 11. Set 'next step' as the default button, not 'Hide/Unhide'. ! ! 12. formbuttons.php : move the hide-unhide option further up the page. At present moving it causes it to stop working! ! Easy; define start of form far higher up the display page and move h/u button... ! -> Start of form is already above table but moving it stops it working properly. Long-term: need to figure out why; for now: leave it ! where it is! + x. [ECP] Finish implementing ATEquationfun fully -> Done (~95% - for 100% testing need to add more answertests to test suite) ! x. 1a Once done, need to change equivchecklocate's definition of 'errors' to require both matheq and misapp to be true before setting ! errors as false. Some changes to displaychat may also be needed to show the necessary error messages for the different types once ! they have been set up. ! ! x. [ECP] Add in capacity to provide feedback on misapp errors. Requires: 1. -> Limited feedback added ! ! x. [ECP] Create new model solutions for the trial - i.e. more questions. -> More first order simple problems written ! ! x Write FOETh.html - theory for exact 1st ODEs. ! ! x. [CJS] Figure out/explain how to set up constrained random generation of constants, in e.g. TrialODE1 -> Implemented successfully, ! each id gets a unique set of random numbers at present ! ! x. [ECP]{preferable} Improve user interface (inc java drop-down menus), add in saving of ids given along with acceptance of T&Cs etc. ! -> Partially done, index.php now includes drop-down menus ! ! ! x Change 'PartFracEqn' (which allows checking for PF-ing of equations) to work for various ATs, such as int/diff as well -> Partially ! done, see 1. above x [Temporary measure] add in code to find out what browser is being used, and change the <=> display command appropriately. -> No Index: execnonmathcoms.php =================================================================== RCS file: /cvsroot/stack/ODE/execnonmathcoms.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** execnonmathcoms.php 31 Mar 2008 13:55:31 -0000 1.4 --- execnonmathcoms.php 17 Apr 2008 19:48:29 -0000 1.5 *************** *** 16,19 **** --- 16,21 ---- $in = $ws[0]['value']; + $ws_pos = ODE_locate_step($work_sol,$in); // This is necessary to allow display of hint for first line of question + $this_attempt['ws_pos']=$ws_pos; // This is necessary to allow display of hint for first line of question $this_attempt['in'] = $in; $this_attempt = ODE_process_in($work_sol,$this_attempt); *************** *** 105,109 **** // TEMP2 - Using this option also causes a new line to be generated, exactly the same as the preceding one, when the action has been performed ! if ('show hints' == $action) { $this_attempt = end($attempt); $in = ''; --- 107,111 ---- // TEMP2 - Using this option also causes a new line to be generated, exactly the same as the preceding one, when the action has been performed ! if ('Show hint' == $action) { $this_attempt = end($attempt); $in = ''; Index: index.php =================================================================== RCS file: /cvsroot/stack/ODE/index.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** index.php 4 Apr 2008 14:39:38 -0000 1.7 --- index.php 17 Apr 2008 19:48:29 -0000 1.8 *************** *** 75,79 **** <p>Now choose one of the following options and press START.</p> ! <input type="submit" name="action" value="START" /> --- 75,79 ---- <p>Now choose one of the following options and press START.</p> ! <input type="submit" name="action" value="START" /> *************** *** 256,260 **** </div> ! <!-- <div class="section"> <h3> <a onclick="swapper(IFContainer, 'IFIcon');"> --- 256,260 ---- </div> ! <div class="section"> <h3> <a onclick="swapper(IFContainer, 'IFIcon');"> *************** *** 270,277 **** </div> </div> ! </div> --> </form> </body> </html> \ No newline at end of file --- 270,279 ---- </div> </div> ! </div> </form> + <p>If you have any problems or questions that aren't addressed in the introductory tutorial or the help files attached to the questions, please feel free to <a href="mailto:ce...@ma...?subject=ODE software problem/question">e-mail</a> me.</p> + </body> </html> \ No newline at end of file Index: formbuttons.php =================================================================== RCS file: /cvsroot/stack/ODE/formbuttons.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** formbuttons.php 5 Apr 2008 11:36:51 -0000 1.6 --- formbuttons.php 17 Apr 2008 19:48:29 -0000 1.7 *************** *** 1,12 **** - <!-- Presentational changes made --> <h2>I am about to apply the following mathematical operation:</h2> <p> <table><tr> <td><input type="radio" name="action" value="subst" /> Substitute (eg x=7)</td> <td><input type="radio" name="action" value="partfrac" /> Write in partial fractions (wrt option)</td> <td><input type="radio" name="action" value="factor" /> Factor (wrt option)</td> - <!-- <br /> --> - <td><input type="radio" name="action" value="diff" /> Differentiate (wrt option)</td> - <td><input type="radio" name="action" value="int" /> Integrate (wrt option)</td> </tr> <!-- <br /> --> --- 1,13 ---- <h2>I am about to apply the following mathematical operation:</h2> <p> <table><tr> + <td><input type="radio" name="action" value="intfact" /> Find integrating factor, <b>R</b> (wrt option)</td> + <td><input type="radio" name="action" value="diff" /> Differentiate (wrt option)</td> + <td><input type="radio" name="action" value="int" /> Integrate (wrt option)</td> + </tr> + <tr> <td><input type="radio" name="action" value="subst" /> Substitute (eg x=7)</td> <td><input type="radio" name="action" value="partfrac" /> Write in partial fractions (wrt option)</td> <td><input type="radio" name="action" value="factor" /> Factor (wrt option)</td> </tr> <!-- <br /> --> *************** *** 27,35 **** <br /> Option: <input name="opts" size="50" value="" /> ! <!-- <br /> --> ! </p> ! <p> <input type="submit" name="action" value="Hide/Unhide" />selected lines of working </p> <h2>The result of this operation is the following line:</h2> <font color="red"><i><b>Note: To continue from an earlier point in your working select the relevant line as well as entering all the usual information</b></i></font> --- 28,37 ---- <br /> Option: <input name="opts" size="50" value="" /> ! <br /> <input type="submit" name="action" value="Hide/Unhide" />selected lines of working </p> + + <hr /> + <h2>The result of this operation is the following line:</h2> <font color="red"><i><b>Note: To continue from an earlier point in your working select the relevant line as well as entering all the usual information</b></i></font> *************** *** 40,49 **** <input type="submit" name="submit" value="next step" /> - <input type="submit" name="action" value="Show hint" /> <br /> <p> <input type="submit" name="action" value="Show solution" /> (No further attempts!) </p> ! <h3>Please add any comments you have below:</h3><p> ! <input name="UserCom" size="120" value="" /> <br /> </p> --- 42,53 ---- <input type="submit" name="submit" value="next step" /> <br /> <p> + <input type="submit" name="action" value="Show hint" /> <input type="submit" name="action" value="Show solution" /> (No further attempts!) </p> ! ! <hr /> ! ! <p><b><big>Please add any comments you have:</big></b><input name="UserCom" size="120" value="" /> </p> Index: debug.php =================================================================== RCS file: /cvsroot/stack/ODE/debug.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** debug.php 5 Apr 2008 11:36:51 -0000 1.10 --- debug.php 17 Apr 2008 19:48:29 -0000 1.11 *************** *** 26,29 **** --- 26,31 ---- //*echo "<b><i>printing incacterrors </i></b><br />"; //*var_dump($incacterrors); + //*echo "<b><i>printing opts </i></b><be />"; + //*var_dump($opts); //*echo "</pre>"; Index: execmathscoms.php =================================================================== RCS file: /cvsroot/stack/ODE/execmathscoms.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** execmathscoms.php 5 Apr 2008 11:36:51 -0000 1.10 --- execmathscoms.php 17 Apr 2008 19:48:29 -0000 1.11 *************** *** 85,88 **** --- 85,121 ---- } + /* Integrating factor demo code */ + /* To keep things simple I am going to assume that we are always dealing with ($opt, y) */ + /* f(g,v1,v2):=if(is(1=coeff(lhs(g),'diff(v2(v1),v1)))) then exp(integrate(coeff(lhs(g),v2(v1)),v1)) else "error"; */ + if ('' != $in and 'intfact' == $action) { + $this_attempt['action'] = $action; + $action = "next step"; + if ('' != $opts) { + if ('CAS' == $InteractionMode) { + $in = "if (is(1=coeff(lhs($in),'diff(y($opts),$opts,1)))) then ev(R=exp(integrate(coeff(lhs($in),y($opts)),$opts)),logabs:false) else 0"; + } + $this_attempt['in']=$in; + if (true == $contf) { + $com = 'Integrating factor found for line '.$editthis.', with respect to '.$opts; + } else { + $com = 'Integrating factor found, with respect to '.$opts; + } + $this_attempt['com']=$com; + $ATtype = 'IntFact'; + $this_attempt['ATtype'] = $ATtype; + /* subst_int_const not necessary here as only equations get integration constants in wxMaxima */ + $ATint = "if (is(1=coeff(lhs($LAin),'diff(y($opts),$opts,1)))) then ev(R=exp(integrate(coeff(lhs($LAin),y($opts)),$opts)),logabs:false) else 0"; + $this_attempt['ATint'] = $ATint; + $this_attempt['ATopt'] = $opts; + $this_attempt = ODE_process_in($work_sol,$this_attempt); + if (0===$this_attempt['ATint']) { + $incacterrors = "You cannot find the integrating factor when the coefficient of dy(x)/dx is not 1."; + /* Don't know if this will work properly - i.e., will a new line be generated anyway? */ + } + } else { + $incacterrors = "You must provide the variable with which to find the integrating factor with respect to."; + } + } + /* end */ if ('' != $in and 'int' == $action) { Index: DisplayODE.php =================================================================== RCS file: /cvsroot/stack/ODE/DisplayODE.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DisplayODE.php 11 Feb 2008 11:44:25 -0000 1.8 --- DisplayODE.php 17 Apr 2008 19:48:29 -0000 1.9 *************** *** 12,16 **** <title>Welcome to the ODE trial</title> - <!-- 4-4 insertion - auto-scroll to bottom of page //--> <script type="text/javascript"> <!-- --- 12,15 ---- *************** *** 29,33 **** //--> </script> - <!-- 4-4 insertion ends //--> </head> --- 28,31 ---- *************** *** 96,100 **** } ! echo "</form>\n\n\n"; // form in which questions are edited. --- 94,98 ---- } ! echo "</form>\n\n"; // form in which questions are edited. *************** *** 104,112 **** $end = microtime(true); ! echo '<br />Took: '.($end - $start); ?> ! <br /><a href="index.php">Finish this question and start again.</a> </body> --- 102,110 ---- $end = microtime(true); ! echo 'Took: '.($end - $start).' '; ?> ! <a href="index.php">Finish this question and start again.</a> </body> Index: displaychat.php =================================================================== RCS file: /cvsroot/stack/ODE/displaychat.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** displaychat.php 4 Apr 2008 12:50:24 -0000 1.7 --- displaychat.php 17 Apr 2008 19:48:29 -0000 1.8 *************** *** 2,6 **** // Changes made to conditions for iff/niff display, ftfrom reset added to niff loop ! //$sizeatt = count($attempt); // find out how many lines of working there are... //echo "<b>count(attempt): </b>"; //var_dump($sizeatt); --- 2,6 ---- // Changes made to conditions for iff/niff display, ftfrom reset added to niff loop ! $sizeatt = count($attempt); // find out how many lines of working there are... //echo "<b>count(attempt): </b>"; //var_dump($sizeatt); *************** *** 26,30 **** echo "</td>\n "; } ! if ("Hide/Unhide" != $action and "Show hints" != $action and "Show solution" != $action and "new" != $action) { if (0==$errors) { if ('' != $ftfrom and $ftfrom < $field - 1) { --- 26,30 ---- echo "</td>\n "; } ! if ("Hide/Unhide" != $action and "Show hint" != $action and "Show solution" != $action and "new" != $action) { if (0==$errors) { if ('' != $ftfrom and $ftfrom < $field - 1) { *************** *** 67,80 **** echo "<td></td>"; } else { ! if ('Show hints' === $this_action and array_key_exists('ws_pos',$val)) { // should have "and ($field==$sizeatt-1)" but would need to stop it generating a new attempt each time a hint is sought... if (-1 != $ws_pos) { ! if ('' != $ws[$ws_pos]['hint']) { ! echo '<td>'.$ws[$ws_pos]['hint'].'</td>'; } else { ! echo '<td><i>There is no hint available for this step, sorry.</i></td>'; } } else { ! echo '<td><i>No hint found for this step, sorry.</i></td>'; } } --- 67,82 ---- echo "<td></td>"; } else { ! if ('Show hint' === $this_action and array_key_exists('ws_pos',$val) and ($field==$sizeatt-1)) { // should have "and ($field==$sizeatt-1)" but would need to stop it generating a new attempt each time a hint is sought... if (-1 != $ws_pos) { ! if ('' != $ws[$ws_pos]['hint'] and 0 != $field) { ! echo '<td><font color="blue"><i>'.$ws[$ws_pos]['hint'].'</i></font></td>'; ! } else if ('' != $ws[$ws_pos]['hint'] and 0 == $field) { ! echo '<td><font color="blue"><i>'.$ws[0]['hint'].'</i></font></td>'; } else { ! echo '<td><font color="blue"><i>There is no hint available for this step, sorry.</i></font></td>'; } } else { ! echo '<td><font color="blue"><i>No hint found for this step, sorry.</i></font></td>'; } } *************** *** 104,110 **** --- 106,115 ---- } + //echo "<tr><td colspan=\"5\"></td> <td><input type=\"submit\" name=\"action\" value=\"Hide/Unhide\" />selected lines of working</td></tr>"; //Doesn't work! + echo '</table>'; //var_dump($attempt); + echo '<hr />'; ?> \ No newline at end of file Index: equivchecklocate.php =================================================================== RCS file: /cvsroot/stack/ODE/equivchecklocate.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** equivchecklocate.php 5 Apr 2008 11:36:51 -0000 1.11 --- equivchecklocate.php 17 Apr 2008 19:48:29 -0000 1.12 *************** *** 21,25 **** $caction = $this_attempt['action']; ! $maoplist = array('+', '-', '*', '/', 'int', 'diff', 'opt^', '^opt', 'subst', 'partfrac', 'factor', 'swapSs'); // Misapplication (diagonal) error checking --- 21,25 ---- $caction = $this_attempt['action']; ! $maoplist = array('+', '-', '*', '/', 'intfact', 'int', 'diff', 'opt^', '^opt', 'subst', 'partfrac', 'factor', 'swapSs'); // Misapplication (diagonal) error checking |