From: pkiddie <pk...@us...> - 2005-08-23 16:42:08
|
Update of /cvsroot/stack/stack-1-0/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16623/html Modified Files: Tag: development_xmlrqp help_popup.php Log Message: Student documentation fixed in help_popup Admin first/surname fields added Documentation menus added Details tidied Index: help_popup.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/help_popup.php,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** help_popup.php 19 Jul 2005 13:31:32 -0000 1.3 --- help_popup.php 23 Aug 2005 16:41:58 -0000 1.3.2.1 *************** *** 1,112 **** ! <?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; } ! else if ('stackQuiz' == $variable) { ! $q_field = $stackQuiz[$field]; ! $fn = 'stackQuiz_'.$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> --- 1,224 ---- ! <?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="{$stack_root}/lang/{$lang}/doc/$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; } ! ! else if ('stackQuiz' == $variable) { ! ! $q_field = $stackQuiz[$field]; ! ! $fn = 'stackQuiz_'.$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> ! |