From: Chris S. <san...@us...> - 2005-07-14 11:28:26
|
Update of /cvsroot/stack/stack-1-0/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11575/html Modified Files: admin-menu.txt helpform.php Added Files: help_popup.php Log Message: Index: helpform.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/helpform.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** helpform.php 20 Jun 2005 15:42:53 -0000 1.5 --- helpform.php 14 Jul 2005 11:28:14 -0000 1.6 *************** *** 18,22 **** */ ! echo "<form name=\"stackquestionhelpform\" action=\"{$stack_web_url}doc/help_popup.php\" method=\"POST\">"; ?> <input type="hidden" name="field" value="" /> <input type="hidden" name="variable" value="" /> --- 18,22 ---- */ ! echo "<form name=\"stackquestionhelpform\" action=\"{$stack_web_url}html/help_popup.php\" method=\"POST\">"; ?> <input type="hidden" name="field" value="" /> <input type="hidden" name="variable" value="" /> Index: admin-menu.txt =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/admin-menu.txt,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** admin-menu.txt 14 Jul 2005 08:46:52 -0000 1.12 --- admin-menu.txt 14 Jul 2005 11:28:14 -0000 1.13 *************** *** 16,19 **** --- 16,20 ---- ..menu_Options|documentation.php?action=author_options ..menu_AnswerT|documentation.php?action=author_answertest + ..menu_TestSuite|documentation.php?action=author_testsuite ..menu_PR|documentation.php?action=author_potresp ..menu_FAF|documentation.php?action=author_factsformula --- NEW FILE: help_popup.php --- <?php /** * Generates help files. * This file is used in the help popup windows, for individual fields. * * This is used by both the student and teacher. * * @package documentation * @subpackage Stack */ ?> <head> <title>Stack help!</title> <style type="text/css"> @import url(stack.css); </style> <script type="text/javascript"> window.focus(); </script> <?php include('../stackstd.php'); // HACK for now. $options = stack_options_set(array()); $filename = stack_lang_filename($options,'doc/en_doc.php'); include($filename); include("{$stack_root}/html/htmlstyle.html"); // HACK! $lang = 'en'; $disp_opt = 'LaTeX'; ?> </head> <body> <?php $field = $_POST['field']; $variable = $_POST['variable']; if (array_key_exists('field',$_GET)) { $field = $_GET['field']; } if (array_key_exists('variable',$_GET)) { $variable = $_GET['variable']; } //show_array($_POST); //echo $variable; if ('student' == $field) { include('student_input.php'); } else if('fact' == $variable) { //<a href="javascript:HelpPopup('calc_product_rule','fact');">A fact!</a> // These allow the student to ask for help in the popup window. $fn = $stack_root.'/lang/'.$lang.'/doc/student_factsformula.php'; include($fn); if (array_key_exists($field,$stackFact)) { $name = $stackFact[$field]['name']; $fact = $stackFact[$field]['fact']; $strout = stack_latex_to_html($fact); echo "<h2><img src='$stack_web_url/pics/logo_sm.png' /> $name</h2><p>$strout</p>"; } } else if('all' == $field) { // Then we would like a lot of documentation. // This needs to come after 'fact' $filename=$variable.'.php'; include($filename); } else { if ('stackQuestion' == $variable) { $q_field = $stackQuestion[$field]; $fn = 'stackQuestion_'.$field;} else if ('stackOptions' == $variable) { $q_field = $stackOptions[$field]; $fn = 'stackOptions_'.$field; } else if ('stackQuestionPotResp' == $variable) { $q_field = $stackQuestionPotResp[$field]; $fn = 'stackQuestion_PR_'.$field; } $fd = get_string($fn,'stack',''); echo "<h3>$fd</h3>"; echo $q_field['doc']; echo "<p>"; echo "Name of field: <font color=orange><tt>$field</tt></font>. Type of field: <font color=orange><tt>{$q_field['type']}</tt></font>."; if (array_key_exists('required',$q_field)) { echo " Required: <font color=orange><tt>{$q_field['required']}</tt></font>."; } } ?> </body></html> |