You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(486) |
Jul
(201) |
Aug
(194) |
Sep
(87) |
Oct
(72) |
Nov
(72) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(6) |
Feb
(41) |
Mar
(22) |
Apr
(4) |
May
(12) |
Jun
|
Jul
|
Aug
(42) |
Sep
(21) |
Oct
(14) |
Nov
(10) |
Dec
|
2007 |
Jan
(14) |
Feb
(34) |
Mar
(61) |
Apr
(54) |
May
(140) |
Jun
(184) |
Jul
(164) |
Aug
(130) |
Sep
(241) |
Oct
(175) |
Nov
(148) |
Dec
(96) |
2008 |
Jan
(5) |
Feb
(38) |
Mar
(30) |
Apr
(46) |
May
(25) |
Jun
(22) |
Jul
(5) |
Aug
(17) |
Sep
(2) |
Oct
(100) |
Nov
(83) |
Dec
(33) |
2009 |
Jan
(127) |
Feb
(43) |
Mar
(86) |
Apr
(34) |
May
(50) |
Jun
(168) |
Jul
(48) |
Aug
(66) |
Sep
(38) |
Oct
(75) |
Nov
(113) |
Dec
(72) |
2010 |
Jan
(123) |
Feb
(68) |
Mar
(26) |
Apr
(11) |
May
(39) |
Jun
(131) |
Jul
(56) |
Aug
(79) |
Sep
(69) |
Oct
(17) |
Nov
(166) |
Dec
(32) |
2011 |
Jan
(21) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
(1) |
Nov
(8) |
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Juliette W. <jv...@us...> - 2005-06-14 15:50:17
|
Update of /cvsroot/stack/stack-1-0/other In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8717/other Modified Files: Tag: frontend_dev ListMenu.php Log Message: Added default action to process_input.php Fixed registration screen warning. Index: ListMenu.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/ListMenu.php,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** ListMenu.php 27 Mar 2005 17:53:31 -0000 1.2 --- ListMenu.php 14 Jun 2005 15:50:07 -0000 1.2.4.1 *************** *** 54,57 **** --- 54,58 ---- * @package Menu */ + class ListMenu { *************** *** 128,137 **** */ function ListMenu($basepath, $menufile) ! { $this->_basepath=$basepath; //open menu file ! $menufile='http://'.$_SERVER['SERVER_NAME'].$basepath.$menufile; $handle=@fopen($menufile, 'r'); if (!$handle) { die('<strong>ListMenu was unable to open the menu-structure file: '.$menufile. --- 129,140 ---- */ function ListMenu($basepath, $menufile) ! { $this->_basepath=$basepath; //open menu file ! // $menufile='http://'.$_SERVER['SERVER_NAME'].$basepath.$menufile; ! $handle=@fopen($menufile, 'r'); + if (!$handle) { die('<strong>ListMenu was unable to open the menu-structure file: '.$menufile. *************** *** 140,148 **** ); } ! //sequentially parse each line of file $CurrNodeIndex=0; while ($buffer=fgets($handle, 4096)) { ! $buffer=trim($buffer); --- 143,151 ---- ); } ! //sequentially parse each line of file $CurrNodeIndex=0; while ($buffer=fgets($handle, 4096)) { ! $buffer=trim($buffer); *************** *** 158,162 **** continue; } ! //parse text, link, and target list($text, $link, $target)=array_pad(explode('|',substr($buffer,$level)),3,''); --- 161,165 ---- continue; } ! //parse text, link, and target list($text, $link, $target)=array_pad(explode('|',substr($buffer,$level)),3,''); *************** *** 169,173 **** $parsedURL['scheme']="http"; ! $parsedURL['host']=$_SERVER['SERVER_NAME']; //if link is empty, link to this page --- 172,176 ---- $parsedURL['scheme']="http"; ! $parsedURL['host']=$_SERVER['SERVER_NAME'].'/'; //if link is empty, link to this page *************** *** 202,209 **** 'visible'=>1 ); ! $CurrNodeIndex++; }//end while fclose($handle); --- 205,213 ---- 'visible'=>1 ); ! $CurrNodeIndex++; }//end while + fclose($handle); *************** *** 257,264 **** $PrevLevel=0; $stack=array(); - //build unordered list for ($CurrNodeIndex=0; $CurrNodeIndex<count($menu); $CurrNodeIndex++) { - // ignore invisible nodes if ($menu[$CurrNodeIndex]['visible']==0) { --- 261,266 ---- |
From: Juliette W. <jv...@us...> - 2005-06-14 15:50:16
|
Update of /cvsroot/stack/stack-1-0/frontend_general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8717/frontend_general Modified Files: Tag: frontend_dev process_input.php Log Message: Added default action to process_input.php Fixed registration screen warning. Index: process_input.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/frontend_general/Attic/process_input.php,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** process_input.php 14 Jun 2005 14:27:41 -0000 1.1.2.3 --- process_input.php 14 Jun 2005 15:50:06 -0000 1.1.2.4 *************** *** 55,59 **** } */ ! $action = ''; if (array_key_exists('action',$_GET)) { $action = $_GET['action']; --- 55,59 ---- } */ ! $action = $default_action; if (array_key_exists('action',$_GET)) { $action = $_GET['action']; |
From: Juliette W. <jv...@us...> - 2005-06-14 15:50:15
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8717 Modified Files: Tag: frontend_dev chat.php documentation.php editquiz.php index.php question_bank.php registration_screen.php select_quiz.php update_info.php Log Message: Added default action to process_input.php Fixed registration screen warning. Index: update_info.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/update_info.php,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** update_info.php 13 Jun 2005 13:04:05 -0000 1.1.4.1 --- update_info.php 14 Jun 2005 15:50:06 -0000 1.1.4.2 *************** *** 30,33 **** --- 30,34 ---- include('stackstd.php'); + $default_action = ''; include($stack_root.'/frontend_general/process_input.php'); Index: editquiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/editquiz.php,v retrieving revision 1.10.2.2 retrieving revision 1.10.2.3 diff -C2 -d -r1.10.2.2 -r1.10.2.3 *** editquiz.php 14 Jun 2005 14:27:40 -0000 1.10.2.2 --- editquiz.php 14 Jun 2005 15:50:05 -0000 1.10.2.3 *************** *** 21,24 **** --- 21,25 ---- // (1) Process Input - this sets $action, $user and $username /////////////////////////////////////////////////////////////// + $default_action = 'quiz_choose'; include('frontend_general/process_input.php'); *************** *** 53,61 **** // action = filter Re-display the list of questions, filtered. ! // $action = 'quiz_choose'; ! // ! // if (array_key_exists('action',$_POST)) { ! // $action = $_POST['action']; ! // } // show_array($_POST); --- 54,58 ---- // action = filter Re-display the list of questions, filtered. ! // show_array($_POST); Index: question_bank.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/question_bank.php,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** question_bank.php 13 Jun 2005 13:04:05 -0000 1.3.2.1 --- question_bank.php 14 Jun 2005 15:50:05 -0000 1.3.2.2 *************** *** 29,32 **** --- 29,33 ---- /////////////////////////////////////////////////////////////// include('stackstd.php'); + $default_action = 'startover'; include($stack_root.'/frontend_general/process_input.php'); include('html/trypopupform.html'); Index: index.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/index.php,v retrieving revision 1.17.2.2 retrieving revision 1.17.2.3 diff -C2 -d -r1.17.2.2 -r1.17.2.3 *** index.php 14 Jun 2005 14:27:40 -0000 1.17.2.2 --- index.php 14 Jun 2005 15:50:05 -0000 1.17.2.3 *************** *** 31,34 **** --- 31,35 ---- include('stackstd.php'); + $default_action = ''; include($stack_root.'/frontend_general/process_input.php'); Index: chat.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/chat.php,v retrieving revision 1.8.2.1 retrieving revision 1.8.2.2 diff -C2 -d -r1.8.2.1 -r1.8.2.2 *** chat.php 14 Jun 2005 14:27:40 -0000 1.8.2.1 --- chat.php 14 Jun 2005 15:50:05 -0000 1.8.2.2 *************** *** 14,17 **** --- 14,18 ---- require_once("stackstd.php"); include('stackstd.php'); + $default_action = ''; include($stack_root.'/frontend_general/process_input.php'); require_once("other/ListMenu.php"); Index: select_quiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/select_quiz.php,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** select_quiz.php 13 Jun 2005 13:04:05 -0000 1.1.4.1 --- select_quiz.php 14 Jun 2005 15:50:06 -0000 1.1.4.2 *************** *** 33,36 **** --- 33,37 ---- $action = 'choose_quiz'; include('stackstd.php'); + $default_action = ''; include($stack_root.'/frontend_general/process_input.php'); Index: registration_screen.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/registration_screen.php,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** registration_screen.php 13 Jun 2005 13:04:05 -0000 1.1.4.1 --- registration_screen.php 14 Jun 2005 15:50:06 -0000 1.1.4.2 *************** *** 25,28 **** --- 25,29 ---- /////////////////////////////////////////////////////////////// include('stackstd.php'); + $default_action = ''; include($stack_root.'/frontend_general/process_input.php'); *************** *** 38,42 **** $username = nsf('username',$user); ! echo "<h1>Register as a new user</h1><form action=\"select_quiz.php?expand=$expand\" method=\"post\" name=\"register\" id=\"register\">"; echo '<p>To register as a STACK user, please provide the following information.<p>'; echo '<table><tr><td>Username </td><td><input type="text" name="user[username]" size="25" value="'.stack_s($username).'" alt="User name" /></td><td>'.$err.'</td></tr>'; --- 39,43 ---- $username = nsf('username',$user); ! echo "<h1>Register as a new user</h1><form action=\"select_quiz.php\" method=\"post\" name=\"register\" id=\"register\">"; echo '<p>To register as a STACK user, please provide the following information.<p>'; echo '<table><tr><td>Username </td><td><input type="text" name="user[username]" size="25" value="'.stack_s($username).'" alt="User name" /></td><td>'.$err.'</td></tr>'; Index: documentation.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/documentation.php,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -C2 -d -r1.2.2.2 -r1.2.2.3 *** documentation.php 14 Jun 2005 14:15:07 -0000 1.2.2.2 --- documentation.php 14 Jun 2005 15:50:05 -0000 1.2.2.3 *************** *** 28,31 **** --- 28,32 ---- /////////////////////////////////////////////////////////////// include('stackstd.php'); + $default_action = ''; include($stack_root.'/frontend_general/process_input.php'); |
Update of /cvsroot/stack/stack-1-0/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19877/doc Modified Files: Tag: frontend_dev author_answertest.php author_gettingstarted.php author_options.php author_potresp.php author_questionfields.php Log Message: Add language support to Juliette's new docs Index: author_questionfields.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/doc/Attic/author_questionfields.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** author_questionfields.php 13 Jun 2005 13:04:22 -0000 1.1.2.1 --- author_questionfields.php 14 Jun 2005 15:11:38 -0000 1.1.2.2 *************** *** 110,114 **** foreach( $stackQuestionInst as $field => $q_field) { ! 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>. Required: <font color=orange><tt>$q_field[required]</tt></font>."; --- 110,116 ---- foreach( $stackQuestionInst as $field => $q_field) { ! if (array_key_exists('doc',$q_field)) { ! echo '<br />'.$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>. Required: <font color=orange><tt>$q_field[required]</tt></font>."; *************** *** 125,130 **** foreach( $stackQuestionAttempt as $field => $q_field) { ! echo "<p>Name of field: <font color=orange><tt>$field</tt></font>. Type of field: <font color=orange><tt>$q_field[type]</tt></font>. <br />"; ! echo $q_field[doc]; } --- 127,134 ---- foreach( $stackQuestionAttempt as $field => $q_field) { ! echo "<p>Name of field: <font color=orange><tt>$field</tt></font>. Type of field: <font color=orange><tt>$q_field[type]</tt></font>. <br />"; ! if (array_key_exists('doc',$q_field)) { ! echo '<br />'.$q_field['doc']; ! } } Index: author_potresp.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/doc/Attic/author_potresp.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** author_potresp.php 13 Jun 2005 13:04:22 -0000 1.1.2.1 --- author_potresp.php 14 Jun 2005 15:11:38 -0000 1.1.2.2 *************** *** 6,10 **** * @subpackage Stack */ ! ?> <h1>Help with <em>potential responses</em></h1> --- 6,10 ---- * @subpackage Stack */ ! include('en_doc.php'); ?> <h1>Help with <em>potential responses</em></h1> *************** *** 84,89 **** foreach( $stackQuestionPotResp as $field => $q_field) { ! ! echo "<h3>{$q_field['descript']}</h3> <p>Name of field: <font color=orange><tt>$field</tt></font>. Type of field: <font color=orange><tt>{$q_field['type']}</tt></font>. <br />"; echo $q_field['doc']; --- 84,89 ---- foreach( $stackQuestionPotResp as $field => $q_field) { ! $descript = get_string('stackQuestion_PR_'.$field,'stack'); ! echo "<h3>{$descript}</h3> <p>Name of field: <font color=orange><tt>$field</tt></font>. Type of field: <font color=orange><tt>{$q_field['type']}</tt></font>. <br />"; echo $q_field['doc']; Index: author_gettingstarted.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/doc/Attic/author_gettingstarted.php,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** author_gettingstarted.php 14 Jun 2005 14:15:07 -0000 1.1.2.2 --- author_gettingstarted.php 14 Jun 2005 15:11:38 -0000 1.1.2.3 *************** *** 26,31 **** echo "<table border='1'>\n"; foreach ($question as $key => $val) { echo "<tr>\n <td>"; ! echo "<a href=\"javascript:HelpPopup('$key','stackQuestion');\">{$stackQuestion[$key]['descript']}</a></td>\n"; echo " <td><tt>$val</tt> </td>\n</tr>\n"; } --- 26,33 ---- echo "<table border='1'>\n"; foreach ($question as $key => $val) { + $fieldname = 'stackQuestion_'.$key; + $descript = get_string($fieldname,'stack'); echo "<tr>\n <td>"; ! echo "<a href=\"javascript:HelpPopup('$key','stackQuestion');\">{$descript}</a></td>\n"; echo " <td><tt>$val</tt> </td>\n</tr>\n"; } *************** *** 44,52 **** if ('stackQuestion' == $stackhelp) { ! $descript = $stackQuestion[$command]['descript']; } else if ('stackQuestionPotResp' == $stackhelp) { ! $descript = $stackQuestionPotResp[$command]['descript']; } else if ('stackOptions' == $stackhelp) { ! $descript = $stackOptions[$command]['descript']; } --- 46,57 ---- if ('stackQuestion' == $stackhelp) { ! $fieldname = 'stackQuestion_'.$command; ! $descript = get_string($fieldname,'stack'); } else if ('stackQuestionPotResp' == $stackhelp) { ! $fieldname = 'stackQuestion_PR_'.$command; ! $descript = get_string($fieldname,'stack'); } else if ('stackOptions' == $stackhelp) { ! $fieldname = 'stackOptions_'.$command; ! $descript = get_string($fieldname,'stack'); } *************** *** 159,164 **** <?php stack_doc_dispstackqfield('questionVarsRaw'); ?> field. Please click on the link to the left to read the specific ! documentation on this field. More examples are given ! <a href="#qvars_ex">later</a>.</p> <p>To create a random question we need to modify the previous one slightly so that the fields consist of the following. --- 164,169 ---- <?php stack_doc_dispstackqfield('questionVarsRaw'); ?> field. Please click on the link to the left to read the specific ! documentation on this field. More examples are given in the documentation for ! <?php stack_doc_dispstackqfield('questionVarsRaw'); ?> <p>To create a random question we need to modify the previous one slightly so that the fields consist of the following. *************** *** 440,449 **** <?php // Examples and documentation for the Question Variables. ! $descript = $stackQuestion['questionVarsRaw']['descript']; ! echo "<h2><a name=\"qvars\">$descript</a></h2>\n"; echo $stackQuestion['questionVarsRaw']['doc']; ?> ! <h2><a name="qvars_ex">Examples</a></h2> <p>Simple assignments are of the form <tt>key = value</tt>, for --- 445,454 ---- <?php // Examples and documentation for the Question Variables. ! $descript = get_string('stackQuestion_questionVarsRaw','stack'); ! echo "<h2><a name=\"qvars_ex\">$descript: Examples</a></h2>\n"; echo $stackQuestion['questionVarsRaw']['doc']; ?> ! <p>Simple assignments are of the form <tt>key = value</tt>, for *************** *** 501,506 **** echo " <a href='$url'>functions</a>.</p> "; ?> - - - - --- 506,507 ---- Index: author_answertest.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/doc/Attic/author_answertest.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** author_answertest.php 13 Jun 2005 13:04:21 -0000 1.1.2.1 --- author_answertest.php 14 Jun 2005 15:11:38 -0000 1.1.2.2 *************** *** 7,10 **** --- 7,12 ---- */ + include('en_doc.php'); + ?> <h1>Answer test documentation</h1> Index: author_options.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/doc/Attic/author_options.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** author_options.php 13 Jun 2005 13:04:22 -0000 1.1.2.1 --- author_options.php 14 Jun 2005 15:11:38 -0000 1.1.2.2 *************** *** 7,10 **** --- 7,12 ---- */ + include('en_doc.php'); + ?> |
From: Chris S. <san...@us...> - 2005-06-14 15:11:47
|
Update of /cvsroot/stack/stack-1-0/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19877/html Modified Files: Tag: frontend_dev admin-menu.txt Log Message: Add language support to Juliette's new docs Index: admin-menu.txt =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/admin-menu.txt,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -C2 -d -r1.8.2.2 -r1.8.2.3 *** admin-menu.txt 14 Jun 2005 14:27:41 -0000 1.8.2.2 --- admin-menu.txt 14 Jun 2005 15:11:39 -0000 1.8.2.3 *************** *** 3,10 **** .Questions|question_bank.php ! .New Question|question_bank.php?action=start_new ! .Import Question|question_bank.php?action=upload_xml_file .Quizzes|editquiz.php?action=quiz_choose ! .New Quiz|editquiz.php?action=quiz_new .Reporting|analysis.php .Logout|index.php?action=logout --- 3,10 ---- .Questions|question_bank.php ! ..New|question_bank.php?action=start_new ! ..Import|question_bank.php?action=upload_xml_file .Quizzes|editquiz.php?action=quiz_choose ! ..Quiz|editquiz.php?action=quiz_new .Reporting|analysis.php .Logout|index.php?action=logout |
From: Juliette W. <jv...@us...> - 2005-06-14 14:27:50
|
Update of /cvsroot/stack/stack-1-0/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30116/html Modified Files: Tag: frontend_dev admin-menu.txt Log Message: Removed a couple more warnings. New attempt at admin menu! Index: admin-menu.txt =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/admin-menu.txt,v retrieving revision 1.8.2.1 retrieving revision 1.8.2.2 diff -C2 -d -r1.8.2.1 -r1.8.2.2 *** admin-menu.txt 13 Jun 2005 13:04:06 -0000 1.8.2.1 --- admin-menu.txt 14 Jun 2005 14:27:41 -0000 1.8.2.2 *************** *** 2,25 **** // level // text // link // target // ! .Questions ! ..New|question_bank.php?action=start_new ! ..Import|question_bank.php?action=upload_xml_file ! ..Question Bank |question_bank.php ! ..Authoring Help|documentation.php ! ...Getting Started|documentation.php?action=author_gettingstarted ! ...Common Syntax|documentation.php?action=author_commonsyntax ! ...Question fields|documentation.php?action=author_questionfields ! ...Options|documentation.php?action=author_options ! ...Answer Tests|documentation.php?action=author_answertest ! ...Potential responses|documentation.php?action=author_potresp ! ...FAQ|documentation.php?action=author_faq ! ...Maxima|documentation.php?action=author_maxima ! ...Enabled Maxima functions|documentation.php?action=functions ! .Quizzes ! ..New|editquiz.php?action=quiz_new ! ..Edit|editquiz.php?action=quiz_choose ! ..Preview|select_quiz.php .Reporting|analysis.php .Logout|index.php?action=logout .About STACK |documentation.php?action=about_general ..Install|documentation.php?action=about_install --- 2,22 ---- // level // text // link // target // ! .Questions|question_bank.php ! .New Question|question_bank.php?action=start_new ! .Import Question|question_bank.php?action=upload_xml_file ! .Quizzes|editquiz.php?action=quiz_choose ! .New Quiz|editquiz.php?action=quiz_new .Reporting|analysis.php .Logout|index.php?action=logout + .Help|documentation.php + ..Getting Started|documentation.php?action=author_gettingstarted + ..Common Syntax|documentation.php?action=author_commonsyntax + ..Question fields|documentation.php?action=author_questionfields + ..Options|documentation.php?action=author_options + ..Answer Tests|documentation.php?action=author_answertest + ..Potential responses|documentation.php?action=author_potresp + ..FAQ|documentation.php?action=author_faq + ..Maxima|documentation.php?action=author_maxima + ..Enabled Maxima functions|documentation.php?action=functions .About STACK |documentation.php?action=about_general ..Install|documentation.php?action=about_install |
From: Juliette W. <jv...@us...> - 2005-06-14 14:27:49
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30116 Modified Files: Tag: frontend_dev chat.php editquiz.php index.php Log Message: Removed a couple more warnings. New attempt at admin menu! Index: chat.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/chat.php,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** chat.php 10 Jun 2005 18:40:24 -0000 1.8 --- chat.php 14 Jun 2005 14:27:40 -0000 1.8.2.1 *************** *** 12,51 **** * */ ! session_start(); require_once("other/ListMenu.php"); - require_once("stackstd.php"); - - - //////////////////////////////////////////////// - // (1) Establish user - //////////////////////////////////////////////// - // (2.0) Try to establish the user. - if (array_key_exists('user',$_SESSION)) { - $user = $_SESSION['user']; - } - - - // Deal with slahes in input - if (get_magic_quotes_gpc()) { - /** - * Automatically removes slashes deeply from arrays. - * - * @param $value incoming array. - * @return $value the array with slashed removed. - */ - function stripslashes_deep($value) - { - $value = is_array($value) ? - array_map('stripslashes_deep', $value) : - stripslashes($value); - - return $value; - } - - $_POST = array_map('stripslashes_deep', $_POST); - $_GET = array_map('stripslashes_deep', $_GET); - $_COOKIE = array_map('stripslashes_deep', $_COOKIE); - } $options['Display']='LaTeX'; --- 12,20 ---- * */ ! require_once("stackstd.php"); ! include('stackstd.php'); ! include($stack_root.'/frontend_general/process_input.php'); require_once("other/ListMenu.php"); $options['Display']='LaTeX'; Index: editquiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/editquiz.php,v retrieving revision 1.10.2.1 retrieving revision 1.10.2.2 diff -C2 -d -r1.10.2.1 -r1.10.2.2 *** editquiz.php 13 Jun 2005 13:04:05 -0000 1.10.2.1 --- editquiz.php 14 Jun 2005 14:27:40 -0000 1.10.2.2 *************** *** 8,12 **** * @subpackage Stack */ ! session_start(); require_once("other/ListMenu.php"); require_once("stackstd.php"); --- 8,12 ---- * @subpackage Stack */ ! require_once("other/ListMenu.php"); require_once("stackstd.php"); Index: index.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/index.php,v retrieving revision 1.17.2.1 retrieving revision 1.17.2.2 diff -C2 -d -r1.17.2.1 -r1.17.2.2 *** index.php 13 Jun 2005 13:04:05 -0000 1.17.2.1 --- index.php 14 Jun 2005 14:27:40 -0000 1.17.2.2 *************** *** 29,33 **** // (1) Process Input - this sets $action, $user and $username /////////////////////////////////////////////////////////////// ! $action = 'loginscreen'; include('stackstd.php'); include($stack_root.'/frontend_general/process_input.php'); --- 29,33 ---- // (1) Process Input - this sets $action, $user and $username /////////////////////////////////////////////////////////////// ! include('stackstd.php'); include($stack_root.'/frontend_general/process_input.php'); |
From: Juliette W. <jv...@us...> - 2005-06-14 14:27:49
|
Update of /cvsroot/stack/stack-1-0/frontend_general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30116/frontend_general Modified Files: Tag: frontend_dev process_input.php Log Message: Removed a couple more warnings. New attempt at admin menu! Index: process_input.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/frontend_general/Attic/process_input.php,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** process_input.php 14 Jun 2005 14:15:07 -0000 1.1.2.2 --- process_input.php 14 Jun 2005 14:27:41 -0000 1.1.2.3 *************** *** 21,25 **** session_start(); - require_once('stackstd.php'); $errors = ''; --- 21,24 ---- |
From: Juliette W. <jv...@us...> - 2005-06-14 14:15:16
|
Update of /cvsroot/stack/stack-1-0/frontend_general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23181/frontend_general Modified Files: Tag: frontend_dev process_input.php Log Message: Fixed warning. Index: process_input.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/frontend_general/Attic/process_input.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** process_input.php 13 Jun 2005 13:04:25 -0000 1.1.2.1 --- process_input.php 14 Jun 2005 14:15:07 -0000 1.1.2.2 *************** *** 56,60 **** } */ ! if (array_key_exists('action',$_GET)) { $action = $_GET['action']; --- 56,60 ---- } */ ! $action = ''; if (array_key_exists('action',$_GET)) { $action = $_GET['action']; |
From: Juliette W. <jv...@us...> - 2005-06-14 14:15:15
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23181 Modified Files: Tag: frontend_dev documentation.php Log Message: Fixed warning. Index: documentation.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/documentation.php,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -d -r1.2.2.1 -r1.2.2.2 *** documentation.php 13 Jun 2005 13:04:05 -0000 1.2.2.1 --- documentation.php 14 Jun 2005 14:15:07 -0000 1.2.2.2 *************** *** 41,45 **** } else if ('functions' == $action) { // Documentation on Maxima Functions include($stack_root.'/maximadocs/functions.php'); ! } else { // Other documentation include($stack_root."/doc/{$action}.php"); } --- 41,45 ---- } else if ('functions' == $action) { // Documentation on Maxima Functions include($stack_root.'/maximadocs/functions.php'); ! } else if ('' != $action) { // Other documentation include($stack_root."/doc/{$action}.php"); } |
From: Juliette W. <jv...@us...> - 2005-06-14 14:15:15
|
Update of /cvsroot/stack/stack-1-0/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23181/doc Modified Files: Tag: frontend_dev author_gettingstarted.php Log Message: Fixed warning. Index: author_gettingstarted.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/doc/Attic/author_gettingstarted.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** author_gettingstarted.php 13 Jun 2005 13:04:22 -0000 1.1.2.1 --- author_gettingstarted.php 14 Jun 2005 14:15:07 -0000 1.1.2.2 *************** *** 11,14 **** --- 11,15 ---- include_once("{$stack_root}/scripts/maxima/maximafun.php"); + /** * Display an example of the stack question |
From: Chris S. <san...@us...> - 2005-06-14 11:36:16
|
Update of /cvsroot/stack/stack-1-0/scripts/maxima In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30583/scripts/maxima Modified Files: Tag: frontend_dev stackmaxima.mac Log Message: Index: stackmaxima.mac =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/maxima/stackmaxima.mac,v retrieving revision 1.13 retrieving revision 1.13.2.1 diff -C2 -d -r1.13 -r1.13.2.1 *** stackmaxima.mac 12 Jun 2005 16:10:01 -0000 1.13 --- stackmaxima.mac 14 Jun 2005 11:36:07 -0000 1.13.2.1 *************** *** 455,459 **** /* (1) p is degree 0 in v */ /* (2.1) p is linear in v, and the coefficients have no common factors */ ! /* (2.2) p is linear in v, and the coefficients of v is 1 */ /* (3) p is quadratic, the coefficients have no common factors */ /* and p does not factor over the **rationals** */ --- 455,459 ---- /* (1) p is degree 0 in v */ /* (2.1) p is linear in v, and the coefficients have no common factors */ ! /* (2.2) p is linear in v, and the coefficients of v is -1 */ /* (3) p is quadratic, the coefficients have no common factors */ /* and p does not factor over the **rationals** */ |
From: Chris S. <san...@us...> - 2005-06-14 11:36:15
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30583/scripts Modified Files: Tag: frontend_dev en.php Log Message: Index: en.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/en.php,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** en.php 12 Jun 2005 16:10:00 -0000 1.3 --- en.php 14 Jun 2005 11:36:06 -0000 1.3.2.1 *************** *** 30,33 **** --- 30,34 ---- $string['End'] = 'End'; + // Stack page footer. $string['ThisSTACKVer'] = 'This is STACK version'; $string['ThisPageTook'] = 'This page took approximatly'; *************** *** 39,47 **** $string['QValidquestionnotar'] = '$question variable does not exist!'; $string['QValidMaximaName'] = 'is a Maxima function name.'; ! $string['QInstCASError'] = 'CAS ERROR when instantiated!'; $string['CASError'] = 'CAS ERROR!'; $string['CASError_ans'] = 'The CAS did not process your answer.'; ! $string['QMarkBailOut'] = 'WARNING! bailing out, since the following prn has been visited more than once:'; $string['QTestTeacherInfo'] = 'Information for the teacher'; $string['QTestQuestionNote'] = 'Question note'; --- 40,49 ---- $string['QValidquestionnotar'] = '$question variable does not exist!'; $string['QValidMaximaName'] = 'is a Maxima function name.'; ! $string['QInstCASError'] = 'The CAS generated errors when creating a question version.'; $string['CASError'] = 'CAS ERROR!'; $string['CASError_ans'] = 'The CAS did not process your answer.'; ! $string['QMarkBailOut'] = 'There is an error in the marking procedure, please contact your administrator. (A potential response was visited more than once.)'; + // Teacher's view to try questions. $string['QTestTeacherInfo'] = 'Information for the teacher'; $string['QTestQuestionNote'] = 'Question note'; *************** *** 49,52 **** --- 51,55 ---- $string['QTestTeacherAns'] = "Teacher's answer"; + // $string['YourLastAns'] = 'Your last answer was interpreted as:'; $string['YouHaveNotAns'] = 'Warning: you have not answered this.'; *************** *** 90,94 **** $string['NotSupported'] = 'The string <tt><font color=\'orange\'>{$a[\'key\']}</font></tt> is a legitimate CAS command, but does is not supported in this implementation of STACK. There may be an alternative. If you are in doubt about this, please contact the administrator.'; ! $string['EmptyCASString'] = 'You have an empty <tt>casstring</tt>, which is not permitted.'; $string['ErrorCASString'] = 'The string <font color=\'orange\'><tt>@{$a[\'key\']}@</tt></font> generated the following error(s)'; $string['OddAmpCASString'] = 'You have an odd number of @s, which is not permitted.'; --- 93,98 ---- $string['NotSupported'] = 'The string <tt><font color=\'orange\'>{$a[\'key\']}</font></tt> is a legitimate CAS command, but does is not supported in this implementation of STACK. There may be an alternative. If you are in doubt about this, please contact the administrator.'; ! // Validating the CASText ! $string['EmptyCASString'] = 'You have included a CAS string which is empty. This is not permitted.'; // This occurs when validating CASText For example, a user might type "Factor @ @." $string['ErrorCASString'] = 'The string <font color=\'orange\'><tt>@{$a[\'key\']}@</tt></font> generated the following error(s)'; $string['OddAmpCASString'] = 'You have an odd number of @s, which is not permitted.'; *************** *** 123,127 **** $string['stackQuestion_questionStem'] = 'Question stem'; $string['stackQuestion_questionAns'] = "Teacher's answer"; ! $string['stackQuestion_questionAnsKey'] = "Student's answer key"; $string['stackQuestion_questionAnsVarsRaw'] = 'Feedback variables'; $string['stackQuestion_questionAnsVars'] = '(Internal) Feedback variables'; --- 127,131 ---- $string['stackQuestion_questionStem'] = 'Question stem'; $string['stackQuestion_questionAns'] = "Teacher's answer"; ! $string['stackQuestion_questionAnsKey'] = "Student's answer key"; // The name of the variable to which the student's answer is assigned. $string['stackQuestion_questionAnsVarsRaw'] = 'Feedback variables'; $string['stackQuestion_questionAnsVars'] = '(Internal) Feedback variables'; *************** *** 212,220 **** $string['FacForm_UnPick_morework'] = 'You could still do some more work on the term {$a[0]}. '; ! $string['FacForm_UnPick_intfac'] = 'You need to take out a common integer factor. '; $string['ATFacForm_error_list'] = 'The answer test failed. Please contact your systems administrator'; $string['ATFacForm_error_degreeSA'] = 'The CAS could not establish the algebraic degree of your answer.'; ! $string['ATFacForm_error_float'] = 'You should not use any floating point numbers. Please use only integers, fractions etc.'; $string['ATFacForm_isfactored'] = 'Your answer is factored, well done. '; // needs a space at the end. $string['ATFacForm_notfactored'] = 'Your answer is not factored. '; // needs a space at the end. --- 216,224 ---- $string['FacForm_UnPick_morework'] = 'You could still do some more work on the term {$a[0]}. '; ! $string['FacForm_UnPick_intfac'] = $string['irred_Q_commonint']; $string['ATFacForm_error_list'] = 'The answer test failed. Please contact your systems administrator'; $string['ATFacForm_error_degreeSA'] = 'The CAS could not establish the algebraic degree of your answer.'; ! $string['ATFacForm_error_float'] = 'You should not use any floating point (decimal) numbers. Please use only integers, fractions etc.'; $string['ATFacForm_isfactored'] = 'Your answer is factored, well done. '; // needs a space at the end. $string['ATFacForm_notfactored'] = 'Your answer is not factored. '; // needs a space at the end. |
From: Chris S. <san...@us...> - 2005-06-14 08:42:28
|
Update of /cvsroot/stack/stack-1-0/scripts/maxima/format In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9483/scripts/maxima/format Added Files: Tag: frontend_dev format.pdf Removed Files: Tag: frontend_dev format.ps Log Message: --- NEW FILE: format.pdf --- (This appears to be a binary file; contents omitted.) --- format.ps DELETED --- |
From: Chris S. <san...@us...> - 2005-06-13 16:34:30
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20553/scripts Modified Files: Tag: frontend_dev stackUtility.php Log Message: Index: stackUtility.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackUtility.php,v retrieving revision 1.22 retrieving revision 1.22.2.1 diff -C2 -d -r1.22 -r1.22.2.1 *** stackUtility.php 12 Jun 2005 16:10:01 -0000 1.22 --- stackUtility.php 13 Jun 2005 16:34:21 -0000 1.22.2.1 *************** *** 355,359 **** } ! // (3) Check for missing *'s // hack: This needs some careful thought. // We can't simply check for adjcent letters. For example sin(x) is ok, xsin(x) is not! --- 355,410 ---- } ! // (3) We should only allow certain strings in student's answers. ! // These are kept in $stack_cas['studentAllow'], and are generated on the fly from ! // the CAS docs. ! ! if ($stack_cas['strict']) { ! // Match more then one occurance ! $pat = "|[\?_A-Za-z0-9]+|"; ! preg_match_all($pat,$strout,$out,PREG_PATTERN_ORDER); ! ! ! // Filter out some of these matches. ! $strin_keywords=''; ! foreach($out[0] as $key) { ! // Do we have only numbers, or only 2 characters? ! // These strings are fine. ! preg_match("|[0-9]+|",$key,$justnum); ! ! if (empty($justnum) and strlen($key)>2) { ! $strin_keywords[] = $key; ! } ! } ! ! // Students are only allowed certain strings. ! if ('t' != $seclevel) { ! // Make sure each one is really an allowed keyword ! if (is_array($strin_keywords)) { ! foreach ($strin_keywords as $strinkey) { ! ! if (!in_array(strtoupper($strinkey),$stack_cas['studentAllow'])) { ! // We are in trouble! ! $a = array('key' => stack_s($strinkey)); ! $ret.='<br />'.get_string('UnknownFun','stack',$a); ! } ! } ! } ! } else { // End of keyword checks for students ! // Make sure a teacher has not entered an unsupported function. ! if (is_array($strin_keywords)) { ! foreach ($strin_keywords as $strinkey) { ! ! if (in_array(strtoupper($strinkey),$stack_cas['teacherNotAllow'])) { ! // We are in trouble! ! $a = array('key' => stack_s($strinkey)); ! $ret.='<br />'.get_string('NotSupported','stack',$a); ! } ! } ! } ! ! } ! } ! ! // (4) Check for missing *'s // hack: This needs some careful thought. // We can't simply check for adjcent letters. For example sin(x) is ok, xsin(x) is not! *************** *** 411,464 **** } - // (5) We should only allow certain strings in student's answers. - // These are kept in $stack_cas['studentAllow'], and are generated on the fly from - // the CAS docs. - - if ($stack_cas['strict']) { - // Match more then one occurance - $pat = "|[\?_A-Za-z0-9]+|"; - preg_match_all($pat,$strout,$out,PREG_PATTERN_ORDER); - - - // Filter out some of these matches. - $strin_keywords=''; - foreach($out[0] as $key) { - // Do we have only numbers, or only 2 characters? - // These strings are fine. - preg_match("|[0-9]+|",$key,$justnum); - - if (empty($justnum) and strlen($key)>2) { - $strin_keywords[] = $key; - } - } - - // Students are only allowed certain strings. - if ('t' != $seclevel) { - // Make sure each one is really an allowed keyword - if (is_array($strin_keywords)) { - foreach ($strin_keywords as $strinkey) { - - if (!in_array(strtoupper($strinkey),$stack_cas['studentAllow'])) { - // We are in trouble! - $a = array('key' => stack_s($strinkey)); - $ret.='<br />'.get_string('UnknownFun','stack',$a); - } - } - } - } else { // End of keyword checks for students - // Make sure a teacher has not entered an unsupported function. - if (is_array($strin_keywords)) { - foreach ($strin_keywords as $strinkey) { - - if (in_array(strtoupper($strinkey),$stack_cas['teacherNotAllow'])) { - // We are in trouble! - $a = array('key' => stack_s($strinkey)); - $ret.='<br />'.get_string('NotSupported','stack',$a); - } - } - } - - } - } // Knock off first "<br />", (6 chars) --- 462,465 ---- |
From: Chris S. <san...@us...> - 2005-06-13 16:27:39
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16390/scripts Modified Files: Tag: frontend_dev stackWin.php Log Message: Index: stackWin.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackWin.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** stackWin.php 12 Jun 2005 16:10:01 -0000 1.2 --- stackWin.php 13 Jun 2005 16:27:31 -0000 1.2.2.1 *************** *** 91,95 **** $ret = ''; // read output from stdout ! // $start_time = stack_microtime_float(); $continue = TRUE; while (!feof($pipes[1])) { --- 91,95 ---- $ret = ''; // read output from stdout ! $start_time = stack_microtime_float(); $continue = TRUE; while (!feof($pipes[1])) { |
From: Chris S. <san...@us...> - 2005-06-13 16:22:44
|
Update of /cvsroot/stack/stack-1-0/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13527/html Modified Files: Tag: frontend_dev stack.css Log Message: Index: stack.css =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/stack.css,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** stack.css 28 Mar 2005 11:58:48 -0000 1.2 --- stack.css 13 Jun 2005 16:22:21 -0000 1.2.4.1 *************** *** 44,48 **** #navigation li a.activeLink{ font-style: italic; ! color: #ffefa0; } #content { --- 44,48 ---- #navigation li a.activeLink{ font-style: italic; ! font-weight: bold; } #content { |
From: Chris S. <san...@us...> - 2005-06-13 16:22:44
|
Update of /cvsroot/stack/stack-1-0/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13527/doc Modified Files: author.php Log Message: Index: author.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/doc/author.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** author.php 8 Jun 2005 08:31:17 -0000 1.14 --- author.php 13 Jun 2005 16:22:21 -0000 1.15 *************** *** 125,129 **** you want to store a question you need to login <em>before</em> you start to edit. If you forget to do this all is not lost: ! download your temporary question as an XML file from the question edit page, and login. They you can import is back to the database.</p> --- 125,129 ---- you want to store a question you need to login <em>before</em> you start to edit. If you forget to do this all is not lost: ! export your temporary question as an XML file from the question edit page, and login. They you can import is back to the database.</p> |
From: Juliette W. <jv...@us...> - 2005-06-13 13:13:24
|
Update of /cvsroot/stack/stack-1-0/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12279/doc Removed Files: Tag: frontend_dev help.php helpform.html index.php install.php stackCommonSyntax.php Log Message: Removed some unneeded files. --- helpform.html DELETED --- --- help.php DELETED --- --- install.php DELETED --- --- stackCommonSyntax.php DELETED --- --- index.php DELETED --- |
From: Juliette W. <jv...@us...> - 2005-06-13 13:04:46
|
Update of /cvsroot/stack/stack-1-0/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7154/html Modified Files: Tag: frontend_dev admin-menu.txt index-menu.txt student-menu.txt Log Message: Tweaked the menus. Moved couple of files into separate directory. First sweep at tidying up documentation - note that some of the links previously within pages (using anchors) may need to be removed. Index: index-menu.txt =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/index-menu.txt,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** index-menu.txt 10 Jun 2005 20:23:57 -0000 1.2 --- index-menu.txt 13 Jun 2005 13:04:06 -0000 1.2.2.1 *************** *** 4,14 **** .Login|index.php?action=loginscreen .Register|registration_screen.php ! .Help|documentation.php?action=studenthelp ! .About STACK|documentation.php?action=about ! ..Install|documentation.php?action=install ! ..Develop|documentation.php?action=develop ..Question Bank Demo|question_bank.php ..CAS online Demo|chat.php ! ..Sourceforge|http://sourceforge.net/projects/stack|_blank ..STACK Forum|http://mantis.york.ac.uk/moodle/mod/forum/index.php?id=21|_blank ..Contact|mailto:ch...@sa... --- 4,13 ---- .Login|index.php?action=loginscreen .Register|registration_screen.php ! .About STACK|documentation.php?action=about_general ! ..Install|documentation.php?action=about_install ! ..Develop|documentation.php?action=about_develop ..Question Bank Demo|question_bank.php ..CAS online Demo|chat.php ! ..STACK at Sourceforge|http://sourceforge.net/projects/stack|_blank ..STACK Forum|http://mantis.york.ac.uk/moodle/mod/forum/index.php?id=21|_blank ..Contact|mailto:ch...@sa... Index: student-menu.txt =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/student-menu.txt,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** student-menu.txt 10 Jun 2005 20:23:57 -0000 1.2 --- student-menu.txt 13 Jun 2005 13:04:06 -0000 1.2.2.1 *************** *** 5,17 **** .Update user info|update_info.php?action=userupdate .Logout|index.php?action=logout ! .Help|documentation.php?action=studenthelp ! .About STACK |documentation.php?action=about ! ..Install|documentation.php?action=install ! ..Develop|documentation.php?action=develop ..Question Bank Demo|question_bank.php ..CAS online Demo|chat.php ! ..Sourceforge|http://sourceforge.net/projects/stack|_blank ..STACK Forum|http://mantis.york.ac.uk/moodle/mod/forum/index.php?id=21|_blank - ..Maxima|http://maxima.sourceforge.net/_blank ..Contact|mailto:ch...@sa... . <img src="pics/logo.png" width='120' alt="STACK logo" />|documentation.php?action=logo --- 5,21 ---- .Update user info|update_info.php?action=userupdate .Logout|index.php?action=logout ! .Help |documentation.php?action=student_overview ! ..Practice Mode|documentation.php?action=student_practicemode ! ..Assessment Mode|documentation.php?action=student_assessmentmode ! ..Question formatting|documentation.php?action=student_understandingoutput ! ..Answer Input|documentation.php?action=student_input ! ..Forbidden Answers|documentation.php?action=student_forbidden ! .About STACK |documentation.php?action=about_general ! ..Install|documentation.php?action=about_install ! ..Develop|documentation.php?action=about_develop ..Question Bank Demo|question_bank.php ..CAS online Demo|chat.php ! ..STACK at Sourceforge|http://sourceforge.net/projects/stack|_blank ..STACK Forum|http://mantis.york.ac.uk/moodle/mod/forum/index.php?id=21|_blank ..Contact|mailto:ch...@sa... . <img src="pics/logo.png" width='120' alt="STACK logo" />|documentation.php?action=logo Index: admin-menu.txt =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/admin-menu.txt,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** admin-menu.txt 12 Jun 2005 07:47:06 -0000 1.8 --- admin-menu.txt 13 Jun 2005 13:04:06 -0000 1.8.2.1 *************** *** 2,26 **** // level // text // link // target // ! .Questions|question_bank.php ..New|question_bank.php?action=start_new ..Import|question_bank.php?action=upload_xml_file ! .Quizzes|editquiz.php?action=quiz_choose ..New|editquiz.php?action=quiz_new ! .Preview|select_quiz.php .Reporting|analysis.php .Logout|index.php?action=logout ! .Import|question_bank.php?action=upload_xml_file ! .Help|documentation.php?action=help&field=general ! ..Authoring guide|documentation.php?action=author ! ..Maxima's docs|maximadocs/maxdoc/maxima_toc.html|Maxima_docs ! ..Enabled functions|documentation.php?action=functions ! ..Question fields|documentation.php?action=stackQuestion ! ..Options|documentation.php?action=stackOptions ! ..Answer Tests|documentation.php?action=stackAnswerTest ! ..Potential responses|documentation.php?action=stackQuestionPotResp ! ..Maxima|http://maxima.sourceforge.net/_blank ! .About STACK |documentation.php?action=about ! ..Install|documentation.php?action=install ! ..Develop|documentation.php?action=develop ..CAS online Demo|chat.php ..MathML Demo|chat_mathml.php --- 2,28 ---- // level // text // link // target // ! .Questions ..New|question_bank.php?action=start_new ..Import|question_bank.php?action=upload_xml_file ! ..Question Bank |question_bank.php ! ..Authoring Help|documentation.php ! ...Getting Started|documentation.php?action=author_gettingstarted ! ...Common Syntax|documentation.php?action=author_commonsyntax ! ...Question fields|documentation.php?action=author_questionfields ! ...Options|documentation.php?action=author_options ! ...Answer Tests|documentation.php?action=author_answertest ! ...Potential responses|documentation.php?action=author_potresp ! ...FAQ|documentation.php?action=author_faq ! ...Maxima|documentation.php?action=author_maxima ! ...Enabled Maxima functions|documentation.php?action=functions ! .Quizzes ..New|editquiz.php?action=quiz_new ! ..Edit|editquiz.php?action=quiz_choose ! ..Preview|select_quiz.php .Reporting|analysis.php .Logout|index.php?action=logout ! .About STACK |documentation.php?action=about_general ! ..Install|documentation.php?action=about_install ! ..Develop|documentation.php?action=about_develop ..CAS online Demo|chat.php ..MathML Demo|chat_mathml.php |
From: Juliette W. <jv...@us...> - 2005-06-13 13:04:45
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7154 Modified Files: Tag: frontend_dev documentation.php editquiz.php index.php question_bank.php registration_screen.php select_quiz.php update_info.php Removed Files: Tag: frontend_dev loginregister.php process_input.php Log Message: Tweaked the menus. Moved couple of files into separate directory. First sweep at tidying up documentation - note that some of the links previously within pages (using anchors) may need to be removed. Index: index.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/index.php,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -C2 -d -r1.17 -r1.17.2.1 *** index.php 10 Jun 2005 20:23:56 -0000 1.17 --- index.php 13 Jun 2005 13:04:05 -0000 1.17.2.1 *************** *** 30,34 **** /////////////////////////////////////////////////////////////// $action = 'loginscreen'; ! include('process_input.php'); /////////////////////////////////////////////////////////////// --- 30,35 ---- /////////////////////////////////////////////////////////////// $action = 'loginscreen'; ! include('stackstd.php'); ! include($stack_root.'/frontend_general/process_input.php'); /////////////////////////////////////////////////////////////// Index: update_info.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/update_info.php,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** update_info.php 10 Jun 2005 15:08:19 -0000 1.1 --- update_info.php 13 Jun 2005 13:04:05 -0000 1.1.4.1 *************** *** 29,33 **** /////////////////////////////////////////////////////////////// ! include('process_input.php'); include_once($stack_root."/scripts/stackUser.php"); --- 29,34 ---- /////////////////////////////////////////////////////////////// ! include('stackstd.php'); ! include($stack_root.'/frontend_general/process_input.php'); include_once($stack_root."/scripts/stackUser.php"); --- process_input.php DELETED --- Index: question_bank.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/question_bank.php,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** question_bank.php 10 Jun 2005 20:23:56 -0000 1.3 --- question_bank.php 13 Jun 2005 13:04:05 -0000 1.3.2.1 *************** *** 28,32 **** // (1) Process Input - this sets $action, $user and $username /////////////////////////////////////////////////////////////// ! include('process_input.php'); include('html/trypopupform.html'); include('html/helpform.php'); --- 28,33 ---- // (1) Process Input - this sets $action, $user and $username /////////////////////////////////////////////////////////////// ! include('stackstd.php'); ! include($stack_root.'/frontend_general/process_input.php'); include('html/trypopupform.html'); include('html/helpform.php'); *************** *** 398,402 **** if ('admin'==$user['username']) { stack_db_listquestions('edit',$question_bank_filter); - echo "<p><a href=\"javascript:SelectQ('','upload_xml_file');\">Import questions in XML format</a></p>"; } else { --- 399,402 ---- *************** *** 404,408 **** } - echo "<p><a href=\"javascript:SelectQ('','start_new');\">Author a new question</a> "; echo "<p><a href=\"javascript:SelectQs('export_xml_list');\">Export selected as XML</a> "; echo "<p><a href=\"javascript:SelectQs('edit_metadata');\">Edit metadata</a> "; --- 404,407 ---- Index: registration_screen.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/registration_screen.php,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** registration_screen.php 10 Jun 2005 15:08:18 -0000 1.1 --- registration_screen.php 13 Jun 2005 13:04:05 -0000 1.1.4.1 *************** *** 24,28 **** // (1) Process Input - this sets $action, $user and $username /////////////////////////////////////////////////////////////// ! include('process_input.php'); ////////////////////////////////////////////////////////////// --- 24,29 ---- // (1) Process Input - this sets $action, $user and $username /////////////////////////////////////////////////////////////// ! include('stackstd.php'); ! include($stack_root.'/frontend_general/process_input.php'); ////////////////////////////////////////////////////////////// Index: select_quiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/select_quiz.php,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** select_quiz.php 10 Jun 2005 15:08:18 -0000 1.1 --- select_quiz.php 13 Jun 2005 13:04:05 -0000 1.1.4.1 *************** *** 32,36 **** /////////////////////////////////////////////////////////////// $action = 'choose_quiz'; ! include('process_input.php'); ////////////////////////////////////////////////////////////// --- 32,37 ---- /////////////////////////////////////////////////////////////// $action = 'choose_quiz'; ! include('stackstd.php'); ! include($stack_root.'/frontend_general/process_input.php'); ////////////////////////////////////////////////////////////// *************** *** 41,45 **** // haven't logged out. ! include('loginregister.php'); ////////////////////////////////////////////////////////////// --- 42,46 ---- // haven't logged out. ! include('frontend_general/loginregister.php'); ////////////////////////////////////////////////////////////// --- loginregister.php DELETED --- Index: documentation.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/documentation.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** documentation.php 12 Jun 2005 16:10:00 -0000 1.2 --- documentation.php 13 Jun 2005 13:04:05 -0000 1.2.2.1 *************** *** 27,31 **** // (1) Process Input - this sets $action, $user and $username /////////////////////////////////////////////////////////////// ! include('process_input.php'); ////////////////////////////////////////////////////////////// --- 27,32 ---- // (1) Process Input - this sets $action, $user and $username /////////////////////////////////////////////////////////////// ! include('stackstd.php'); ! include($stack_root.'/frontend_general/process_input.php'); ////////////////////////////////////////////////////////////// *************** *** 33,52 **** ////////////////////////////////////////////////////////////// ! include('html/helpform.php'); ! include('html/pagehead.php'); ! if ('studenthelp' == $action) { // Student help information ! include('doc/help.html'); ! } else if ('logo' == $action) { // Information about the logo ! include('pics/index.php'); ! } else if ('about' == $action) { // Information about STACK ! include('doc/aboutSTACK.php'); } else if ('functions' == $action) { // Documentation on Maxima Functions ! include("maximadocs/functions.php"); } else { // Other documentation ! include("doc/{$action}.php"); } ! include('html/pagefoot.php'); ?> --- 34,49 ---- ////////////////////////////////////////////////////////////// ! include($stack_root.'/html/helpform.php'); ! include($stack_root.'/html/pagehead.php'); ! if ('logo' == $action) { // Information about the logo ! include($stack_root.'/pics/index.php'); } else if ('functions' == $action) { // Documentation on Maxima Functions ! include($stack_root.'/maximadocs/functions.php'); } else { // Other documentation ! include($stack_root."/doc/{$action}.php"); } ! include($stack_root.'/html/pagefoot.php'); ?> Index: editquiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/editquiz.php,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -C2 -d -r1.10 -r1.10.2.1 *** editquiz.php 12 Jun 2005 07:47:06 -0000 1.10 --- editquiz.php 13 Jun 2005 13:04:05 -0000 1.10.2.1 *************** *** 21,25 **** // (1) Process Input - this sets $action, $user and $username /////////////////////////////////////////////////////////////// ! include('process_input.php'); --- 21,25 ---- // (1) Process Input - this sets $action, $user and $username /////////////////////////////////////////////////////////////// ! include('frontend_general/process_input.php'); |
From: Juliette W. <jv...@us...> - 2005-06-13 13:04:35
|
Update of /cvsroot/stack/stack-1-0/frontend_general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7154/frontend_general Added Files: Tag: frontend_dev loginregister.php process_input.php Log Message: Tweaked the menus. Moved couple of files into separate directory. First sweep at tidying up documentation - note that some of the links previously within pages (using anchors) may need to be removed. --- NEW FILE: loginregister.php --- <?php /** * * Welcome to STACK. A system for teaching and assessment using a * computer algebra kernel. * <br> * This file is licensed under the GPL License. * <br> * A copy of the license is in your STACK distribution called * license.txt. If you are missing this file you can obtain * it from: * http://www.stack.bham.ac.uk/license.txt * <br> * Copyright (c) 2005, Christopher James Sangwin * * @author Chris Sangwin C.J...@bh... * @author Laura Naismith L.N...@bh... * * @package Stack */ include_once($stack_root."/scripts/stackUser.php"); // (2.2) Log user into STACK if ('login' == $action) { if (array_key_exists('username',$_POST)) { $username = $_POST['username']; $password = $_POST['password']; $user = stack_user_login($username,$password,$errors); if ($user['loggedin']) { $action = 'welcome'; } } else { $action = 'error'; $error = "No username was specified"; } } // (2.3) Register as a new user if ('register' == $action) { if (array_key_exists('user',$_POST)) { // We have an incoming form with new user information $user = $_POST['user']; if (stack_db_user_get($user['username'])) { $action = 'error'; $errors['user']['username'] = '<font color="red">Username "'.$user['username'].'" already exists.</font>'; $error = $errors['user']['username']; } else { stack_user_information_validate($user,$errors); if (!nsf($errors,'user')) { if ('' != trim($user['password'])) { $user['id'] = stack_db_user_store($user); $user['loggedin'] = TRUE; $action = 'welcome'; } else { $errors['user']['password'] = '<font color="red">Password must be non-empty.</font>'; $action = 'error'; $error = $errors['user']['password']; } } } } } // (2.3) Register as a new user if ('userupdate' == $action and $user['loggedin']) { if (array_key_exists('user',$_POST)) { // We have an incoming form with new user information // Merge posted info with new infor foreach ($_POST['user'] as $key => $val) { $user[$key] = $val; } stack_user_information_validate($user,$errors); if (!nsf($errors,'user')) { if ('' != trim($user['password'])) { $user = stack_db_user_update($user); } else { $errors['user']['password'] = '<font color="red">Password must be non-empty.</font>'; $error = $errors['user']['password']; $action = 'error'; } } } } // If user is not set make sure error message is set. // (2.infty) Store user in the $_SESSION $_SESSION['user'] = $user; ?> --- NEW FILE: process_input.php --- <?php /** * * Welcome to STACK. A system for teaching and assessment using a * computer algebra kernel. * <br> * This file is licensed under the GPL License. * <br> * A copy of the license is in your STACK distribution called * license.txt. If you are missing this file you can obtain * it from: * http://www.stack.bham.ac.uk/license.txt * <br> * Copyright (c) 2005, Christopher James Sangwin * * @author Chris Sangwin C.J...@bh... * @author Laura Naismith L.N...@bh... * * @package Stack */ session_start(); require_once('stackstd.php'); $errors = ''; $user = ''; if (get_magic_quotes_gpc()) { /** * Automatically removes slashes deeply from arrays. * * @param $value incoming array. * @return $value the array with slashed removed. */ function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; } $_POST = array_map('stripslashes_deep', $_POST); $_GET = array_map('stripslashes_deep', $_GET); $_COOKIE = array_map('stripslashes_deep', $_COOKIE); } // The expand variable is needed so that when you move to a next page, the // menu is created with the right part of the menu expanded. /* if (array_key_exists('expand',$_GET)) { $expand = $_GET['expand']; } else { // This is our first visit to the page. $expand = 0; } */ if (array_key_exists('action',$_GET)) { $action = $_GET['action']; } if (array_key_exists('action',$_POST)) { $action = $_POST['action']; } // Establish the user - we always need this to print the header as well as // for other purposes depending on the file. // (2.0) Try to establish the user. if (array_key_exists('user',$_SESSION)) { $user = $_SESSION['user']; $username = $user['username']; } else { // Make sure the user is logged in as a Guest. include_once($stack_root."/scripts/stackUser.php"); $user = stack_user_blank(); } ?> |
From: Juliette W. <jv...@us...> - 2005-06-13 13:04:34
|
Update of /cvsroot/stack/stack-1-0/doc/dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7154/doc/dev Added Files: Tag: frontend_dev Rosetta.pdf testsuite.php todo.php Log Message: Tweaked the menus. Moved couple of files into separate directory. First sweep at tidying up documentation - note that some of the links previously within pages (using anchors) may need to be removed. --- NEW FILE: todo.php --- <h1>STACK version 1.0</h1> <p>This is the first release of the STACK computer aided assessment system. This is a ToDo list, of features to add etc. <?php $todo = array(); $item['title'] = 'Calculus and algebra refreshers booklets'; $item['notes'] = 'Put the questions from the algebra and calculus refreshers into STACK (Santiago)'; $todo[] = $item; $item['title'] = 'HTML'; $item['notes'] = 'Use TtH\'s <pre>\begin{html}...\end{html}</pre> commands rather than the current system.'; $todo[] = $item; $item['title'] = 'Time and dates in general'; $item['notes'] = 'This includes analysis scripts. Time stamps in various places. Quiz due dates etc.'; $todo[] = $item; $item['title'] = 'Marking efficiency'; $item['notes'] = 'When a question has potential responses it should be marked as a batch process, not by repeated use of a CAS process. This will reduce overheads.'; $todo[] = $item; $item['title'] = 'Upload questions on install'; $item['notes'] = 'Upload questions from the demo files on a *new* install of stack.'; $todo[] = $item; $item['title'] = 'Quiz level options'; $item['notes'] = 'We need to do <ol> <li>Mode: practice, assessed, strict</li> <li>Order lists</li> <li>(Due date)</li> </ol>'; $todo[] = $item; $item['title'] = 'Error trapping.'; $item['notes'] = ''; $todo[] = $item; $item['title'] = 'Answer test requests'; $item['notes'] = 'Add answer tests for > and >='; $todo[] = $item; $item['title'] = 'Language support.'; $item['notes'] = 'Very much like the Moodle model. All strings should come from a language database.'; $todo[] = $item; $item['title'] = 'Hints.'; $item['notes'] = 'Add a mechanism where a "hint" may be "purchased" for a mark penalty.'; $todo[] = $item; $item['title'] = 'Add concept of "type" to stackQuestion datatype.'; $item['notes'] = 'Each response should be of a certain "type". The type of an answer affects the way the system deals with it. This includes <ul> <li>The way the question is displayed.</li> <li>The way the answer is entered by the student.</li> <li>The way the answer is validated by the system.</li> <li>The way the answer is marked.</li> </ul> For example <ol> <li>Casstring: This is the default type.<br /> Answers are entered using the cas syntax, currently using an answer box and plain text input. This answers are evaluated by the cas, and echoed back to the student. This will not be in the form they entered.</li> <li>String <br />If passed to the CAS, the answer variable will be a CAS string. <br>\verb$ans1 = "x^2+2", rather than ans1 = x^2+2.$ <br>Hence, it will need to be explicitly passed by the CAS routines if it is to be evaluated correctly.</li> <li>Numbers <br />Of various types....</li> <li>Survey <br>Mathematical support for the question, but the interaction not "marked".</li> <li>Human marked <br>Interaction not "marked" automatically, but a mark can be added later.</li> </ol>'; $todo[] = $item; $item['title'] = 'Multi interaction (part) questions'; $item['notes'] = ''; $todo[] = $item; //show_array($todo); echo "<ol>\n"; foreach($todo as $key => $val) { echo "<li><b>{$val['title']}</b>"; echo "<br .>{$val['notes']}\n"; echo "</li>\n"; } echo "</ol>\n"; ?> --- NEW FILE: Rosetta.pdf --- %PDF-1.2 9 0 obj << /Type/Font /Subtype/Type1 /Name/F1 /FontDescriptor 8 0 R /BaseFont/PNBBBY+CMBX12 /FirstChar 33 /LastChar 196 /Widths[342.6 581 937.5 562.5 937.5 875 312.5 437.5 437.5 562.5 875 312.5 375 312.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 312.5 312.5 342.6 875 531.3 531.3 875 849.5 799.8 812.5 862.3 738.4 707.2 884.3 879.6 419 581 880.8 675.9 1067.1 879.6 844.9 768.5 844.9 839.1 625 782.4 864.6 849.5 1162 849.5 849.5 687.5 312.5 581 312.5 562.5 312.5 312.5 546.9 625 500 625 513.3 343.8 562.5 625 312.5 343.8 593.8 312.5 937.5 625 562.5 625 593.8 459.5 443.8 437.5 625 593.8 812.5 593.8 593.8 500 562.5 1125 562.5 562.5 562.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 675.9 937.5 875 787 750 879.6 812.5 875 812.5 875 0 0 812.5 656.3 625 625 937.5 937.5 312.5 343.8 562.5 562.5 562.5 562.5 562.5 849.5 500 574.1 [...3131 lines suppressed...] 0000199638 00000 n 0000199937 00000 n 0000200236 00000 n 0000201612 00000 n 0000200632 00000 n 0000200931 00000 n 0000201230 00000 n 0000201529 00000 n 0000201996 00000 n 0000202019 00000 n 0000202041 00000 n trailer << /Size 221 /Root 2 0 R /Info 1 0 R >> startxref 202162 %%EOF --- NEW FILE: testsuite.php --- <?php /** * This file runs a testsuite against a particular answer test. * */ session_start(); require_once('../stackstd.php'); /** * Construct a test suite array object. */ function stack_testsuite_construct($at,$sa,$ta,$mark,$atops='',$notes=''){ $ts = array('AnswerTest'=>$at, 'SAns'=>$sa, 'TAns'=>$ta, 'AnsTestOpt'=>$atops, 'ExpectedScore'=> $mark, 'Notes' =>$notes,); return $ts; } // AlgEquiv Answer tests. $testsuite[] = stack_testsuite_construct('AlgEquiv','1/0','x^2-2*x+1',0,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','4^(-1/2)','1/2',1,'','Numbers'); $testsuite[] = stack_testsuite_construct('AlgEquiv','4^(1/2)','sqrt(4)',1,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','0.5','1/2',0,'','Mix of floats and rational numbers'); $testsuite[] = stack_testsuite_construct('AlgEquiv','0.333333333333333','1/3',0,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','SQRT(-1)','%I',1,'','Powers and roots'); $testsuite[] = stack_testsuite_construct('AlgEquiv','x^(1/2)','sqrt(x)',1,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','x','sqrt(x^2)',0,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','abs(x)','sqrt(x^2)',1,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','x-1','(x^2-1)/(x+1)',1,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','(x-1)^2','x^2-2*x+1',1,'','Polynomials and rational function'); $testsuite[] = stack_testsuite_construct('AlgEquiv','(x-1)*(x^2+x+1)','x^3-1',1,'x',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','(x-1)^(-2)','1/(x^2-2*x+1)',1,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','1/n-1/(n+1)','1/(n*(n+1))',1,'x',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','cos(x)','cos(-x)',1,'','Trig functions'); $testsuite[] = stack_testsuite_construct('AlgEquiv','cos(x)^2+sin(x)^2','1',1,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','2*cos(x)^2-1','cos(2*x)',1,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','EXP(%i*%pi)','-1',1,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','LOG(a^2*b)','2*LOG(a)+LOG(b)',1,'','Logarithms'); $testsuite[] = stack_testsuite_construct('AlgEquiv','x','[1,2,3]',0,'','Lists'); $testsuite[] = stack_testsuite_construct('AlgEquiv','[1,2]','[1,2,3]',0,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','[1,2,4]','[1,2,3]',0,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','x','{1,2,3}',0,'','Sets'); $testsuite[] = stack_testsuite_construct('AlgEquiv','{1,2}','{1,2,3}',0,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','[1,2,4]','[1,2,3]',0,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','matrix([1,2],[2,3])','matrix([1,2],[2,3])',1,'','Matrices'); $testsuite[] = stack_testsuite_construct('AlgEquiv','matrix([1,2],[2,3])','matrix([1,2,3],[2,3,3])',0,'',''); $testsuite[] = stack_testsuite_construct('AlgEquiv','matrix([1,2],[2,3])','matrix([1,2],[2,5])',0,'',''); // Integration test $testsuite[] = stack_testsuite_construct('Int','1/0','x^2-2*x+1',0,'',''); $testsuite[] = stack_testsuite_construct('Int','1/0','x^2-2*x+1',0,'x',''); $testsuite[] = stack_testsuite_construct('Int','x^3/3','x^3/3',0,'x',''); $testsuite[] = stack_testsuite_construct('Int','x^3/3+1','x^3/3',0,'x',''); $testsuite[] = stack_testsuite_construct('Int','x^3/3+c','x^3/3',1,'x',''); $testsuite[] = stack_testsuite_construct('Int','2*x','x^3/3',0,'x',''); $testsuite[] = stack_testsuite_construct('Int','sin(2*x)','x^3/3',0,'x',''); $testsuite[] = stack_testsuite_construct('Int','(t-1)^5/5+c','(t-1)^5/5',1,'t',''); // Differentiation test $testsuite[] = stack_testsuite_construct('Diff','1/0','3*x^2',0,'',''); $testsuite[] = stack_testsuite_construct('Diff','1/0','3*x^2',0,'x',''); $testsuite[] = stack_testsuite_construct('Diff','3*x^2','3*x^2',1,'x',''); $testsuite[] = stack_testsuite_construct('Diff','x^4/4','3*x^2',0,'x',''); $testsuite[] = stack_testsuite_construct('Diff','x^4/4+1','3*x^2',0,'x',''); $testsuite[] = stack_testsuite_construct('Diff','x^4/4+c','3*x^2',0,'x',''); // Factored form $testsuite[] = stack_testsuite_construct('FacForm','1/0','x^2-2*x+1',0,'',''); $testsuite[] = stack_testsuite_construct('FacForm','1/0','x^2-2*x+1',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','2*(x-1)','2*x-2',1,'x','Linear integer factors'); $testsuite[] = stack_testsuite_construct('FacForm','2*x-2','2*x-2',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','2*(x+1)','2*x-2',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','2*x+2','2*x-2',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','2*(x+0.5)','2*x+1',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','t*(2*x+1)','t*(2*x+1)',1,'x','Linear factors'); $testsuite[] = stack_testsuite_construct('FacForm','t*x+t','t*(x+1)',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','2*x*(x-3)','2*x^2-6*x',1,'x','Quadratic, with no const'); $testsuite[] = stack_testsuite_construct('FacForm','2*(x^2-3*x)','2*x*(x-3)',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','x*(2*x-6)','2*x*(x-3)',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','(x+2)*(x+3)','(x+2)*(x+3)',1,'x','Quadratic'); $testsuite[] = stack_testsuite_construct('FacForm','(x+2)*(2*x+6)','2*(x+2)*(x+3)',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','(z*x+z)*(2*x+6)','2*z*(x+1)*(x+3)',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','(x+t)*(x-t)','x^2-t^2',1,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','t^2-1','(t-1)*(t+1)',0,'t',''); $testsuite[] = stack_testsuite_construct('FacForm','(2-x)*(3-x)','(x-2)*(x-3)',1,'x','These are delicate cases!'); $testsuite[] = stack_testsuite_construct('FacForm','(1-x)^2','(x-1)^2',1,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','-(1-x)^2','-(x-1)^2',1,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','4*(1-x/2)^2','(x-2)^2',1,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','(x-1)*(x^2+x+1)','x^3-1',1,'x','Cubics'); $testsuite[] = stack_testsuite_construct('FacForm','(1-x)*(2-x)*(3-x)','-x^3+6*x^2-11*x+6',1,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','(x^2-3*x+2)*(3-x)','-x^3+6*x^2-11*x+6',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','(sin(x)+1)*(sin(x)-1)','sin(x)^2-1',0,'sin(x)','Not polynomials in a variable'); $testsuite[] = stack_testsuite_construct('FacForm','7','7',1,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','24*(x-1/4)','24*x-6',1,'x','Factors over other fields'); $testsuite[] = stack_testsuite_construct('FacForm','(x-sqrt(2))*(x+sqrt(2))','x^2-2',1,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','(%i*x-2*%i)','%i*(x-2)',0,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','%i*(x-2)','(%i*x-2*%i)',1,'x',''); $testsuite[] = stack_testsuite_construct('FacForm','(x-%i)*(x+%i)','x^2+1',1,'x',''); //$testsuite[] = stack_testsuite_construct('FacForm','(x-1)*(x+(1+sqrt(3)*%i)/2)*(x+(1-sqrt(3)*%i)/2)','x^3-1',1,'x',''); $testsuite[] = stack_testsuite_construct('SA_factored','1/0','0',0,'x',''); $testsuite[] = stack_testsuite_construct('SA_factored','2*(x-2)','0',1,'x','Linear integer factors'); $testsuite[] = stack_testsuite_construct('SA_factored','2*x-2','0',0,'x',''); $testsuite[] = stack_testsuite_construct('SA_factored','2*(x+0.5)','0',0,'x',''); $testsuite[] = stack_testsuite_construct('SA_factored','(2-x)*(3-x)','0',1,'x','These are delicate cases!'); $testsuite[] = stack_testsuite_construct('SA_factored','(1-x)^2','(x-1)^2',1,'x',''); $testsuite[] = stack_testsuite_construct('SA_expanded','1/0','0',1,'',''); $testsuite[] = stack_testsuite_construct('SA_expanded','x^2-1','0',1,'',''); $testsuite[] = stack_testsuite_construct('SA_expanded','(x-1)*(x+1)','0',0,'',''); $AnswerTestlist = array('AlgEquiv','Diff','Int','FacForm','SA_factored','SA_expanded'); //$AnswerTestlist = array('Int'); //$AnswerTestlist = array('FacForm','SA_factored'); // Now perform the tests, and display the results. $disp = 'LaTeX'; $errors = array(); echo "<h1>Test suite for the AnswerTests</h1>\n"; foreach( $AnswerTestlist as $atest) { echo "<h2>$atest</h2>\n"; echo $stackAnswerTest[$atest]['doc']; $all_passed = TRUE; echo "<table border='1' cellpadding='2'>\n\n"; // (4) Sort out and display the output echo "<tr> <th> pass? </th> <th> TAns </th> <th> SAns </th> <th> Ans </th> <th> Errors </th> <th> RawMark </th> <th> Expected </th> <th> FeedBack </th> <th> AnswerNote </th></tr>"; foreach ($testsuite as $ts) { // (0) Check this is the required AnswerTest. if ($ts['AnswerTest'] == $atest) { $err = ''; // (1) Apply the AnswerTest $this_attempt = stack_apply_answertest($ts['SAns'],$ts['TAns'],$ts['AnswerTest'],$ts['AnsTestOpt'],$disp,$err); // (2) Process $this_attempt $dispans = ''; $errans = ''; if (array_key_exists('Ans',$this_attempt)) { if (array_key_exists('display',$this_attempt['Ans'])) { $dispans=$this_attempt['Ans']['display']; } if (array_key_exists('error',$this_attempt['Ans'])) { $errans='<font color="red">'.$this_attempt['Ans']['error'].'</font>'; } } if (array_key_exists('Valid',$this_attempt)) { if ('false' == $this_attempt['Valid']) { $errans .= ' <font color="red">[invalid]</font>'; } } if (''!=$dispans) { $locs = array(); $dispans = stack_castext_to_display('$$'.$dispans.'$$', $locs , $disp,$errors); // Remove <br clear="all" /> from the beginning. if ('<br clear="all" />'==substr($dispans,0,18)) { $dispans = substr($dispans,18); } } $feedback = ''; if (array_key_exists('FeedBack',$this_attempt)) { $locs = array(); $feedback = stack_castext_to_display($this_attempt['FeedBack'], $locs , $disp,$errors); } if (array_key_exists('RawMark',$this_attempt)) { $rawmark = $this_attempt['RawMark']; } else { $rawmark = NULL; } if ( $ts['ExpectedScore'] == $rawmark ) { $outcome = '<font color="green">pass</font>'; } else { $all_passed = FALSE; $outcome = '<font color="red">fail</font>'; } // (3) Echo notes. echo "<tr>\n"; echo " <td colspan = \"9\">{$ts['Notes']}</td>\n"; echo "</tr>\n"; // (4) Construct the row. echo " <td> $outcome </td>\n"; echo " <td nowrap=\"nowrap\">".stack_s($ts['TAns'])." </td>\n "; echo " <td nowrap=\"nowrap\">".stack_s($ts['SAns'])." </td>\n "; echo " <td> $dispans </td>\n "; echo " <td> $errans </td>\n "; echo " <td> $rawmark </td>\n "; echo " <td> {$ts['ExpectedScore']} </td>\n"; echo " <td> $feedback </td>\n "; if (array_key_exists('AnswerNote',$this_attempt)) { echo " <td> {$this_attempt['AnswerNote']} </td>\n "; } else { echo " <td>   </td>\n "; } echo "</tr>\n"; } // End of check for which AnswerTest this is. } echo "</table></p>\n\n"; // (7) Overall, did all the tests pass if ( $all_passed ) { echo '<h2><font color="green">All tests passed!</font></h2>'; } else { echo '<h2><font color="red">Not all tests passed!</font></h2>'; } echo "<hr />\n"; } ?> |
Update of /cvsroot/stack/stack-1-0/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7154/doc Added Files: Tag: frontend_dev about_develop.php about_general.php about_install.php author_answertest.php author_commonsyntax.php author_faq.php author_gettingstarted.php author_maxima.php author_options.php author_potresp.php author_questionfields.php student_assessmentmode.php student_forbidden.php student_input.php student_overview.php student_practicemode.php student_understandingoutput.php Removed Files: Tag: frontend_dev Rosetta.pdf aboutSTACK.php author.php develop.php help.html stackAnswerTest.php stackHelp.php stackOptions.php stackQuestion.php stackQuestionPotResp.php testsuite.php todo.php Log Message: Tweaked the menus. Moved couple of files into separate directory. First sweep at tidying up documentation - note that some of the links previously within pages (using anchors) may need to be removed. --- stackHelp.php DELETED --- --- NEW FILE: student_forbidden.php --- <a name="forbid"><h2>Forbidden words</h2></a> Suppose that Stack asked you to calculate sin(<font face="SYMBOL">p</font>/4) (for which the answer is of course 2<sup>-1/2</sup>). One cunning plan that might occur to you would be to just enter <tt><font color="GREEN">sin(pi/4)</font></tt> as your answer, leaving the CAS to do all the real work. If this worked, it would remove the whole point, so Stack prevents it. For each question, there are certain "forbidden words" that you are not allowed to use as part of your answer; in the example above, the word "sin" would be forbidden. If you give an answer involving a forbidden word, Stack will tell you, and you will be able to go back and change it without any penalty. --- NEW FILE: author_faq.php --- <?php /** * An authoring guide for STACK questions. * * @package documentation * @subpackage Stack */ ?> <h1><a name="FAQ">Frequently Asked Questions</a></h1> <?php $faqs = array(); $faq['title'] = 'What is LaTeX? Were can I get help learning LaTeX?'; $faq['answer']= '<p>LaTeX is a document preparation system. For STACK questions we only need some simple LaTeX, so please do not be put off. Details about LaTeX are available from <a href="http://www.latex-project.org/guides/">http://www.latex-project.org/guides/</a>. </p> <p>Perhaps a better introduction for those totally new to LaTeX is found <a href="http://www.comp.leeds.ac.uk/andyr/misc/latex/">here</a> with more specific information about <a href="http://www.comp.leeds.ac.uk/andyr/misc/latex/latextutorial9.html">mathematics</a> with examples for you to follow. Note that some of the more complex examples will not work on STACK. Just keep things simple.</p> <p>Another option is <a href="http://www.dessci.com/en/products/texaide/">TeXaide</a>.'; $latexex = array( "x^2", "x_n", "x^{2x}", "\alpha\beta", "\sin(3\pi x)", "\frac{1}{1-n^2}", "\int_a^b x^2\ dx"); $latexstr = '\begin{tabular}{c|c|c} \LaTeX Fragment, ex & \verb#$ex$# & \verb#\\[ ex \\]# \\\\ '."\n"; foreach ($latexex as $key) { $latexstr .= ' \verb# '.$key.' # & $ '.$key.' $ & \\[ '.$key.' \\] \\\\ \hline'."\n"; } $latexstr .= '\end{tabular}'; $latexstr = stack_latex_to_html($latexstr); $faq['answer'] .= "<p>Here are some simple examples</p>$latexstr"; $faqs[] = $faq; $faq['title'] = 'Can I add HTML to CAS-enabled text?'; $faq['answer']= 'Yes: in your CAS-enabled text, anything contained between two tags <tt>< html> stuff < html></tt> structures is kept as HTML and not passed through the LaTeX to HTML converter. You can use these tags to insert references to images etc.'; $faqs[] = $faq; $faq['title'] = 'Why does a Maxima function not work in STACK?'; $faq['answer']= '<p>Not all Maxima functions are enabled by STACK, for obvious security reasons. You can find a list of which functions STACK will allow on <a href="index.php?action=CAS&field=functions">this page</a>. This varies between different installations of STACK. See the next FAQ entry for more information on how to change the setting which generate this page.</p> <p>It may be that your function belongs to a library which STACK does not load by default. Do you need to use Maxima\'s <tt>load</tt> command to use it? If so, you will need to ask your system administrator or the developers to add a <tt>load</tt> command to the file <tt>stackmaxima.mac</tt> so that this library becomes available.</p> <p>You should also be aware that there are also a number of functions defined by STACK which are not standard Maxima functions. The command you need may well not be enabled since you should use one STACK provides instead. Details of these are available <a href="#syntax">here</a>.</p>'; $faqs[] = $faq; $faq['title'] = 'How can I change which Maxima functions STACK allows?'; $faq['answer']= '<p>This is a job for your system administrator, who can alter your installation by changing <pre> public_html/scripts/maxima/maximafun.php </pre> <em>It is not enough to just change this file!</em> You will also need to copy and re-run the script <pre> $stack_root/scripts/install/install.php </pre> as in the install process. This should not re-install the databases or wipe data, but at the end of the file will generate a number of temporary files to reflect your new settings. The most important of these for this purpose is <pre> $stack_logfiles/CASkeywords.php </pre></p>'; $faqs[] = $faq; echo "<ol>"; foreach ($faqs as $key => $faq) { echo " <li><a href=\"#fqa{$key}\">{$faq['title']}</a></li>\n"; } echo "</ol>\n\n"; foreach ($faqs as $key => $faq) { $keyno = $key+1; echo " <h3><a name=\"fqa{$key}\">{$keyno}. {$faq['title']}</a></h3>\n"; echo $faq['answer']; } ?> --- NEW FILE: author_options.php --- <?php /** * Describes the data structure stackOption * * @package documentation * @subpackage Stack */ ?> <h1>Options documentation</h1> <p>A stackOption is the basic way to affect the system. They are an efficient way to transfer information between various parts of the code. There is a cascading system of options. Starting with the system default values, and options actually set at a lower level wil override the current values. </p> <p>In this way we obtain the maximum flexibility, with the maximum consistencey enforced very easily with the minimum of fuss. Note, that changing an option at, for example the quiz level, will alter the behaviour of all questions at a lower level. Hence care needs to be exercised when doing this.</p> <p>Below are details of all the options. Of course it may make no sense to alter options at some levels in the system. The option structure simply defines a coherent mechanism for moving the information around.</p> <?php foreach( $stackOptions as $field => $q_field) { $fd = 'stackOptions_'.$field; $fd = get_string($fd,'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 (is_array($q_field['values'])) { echo "Permissable values: <font color=orange><tt>"; show_array($q_field['values']); echo "</tt></font>"; } $default = $q_field['default']; if ('' == $default) { $default = '[none]'; } if ('html' == $q_field['type']) { echo 'System default value: <br /><font color=orange><tt>'.htmlspecialchars($default).'</tt></font><br />('.$default.').'; } else { echo "System default value: <font color=orange><tt>$default</tt></font>."; } } ?> --- testsuite.php DELETED --- --- stackQuestionPotResp.php DELETED --- --- NEW FILE: author_commonsyntax.php --- <?php /** * Every CAS system is unique, and they all have different input * syntaxs. This file describes some aliases that STACK uses to * sort out some of these problems. * * @package documentation * @subpackage Stack */ ?> <h1>Common syntax, and STACK commands</h1> <p>Every CAS system is unique, and they all have different a syntax for doing the amazing complex tasks they are asked to perform. Each CAS system uses a slightly different syntax, details of which are given in the invaluable <a href="doc/dev/Rosetta.pdf">Rosetta.pdf</a>. This makes moving from one to the other a difficult task! Since many CAS systems allow a synonym (or alias) to be set up, adapting the function name is not an overwhelming task. Furthermore, the vast majority of tasks we need in single variable calculus and algebra CAA can be reduced to these tasks. So by adopting this common syntax more than expected can be achieved. </p> <p>This section contains details of basic functions, STACK specific functions and various ALIAS commands used by STACK to provide users of other CAS systems a more familiar command name. </p> <?php include($stack_root.'/scripts/maxima/stackfun.php'); function disp_cas($type){ global $stack_cmd; echo "<table>\n"; foreach ($stack_cmd as $fun => $vals) { if ($type == $vals['type']) { echo "<tr><td nowrap='nowrap' align='top'><b><a NAME=\"STACK_command_$fun\">$fun</a></b></td> <td nowrap='nowrap' align='top'>{$vals['syntax']}</tt></td> <td>{$vals['doc']}</td></tr>\n"; } } echo "</table>\n"; } ?> <h2>Numbers</h2> <?php disp_cas('num') ?> <h2>Sets, lists and matrices</h2> <p> Lists are entered using brackets, eg <tt>[1,2,3]</tt>. These are native to Maxima.</p> <p> Sets are implemented using the Maxima package <tt>nset</tt> which is automatically loaded by STACK. See the <a href="maximadocs/maxdoc/nset.html">specific documentation</a>. Note that, in addtion to Maxima's use of <tt>set(a1,a2,...,an)</tt> to construct a set with members <em>a1,a2,...,an</em>, STACK allows the use of curly braces: <tt>{a1,a2,...,an}.</tt> </p> <p> Matrices are a standard part of Maxima, and are entered using a syntax like <tt>matrix([1,2,3],[x^2,y^2,z^2]);</tt> </p> <p><em>Warning!</em> Maxima uses "." to signify matrix multiplication, eg <tt>A.B</tt> However, <tt>A*B</tt> is also defined as pointwise multiplication. <!--the <tt>vect</tt> packagefor vector and tensor functions re-defines this to be a <em>commutative</em>operator with strange consequences. Do not use "." for multiplication, use <tt>*</tt>instead.</p> --> With all these things, if the student needs to enter something as an answer, consider setting the optional <?php stack_doc_dispstackqfield('SyntaxHint','stackOptions'); ?> <h2>Trig and "calculator" functions</h2> <p>Basic "calculator" functions would use their "natural" names. The angular measure is always assumed to be <em>radians</em>. This is in keeping with the CAS, but probably not best suited for more elementary school assessment. Similarly <tt>log</tt> is a natural logarithm. </p> <table> <tr> <td> <b>Trig </br> </td> <td><tt>sin(x), cos(x), tan(x)</tt></td> <td> The angular measure is always assumed to be <em>radians</em>.</td> </tr> <tr> <td> <b>Hyperbolic </br> </td> <td><tt>sinh(x), cosh(x), tanh(x)</tt></td></tr> <tr> <td> <b>Logarithms </br> </td> <td><tt>log(x), exp(x)</tt></td> <td> Natural logarithms, and exponential function.</td></tr> </table> <h2>Algebra</h2> <?php disp_cas('algebra') ?> <h2>Calculus</h2> <?php disp_cas('calculus') ?> <h2>Random numbers</h2> <?php disp_cas('rand') ?> The syntax is as follows. <ol> <li>If <tt>x</tt> is an <em>integer</em> return an integer between 0 and <tt>x-1</tt>.</li> <li>If <tt>x</tt> is a <em>float</em> return a float in the range 0 to <tt>x</tt>. </li> <li>If <tt>x</tt> is a <em>list</em> return a randomly selected element.</li> <li>If <tt>x</tt> is a <em>matrix</em> then rand is applied to every element of this matrix, as above.</li> </ol> <p>For the purposes of learning and teaching, we do not need an algorithm which is statistically perfect. We are much more interested in simplicity, efficiency and reproducibility across platforms. Hence, we adopt a linear method.</p> <h2>Plots</h2> In STACK, the <tt>plot</tt> command has been defined to be a wrapper for Maxima's <tt>plot2d</tt> command. Try, for example the following. <pre>@plot(x^2,[x,-1,1])@</pre> To get many plots in one window, we need to define a list of functions, perhaps with Maxima's <a href='maximadocs/maxdoc/maxima_38.html#IDX948'>MAKELIST</a> command. <pre>@(p(k):=x^k,pl:makelist(p(k),k,1,5),plot(pl,[x,-1,1]))@</pre> --- aboutSTACK.php DELETED --- --- NEW FILE: about_general.php --- <?php /** * A short blurb about what STACK is. * * @package documentation * @subpackage Stack */ ?> <p>The STACK system is a sophisticated computer aided assessment package for mathematics, which evaluates the student's answer using a computer algebra system. Hence the student is required to provide their own answer, rather than relying on their selection from a teacher-provided list. Using CAS is a natural tool for random generation of structured problems, establishing mathematical properties of student's answers (eg equivalence with a correct answer) and providing feedback.</p> <p>This system was conceived by <a href='email:ch...@sa...'>Chris Sangwin</a>, and is now part of the <a href='http://maths.york.ac.uk/serving_maths/'>Serving Mathematics in a distributed e-learning environment</a> project.</p> --- Rosetta.pdf DELETED --- --- NEW FILE: about_develop.php --- <?php /** * Details of how to Develop. * * @package documentation * @subpackage Stack */ ?> <h1>Developing STACK</h1> <p>This document is intended for people who wish to develop the code for STACK. Contributions are welcome, please contact the developers at <a href="http://sourceforge.net/projects/stack">sourceforge</a> for more information. <h3>History</h3> STACK has its roots in the AiM CAA system. The original motivation for the project, and core development is by <a href="mailto:ch...@sa...">Chris Sangwin</a>. If you are using STACK please do contact Chris, as it is always a pleasure to hear from users. <table cellpadding='2' border='1'> <tr><td>Nov 2004-April 2005</td><td>Stack 1.0</td><td>STACK project started as part of the Serving Mathematics in a Distributed e-Learning Environment project funded by JISC.</td></tr> <tr><td>Summer 2004</td><td>Previous work</td><td>Core original code written by <a href="mailto:ch...@sa...">Chris Sangwin</a> and Laura Naismith, at the Centre for Educational Technology and Distance Learning, at the University of Birmingham</td></tr> </table> <h2>Obtaining the STACK code</h2> STACK code is hosted on <a href="http://sourceforge.net/projects/stack">sourceforge</a>. The <a href="http://phpdoc.org/index.php">PHPDoc</a> auto-generated documentation is available <a href="api/">here</a>. <h2>Areas in which you can help</h2> Collaborators of all kinds are welcome to come and help out with this project. There are a number of areas in which you can contribute. For example: <UL> <li>Writing and contributing questions.</li> <li>Developing the front end - stand alone or in a VLE <li>Translations to non-English languages</li> <li>New question types and formats <li>New answer tests in Maxima's language. <li>Documentation and authoring guides.</li> </ul> <h2>Coding Guidelines</h2> <p>These have been copied and adapted from the <a href="http://moodle.org/">Moodle</a> coding guidelines and they are here to provide a goal for all code to strive to. It's true that some code falls short in a few areas, but it will all be fixed eventually. All new code definitely must adhere to these standards as closely as possible.</p> <h2>General Rules</h2> <ol class="normaltext"> <li class="spaced">All code files should use the .php extension.</li> <li class="spaced">All template files should use the .html extension.</li> <li class="spaced">All text files should use Unix-style text format (most text editors have this as an option).</li> <li class="spaced">All php tags must be 'full' tags like <font color="#339900"><?php ?></font> ... not 'short' tags like <font color="#339900"><? ?></font>. </li> <li class="spaced">All existing copyright notices must be retained. You can add your own if necessary.</li> <li class="spaced">Each file should include the main stackstd.php configuration file.</li> <li class="spaced">Each frontend file should check that the user is authenticated correctly.</li> <li class="spaced">All variables should be initialised or at least tested for existence using isset() or empty() before they are used.</li> </li> </ol> <h2>Coding Style</h2> <p>I know it can be a little annoying to change your style if you're used to something else, but balance that annoyance against the annoyance of all the people trying later on to make sense of STACK code with mixed styles. There are obviously many good points for and against any style that people use, but the current style just <strong>is</strong>, so please stick to it. </p> <ol class="normaltext"> <li class="spaced"><strong>Indenting</strong> should be consistently 4 spaces. Don't use tabs AT ALL. </li> <li class="spaced"><strong>Variable names</strong> should always be easy-to-read, meaningful lowercase English words. If you really need more than one word then run them together, but keep them short as possible. Use plural names for arrays of objects. <p class="examplecode"><font color="#006600">GOOD: $quiz<br /> GOOD: $errorstring<br /> GOOD: $assignments (for an array of objects)<br /> GOOD: $i (but only in little loops)<br /> <br /> BAD: $Quiz <br /> BAD: $aReallyLongVariableNameWithoutAGoodReason<br /> BAD: $error_string</font></p> </li> <li class="spaced"><strong>Function names</strong> should be simple English lowercase words, and start with the name of the stack and then the module to avoid conflicts, either with othe parts of the code or future applications. Words should be separated by underscores. Parameters should always have sensible defaults if possible. Note there is no space between the function name and the following (brackets). <br /> <p class="examplecode"> <font color="#007700">function </font><font color="#0000BB">forum_set_display_mode</font><font color="#007700">(</font><font color="#0000BB">$mode</font><font color="#007700">=</font><font color="#0000BB">0</font><font color="#007700">) {<br /> global </font><font color="#0000BB">$USER</font><font color="#007700">, </font><font color="#0000BB">$CFG</font><font color="#007700">;<br /> <br /> if (</font><font color="#0000BB">$mode</font><font color="#007700">) {<br /> </font><font color="#0000BB">$USER</font><font color="#007700">-></font><font color="#0000BB">mode </font><font color="#007700">= </font><font color="#0000BB">$mode</font><font color="#007700">;<br /> } else if (empty(</font><font color="#0000BB">$USER</font><font color="#007700">-></font><font color="#0000BB">mode</font><font color="#007700">)) {<br /> </font><font color="#0000BB">$USER</font><font color="#007700">-></font><font color="#0000BB">mode </font><font color="#007700">= </font><font color="#0000BB">$CFG</font><font color="#007700">-></font><font color="#0000BB">forum_displaymode</font><font color="#007700">;<br /> }<br /> }</font></p> </li> <li class="spaced"><strong>Blocks</strong> must always be enclosed in curly braces (even if there is only one line). STACK uses Moodle's style: <p class="examplecode"> <font color="#006600">if (</font><font color="#0000CC">$quiz</font><font color="#006600">-></font><font color="#0000CC">attempts</font><font color="#006600">) {<br /> if (</font><font color="#0000CC">$numattempts </font><font color="#006600">> </font><font color="#0000CC">$quiz</font><font color="#006600">-></font><font color="#0000CC">attempts</font><font color="#006600">) {<br /> </font><font color="#0000CC">error</font><font color="#006600">(</font><font color="#0000BB">$strtoomanyattempts</font><font color="#006600">, </font><font color="#CC0000">"view.php?id=$cm</font><font color="#006600">-></font><font color="#CC0000">id"</font><font color="#006600">);<br /> }<br /> }</font></p> </li> <li class="spaced"><strong>Strings</strong> should be defined using single quotes where possible, for increased speed.<br /> <p class="examplecode"> <font color="#006600">$var = 'some text without any variables';<br /> $var = "with special characters like a new line \n";<br /> $var = 'a very, very long string with a '.$single.' variable in it';<br /> $var = "some $text with $many variables $within it"; </font></p> </li> <li class="spaced"><strong>Comments</strong> should use two or three slashes and line up nicely with the code. <p class="examplecode"><font color="#006600">function </font><font color="#0000BB">forum_get_ratings_mean</font><font color="#007700">(</font><font color="#0000BB">$postid</font><font color="#007700">, </font><font color="#0000BB">$scale</font><font color="#007700">, </font><font color="#0000BB">$ratings</font><font color="#007700">=</font><font color="#0000BB">NULL</font><font color="#007700">) {<br /> </font><font color="#FF8000">/// Return the mean rating of a post given to the current user by others.<br /> /// Scale is an array of possible ratings in the scale<br /> /// Ratings is an optional simple array of actual ratings (just integers)<br /> <br /> </font><font color="#007700">if (!</font><font color="#0000BB">$ratings</font><font color="#007700">) {<br /> </font><font color="#0000BB">$ratings </font><font color="#007700">= array(); </font><font color="#FF8000">// Initialize the empty array</font><font color="#007700"><br /> if (</font><font color="#0000BB">$rates </font><font color="#007700">= </font><font color="#0000BB">get_records</font><font color="#007700">(</font><font color="#DD0000">"forum_ratings"</font><font color="#007700">, </font><font color="#DD0000">"post"</font><font color="#007700">, </font><font color="#0000BB">$postid</font><font color="#007700">)) {<br /> </font><font color="#FF8000">// Process each rating in turn</font><font color="#007700"><br /> foreach (</font><font color="#0000BB">$rates </font><font color="#007700">as </font><font color="#0000BB">$rate</font><font color="#007700">) {</font> <br /> ....etc </p> </li> <li class="spaced"><strong>Space</strong> should be used liberally - don't be afraid to spread things out a little to gain some clarity. Generally, there should be one space between brackets and normal statements, but no space between brackets and variables or functions:<br /> <p class="examplecode"> <font color="#007700">foreach (</font><font color="#0000BB">$objects </font><font color="#007700">as </font><font color="#0000BB">$key </font><font color="#007700">=></font><font color="#0000BB"> $thing</font><font color="#007700">)</font><font color="#006600"> {<br /> </font><font color="#007700"> </font><font color="#0000BB">process($thing);</font><font color="#006600"> <br /> } <br /> <br /> </font><font color="#007700">if (</font><font color="#0000BB">$x </font><font color="#007700">== </font><font color="#0000BB">$y</font><font color="#007700">)</font><font color="#006600"> {<br /> </font><font color="#007700"> </font><font color="#0000BB">$a </font><font color="#007700">= </font><font color="#0000BB">$b</font><font color="#007700">;</font><font color="#006600"><br /> } else if (</font><font color="#0000BB">$x </font><font color="#007700">== </font><font color="#0000BB">$z</font><font color="#006600">) {<br /> </font><font color="#007700"> </font><font color="#0000BB">$a </font><font color="#007700">= </font><font color="#0000BB">$c</font><font color="#007700">;</font><font color="#006600"><br /> } else {<br /> </font><font color="#007700"> </font><font color="#0000BB">$a </font><font color="#007700">= </font><font color="#0000BB">$d</font><font color="#007700">;</font><font color="#006600"><br /> } </font></p> </li> </ol> <p> </p> --- NEW FILE: author_questionfields.php --- <?php /** * Describes the data structure stackQuestion * * @package documentation * @subpackage Stack */ include('en_doc.php'); ?> <h1>Question documentation</h1> <p>A <tt>stackQuestion</tt> is the basic object in the system. Indeed, STACK is designed as a vehicle to manage these questions. Each question contains a number of fields. This page is a reference for each field. </p> <p>If you would like some examples of how to author questions, please refer to the authoring guide instead.</p> <p>Each field in the question has attributes. There is a <tt>type</tt>, and whether or not the field is <tt>required</tt> in a valid question. (Note, the type of a field, should not be confused with the "type" of a question!)</p> <h3><tt>type</tt></h3> There are four main types which occur in a <tt>stackQuestion</tt>. Other types occur as required. <ul> <li> <tt>casstring</tt> is an expression which will be processed by the cas, and is required to be in CAS syntax. Hence in a particular question, this information may well be (indeed is likely to be) cas-specific. <br />When processed by the cas, the result is stored as an array containing the <tt>value</tt>, essentially an un-parsed form of the evaluated expression suitable to be fed back to the CAS, together with a <tt>display</tt> field which is the HTML (or MathML) code for the displayed expression. An <tt>errors</tt> field may or may not be present. There are two processes of checking for errors. <ol> <li> PHP-side processing. This checks for mis-matched parentheses, missing * signs and generally does its best not to attempt to evaluate a syntactically incorrect expression.</li> <li> cas-side processing, of course may generate errors when the evaluation takes place. </li></ol> <li> <tt>castext</tt> is a LaTeX string in which some computer algebra strings have been embedded. These strings are embedded between @ characters. Each of these is treated as a <tt>casstring</tt>. For example, <pre> The expansion of $(x-1)^6$ is @expand( (x-1)^6 )@.</pre> There is a filter which processes <tt>castext</tt> in the context in which it occurs. This context includes a list of variables, and options for the display. </li> <li> <tt>rawkeyval</tt> and <tt>keyval</tt> pair. These fields always occur together. The former is the string input, typed by the user. The latter is the PHP array of values. An example is the field <tt>questionVars</tt>. </li> <li> <tt>meta</tt> These fields are information <em>about</em> the question. For example, the questionID number, who edited the question and so on. These fields appear in the database directlty, while the others are serialized together and stored in the <font color=orange><tt>questionBody</tt></font>. Indeed, this field is used to create the database tables in the first place. </li> </ul> <?php foreach( $stackQuestion as $field => $q_field) { $fd = 'stackQuestion_'.$field; $fd = get_string($fd,'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>. Required: <font color=orange><tt>$q_field[required]</tt></font>."; } ?> <h2>Data type stackQuestionInst</h2> <p>A <tt>stackQuestionInst</tt> is an instantiated version of a <tt>stackQuestion</tt>. It inherits many fields from the <tt>stackQuestion</tt>. There are also many fields with the string \"<tt>Inst</tt>\" appended to the field name, to indicate they are instantiated versions. <p>For example, <font color=orange><tt>questionVarsInst</tt></font> are the <font color=orange><tt>questionVars</tt></font> with their values assigned. <p>Fields in a <tt>stackQuestion</tt> of type <font color=orange><tt>rawkeyvals</tt></font> are <em> not inherited</em> by the </tt>stackQuestionInst</tt>. There is no point storing stings, when we have the parsed, validated <font color=orange><tt>keyvals</tt></font> fields to work with. <?php foreach( $stackQuestionInst as $field => $q_field) { 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>. Required: <font color=orange><tt>$q_field[required]</tt></font>."; } ?> <h2>Data type stackQuestionAttempt</h2> This holds data about each student's attempts as a particular <font color=orange><tt>questionInst</tt></font>. Note that in a fully correct relational database, these would be held in a separate table. However, since each student will generate a new instance, it seems better to store the attempts as an array subfield of the <font color=orange><tt>questionInst</tt></font> itself. This field is <?php foreach( $stackQuestionAttempt as $field => $q_field) { echo "<p>Name of field: <font color=orange><tt>$field</tt></font>. Type of field: <font color=orange><tt>$q_field[type]</tt></font>. <br />"; echo $q_field[doc]; } //echo "<pre>";print_r($stackQuestionInst);echo "</pre>"; ?> --- NEW FILE: author_gettingstarted.php --- <?php /** * An authoring guide for STACK questions. * * @package documentation * @subpackage Stack */ require('html/trypopupform.html'); include_once("$stack_root/scripts/stackAuthor.php"); include_once("{$stack_root}/scripts/maxima/maximafun.php"); /** * Display an example of the stack question * * * @question The question to be displayed. * */ function stack_doc_dispexample($question) { global $stackQuestion; //show_array($question); echo "<table border='1'>\n"; foreach ($question as $key => $val) { echo "<tr>\n <td>"; echo "<a href=\"javascript:HelpPopup('$key','stackQuestion');\">{$stackQuestion[$key]['descript']}</a></td>\n"; echo " <td><tt>$val</tt> </td>\n</tr>\n"; } echo "</table>\n"; } /** * Display, with hyperlinking, the STACK question field name and a link to the help pop-up. * * * @param string $command The command to be displayed * @param string $stackhelp Optional: the help file which contains the field. */ function stack_doc_dispstackqfield($command,$stackhelp='stackQuestion') { global $stackQuestion,$stackQuestionPotResp,$stackOptions; if ('stackQuestion' == $stackhelp) { $descript = $stackQuestion[$command]['descript']; } else if ('stackQuestionPotResp' == $stackhelp) { $descript = $stackQuestionPotResp[$command]['descript']; } else if ('stackOptions' == $stackhelp) { $descript = $stackOptions[$command]['descript']; } echo "<a href=\"javascript:HelpPopup('$command','$stackhelp');\">$descript</a> "; } /** * Display, with hyper-linking, the STACK command * * * @param string $command The command to be displayed */ function stack_doc_dispstackcommand($command) { echo "<a href=\"#STACK_command_{$command}\"><font color=\"orange\"><tt>$command</tt></font></a> "; } ?> <h1><a name=\"author\">Authoring a STACK question</a></h1> <p>A <tt>stackQuestion</tt> is the basic object in the system. Indeed, STACK is designed as a vehicle to manage these questions. This page explains the process of authoring a question, by working through an example. This example uses the online form method. It is possible to edit XML files directly, but this process is not explained here.</p> <h2>A minimal example</h2> <p>Start with a <a href="javascript:NewPopup();">New question</a>. This link will open a pop-up window in which you can edit the question. This link also occurs in the Demonstration >> Question Bank page. Do not be put off by the fact this form looks complicated. There are lots of fields, but only two are compulsory: <ol> <li>The <?php stack_doc_dispstackqfield('questionStem'); ?> is the string actually displayed to the student. ie this is "the question".</li> <li>The <?php stack_doc_dispstackqfield('questionAns'); ?> is the answer to the question.</li> </ol> </p> <p>We are now ready to edit a new question. Into these two fields, enter the following information. It should be possible to cut and paste. <?php $question = array(); $question['questionStem'] = 'Differentiate $(x-1)^3$ with respect to $x$.'; $question['questionAns'] = '3*(x-1)^2'; stack_doc_dispexample($question); ?> Scroll down and click the "edit question" link. Now check for any errors, which should appear under the respective field in red, if so correct them and press "edit question" again. When you are in a position to, click the "Try this question" link. This will take you into another view: the "teacher's view" mode. Click on "validate" and "mark" with different answers. Of course, you can return to the edit form by pressing "edit". The "new_version" is to create a different random version, something we shall cover in a moment.</p> <p>You now have a minimal question working.</p> <p>Note, this question will only remain as long as you are in a session. In order to store the question in STACK's database you need to be logged in as the admin user. Note that currently if you want to store a question you need to login <em>before</em> you start to edit. If you forget to do this all is not lost: download your temporary question as an XML file from the question edit page, and login. They you can import is back to the database.</p> <h2>CAS-enabled text: <tt>castext</tt></h2> <p>Before we consider in detail how to add more features to the question we introduce a datatype <tt>castext</tt>. Many of the fields in a STACK question, such as the <?php stack_doc_dispstackqfield('questionStem'); ?> are of this nominal type, which can be thought of as <em>CAS-enabled text</em>. This is simply LaTeX text, in which CAS commands can be embedded. These CAS commands are executed before the question is displayed to the user.</p> <p><em>Use only simple LaTeX structures, and equations.</em> Only core LaTeX is supported, and experienced users may feel a little disappointed that not all the more complex environments, (such as \begin{eqnarray}) work. If you do not know how to use LaTeX, some simple examples are given in the <a href="#FAQ">FAQ</a>. </p> <p>The following things to remember about <tt>castext</tt>: <ul> <li>Anything enclosed between @ symbols is evaluated by the CAS, and displayed using the display option as an inline equation. This is analogous to using LaTeX's $'s. Note however, that you don't need to use <tt>$@ stuff @$</tt>, and that <tt>@ stuff @</tt> is sufficient.</li> <li>To get a displayed equation centered on a line of its own, use either <tt>$$@ stuff @$$</tt>, <tt>\[@ stuff @\]</tt>,as in LaTeX.</li> <li> Anything between <tt>< html> stuff < html></tt> structures is kept as HTML, and not interpreted as LaTeX. This enables URL's to be included in the text, as well as external images etc. </li> </ul></p> <h2>Random questions</h2> <p>It is common to want to use random numbers in questions. This is straight forward to do, and we make use of the optional <?php stack_doc_dispstackqfield('questionVarsRaw'); ?> field. Please click on the link to the left to read the specific documentation on this field. More examples are given <a href="#qvars_ex">later</a>.</p> <p>To create a random question we need to modify the previous one slightly so that the fields consist of the following. Note, that while a little more complex, this question is no different from the one before. <?php $question = array(); $question['questionVarsRaw'] = 'p = (x-1)^3'; $question['questionStem'] = 'Differentiate @p@ with respect to $x$.'; $question['questionAns'] = 'diff(p,x)'; stack_doc_dispexample($question); ?> Notice that now we have defined a local variable <em>p</em>, and used the <em>value</em> of this in the <?php stack_doc_dispstackqfield('questionStem'); ?>. Hence, the user will not see a "<em>p</em>" on the screen when the question is instantiated, but the <em>value</em> of <em>p</em>.</p> <p>Notice also that in the <?php stack_doc_dispstackqfield('questionAns'); ?>, there is a CAS command to differentiate the value of <em>p</em> with respect to <em>x</em>. It is necessary for the CAS to work out the answer in a random question.</p> <p>We are now in a position to generate a random question. Use the data, as follows.</p> <?php $question = array(); $question['questionVarsRaw'] = "n = 2+rand(3); p = (x-1)^n"; $question['questionStem'] = 'Differentiate @p@ with respect to $x$.'; $question['questionAns'] = 'diff(p,x)'; stack_doc_dispexample($question); ?> <p>In this new example, we have an extra variable <em>n</em> which is defined to be a random number. This is then used to define the variable <em>p</em> which is in turn used in the question itself. Edit your trial question, and in the Teacher's trial window use the "new version" button to get new random versions of the question.</p> <p>When generating random questions in CAA we talk about <em>random numbers</em> when we really mean <em>pseudo-random numbers</em>. To keep track of which random numbers are generated for each user, there is a special command in STACK, which you should use instead of Maxima's random command. This is the <?php stack_doc_dispstackcommand("rand"); ?> command which is a general "random thing" generator. It can be used to generate random numbers and also to make selections from a list. <p>As a specific example of some of these features, try the question illustrated below. This contains random numbers, and also examples of variables and expressions selected from a list. <?php $question = array(); $question['questionVarsRaw'] = "n = rand(5)+3; v = rand([x,s,t]); p = rand([sin(n*v),cos(n*v)])"; $question['questionStem'] = 'Differentiate @p@ with respect to @v@.'; $question['questionAns'] = 'diff(p,v)'; stack_doc_dispexample($question); ?> </p> <h2><a name="author_potential_response">Better feedback via the potential response tree</a></h2> <p>So far we have just compared the student's answer with that of the teacher. This gives the minimum possible feedback, along the lines of "correct" or "incorrect". STACK has a mechanism for you to provide better feedback, and this facility is one of STACK's more important features. In our question we need to find the section of the form which looks like <hr /> <a href="#author_potential_response">Add</a> <input type="input" name="questionPotResp[add]" value="0" size="3" /> <a href="javascript:HelpPopup('all','stackQuestionPotResp');">potential responses.</a> (distracters etc).<br /> <hr /> In this change the 0 to a 2 in the box on the question edit form (not above!) and activate either the "Add" or "Edit question" links. The question edit form will become quite significantly more complex as now you have just added two <a href="javascript:HelpPopup('all','stackQuestionPotResp');">potential responses.</a> It is worth reading the documentation about the <a href="javascript:HelpPopup('all','stackQuestionPotResp');">potential responses</a> before we proceed to examples which illustrate this.</p> <p>As an example, we shall provide feedback which checks <ol> <li>For the correct answer.</li> <li>To see if the student integrated by mistake.</li> </ol> First, check that a variable name appears in the <?php stack_doc_dispstackqfield('questionAnsKey'); ?>, it will probably read <tt>ans1</tt>. Use this variable name to refer to the student's answer in all subsequent work.</p> <p>Ignore, for now, the <?php stack_doc_dispstackqfield('questionAnsVarsRaw'); ?> field, since we do not need to process the student's answer yet.</p> <p>Check the first potential response box, indexed with a No. 0 in the top left hand corner. Assuming you have been following this tutorial, you should find that the box <?php stack_doc_dispstackqfield('SAns','stackQuestionPotResp'); ?> contains the student's answer, expressed as <tt>ans1</tt> and that <?php stack_doc_dispstackqfield('TAns','stackQuestionPotResp'); ?> contains the teacher's answer <tt>diff(p,x)</tt>. Notice that this depends on the variable <tt>p</tt> and also contains a CAS command <tt>diff</tt>, as before.</p> <p>Change the <?php stack_doc_dispstackqfield('AnsTest','stackOptions'); ?> to be <tt>AlgEquiv</tt> (algebraic equivalence test), since although this is the default, we now want to be certain this test is actually used. Leave the <?php stack_doc_dispstackqfield('AnsTestOpt','stackOptions'); ?> blank, since in this case we need no options for the Answer Test.</p> <p><em>DO NOT check the Del box!</em> which would result in this potential response being deleted on the next edit cycle.</p> <p>We are now in a position to decide what outcomes we would like. If the result of this answer test is true, we have established the student's answer is correct. Hence we would like to give one mark. This is achieved by setting the <?php stack_doc_dispstackqfield('RawMarkMod','stackQuestionPotResp'); ?> (labelled "Mark") to be '=', and the <?php stack_doc_dispstackqfield('RawMark','stackQuestionPotResp'); ?> to be 1. Notice, these fields already assume these values by default, so you should not need to do anything. Since we have established that the answer is correct we end the process by choosing the Next field to be -1. Again it already is.</p> <p>What if the answer test was false? We would like to check that the student has not integrated by mistake, and we achieve this by applying another answer test in the potential response node No. 1. To jump to this node, from the false branch of Node No 0., make sure that the "Next" field is set to be 1. This fragment is shown below. <hr /> <table> <tr align=top><td>If...</td> <td><a href="javascript:HelpPopup('RawMarkMod','stackQuestionPotResp');">Mark</a></td> <td><a href="javascript:HelpPopup('RawMark','stackQuestionPotResp');">Value</a></td> <td><a href="javascript:HelpPopup('Penalty','stackQuestionPotResp');">Penalty</a></td> <td colspan='2'><a href="javascript:HelpPopup('FeedBack','stackQuestionPotResp');">Feedback</a></td> <td><a href="javascript:HelpPopup('ApLat','stackQuestionPotResp');">Next</a></td> <td></td></tr> <tr> <td colspan = '4'>............</td></tr> <tr><td>false</td><td> <select name="questionPotResp[0][false][RawMarkMod]"> <option value="=" selected>=</option> <option value="+">+</option> <option value="-">-</option> <option value="=AT">=AT</option> </select></td> <td><input type='text' name='questionPotResp[0][false][RawMark]' size ='4' value='0' /></td> <td><input type='text' name='questionPotResp[0][false][Penalty]' value ='' size =' 3' /></td> <td colspan='2'><textarea name='questionPotResp[0][false][FeedBack]' rows ='1' cols='50'></textarea></td> <td> <select name="questionPotResp[0][false][ApLat]"> <option value="-1">-1</option> <option value="0">0</option> <option value="1" selected>1</option> </selected></td> </tr></table><hr /> We are now in a position to implement the second test, before we do this we need to decide what we want.</p> <p>If the student has integrated, they may or may not have added a constant of integration. If that have added such a constant we don't know what they have used! So, the best way to solve this problem is to differentiate their answer and compare it to the question. This is achieved with the following potential response node. You should examine this carefully, and transfer the values to your question template. <?php $pr = array( 'SAns' => 'diff(ans1,x)','TAns' => 'p','AnsTest' => 'AlgEquiv', 'order' => '1', 'true' => array( 'RawMarkMod' => '=', 'RawMark' => '0', 'FeedBack' => 'It looks like you have integrated instead! Please try again.', 'ApLat' => '-1'), 'false' => array( 'RawMarkMod' => '=', 'RawMark' => '0', 'ApLat' => '-1') ); $errors = array(); @stack_question_edit_potresp('1',$pr,'2',$errors); ?> <p>Another common problem is that, even if the student has given the correct answer, they may have used a quite inappropriate method. For example, they may have expanded out the polynomial and hence give the answer in unfactored form. In this situation, we might like to provide some encouraging feedback to explain to the student what they have done wrong.</p> <p>First, we need to add another potential response: after all, we need to apply another answer test. To do this, go back and Add 1 potential response in a similar way as before. After you have re-loaded the page with the "Add" or "Edit question" link, you should have three potential responses for this question.</p> <p>To use this potential response, edit Node 0, and now change the true branch to make the Next node point to the new Node 2. If we enter Node 2, we know the student has the correct answer. We only need to establish if it is factored or not.</p> <p>To establish that the student's answer is factored we need to use a different <?php stack_doc_dispstackqfield('AnsTest','stackOptions'); ?> In this case we choose <tt>SA_factored</tt> which establishes that the Student's Answer is in factored form. Note that this is similar to the <tt>FacForm</tt> answer test, but it does not provide feedback. Since the purpose of this question is not to see if a student can factor the answer we wish to provide our own feedback. We need to add <tt>x</tt> to the <?php stack_doc_dispstackqfield('AnsTestOpt','stackOptions'); ?> to indicate which variable we are using.</p> <p>We also need to update the marks, since we know the student has the answer correct, we should make sure they get marks in both branches of the potential response node.</p> <p>Last, but certainly not least, we add some positive and encouraging feedback to the false branch. For reference, my node 2. is shown below.</p> <?php $pr = array( 'SAns' => 'ans1','TAns' => 'diff(p,x)','AnsTest' => 'SA_factored', 'AnsTestOpt' => 'x', 'order' => '2', 'true' => array( 'RawMarkMod' => '=', 'RawMark' => '1', 'ApLat' => '-1'), 'false' => array( 'RawMarkMod' => '=', 'RawMark' => '1', 'FeedBack' => 'You should keep your answer in factored form. In this case there is no need to expand out your answer, since the chain rule will help you to differentiate the expression directly.', 'ApLat' => '-1') ); $errors = array(); @stack_question_edit_potresp('1',$pr,'2',$errors); ?> <p>Of course, you can continue to add more potential responses as the need arises. These can test for more subtle errors, based upon the common mistakes student's make. In each case an <?php stack_doc_dispstackqfield('AnsTest','stackOptions'); ?> can be used to make a different kind of distinction between answers. You can also define <?php stack_doc_dispstackqfield('questionAnsVarsRaw'); ?> before the response processing tree is traversed to perform calculations on the student's answer. </p> <h2>Options</h2> <p>There is a tension between system flexibility and the simplicity of the question authoring process. At one end of this spectrum, it should be possible in each question to alter every system feature, from the question stem, answer and number of marks available right through to the fonts used, teacher's email address and the URL for a help page. At the other end of the spectrum, questions need to be authored with a maximum of efficiency. Really, the only compulsory fields need be: <ol> <li>the question stem: i.e. the actual "question" posed to the student, and</li> <li>the answer.</li> </ol> One challenge was to make it possible to author a viable question by only entering this information, and provide a mechanism for other features to adopt sensible default values taken from a context.</p> <p>The solution is a cascading options structure. Options are essentially global variables available for use by questions and quizzes. They assume a default value at the system level which can be overridden at the quiz level, or again at the question level. Although we conceived of a "subject", "quiz", "question" hierarchy, the cascading options structure is flexible enough to cope with any navigation system which is essentially a tree structure. When authoring a question or quiz, you can use the default values to create new questions and quizzes quickly and consistently. In fact, most things turn out to be best represented as an option, including the <?php stack_doc_dispstackqfield('QuVal','stackOptions'); ?> (no. of marks), <?php stack_doc_dispstackqfield('Penalty','stackOptions'); ?>, and even the <?php stack_doc_dispstackqfield('AnsTest','stackOptions'); ?>. There are a wide variety of options, with specific documentation available <a href="index.php?action=help&field=stackOptions">here</a>. </p> <p>The options allow a single question to behave in quite different ways, depending on the values set. Adding new options is a reasonably straightforward, and if STACK does not behave in the way you would like, please propose an alternative and it may be added as an option for others to enjoy. Note that this option structure is somewhat at odds with the ISM Question and Test Interpretability (QTI) view of an assessment item as being entirely self contained. </p> <?php // Examples and documentation for the Question Variables. $descript = $stackQuestion['questionVarsRaw']['descript']; echo "<h2><a name=\"qvars\">$descript</a></h2>\n"; echo $stackQuestion['questionVarsRaw']['doc']; ?> <h2><a name="qvars_ex">Examples</a></h2> <p>Simple assignments are of the form <tt>key = value</tt>, for example, <pre>n = rand(3)+2 p = (n-1)^n</pre> Of course, these assignments can make use of Maxima's functions to manipulate expressions. <pre>p = expand( (x-3)*(x-4) )</pre></p> <p>You can use Maxima's looping structures within Question variables, although the syntax requires this to be of the form <tt>key = value</tt>. In this case, the <tt>key</tt> will be assigned the value <tt>DONE</tt> at the end of the process, unless another value is returned. For example <pre>n = 1 dum1 = FOR a:-3 THRU 26 STEP 7 DO n:n+a </pre> Note, you must use Maxima's syntax <tt>a:-3</tt> here for assignment of <tt>-3</tt> to the variable <tt>a</tt>. The assignment to the dummy variable <tt>dum1</tt> is to ensure every command is of the form <tt>key = value</tt>. Please look at Maxima's documentation for the command <?php $url = $maxima_cmd['DO']['urls'][0]; echo " <a href='maximadocs/maxdoc/$url'>DO</a>.</p> "; ?> You should also look at Maxima's <?php $url = $maxima_cmd['BLOCK']['urls'][0]; echo " <a href='maximadocs/maxdoc/$url'>BLOCK</a>"; ?> which may be useful here for more complex manipulations. Here is another example, which generates a random polynomial. <pre> m = rand([y,x,t]) p = rand(7)+1 q = 0 dum1 = block(for i:1 while i<=p do (q:q+rand(9)*m^p,p:p-1),return(q)) r = int(q,m) </pre> <p>It is also possible to define functions within the Question Variables for use within a question. This is not recommended, and has not been widely tested. For example <pre>dum1 = f(x) := x^2 n = f(4)</pre> Again, the syntax requires this to be of the form <tt>key = value</tt>, so that another dummy assignment has taken place. Please look at Maxima's documentation for <?php $url = $stack_web_url."maximadocs/maxdoc/maxima_39.html#SEC120"; echo " <a href='$url'>functions</a>.</p> "; ?> --- NEW FILE: student_practicemode.php --- <a name="practice"><h2>Practice mode</h2></a> If a test is set up in practice mode, it will say so in the test selection menu, and also at the top of the test page. If so, you can do the same set of questions repeatedly, and mark them by clicking the <b>Mark</b> button at the bottom of the page. The system will tell you whether your answers are right or wrong (except for multiple choice questions) and may give some feedback about any answers that are wrong, but it will not tell you the right answers. You can click the <b>Back</b> button on your browser to get back to the page where you filled in your answers, correct any mistakes, and try again. Alternatively, you can go away and come back some other time; Stack will remember your previous answers, so you can correct any that were wrong, and leave the others as they are. The system will give you a numerical mark for your work which you may find informative, but it does not officially count for anything. For more information about the marking system, see the section on <a href="#assessment">assessment mode</a>. <br /><br /> If you want to see the solutions, you can click the <b>Solutions</b> button at the bottom of the page instead of the <b>Mark</b> button. If you try the test again after doing this, you will get slightly different questions. --- NEW FILE: student_overview.php --- <H1>Help with STACK</H1> <a name="overview"><h2>Overview</h2></a> <b>Stack</b> is a computer system that assists in the teaching of some parts of University mathematics. <br /><br /> The basic idea is that you follow the links and then Stack will present you with a list of questions. There is detailed advice below on how to enter your answers. You can then click the <b>Mark</b> button at the bottom of the page to mark your work. The details of how this works depend on whether Stack is running in practice mode or assessment mode. --- NEW FILE: about_install.php --- <?php /** * Details of how to install STACK. * * @package documentation * @subpackage STACK * */ ?> <h1>Installing STACK</h1> STACK is a collection of PHP scripts, which link together the user, a CAS, and a database over the internet. Hence the system itself requires of a number of extra components. <h3>Platform</h3> The scripts currently released will run on a Linux (or unix) machine or a Microsoft (Windows) platform. <ul> <li><b>Linux:</b> STACK has been tested on a <a href="http://fedora.redhat.com/">Fedora</a> based Linux system running the Apache web server.</li> <li><b>Microsoft:</b> STACK has been tested on Windows XP and Windows 2000 using IIS and <a href="http://www.easyphp.org/">EasyPHP</a>. EasyPHP is by far the easiest platform on which to install STACK. However, this does not seem to be as efficient as Linux and may not be suitable for a production server.</li> </ul> <h3>Components</h3> Regardless of which operating system used, you will need the following components. <ul> <li>A web server, such as <a href="http://www.apache.org/">Apache</a>, running <a href="http://www.php.net/">PHP</a> (at least version 4.3.9), <!--(version 5 if using the CAS Pool)--></li> and <a href="http://www.mysql.com/">MySQL</a> server (at least version 4).<br /> Windows users could use <a href="http://www.easyphp.org/">EasyPHP</a>.</li> <li>You need to convex LaTeX to HTML with <a href="http://hutchinson.belmont.ma.us/tth/">TtH</a>. <li>The computer algebra system (<a href="#cas">see below</a>) <a href="http://maxima.sourceforge.net/">Maxima</a>. Version 5.9.1 (or later) is needed to include graphical support. (Note, for those on a Microsoft platform, the <a href="http://wxmaxima.sourceforge.net/">wxMaxima</a> front end is much better than that distributed with Maxima itself and is well worth installing for testing CAS code outside STACK)</li> <li>For graphical support we have used the <a href="http://www.gnuplot.info/">GNUPLOT</a> package. (Note, this is already supplied on Fedora 3 distributions, and comes with Maxima 5.9.1 on Windows) </ul> Finally of course <ul> <li>The STACK scripts themselves.</li> </ul> <p>The <em>latest</em> stack scripts can be obtained from the CVS on <tt>sourceforge</tt>. For example, anonymous access is via</p> <p><tt>cvs -z3 -d:pserver:ano...@cv...:/cvsroot/stack co -P <?php echo $stack_ver['cvsmodule'] ?> </tt></p> <p> Developer access can be obtained via SSH by</p> <p><tt>export CVS_RSH=ssh<br /> cvs -z3 -d:ext:</tt><em>developername</em><tt>@cvs.sourceforge.net:/cvsroot/stack co -P <?php echo $stack_ver['cvsmodule'] ?> </tt></p> <p>Users of a Microsoft platform should consider using the <a href="http://www.tortoisecvs.org/">tortoise CVS</a> application to obtain the scripts. Details of fields to fill in are available on this <a href="doc/stackcvs.png">screen shot</a>. Note: the module name (underlined in red) should read <font color="red"><?php echo $stack_ver['cvsmodule'] ?></font> <h2>Security</h2> <p><font color="red">WARNING! What these scripts attempt to do is inherently insecure.</font> This system is designed to execute arbitrary third party CAS code on your server, to create mathematical questions. This is inherently insecure, and you should be aware of the dangers. These are <em>in addition</em> to the normal security problems associated with interactive, database driven web sites.</p> <p>The array <pre>$stack_cas['globalForbid']</pre> is generated automatically and contains strings the system attempts not to execute. You should look at the file <tt>scripts/maxima/maximafun.php</tt> and the array distributed, together with the CAS documentation, to decide which CAS commands you wish to prevent from being executed on your server. This list is not comprehensive, and you should make your own decisions here. <font color="red"><em>You have been warned!</em></font> <h2><a href="http://www.php.net/">PHP</a></h2> STACK needs no special PHP settings, although the function <tt>proc_open</tt> must be available to establish a connection with the external applications. <p>For mail, use the <a href="http://pear.php.net/">pear class</a>. For example in Linux, to install this from the command line, type <tt>pear install mail</tt>, for example.<br /> You will need to install, <tt>mail, NET_Socket, NET_SMTP, Auth_SASL</tt>.</p> <!-- <p>There are two ways to use the scripts, as follows.</p> <h3>1. A direct connection with the CAS.</h3> <p>This is the method used when <tt>$stack_os</tt> is set to be either of <tt>'win'</tt> or <tt>'unix'</tt>. Each request to the CAS starts up and shuts down a CAS process. Note, each item may use the CAS on many occasions when traversing the potential response tree to mark a student's answer. <h3>2. Starting a pool of CAS processes.</h3> <p>This method uses command line PHP to open and manage a pool of CAS processes. The scripts then connect to the pool using sockets on the local machine. To use this method, <tt>$stack_os</tt> is set to be <tt>'unix-pool'</tt>. </p> <p>This removes the overhead of starting a new CAS process each time, and hence loading and compiling all the libraries. However, this requires PHP 5 to get access to the process control functions to for... [truncated message content] |
From: Juliette W. <jv...@us...> - 2005-06-13 13:01:57
|
Update of /cvsroot/stack/stack-1-0/frontend_general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5577/frontend_general Log Message: Directory /cvsroot/stack/stack-1-0/frontend_general added to the repository --> Using per-directory sticky tag `frontend_dev' |