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: Chris S. <san...@us...> - 2005-10-27 14:39:33
|
Update of /cvsroot/stack/stack-1-0/scripts/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10711/scripts/install Modified Files: stackBackup.php Log Message: Index: stackBackup.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/install/stackBackup.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** stackBackup.php 27 Oct 2005 14:35:13 -0000 1.1 --- stackBackup.php 27 Oct 2005 14:39:22 -0000 1.2 *************** *** 9,12 **** --- 9,13 ---- * Include the stack settings. */ + session_start(); require('../../stackConfig.php'); require('../../stackLib.php'); *************** *** 16,19 **** --- 17,30 ---- $file_names = NULL; + $user['id'] = 0; + if (array_key_exists('user',$_SESSION)) { + $user = $_SESSION['user']; + } + + if (-1 != $user['id'] and !$user['loggedin']) { + die("Only the admin user may backup an entire site."); + } + + ?> <html> |
From: Chris S. <san...@us...> - 2005-10-27 14:35:21
|
Update of /cvsroot/stack/stack-1-0/scripts/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9469/scripts/install Added Files: stackBackup.php Log Message: --- NEW FILE: stackBackup.php --- <?php /** * Installs the various functions needed by STACK. * @package install * @subpackage Stack */ /** * Include the stack settings. */ require('../../stackConfig.php'); require('../../stackLib.php'); include_once("{$stack_root}/scripts/stackXML.php"); $file_names = NULL; ?> <html> <head> </head> <hody> <h1>STACK backup.</h1> <h2>Backup all quizzes, including their questions.</h2> <?php /** * Include the stack settings. */ $quiz_store = stack_db_quiz_get(); foreach($quiz_store as $quizs) { $quizid = $quizs['quizid']; $quiz = stack_db_quiz_get($quizid); stack_xml_remove_quiz_meta_defaults($quiz); //Pass quiz by reference and remove all default metadata $name = stack_xml_write_quiz($quiz,"{$stack_root}/{$stack_tmpdir}/"); $file_names[] = $name; echo get_string('FE_quiz_download','stack',''). "<a href='{$stack_web_url}tmp/{$name}'>$name</a>.<br />"; } ?> <h2>Backup all questions, not in quizzes.</h2> <?php $query = 'SELECT questionID, questionName, questionKeywords FROM stackQuestion'; $result = stack_db_query($query); if(0 != mysql_num_rows($result)) { $question_store = NULL; echo '<table>'; $trcol = FALSE; for ($i = 0; $i < mysql_num_rows($result); $i++) { $row = mysql_fetch_row($result); $usage = stack_db_quiz_question_use_report($row[0]); if (FALSE === $usage) { $trcol = !$trcol; $qkeywords = stripslashes($row[2]); if ('' == $row[1]) { $qname = ''; } else { $qname = stripslashes($row[1]); } if ($trcol) { echo "\n<tr bgcolor='#DDDDDD'>\n"; } else { echo "\n<tr bgcolor='#DDDDFF'>\n"; } echo(' <td>' . $row[0] . "</td>\n"); echo(' <td>' . $qname . "</td>\n"); echo(' <td>' . $qkeywords . "</td>\n"); echo "</tr>\n"; $question_store[]=$row[0]; } } echo '</table>'; if (NULL !== $question_store) { $name = stack_xml_write_question_list($question_store, "{$stack_root}/{$stack_tmpdir}/"); $file_names[] = $name; echo "<p>Please download the file <a href='{$stack_web_url}tmp/{$name}'>$name</a>.</p>"; } } else { echo "<p>No unused questions!</p>"; } show_array($file_names); ?> </body> </html> |
From: Chris S. <san...@us...> - 2005-10-27 12:48:56
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15945 Modified Files: quiz.php Log Message: Index: quiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/quiz.php,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** quiz.php 26 Oct 2005 17:49:28 -0000 1.45 --- quiz.php 27 Oct 2005 12:48:48 -0000 1.46 *************** *** 671,680 **** if ($focus) { ! echo "\n\n<a href='#top'>".get_string('Top','stack','')."</a>  "; foreach ($quizInst as $qk => $dum) { $qnn = $qk+1; echo "<a href=\"javascript:takeaction('focus',$qk);\">$qnn</a> "; } ! echo "\n<a href='#bottom'>".get_string('Bottom','stack','')."</a>  "; } else { //unfocus --- 671,687 ---- if ($focus) { ! echo "\n<a href=\"javascript:takeaction('unfocus',0);\">".get_string('UnFocus','stack','')."</a> "; ! if ($focus_on>0) { ! $qnn=$focus_on-1; ! echo "<a href=\"javascript:takeaction('focus',$qnn);\">".get_string('Previous','stack','')."</a> "; ! } foreach ($quizInst as $qk => $dum) { $qnn = $qk+1; echo "<a href=\"javascript:takeaction('focus',$qk);\">$qnn</a> "; } ! if ($focus_on<$qk) { ! $qnn=$focus_on+1; ! echo "<a href=\"javascript:takeaction('focus',$qnn);\">".get_string('Next','stack','')."</a> "; ! } } else { //unfocus |
From: Chris S. <san...@us...> - 2005-10-27 12:48:56
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15945/lang/en Modified Files: stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/stack.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** stack.php 27 Oct 2005 12:25:16 -0000 1.36 --- stack.php 27 Oct 2005 12:48:48 -0000 1.37 *************** *** 42,45 **** --- 42,47 ---- $string['Top'] = 'Top'; $string['Bottom'] = 'Bottom'; + $string['Next'] = 'Next'; + $string['Previous'] = 'Previous'; $string['Count'] = 'Count'; $string['Quiz_error_q'] = '<font color=\"red\">There were errors in the question.</font><br />Please contact your system administrator about questionID {$a[0]}.<br />'; |
From: Chris S. <san...@us...> - 2005-10-27 12:34:47
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13493/scripts Modified Files: stackQuestion.php stackUtility.php Log Message: Index: stackUtility.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackUtility.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** stackUtility.php 25 Oct 2005 16:36:51 -0000 1.36 --- stackUtility.php 27 Oct 2005 12:34:36 -0000 1.37 *************** *** 448,452 **** if (preg_match($pat,$strnew)) { // We have at least one. ! // show_array($pat); $strout = preg_replace($pat,"\${1}<font color=\"red\">*</font>\${2}",$strout); $strnew = preg_replace($pat,"\${1}*\${2}",$strnew); --- 448,452 ---- if (preg_match($pat,$strnew)) { // We have at least one. ! //show_array($pat); $strout = preg_replace($pat,"\${1}<font color=\"red\">*</font>\${2}",$strout); $strnew = preg_replace($pat,"\${1}*\${2}",$strnew); Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** stackQuestion.php 26 Oct 2005 17:48:50 -0000 1.47 --- stackQuestion.php 27 Oct 2005 12:34:36 -0000 1.48 *************** *** 1577,1581 **** // Validate the casstring, which might be changed as a result of this. $err = validate_casstring($RawAns,'s'); // parse the student's raw answer ! show_array($err); if ('' != $err) { $errors['RawAns']= $err; --- 1577,1581 ---- // Validate the casstring, which might be changed as a result of this. $err = validate_casstring($RawAns,'s'); // parse the student's raw answer ! //show_array($err); if ('' != $err) { $errors['RawAns']= $err; |
From: Chris S. <san...@us...> - 2005-10-27 12:25:31
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11544 Modified Files: index.php Log Message: Index: index.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/index.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** index.php 26 Oct 2005 17:48:50 -0000 1.33 --- index.php 27 Oct 2005 12:25:16 -0000 1.34 *************** *** 177,180 **** --- 177,181 ---- $quiz_store = stack_db_subject_quiz_list_student($subjectID); stack_quiz_student_select($subjectID,$quiz_store, $user); + echo "\n<font size='-1'>\n".get_string('quiz_version_info2','stack','')."\n</font>\n"; echo $subject['subjectHTMLFoot']; } |
From: Chris S. <san...@us...> - 2005-10-27 12:25:31
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11544/scripts Modified Files: stackQuiz.php Log Message: Index: stackQuiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuiz.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** stackQuiz.php 26 Oct 2005 17:48:50 -0000 1.18 --- stackQuiz.php 27 Oct 2005 12:25:16 -0000 1.19 *************** *** 219,224 **** if (!$review) { - include($stack_root.'/html/quizchoose.html'); require_once("{$stack_root}/html/quizjava.html"); } --- 219,224 ---- if (!$review) { require_once("{$stack_root}/html/quizjava.html"); + include($stack_root.'/html/quizchoose.html'); } |
From: Chris S. <san...@us...> - 2005-10-27 12:25:31
|
Update of /cvsroot/stack/stack-1-0/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11544/html Modified Files: quizchoose.html Log Message: Index: quizchoose.html =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/quizchoose.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** quizchoose.html 26 Oct 2005 17:48:50 -0000 1.3 --- quizchoose.html 27 Oct 2005 12:25:16 -0000 1.4 *************** *** 22,26 **** if ( '0' == $uID) { echo get_string('quiz_version_no','stack','')." <input type='text' name='seed' value='' /><br />"; ! echo "\n<font size='-1'>\n".get_string('quiz_version_info','stack','')."\n</font>\n"; } } --- 22,26 ---- if ( '0' == $uID) { echo get_string('quiz_version_no','stack','')." <input type='text' name='seed' value='' /><br />"; ! echo "\n<font size='-1'>\n".get_string('quiz_version_info1','stack','')."\n</font>\n"; } } |
From: Chris S. <san...@us...> - 2005-10-27 12:25:31
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11544/lang/en Modified Files: stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/stack.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** stack.php 26 Oct 2005 17:48:50 -0000 1.35 --- stack.php 27 Oct 2005 12:25:16 -0000 1.36 *************** *** 47,51 **** $string['quiz_version_no'] = 'Quiz version id number'; // the quiz seed for guest users. $string['quiz_version_no_err'] = 'You have supplied an invalid quiz version id number.'; ! $string['quiz_version_info'] = 'For a new version of a quiz leave this box empty. You are logged in as a guest user. Once you leave the quiz page itself, STACK does not keep track of which version of the quiz you are given, or any answers you may type in. To get the same version of the quiz in future, keep a careful note of the Quiz version id number you are given on the quiz page. When you come back next time, type this into the box before you choose the quiz to get the version you had previously. If you would like STACK to keep track of this for you, together with your answers and marks, please consider registering.'; $string['quiz_duedate'] = 'Quiz due'; $string['quiz_duedate_passed'] = 'It is now after the quiz due date. You may not make further attempts at this quiz.'; --- 47,52 ---- $string['quiz_version_no'] = 'Quiz version id number'; // the quiz seed for guest users. $string['quiz_version_no_err'] = 'You have supplied an invalid quiz version id number.'; ! $string['quiz_version_info1'] = 'For a new version of a quiz leave this box empty. Once you leave the quiz page itself, STACK does not keep track of which version of the quiz you are given, or any answers you may type in. To get the same version of the quiz in future, keep a careful note of the Quiz version id number you are given on the quiz page. When you come back next time, type this into the box before you choose the quiz to get the version you had previously. '; ! $string['quiz_version_info2'] = 'You are logged in as a guest user. If you would like STACK to keep track of the Quiz version id number for you, together with your answers and marks, please consider registering.'; $string['quiz_duedate'] = 'Quiz due'; $string['quiz_duedate_passed'] = 'It is now after the quiz due date. You may not make further attempts at this quiz.'; |
From: pkiddie <pk...@us...> - 2005-10-27 09:37:40
|
Update of /cvsroot/stack/stack-1-0/other/domit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8829/other/domit Modified Files: changelog.txt php_http_client_generic.php php_http_connector.php php_http_exceptions.php xml_domit_getelementsbypath.php xml_domit_lite_parser.php xml_domit_nodemaps.php xml_domit_parser.php xml_domit_shared.php xml_domit_xpath.php xml_saxy_lite_parser.php xml_saxy_parser.php xml_saxy_shared.php Log Message: Updated DOMIT XML parser library from 1.0->1.1. This solves a known problem with a notice coming up on the import of quizzes/questions Index: xml_saxy_shared.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/domit/xml_saxy_shared.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xml_saxy_shared.php 25 Aug 2005 16:06:17 -0000 1.2 --- xml_saxy_shared.php 27 Oct 2005 09:37:18 -0000 1.3 *************** *** 3,7 **** * SAXY_Parser_Base is a base class for SAXY and SAXY Lite * @package saxy-xmlparser ! * @version 0.87 * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License --- 3,7 ---- * SAXY_Parser_Base is a base class for SAXY and SAXY Lite * @package saxy-xmlparser ! * @version 1.0 * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License Index: xml_domit_shared.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/domit/xml_domit_shared.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xml_domit_shared.php 25 Aug 2005 16:06:17 -0000 1.2 --- xml_domit_shared.php 27 Oct 2005 09:37:18 -0000 1.3 *************** *** 2,6 **** /** * @package domit-xmlparser ! * @version 0.98 * @copyright (C) 2004 John Heinstein. All rights reserved * @author John Heinstein <joh...@nb...> --- 2,6 ---- /** * @package domit-xmlparser ! * @version 1.01 * @copyright (C) 2004 John Heinstein. All rights reserved * @author John Heinstein <joh...@nb...> *************** *** 82,85 **** --- 82,92 ---- define('DOMIT_DOCUMENT_FRAGMENT_ERR', 102); + //DOMIT! Error Modes + /** continue on error */ + define('DOMIT_ONERROR_CONTINUE', 1); + /** die on error */ + define('DOMIT_ONERROR_DIE', 2); + + /** *@global Object Instance of the UIDGenerator class *************** *** 118,128 **** /** ! * @global object Reference to custom error handler for DOMException class ! * ! * Made global to simulate a static variable in PHP 4 */ - $GLOBALS['DOMIT_DOMException_errorHandler'] = null; /** * A DOMIT! exception handling class * --- 125,141 ---- /** ! * @global object Reference to custom error handler for DOMException class */ $GLOBALS['DOMIT_DOMException_errorHandler'] = null; /** + * @global int Error mode; specifies whether to die on error or simply continue + */ + $GLOBALS['DOMIT_DOMException_mode'] = DOMIT_ONERROR_CONTINUE; + /** + * @global string Log file for errors + */ + $GLOBALS['DOMIT_DOMException_log'] = null; + + /** * A DOMIT! exception handling class * *************** *** 141,152 **** } else { ! $errorMessage = 'Error: ' . $errorNum . "\n " . $errorString; if ((!isset($GLOBALS['DOMIT_ERROR_FORMATTING_HTML'])) || ($GLOBALS['DOMIT_ERROR_FORMATTING_HTML'] == true)) { ! $errorMessage = "<p><pre>" . $errorMessage . "</pre></p>"; } ! ! die($errorMessage); } } //raiseException --- 154,183 ---- } else { ! $errorMessageText = $errorNum . ' ' . $errorString; ! $errorMessage = 'Error: ' . $errorMessageText; if ((!isset($GLOBALS['DOMIT_ERROR_FORMATTING_HTML'])) || ($GLOBALS['DOMIT_ERROR_FORMATTING_HTML'] == true)) { ! $errorMessage = "<p><pre>" . $errorMessage . "</pre></p>"; } ! ! //log error to file ! if ((isset($GLOBALS['DOMIT_DOMException_log'])) && ! ($GLOBALS['DOMIT_DOMException_log'] != null)) { ! require_once(DOMIT_INCLUDE_PATH . 'php_file_utilities.php'); ! $logItem = "\n" . date('Y-m-d H:i:s') . 'DOMIT! Error ' . $errorMessageText; ! php_file_utilities::putDataToFile($GLOBALS['DOMIT_DOMException_log'], ! $logItem, 'a'); ! } ! ! switch ($GLOBALS['DOMIT_DOMException_mode']) { ! case DOMIT_ONERROR_CONTINUE: ! return; ! break; ! ! case DOMIT_ONERROR_DIE: ! die($errorMessage); ! break; ! } } } //raiseException *************** *** 159,162 **** --- 190,215 ---- $GLOBALS['DOMIT_DOMException_errorHandler'] =& $method; } //setErrorHandler + + /** + * Set error mode + * @param int The DOM error mode + */ + function setErrorMode($mode) { + $GLOBALS['DOMIT_DOMException_mode'] = $mode; + } //setErrorMode + + /** + * Set error mode + * @param boolean True if errors should be logged + * @param string Absolute or relative path to log file + */ + function setErrorLog($doLogErrors, $logfile) { + if ($doLogErrors) { + $GLOBALS['DOMIT_DOMException_log'] = $logfile; + } + else { + $GLOBALS['DOMIT_DOMException_log'] = null; + } + } //setErrorLog } //DOMIT_DOMException *************** *** 186,190 **** */ function &createDocument($namespaceURI, $qualifiedName, &$docType) { ! $xmldoc =& new DOMIT_Document(); $documentElement =& $xmldoc->createElementNS($namespaceURI, $qualifiedName); --- 239,243 ---- */ function &createDocument($namespaceURI, $qualifiedName, &$docType) { ! $xmldoc = new DOMIT_Document(); $documentElement =& $xmldoc->createElementNS($namespaceURI, $qualifiedName); Index: xml_domit_parser.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/domit/xml_domit_parser.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xml_domit_parser.php 25 Aug 2005 16:06:17 -0000 1.2 --- xml_domit_parser.php 27 Oct 2005 09:37:18 -0000 1.3 *************** *** 4,8 **** * @package domit-xmlparser * @subpackage domit-xmlparser-main ! * @version 1.0 * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License --- 4,8 ---- * @package domit-xmlparser * @subpackage domit-xmlparser-main ! * @version 1.01 * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License *************** *** 17,21 **** /** current version of DOMIT! */ ! define ('DOMIT_VERSION', '1.0'); /** XML namespace URI */ --- 17,21 ---- /** current version of DOMIT! */ ! define ('DOMIT_VERSION', '1.01'); /** XML namespace URI */ *************** *** 692,696 **** require_once(DOMIT_INCLUDE_PATH . 'xml_domit_nodemaps.php'); ! $nodelist =& new DOMIT_NodeList(); switch ($this->nodeType) { --- 692,696 ---- require_once(DOMIT_INCLUDE_PATH . 'xml_domit_nodemaps.php'); ! $nodelist = new DOMIT_NodeList(); switch ($this->nodeType) { *************** *** 713,717 **** } else { ! return null; } } --- 713,718 ---- } else { ! $null = null; ! return $null; } } *************** *** 763,767 **** require_once(DOMIT_INCLUDE_PATH . 'xml_domit_xpath.php'); ! $xpParser =& new DOMIT_XPath(); return $xpParser->parsePattern($this, $pattern, $nodeIndex); --- 764,768 ---- require_once(DOMIT_INCLUDE_PATH . 'xml_domit_xpath.php'); ! $xpParser = new DOMIT_XPath(); return $xpParser->parsePattern($this, $pattern, $nodeIndex); *************** *** 774,778 **** function &childNodesAsNodeList() { require_once('xml_domit_nodemaps.php'); ! $myNodeList =& new DOMIT_NodeList(); $total = $this->childCount; --- 775,779 ---- function &childNodesAsNodeList() { require_once('xml_domit_nodemaps.php'); ! $myNodeList = new DOMIT_NodeList(); $total = $this->childCount; *************** *** 841,845 **** $this->ownerDocument =& $this; $this->parser = ''; ! $this->implementation =& new DOMIT_DOMImplementation(); } //DOMIT_Document --- 842,846 ---- $this->ownerDocument =& $this; $this->parser = ''; ! $this->implementation = new DOMIT_DOMImplementation(); } //DOMIT_Document *************** *** 880,884 **** require_once(DOMIT_INCLUDE_PATH . 'php_http_client_generic.php'); ! $this->httpConnection =& new php_http_client_generic($host, $path, $port, $timeout, $user, $password); } //setConnection --- 881,885 ---- require_once(DOMIT_INCLUDE_PATH . 'php_http_client_generic.php'); ! $this->httpConnection = new php_http_client_generic($host, $path, $port, $timeout, $user, $password); } //setConnection *************** *** 904,908 **** require_once(DOMIT_INCLUDE_PATH . 'php_http_proxy.php'); ! $this->httpConnection =& new php_http_proxy($host, $path, $port, $timeout, $user, $password); } //setProxyConnection --- 905,909 ---- require_once(DOMIT_INCLUDE_PATH . 'php_http_proxy.php'); ! $this->httpConnection = new php_http_proxy($host, $path, $port, $timeout, $user, $password); } //setProxyConnection *************** *** 1285,1289 **** */ function &createDocumentFragment() { ! $node =& new DOMIT_DocumentFragment(); $node->ownerDocument =& $this; --- 1286,1290 ---- */ function &createDocumentFragment() { ! $node = new DOMIT_DocumentFragment(); $node->ownerDocument =& $this; *************** *** 1297,1301 **** */ function &createAttribute($name) { ! $node =& new DOMIT_Attr($name); return $node; --- 1298,1302 ---- */ function &createAttribute($name) { ! $node = new DOMIT_Attr($name); return $node; *************** *** 1309,1313 **** */ function &createAttributeNS($namespaceURI, $qualifiedName) { ! $node =& new DOMIT_Attr($qualifiedName); $node->namespaceURI = $namespaceURI; --- 1310,1314 ---- */ function &createAttributeNS($namespaceURI, $qualifiedName) { ! $node = new DOMIT_Attr($qualifiedName); $node->namespaceURI = $namespaceURI; *************** *** 1332,1336 **** */ function &createElement($tagName) { ! $node =& new DOMIT_Element($tagName); $node->ownerDocument =& $this; --- 1333,1337 ---- */ function &createElement($tagName) { ! $node = new DOMIT_Element($tagName); $node->ownerDocument =& $this; *************** *** 1345,1349 **** */ function &createElementNS($namespaceURI, $qualifiedName) { ! $node =& new DOMIT_Element($qualifiedName); $colonIndex = strpos($qualifiedName, ":"); --- 1346,1350 ---- */ function &createElementNS($namespaceURI, $qualifiedName) { ! $node = new DOMIT_Element($qualifiedName); $colonIndex = strpos($qualifiedName, ":"); *************** *** 1371,1375 **** */ function &createTextNode($data) { ! $node =& new DOMIT_TextNode($data); $node->ownerDocument =& $this; --- 1372,1376 ---- */ function &createTextNode($data) { ! $node = new DOMIT_TextNode($data); $node->ownerDocument =& $this; *************** *** 1383,1387 **** */ function &createCDATASection($data) { ! $node =& new DOMIT_CDATASection($data); $node->ownerDocument =& $this; --- 1384,1388 ---- */ function &createCDATASection($data) { ! $node = new DOMIT_CDATASection($data); $node->ownerDocument =& $this; *************** *** 1395,1399 **** */ function &createComment($text) { ! $node =& new DOMIT_Comment($text); $node->ownerDocument =& $this; --- 1396,1400 ---- */ function &createComment($text) { ! $node = new DOMIT_Comment($text); $node->ownerDocument =& $this; *************** *** 1408,1412 **** */ function &createProcessingInstruction($target, $data) { ! $node =& new DOMIT_ProcessingInstruction($target, $data); $node->ownerDocument =& $this; --- 1409,1413 ---- */ function &createProcessingInstruction($target, $data) { ! $node = new DOMIT_ProcessingInstruction($target, $data); $node->ownerDocument =& $this; *************** *** 1420,1424 **** */ function &getElementsByTagName($tagName) { ! $nodeList =& new DOMIT_NodeList(); if ($this->documentElement != null) { --- 1421,1425 ---- */ function &getElementsByTagName($tagName) { ! $nodeList = new DOMIT_NodeList(); if ($this->documentElement != null) { *************** *** 1436,1440 **** */ function &getElementsByTagNameNS($namespaceURI, $localName) { ! $nodeList =& new DOMIT_NodeList(); if ($this->documentElement != null) { --- 1437,1441 ---- */ function &getElementsByTagNameNS($namespaceURI, $localName) { ! $nodeList = new DOMIT_NodeList(); if ($this->documentElement != null) { *************** *** 1458,1462 **** } ! return null; } else { --- 1459,1464 ---- } ! $null = null; ! return $null; } else { *************** *** 1503,1507 **** */ function &getNodesByNodeType($type, &$contextNode) { ! $nodeList =& new DOMIT_NodeList(); if (($type == DOMIT_DOCUMENT_NODE) || ($contextNode->nodeType == DOMIT_DOCUMENT_NODE)){ --- 1505,1509 ---- */ function &getNodesByNodeType($type, &$contextNode) { ! $nodeList = new DOMIT_NodeList(); if (($type == DOMIT_DOCUMENT_NODE) || ($contextNode->nodeType == DOMIT_DOCUMENT_NODE)){ *************** *** 1531,1535 **** */ function &getNodesByNodeValue($value, &$contextNode) { ! $nodeList =& new DOMIT_NodeList(); if ($contextNode->uid == $this->uid) { --- 1533,1537 ---- */ function &getNodesByNodeValue($value, &$contextNode) { ! $nodeList = new DOMIT_NodeList(); if ($contextNode->uid == $this->uid) { *************** *** 1563,1567 **** if (DOMIT_Utilities::validateXML($xmlText)) { ! $domParser =& new DOMIT_Parser(); if ($useSAXY || (!function_exists('xml_parser_create'))) { --- 1565,1569 ---- if (DOMIT_Utilities::validateXML($xmlText)) { ! $domParser = new DOMIT_Parser(); if ($useSAXY || (!function_exists('xml_parser_create'))) { *************** *** 1782,1786 **** function &cloneNode($deep = false) { $className = get_class($this); ! $clone =& new $className($this->nodeName); if ($deep) { --- 1784,1788 ---- function &cloneNode($deep = false) { $className = get_class($this); ! $clone = new $className($this->nodeName); if ($deep) { *************** *** 2029,2033 **** */ function &getElementsByTagName($tagName) { ! $nodeList =& new DOMIT_NodeList(); $this->getNamedElements($nodeList, $tagName); --- 2031,2035 ---- */ function &getElementsByTagName($tagName) { ! $nodeList = new DOMIT_NodeList(); $this->getNamedElements($nodeList, $tagName); *************** *** 2042,2046 **** */ function &getElementsByTagNameNS($namespaceURI, $localName) { ! $nodeList =& new DOMIT_NodeList(); $this->getNamedElementsNS($nodeList, $namespaceURI, $localName); --- 2044,2048 ---- */ function &getElementsByTagNameNS($namespaceURI, $localName) { ! $nodeList = new DOMIT_NodeList(); $this->getNamedElementsNS($nodeList, $namespaceURI, $localName); *************** *** 2079,2083 **** } ! return null; } //_getElementByID --- 2081,2086 ---- } ! $null = null; ! return $null; } //_getElementByID *************** *** 2196,2200 **** if ($returnNode == null) { ! $newAttr =& new DOMIT_Attr($name); $newAttr->setValue($value); $this->attributes->setNamedItem($newAttr); --- 2199,2203 ---- if ($returnNode == null) { ! $newAttr = new DOMIT_Attr($name); $newAttr->setValue($value); $this->attributes->setNamedItem($newAttr); *************** *** 2226,2230 **** if ($returnNode == null) { //create this manually in case element has no ownerDocument to reference ! $newAttr =& new DOMIT_Attr($qualifiedName); $newAttr->prefix = substr($qualifiedName, 0, $colonIndex); $newAttr->localName = $localName; --- 2229,2233 ---- if ($returnNode == null) { //create this manually in case element has no ownerDocument to reference ! $newAttr = new DOMIT_Attr($qualifiedName); $newAttr->prefix = substr($qualifiedName, 0, $colonIndex); $newAttr->localName = $localName; *************** *** 2399,2403 **** function &cloneNode($deep = false) { $className = get_class($this); ! $clone =& new $className($this->nodeName); $clone->attributes =& $this->attributes->createClone($deep); --- 2402,2406 ---- function &cloneNode($deep = false) { $className = get_class($this); ! $clone = new $className($this->nodeName); $clone->attributes =& $this->attributes->createClone($deep); *************** *** 2675,2679 **** //create new text node $className = get_class($this); ! $newTextNode =& new $className($post); $newTextNode->ownerDocument =& $this->ownerDocument; --- 2678,2682 ---- //create new text node $className = get_class($this); ! $newTextNode = new $className($post); $newTextNode->ownerDocument =& $this->ownerDocument; *************** *** 2704,2708 **** function &cloneNode($deep = false) { $className = get_class($this); ! $clone =& new $className($this->nodeValue); return $clone; --- 2707,2711 ---- function &cloneNode($deep = false) { $className = get_class($this); ! $clone = new $className($this->nodeValue); return $clone; *************** *** 2843,2847 **** function &cloneNode($deep = false) { $className = get_class($this); ! $clone =& new $className($this->nodeName); $clone->nodeValue = $this->nodeValue; --- 2846,2850 ---- function &cloneNode($deep = false) { $className = get_class($this); ! $clone = new $className($this->nodeName); $clone->nodeValue = $this->nodeValue; *************** *** 2916,2920 **** function &cloneNode($deep = false) { $className = get_class($this); ! $clone =& new $className(); if ($deep) { --- 2919,2923 ---- function &cloneNode($deep = false) { $className = get_class($this); ! $clone = new $className(); if ($deep) { *************** *** 3004,3008 **** function &cloneNode($deep = false) { $className = get_class($this); ! $clone =& new $className($this->nodeValue); return $clone; --- 3007,3011 ---- function &cloneNode($deep = false) { $className = get_class($this); ! $clone = new $className($this->nodeValue); return $clone; *************** *** 3081,3085 **** function &cloneNode($deep = false) { $className = get_class($this); ! $clone =& new $className($this->nodeName, $this->nodeValue); return $clone; --- 3084,3088 ---- function &cloneNode($deep = false) { $className = get_class($this); ! $clone = new $className($this->nodeName, $this->nodeValue); return $clone; *************** *** 3171,3175 **** function &cloneNode($deep = false) { $className = get_class($this); ! $clone =& new $className($this->nodeName, $this->text); return $clone; --- 3174,3178 ---- function &cloneNode($deep = false) { $className = get_class($this); ! $clone = new $className($this->nodeName, $this->text); return $clone; *************** *** 3323,3327 **** //create instance of SAXY parser ! $parser =& new SAXY_Parser(); $parser->appendEntityTranslationTable($definedEntities); --- 3326,3330 ---- //create instance of SAXY parser ! $parser = new SAXY_Parser(); $parser->appendEntityTranslationTable($definedEntities); *************** *** 3585,3589 **** $name = substr($name, 0, $end); ! $currentNode =& new DOMIT_DocumentType($name, $data); $currentNode->ownerDocument =& $this->xmlDoc; --- 3588,3592 ---- $name = substr($name, 0, $end); ! $currentNode = new DOMIT_DocumentType($name, $data); $currentNode->ownerDocument =& $this->xmlDoc; Index: xml_domit_nodemaps.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/domit/xml_domit_nodemaps.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xml_domit_nodemaps.php 25 Aug 2005 16:06:17 -0000 1.2 --- xml_domit_nodemaps.php 27 Oct 2005 09:37:18 -0000 1.3 *************** *** 33,37 **** return $this->arNodeList[$index]; } ! return null; } //item --- 33,39 ---- return $this->arNodeList[$index]; } ! ! $null = null; ! return $null; } //item *************** *** 110,114 **** function &createClone($deep = false) { $className = get_class($this); ! $clone =& new $className(); foreach ($this->arNodeList as $key => $value) { --- 112,116 ---- function &createClone($deep = false) { $className = get_class($this); ! $clone = new $className(); foreach ($this->arNodeList as $key => $value) { *************** *** 183,187 **** } ! return null; } //getNamedItem --- 185,190 ---- } ! $null = null; ! return $null; } //getNamedItem *************** *** 261,265 **** } ! return null; } //getNamedItemNS --- 264,269 ---- } ! $null = null; ! return $null; } //getNamedItemNS *************** *** 361,365 **** function &createClone($deep = false) { $className = get_class($this); ! $clone =& new $className(); foreach ($this->arNodeMap as $key => $value) { --- 365,369 ---- function &createClone($deep = false) { $className = get_class($this); ! $clone = new $className(); foreach ($this->arNodeMap as $key => $value) { Index: xml_saxy_lite_parser.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/domit/xml_saxy_lite_parser.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xml_saxy_lite_parser.php 25 Aug 2005 16:06:17 -0000 1.2 --- xml_saxy_lite_parser.php 27 Oct 2005 09:37:18 -0000 1.3 *************** *** 4,8 **** * @package saxy-xmlparser * @subpackage saxy-xmlparser-lite ! * @version 0.17 * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License --- 4,8 ---- * @package saxy-xmlparser * @subpackage saxy-xmlparser-lite ! * @version 1.0 * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License *************** *** 17,21 **** /** current version of SAXY Lite */ ! define ('SAXY_LITE_VERSION', '0.17'); /** initial saxy lite parse state, before anything is encountered */ --- 17,21 ---- /** current version of SAXY Lite */ ! define ('SAXY_LITE_VERSION', '1.0'); /** initial saxy lite parse state, before anything is encountered */ Index: php_http_client_generic.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/domit/php_http_client_generic.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** php_http_client_generic.php 25 Aug 2005 16:06:17 -0000 1.2 --- php_http_client_generic.php 27 Oct 2005 09:37:18 -0000 1.3 *************** *** 4,8 **** * php_http_client_generic represents a basic http client * @package php-http-tools ! * @version 0.2-pre * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License --- 4,8 ---- * php_http_client_generic represents a basic http client * @package php-http-tools ! * @version 0.3 * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License *************** *** 154,161 **** */ function php_http_client_generic($host = '', $path = '/', $port = 80, $timeout = 0) { ! $this->connection =& new php_http_connection($host, $path, $port, $timeout); ! $this->headers =& new php_http_headers(); $this->requestPath = $path; ! $this->response =& new php_http_response(); $this->setHeaders(); } //php_http_client_generic --- 154,161 ---- */ function php_http_client_generic($host = '', $path = '/', $port = 80, $timeout = 0) { ! $this->connection = new php_http_connection($host, $path, $port, $timeout); ! $this->headers = new php_http_headers(); $this->requestPath = $path; ! $this->response = new php_http_response(); $this->setHeaders(); } //php_http_client_generic *************** *** 169,173 **** if ($responseHeadersAsObject) { ! $this->response->headers =& new php_http_headers(); } } //generateResponseHeadersAsObject --- 169,173 ---- if ($responseHeadersAsObject) { ! $this->response->headers = new php_http_headers(); } } //generateResponseHeadersAsObject Index: php_http_connector.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/domit/php_http_connector.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** php_http_connector.php 25 Aug 2005 16:06:17 -0000 1.2 --- php_http_connector.php 27 Oct 2005 09:37:18 -0000 1.3 *************** *** 4,8 **** * php_http_connector establishes http connections * @package php-http-tools ! * @version 0.1 * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License --- 4,8 ---- * php_http_connector establishes http connections * @package php-http-tools ! * @version 0.3 * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License *************** *** 38,42 **** require_once(PHP_HTTP_TOOLS_INCLUDE_PATH . 'php_http_client_generic.php'); ! $this->httpConnection =& new php_http_client_generic($host, $path, $port, $timeout, $user, $password); } //setConnection --- 38,42 ---- require_once(PHP_HTTP_TOOLS_INCLUDE_PATH . 'php_http_client_generic.php'); ! $this->httpConnection = new php_http_client_generic($host, $path, $port, $timeout, $user, $password); } //setConnection *************** *** 62,66 **** require_once(PHP_HTTP_TOOLS_INCLUDE_PATH . 'php_http_proxy.php'); ! $this->httpConnection =& new php_http_proxy($host, $path, $port, $timeout, $user, $password); } //setProxyConnection --- 62,66 ---- require_once(PHP_HTTP_TOOLS_INCLUDE_PATH . 'php_http_proxy.php'); ! $this->httpConnection = new php_http_proxy($host, $path, $port, $timeout, $user, $password); } //setProxyConnection Index: changelog.txt =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/domit/changelog.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** changelog.txt 25 Aug 2005 16:06:17 -0000 1.2 --- changelog.txt 27 Oct 2005 09:37:18 -0000 1.3 *************** *** 193,196 **** - SAXY updated ! --- 193,200 ---- - SAXY updated ! Version 1.1 (2005/09/10) ! - removed ampersands when objects instantiated ! - added to error handling modes: DOMIT_ONERROR_DIE and DOMIT_ONERROR_CONTINUE ! - on errors, DOMIT no longer dies by default ! - added setErrorLog and setErrorMode methods Index: xml_domit_lite_parser.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/domit/xml_domit_lite_parser.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xml_domit_lite_parser.php 25 Aug 2005 16:06:17 -0000 1.2 --- xml_domit_lite_parser.php 27 Oct 2005 09:37:18 -0000 1.3 *************** *** 4,8 **** * @package domit-xmlparser * @subpackage domit-xmlparser-lite ! * @version 0.2 * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License --- 4,8 ---- * @package domit-xmlparser * @subpackage domit-xmlparser-lite ! * @version 1.01 * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License *************** *** 17,21 **** /** current version of DOMIT! Lite */ ! define ('DOMIT_LITE_VERSION', '0.2'); /** --- 17,21 ---- /** current version of DOMIT! Lite */ ! define ('DOMIT_LITE_VERSION', '1.01'); /** *************** *** 548,552 **** require_once(DOMIT_INCLUDE_PATH . 'xml_domit_nodemaps.php'); ! $nodelist =& new DOMIT_NodeList(); switch ($this->nodeType) { --- 548,552 ---- require_once(DOMIT_INCLUDE_PATH . 'xml_domit_nodemaps.php'); ! $nodelist = new DOMIT_NodeList(); switch ($this->nodeType) { *************** *** 568,572 **** return $nodelist->item(0); } ! return null; } --- 568,574 ---- return $nodelist->item(0); } ! ! $null = null; ! return $null; } *************** *** 657,661 **** $this->ownerDocument =& $this; $this->parser = ''; ! $this->implementation =& new DOMIT_DOMImplementation(); } //DOMIT_Lite_Document --- 659,663 ---- $this->ownerDocument =& $this; $this->parser = ''; ! $this->implementation = new DOMIT_DOMImplementation(); } //DOMIT_Lite_Document *************** *** 680,684 **** require_once(DOMIT_INCLUDE_PATH . 'php_http_client_generic.php'); ! $this->httpConnection =& new php_http_client_generic($host, $path, $port, $timeout, $user, $password); } //setConnection --- 682,686 ---- require_once(DOMIT_INCLUDE_PATH . 'php_http_client_generic.php'); ! $this->httpConnection = new php_http_client_generic($host, $path, $port, $timeout, $user, $password); } //setConnection *************** *** 712,716 **** require_once(DOMIT_INCLUDE_PATH . 'php_http_proxy.php'); ! $this->httpConnection =& new php_http_proxy($host, $path, $port, $timeout, $user, $password); } //setProxyConnection --- 714,718 ---- require_once(DOMIT_INCLUDE_PATH . 'php_http_proxy.php'); ! $this->httpConnection = new php_http_proxy($host, $path, $port, $timeout, $user, $password); } //setProxyConnection *************** *** 898,902 **** */ function &createElement($tagName) { ! $node =& new DOMIT_Lite_Element($tagName); $node->ownerDocument =& $this; --- 900,904 ---- */ function &createElement($tagName) { ! $node = new DOMIT_Lite_Element($tagName); $node->ownerDocument =& $this; *************** *** 910,914 **** */ function &createTextNode($data) { ! $node =& new DOMIT_Lite_TextNode($data); $node->ownerDocument =& $this; --- 912,916 ---- */ function &createTextNode($data) { ! $node = new DOMIT_Lite_TextNode($data); $node->ownerDocument =& $this; *************** *** 922,926 **** */ function &createCDATASection($data) { ! $node =& new DOMIT_Lite_CDATASection($data); $node->ownerDocument =& $this; --- 924,928 ---- */ function &createCDATASection($data) { ! $node = new DOMIT_Lite_CDATASection($data); $node->ownerDocument =& $this; *************** *** 934,938 **** */ function &getElementsByTagName($tagName) { ! $nodeList =& new DOMIT_NodeList(); if ($this->documentElement != null) { --- 936,940 ---- */ function &getElementsByTagName($tagName) { ! $nodeList = new DOMIT_NodeList(); if ($this->documentElement != null) { *************** *** 987,991 **** if (DOMIT_Utilities::validateXML($xmlText)) { ! $domParser =& new DOMIT_Lite_Parser(); if ($useSAXY || (!function_exists('xml_parser_create'))) { --- 989,993 ---- if (DOMIT_Utilities::validateXML($xmlText)) { ! $domParser = new DOMIT_Lite_Parser(); if ($useSAXY || (!function_exists('xml_parser_create'))) { *************** *** 1091,1094 **** --- 1093,1100 ---- } + if ($this->xmlDeclaration) { + $stringRep = $this->xmlDeclaration . "\n" . $stringRep; + } + return $this->saveTextToFile($filename, utf8_encode($stringRep)); } //saveXML_utf8 *************** *** 1167,1170 **** --- 1173,1184 ---- /** + * Sets the xml declaration text + * @param string The xml declaration text + */ + function setXMLDeclaration($decl) { + $this->xmlDeclaration = $decl; + } //setXMLDeclaration + + /** * Returns a reference to the DOMIT_DOMImplementation object * @return Object A reference to the DOMIT_DOMImplementation object *************** *** 1233,1237 **** function &cloneNode($deep = false) { $className = get_class($this); ! $clone =& new $className($this->nodeName); if ($deep) { --- 1247,1251 ---- function &cloneNode($deep = false) { $className = get_class($this); ! $clone = new $className($this->nodeName); if ($deep) { *************** *** 1356,1360 **** */ function &getElementsByTagName($tagName) { ! $nodeList =& new DOMIT_NodeList(); $this->getNamedElements($nodeList, $tagName); --- 1370,1374 ---- */ function &getElementsByTagName($tagName) { ! $nodeList = new DOMIT_NodeList(); $this->getNamedElements($nodeList, $tagName); *************** *** 1468,1472 **** function &cloneNode($deep = false) { $className = get_class($this); ! $clone =& new $className($this->nodeName); $clone->attributes = $this->attributes; --- 1482,1486 ---- function &cloneNode($deep = false) { $className = get_class($this); ! $clone = new $className($this->nodeName); $clone->attributes = $this->attributes; *************** *** 1593,1597 **** function &cloneNode($deep = false) { $className = get_class($this); ! $clone =& new $className($this->nodeValue); return $clone; --- 1607,1611 ---- function &cloneNode($deep = false) { $className = get_class($this); ! $clone = new $className($this->nodeValue); return $clone; *************** *** 1694,1701 **** //create instance of expat parser (should be included in php distro) if (version_compare(phpversion(), '5.0', '<=')) { ! $parser =& xml_parser_create(''); } else { ! $parser =& xml_parser_create(); } --- 1708,1715 ---- //create instance of expat parser (should be included in php distro) if (version_compare(phpversion(), '5.0', '<=')) { ! $parser = xml_parser_create(''); } else { ! $parser = xml_parser_create(); } *************** *** 1744,1748 **** //create instance of SAXY parser ! $parser =& new SAXY_Lite_Parser(); $parser->appendEntityTranslationTable($definedEntities); --- 1758,1762 ---- //create instance of SAXY parser ! $parser = new SAXY_Lite_Parser(); $parser->appendEntityTranslationTable($definedEntities); Index: xml_domit_getelementsbypath.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/domit/xml_domit_getelementsbypath.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xml_domit_getelementsbypath.php 25 Aug 2005 16:06:17 -0000 1.2 --- xml_domit_getelementsbypath.php 27 Oct 2005 09:37:18 -0000 1.3 *************** *** 46,50 **** function DOMIT_GetElementsByPath() { require_once(DOMIT_INCLUDE_PATH . 'xml_domit_nodemaps.php'); ! $this->nodeList =& new DOMIT_NodeList(); } //DOMIT_GetElementsByPath --- 46,50 ---- function DOMIT_GetElementsByPath() { require_once(DOMIT_INCLUDE_PATH . 'xml_domit_nodemaps.php'); ! $this->nodeList = new DOMIT_NodeList(); } //DOMIT_GetElementsByPath *************** *** 98,102 **** } else { ! return null; } } --- 98,103 ---- } else { ! $null = null; ! return $null; } } *************** *** 222,226 **** function DOMIT_GetElementsByAttributePath() { require_once(DOMIT_INCLUDE_PATH . 'xml_domit_nodemaps.php'); ! $this->nodeList =& new DOMIT_NodeList(); } //DOMIT_GetElementsByAttributePath --- 223,227 ---- function DOMIT_GetElementsByAttributePath() { require_once(DOMIT_INCLUDE_PATH . 'xml_domit_nodemaps.php'); ! $this->nodeList = new DOMIT_NodeList(); } //DOMIT_GetElementsByAttributePath Index: xml_domit_xpath.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/domit/xml_domit_xpath.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xml_domit_xpath.php 25 Aug 2005 16:06:17 -0000 1.2 --- xml_domit_xpath.php 27 Oct 2005 09:37:18 -0000 1.3 *************** *** 72,76 **** function DOMIT_XPath() { require_once(DOMIT_INCLUDE_PATH . 'xml_domit_nodemaps.php'); ! $this->nodeList =& new DOMIT_NodeList(); } //DOMIT_XPath --- 72,76 ---- function DOMIT_XPath() { require_once(DOMIT_INCLUDE_PATH . 'xml_domit_nodemaps.php'); ! $this->nodeList = new DOMIT_NodeList(); } //DOMIT_XPath *************** *** 134,138 **** } else { ! return null; } } --- 134,139 ---- } else { ! $null = null; ! return $null; } } Index: xml_saxy_parser.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/domit/xml_saxy_parser.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xml_saxy_parser.php 25 Aug 2005 16:06:17 -0000 1.2 --- xml_saxy_parser.php 27 Oct 2005 09:37:18 -0000 1.3 *************** *** 4,8 **** * @package saxy-xmlparser * @subpackage saxy-xmlparser-main ! * @version 0.87 * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License --- 4,8 ---- * @package saxy-xmlparser * @subpackage saxy-xmlparser-main ! * @version 1.0 * @copyright (C) 2004 John Heinstein. All rights reserved * @license http://www.gnu.org/copyleft/lesser.html LGPL License *************** *** 17,21 **** /** current version of SAXY */ ! define ('SAXY_VERSION', '0.87'); /** default XML namespace */ --- 17,21 ---- /** current version of SAXY */ ! define ('SAXY_VERSION', '1.0'); /** default XML namespace */ Index: php_http_exceptions.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/domit/php_http_exceptions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** php_http_exceptions.php 25 Aug 2005 16:06:17 -0000 1.2 --- php_http_exceptions.php 27 Oct 2005 09:37:18 -0000 1.3 *************** *** 16,19 **** --- 16,38 ---- define('HTTP_TRANSPORT_ERR', 2); + //HTTPExceptions Error Modes + /** continue on error */ + define('HTTP_ONERROR_CONTINUE', 1); + /** die on error */ + define('HTTP_ONERROR_DIE', 2); + + /** + * @global object Reference to custom error handler for HTTP Exception class + */ + $GLOBALS['HTTP_Exception_errorHandler'] = null; + /** + * @global int Error mode; specifies whether to die on error or simply return + */ + $GLOBALS['HTTP_Exception_mode'] = HTTP_ONERROR_RETURN; + /** + * @global string Log file for errors + */ + $GLOBALS['HTTP_Exception_log'] = null; + /** * An HTTP Exceptions class (not yet implemented) *************** *** 24,29 **** class HTTPExceptions { function raiseException($errorNum, $errorString) { ! die('HTTP Exception: ' . $errorNum . "\n " . $errorString); } //raiseException } //HTTPExceptions --- 43,110 ---- class HTTPExceptions { function raiseException($errorNum, $errorString) { ! //die('HTTP Exception: ' . $errorNum . "\n " . $errorString); ! ! if ($GLOBALS['HTTP_Exception_errorHandler'] != null) { ! call_user_func($GLOBALS['HTTP_Exception_errorHandler'], $errorNum, $errorString); ! } ! else { ! $errorMessageText = $errorNum . ' ' . $errorString; ! $errorMessage = 'Error: ' . $errorMessageText; ! ! if ((!isset($GLOBALS['HTTP_ERROR_FORMATTING_HTML'])) || ! ($GLOBALS['HTTP_ERROR_FORMATTING_HTML'] == true)) { ! $errorMessage = "<p><pre>" . $errorMessage . "</pre></p>"; ! } ! ! //log error to file ! if ((isset($GLOBALS['HTTP_Exception_log'])) && ! ($GLOBALS['HTTP_Exception_log'] != null)) { ! require_once(PHP_HTTP_TOOLS_INCLUDE_PATH . 'php_file_utilities.php'); ! $logItem = "\n" . date('Y-m-d H:i:s') . ' HTTP Error ' . $errorMessageText; ! php_file_utilities::putDataToFile($GLOBALS['HTTP_Exception_log'], ! $logItem, 'a'); ! } ! ! switch ($GLOBALS['HTTP_Exception_mode']) { ! case HTTP_ONERROR_CONTINUE: ! return; ! break; ! ! case HTTP_ONERROR_DIE: ! die($errorMessage); ! break; ! } ! } } //raiseException + + /** + * custom handler for HTTP errors + * @param object A reference to the custom error handler + */ + function setErrorHandler($method) { + $GLOBALS['HTTP_Exception_errorHandler'] =& $method; + } //setErrorHandler + + /** + * Set error mode + * @param int The HTTP error mode + */ + function setErrorMode($mode) { + $GLOBALS['HTTP_Exception_mode'] = $mode; + } //setErrorMode + + /** + * Set error mode + * @param boolean True if errors should be logged + * @param string Absolute or relative path to log file + */ + function setErrorLog($doLogErrors, $logfile) { + if ($doLogErrors) { + $GLOBALS['HTTP_Exception_log'] = $logfile; + } + else { + $GLOBALS['HTTP_Exception_log'] = null; + } + } //setErrorLog } //HTTPExceptions |
From: pkiddie <pk...@us...> - 2005-10-27 09:27:57
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7073/scripts Modified Files: stackXML.php Log Message: Removed show_array when parsing quiz/question XML Index: stackXML.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackXML.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** stackXML.php 20 Oct 2005 10:32:25 -0000 1.21 --- stackXML.php 27 Oct 2005 09:27:45 -0000 1.22 *************** *** 1062,1067 **** { $val = $node->getText(); - - show_array($val); //Do not write question field if there is no text behind it --- 1062,1065 ---- |
From: Chris S. <san...@us...> - 2005-10-26 17:49:36
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17613 Modified Files: editquiz.php quiz.php Log Message: Index: quiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/quiz.php,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** quiz.php 26 Oct 2005 17:48:50 -0000 1.44 --- quiz.php 26 Oct 2005 17:49:28 -0000 1.45 *************** *** 19,22 **** --- 19,24 ---- include($stack_root.'/frontend_general/process_input.php'); + + ////////////////////////////////////////////////////////// // (2) Assign default values to quiz specific variables. Index: editquiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/editquiz.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** editquiz.php 11 Oct 2005 17:35:38 -0000 1.23 --- editquiz.php 26 Oct 2005 17:49:28 -0000 1.24 *************** *** 55,58 **** --- 55,59 ---- require_once("{$stack_root}/html/quizjava.html"); + // Work out the correct value for any filter to be applied to the question // bank. This is not needed by all actions, but it is harmless to set it. |
From: Chris S. <san...@us...> - 2005-10-26 17:49:02
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17401 Modified Files: index.php quiz.php Log Message: Index: quiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/quiz.php,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** quiz.php 11 Oct 2005 17:35:38 -0000 1.43 --- quiz.php 26 Oct 2005 17:48:50 -0000 1.44 *************** *** 97,100 **** --- 97,101 ---- // (4.1) Guest users cannot store information in the DB if ('continue_quiz' == $action and 0 == $user['id']) { + //HACK $action = 'new_quiz_version'; } *************** *** 191,205 **** ///////////////////////////////////////////////////////////// - if ($user['id'] <= 0 or !$user['loggedin']) { - include_once($stack_root."/scripts/stackUser.php"); - $user = stack_user_guest(); - } - // This is used by the remote calling functions. if ('review' == $action) { $student_user = $_POST['userid']; $user = stack_db_user_get_ID($student_user); } ! // (4.5) Reconstruct $quizInst from previous data if ('continue_quiz' == $action or 'review' == $action) { --- 192,206 ---- ///////////////////////////////////////////////////////////// // This is used by the remote calling functions. if ('review' == $action) { + if($user['id'] <= 0 and $user['loggedin']) { $student_user = $_POST['userid']; $user = stack_db_user_get_ID($student_user); + $user['loggedin'] = TRUE; + } else { + $action = 'new_quiz_version'; + } } ! // (4.5) Reconstruct $quizInst from previous data if ('continue_quiz' == $action or 'review' == $action) { *************** *** 207,210 **** --- 208,212 ---- $userinfo = stack_db_quiz_quizattempt_getlast($subjectID,$quizid,$user['id']); + $quiz['seed'] = '#'; if (is_array($userinfo)) { // We have attempted the quiz before with *************** *** 246,280 **** // (4.6) Start a new quiz if ('new_quiz_version' == $action) { ! $focus = FALSE; ! $seed = time()+rand(0,30000); ! $quiz['seed'] = $seed; ! // Record the information in the DB ! if ( '0' != $user['id']) { ! stack_db_quiz_quizattempt_store($subjectID,$quiz['quizid'],$user['id'],$seed); } ! foreach ($quiz_questions as $key => $qID) { ! $question = stack_db_getquestion($qID); ! stack_question_validate($question,$errors["qu$key"]); ! $options = stack_options_set($question,$quiz_options,$subject_options); ! if ( '' == $errors["qu$key"] ) { ! // We add an offset to the quiz $seed here to make sure each question in the quiz ! // is created with a different seed. A question may appear more than once, ! // if it is instantiated with the same seed we are in trouble. ! $quizInst[] = stack_question_inst($question,$seed+$key,$options,$errors["qu$key"]); ! } else { ! $question = NULL; ! $a = array($qID); ! $question['questionStemInst'] = get_string('Quiz_error_q','stack',$a); ! $question['questionAnsInst'] = 0; ! $question['errors'] = $errors["qu$key"]; ! $quizInst[] = $question; } ! } ! } // (4.7) Get the information about the quiz from the $_SESSION --- 248,308 ---- // (4.6) Start a new quiz if ('new_quiz_version' == $action) { ! $focus = FALSE; ! $new_seed = TRUE; ! $seed = time()+rand(0,30000); ! // Guest users should see their seed, and can return to their version of the quiz using this. ! if (0 == $user['id']) { ! // a seed must be only numbers three to five digits long. ! $seed = rand(0,99999); ! if ($seed<1000) { $seed .+ (1000*rand(1,9)+1000*rand(1,9)); } ! ! if (array_key_exists('seed',$_POST)) { ! if ( '' != $_POST['seed']) { ! $seed = $_POST['seed']; ! $new_seed = FALSE; ! if (!stack_question_validate_seed($seed)) { ! $action = 'quiz_error'; ! $error['quiz'] = get_string('quiz_version_no_err','stack',''); ! } ! } ! } } ! $quiz['seed'] = $seed; ! if ( 'quiz_error' != $action) { ! // Record the information in the DB ! if ( 0 <= $user['id'] and $new_seed) { ! stack_db_quiz_quizattempt_store($subjectID,$quiz['quizid'],$user['id'],$seed); ! } ! foreach ($quiz_questions as $key => $qID) { ! $question = stack_db_getquestion($qID); ! stack_question_validate($question,$errors["qu$key"]); ! ! $options = stack_options_set($question,$quiz_options,$subject_options); ! ! if ( '' == $errors["qu$key"] ) { ! // We add an offset to the quiz $seed here to make sure each question in the quiz ! // is created with a different seed. A question may appear more than once, ! // if it is instantiated with the same seed we are in trouble. ! $quizInst[] = stack_question_inst($question,$seed+$key,$options,$errors["qu$key"]); ! } else { ! $question = NULL; ! $a = array($qID); ! $question['questionStemInst'] = get_string('Quiz_error_q','stack',$a); ! $question['questionAnsInst'] = 0; ! $question['errors'] = $errors["qu$key"]; ! $quizInst[] = $question; ! } } ! } } + if ($user['id'] <= 0 or !$user['loggedin']) { + include_once($stack_root."/scripts/stackUser.php"); + $user = stack_user_guest(); + } + // (4.7) Get the information about the quiz from the $_SESSION *************** *** 568,572 **** echo "\n<a name='top'></a>\n"; echo '<table>'; ! echo '<tr><td><b>'.get_string('stackQuiz_quizName','stack','').'</b></td><td>'.$quiz['quizName'].'</td></tr>'; echo '<tr><td><b>'.get_string('stackOptions_QuizMode','stack','').'</b></td><td>'.$quizmode.'</td></tr>'; echo '<tr><td><b>'.get_string('quiz_page_created','stack','').'</b></td><td>'.$dtnow.'</td></tr>'; --- 596,604 ---- echo "\n<a name='top'></a>\n"; echo '<table>'; ! echo '<tr><td><b>'.get_string('stackQuiz_quizName','stack','').'</b></td><td>'.$quiz['quizName']; ! if ( 0 == $user['id'] ) { ! echo ' ('.get_string('quiz_version_no','stack','').' '.$quiz['seed'].')'; ! } ! echo '</td></tr>'; echo '<tr><td><b>'.get_string('stackOptions_QuizMode','stack','').'</b></td><td>'.$quizmode.'</td></tr>'; echo '<tr><td><b>'.get_string('quiz_page_created','stack','').'</b></td><td>'.$dtnow.'</td></tr>'; *************** *** 633,669 **** if (FALSE==$focus or ($focus and $key==$focus_on)) { ! echo "<center><table bgcolor='#CCCCCC' width='100%' cellpadding='2'><tr> <td align='left'><a name=\"q$qn\"><b>".get_string('Question','stack','')." $qn</b></a></td><td align='right'>"; if ($focus) { ! echo "<a href='#top'>".get_string('Top','stack','')."</a>  "; foreach ($quizInst as $qk => $dum) { $qnn = $qk+1; echo "<a href=\"javascript:takeaction('focus',$qk);\">$qnn</a> "; } ! echo "<a href='#bottom'>".get_string('Bottom','stack','')."</a>  "; } else { //unfocus if ('solutions' != $action and 'review' != $action) { ! echo "<a href=\"javascript:takeaction('focus',$key);\">".get_string('Focus','stack','')."</a> "; } ! echo "<a href='#top'>".get_string('Top','stack','')."</a>  "; foreach ($quizInst as $qk => $dum) { $qnn = $qk+1; echo "<a href='#q$qnn'>$qnn</a> "; } ! echo "<a href='#bottom'>".get_string('Bottom','stack','')."</a>  "; } if ('solutions' != $action and 'review' != $action) { ! echo" <a href=\"javascript:takeaction('validate',0);\">".get_string('Validate','stack','')."</a>  <a href=\"javascript:takeaction('mark_question',$key);\">".get_string('MarkThisQ','stack','')."</a>  "; } ! echo "<a href=\"javascript:HelpPopup('student','');\">".get_string('Help','stack','')."</a></td> ! </tr></table></center>"; // (1) Pose the question --- 665,700 ---- if (FALSE==$focus or ($focus and $key==$focus_on)) { ! echo "\n\n<center><table bgcolor='#CCCCCC' width='100%' cellpadding='2'><tr> <td align='left'><a name=\"q$qn\"><b>".get_string('Question','stack','')." $qn</b></a></td><td align='right'>"; if ($focus) { ! echo "\n\n<a href='#top'>".get_string('Top','stack','')."</a>  "; foreach ($quizInst as $qk => $dum) { $qnn = $qk+1; echo "<a href=\"javascript:takeaction('focus',$qk);\">$qnn</a> "; } ! echo "\n<a href='#bottom'>".get_string('Bottom','stack','')."</a>  "; } else { //unfocus if ('solutions' != $action and 'review' != $action) { ! echo "\n<a href=\"javascript:takeaction('focus',$key);\">".get_string('Focus','stack','')."</a> "; } ! echo "\n<a href='#top'>".get_string('Top','stack','')."</a>  "; foreach ($quizInst as $qk => $dum) { $qnn = $qk+1; echo "<a href='#q$qnn'>$qnn</a> "; } ! echo "\n<a href='#bottom'>".get_string('Bottom','stack','')."</a>  "; } if ('solutions' != $action and 'review' != $action) { ! echo"\n<a href=\"javascript:takeaction('validate',0);\">".get_string('Validate','stack','')."</a>  <a href=\"javascript:takeaction('mark_question',$key);\">".get_string('MarkThisQ','stack','')."</a>  "; } ! echo "\n<a href=\"javascript:HelpPopup('student','');\">".get_string('Help','stack','')."</a></td></tr>\n\n</table>\n</center>"; // (1) Pose the question *************** *** 693,700 **** // Show a review table. if ('review' == $action) { ! echo "<p><table bgcolor='#CCCCCC' width='100%' cellpadding='2'><tr><td>"; stack_question_inst_show_attempts($qInst,$errors); ! echo "</td></tr><tr><td><b>".get_string('QTestQuestionNote','stack','')."</b> ".nsf($qInst,'questionNoteInst'); ! echo "</td></tr></table></p>"; stack_question_inst_show_sol($qInst,$errors); } --- 724,731 ---- // Show a review table. if ('review' == $action) { ! echo "\n<p>\n<table bgcolor='#CCCCCC' width='100%' cellpadding='2'>\n <tr><td>"; stack_question_inst_show_attempts($qInst,$errors); ! echo "</td></tr>\n <tr><td><b>".get_string('QTestQuestionNote','stack','')."</b> ".nsf($qInst,'questionNoteInst'); ! echo "</td></tr>\n</table></p>\n"; stack_question_inst_show_sol($qInst,$errors); } Index: index.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/index.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** index.php 25 Oct 2005 16:38:44 -0000 1.32 --- index.php 26 Oct 2005 17:48:50 -0000 1.33 *************** *** 120,123 **** --- 120,124 ---- case 'loginscreen': echo '<h1>'.get_string('FE_index_loginscreen_title','stack','').'</h1>'; + echo get_string('FE_index_loginscreen_guestok','stack',''); echo '<form action="index.php" method="post" name="login" id="login"><table><tr>'; echo '<td align="right">'.get_string('USR_Username','stack','').'</td>'; *************** *** 131,135 **** </table></form>'; - echo get_string('FE_index_loginscreen_guestok','stack',''); echo '<form action="index.php" method="post" name="guestlogin">'; --- 132,135 ---- |
From: Chris S. <san...@us...> - 2005-10-26 17:49:01
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17401/scripts Modified Files: stackQuestion.php stackQuiz.php Log Message: Index: stackQuiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuiz.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** stackQuiz.php 11 Oct 2005 17:35:38 -0000 1.17 --- stackQuiz.php 26 Oct 2005 17:48:50 -0000 1.18 *************** *** 179,196 **** function stack_quiz_student_select($subjectID, $quiz_store, $user, $review=FALSE, $returnurl='') { global $stack_root; ! if (!$review) { ! include($stack_root.'/html/quizchoose.html'); ! require_once("{$stack_root}/html/quizjava.html"); ! } echo '<h2>'.get_string('quiz_choose','stack').'</h2>'; - - global $stackQuiz; if (is_array($quiz_store)) { - echo "\n<table cellpadding='2'>\n"; - echo "\n<tr><th>".get_string('stackQuiz_quizName','stack','')."</th><th>".get_string('stackQuiz_quizDescription','stack','')."</th><th>".get_string('FE_quiz_lastmark','stack','')."</th><th>".get_string('stackQuiz_quizDueDate','stack','')."</th>\n</tr>\n"; --- 179,190 ---- function stack_quiz_student_select($subjectID, $quiz_store, $user, $review=FALSE, $returnurl='') { global $stack_root; + global $stackQuiz; ! $uID = $user['id']; echo '<h2>'.get_string('quiz_choose','stack').'</h2>'; if (is_array($quiz_store)) { echo "\n<table cellpadding='2'>\n"; echo "\n<tr><th>".get_string('stackQuiz_quizName','stack','')."</th><th>".get_string('stackQuiz_quizDescription','stack','')."</th><th>".get_string('FE_quiz_lastmark','stack','')."</th><th>".get_string('stackQuiz_quizDueDate','stack','')."</th>\n</tr>\n"; *************** *** 212,216 **** echo "<tr>\n"; if ($review) { - $uID = $user['id']; echo " <td><a href=\"javascript:quizreview('$uID','$qID','$subjectID');\">{$qname}</a></td>\n"; } else { --- 206,209 ---- *************** *** 224,227 **** --- 217,226 ---- } echo "\n</table>\n</p>"; + + if (!$review) { + include($stack_root.'/html/quizchoose.html'); + require_once("{$stack_root}/html/quizjava.html"); + } + } else { echo '<p>'.get_string('quiz_nonetochoose','stack').'</p>'; Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** stackQuestion.php 25 Oct 2005 16:36:51 -0000 1.46 --- stackQuestion.php 26 Oct 2005 17:48:50 -0000 1.47 *************** *** 1037,1040 **** --- 1037,1066 ---- /** + * Validate a seed. + * + * @param $seed The potential seed. + * @return boolean + */ + function stack_question_validate_seed($seed) { + + // a seed must be only numbers three to five digits long. + if (strlen($seed)<3 or 5<strlen($seed)) { + return(FALSE); + } + + // a seed must not contain anything but digits. + if (ereg("([^0-9])",$seed)) { + return(FALSE); + } + + // $seed >= 1000 + if ($seed < 1000) { + return(FALSE); + } else { + return(TRUE); + } + + } + /** * Produce a report on why an item is invalid - used by the RQP * *************** *** 1523,1526 **** --- 1549,1553 ---- // Construct this attempt + $this_attempt['RawAns'] = ''; $this_attempt['RawMark'] = 0; $this_attempt['Penalty'] = 0; *************** *** 1528,1532 **** $this_attempt['AnswerNote'] = ''; $this_attempt['FeedBack'] = ''; - if ('' != trim($RawAns) ) { --- 1555,1558 ---- *************** *** 2032,2036 **** */ function stack_question_inst_displayq($questionInst) { ! echo '<p>'.$questionInst['questionStemInst'].'</p>'; } --- 2058,2062 ---- */ function stack_question_inst_displayq($questionInst) { ! echo "\n<p>".$questionInst['questionStemInst']."</p>\n"; } *************** *** 2060,2064 **** if (''!=$RawAns) { print_string('YourLastAns','stack',''); ! echo '<center>'.$dispAns.'</center>'; } else { echo '<font color="orange">'.get_string('YouHaveNotAns','stack','').'</font>'; --- 2086,2090 ---- if (''!=$RawAns) { print_string('YourLastAns','stack',''); ! echo "\n<center>\n".$dispAns."\n</center>\n"; } else { echo '<font color="orange">'.get_string('YouHaveNotAns','stack','').'</font>'; *************** *** 2070,2078 **** // Add generic feedback. if (1==$this_attempt['RawMark']) { ! echo $options['FeedBackGenericCorrect']; } else if (0==$this_attempt['RawMark']) { ! echo $options['FeedBackGenericIncorrect']; } else { ! echo $options['FeedBackGenericPCorrect']; } --- 2096,2104 ---- // Add generic feedback. if (1==$this_attempt['RawMark']) { ! echo "\n".$options['FeedBackGenericCorrect']; } else if (0==$this_attempt['RawMark']) { ! echo "\n".$options['FeedBackGenericIncorrect']; } else { ! echo "\n".$options['FeedBackGenericPCorrect']; } *************** *** 2080,2084 **** //Give the question specific feedback. ! echo '<br />'.$this_attempt['FeedBack']; } } else { // An invalid response --- 2106,2110 ---- //Give the question specific feedback. ! echo "\n<br />".$this_attempt['FeedBack']; } } else { // An invalid response *************** *** 2138,2146 **** } ! echo "<form name='questionInsttryform' action='$PostTo' method='POST'>\n"; echo stack_question_inst_try_formfrag($lastans,'RawAns'); ! echo "<input type='submit' name='action' value='validate' /> \n ! <input type='submit' name='action' value='mark' /> \n ! </form>\n\n\n"; // form in which questions are edited. } --- 2164,2172 ---- } ! echo "\n<form name='questionInsttryform' action='$PostTo' method='POST'>\n"; echo stack_question_inst_try_formfrag($lastans,'RawAns'); ! echo "\n<input type='submit' name='action' value='validate' />\n ! <input type='submit' name='action' value='mark' /> \n ! </form>\n"; // form in which questions are edited. } |
From: Chris S. <san...@us...> - 2005-10-26 17:49:01
|
Update of /cvsroot/stack/stack-1-0/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17401/html Modified Files: quizchoose.html Log Message: Index: quizchoose.html =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/quizchoose.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** quizchoose.html 15 Sep 2005 08:50:41 -0000 1.2 --- quizchoose.html 26 Oct 2005 17:48:50 -0000 1.3 *************** *** 18,21 **** --- 18,29 ---- <input type='hidden' name='subjectID' value='-1' /> <input type='hidden' name='action' value='review' /> + <?php + if (isset($uID)) { + if ( '0' == $uID) { + echo get_string('quiz_version_no','stack','')." <input type='text' name='seed' value='' /><br />"; + echo "\n<font size='-1'>\n".get_string('quiz_version_info','stack','')."\n</font>\n"; + } + } + ?> </form> |
From: Chris S. <san...@us...> - 2005-10-26 17:49:01
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17401/lang/en Modified Files: stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/stack.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** stack.php 20 Oct 2005 14:05:39 -0000 1.34 --- stack.php 26 Oct 2005 17:48:50 -0000 1.35 *************** *** 45,48 **** --- 45,51 ---- $string['Quiz_error_q'] = '<font color=\"red\">There were errors in the question.</font><br />Please contact your system administrator about questionID {$a[0]}.<br />'; $string['quiz_page_created'] = 'Page created'; + $string['quiz_version_no'] = 'Quiz version id number'; // the quiz seed for guest users. + $string['quiz_version_no_err'] = 'You have supplied an invalid quiz version id number.'; + $string['quiz_version_info'] = 'For a new version of a quiz leave this box empty. You are logged in as a guest user. Once you leave the quiz page itself, STACK does not keep track of which version of the quiz you are given, or any answers you may type in. To get the same version of the quiz in future, keep a careful note of the Quiz version id number you are given on the quiz page. When you come back next time, type this into the box before you choose the quiz to get the version you had previously. If you would like STACK to keep track of this for you, together with your answers and marks, please consider registering.'; $string['quiz_duedate'] = 'Quiz due'; $string['quiz_duedate_passed'] = 'It is now after the quiz due date. You may not make further attempts at this quiz.'; |
From: Chris S. <san...@us...> - 2005-10-25 16:38:52
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30560 Modified Files: index.php Log Message: Index: index.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/index.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** index.php 11 Oct 2005 09:57:44 -0000 1.31 --- index.php 25 Oct 2005 16:38:44 -0000 1.32 *************** *** 157,161 **** echo '<p>'.get_string('FE_index_register_instruct','stack','').'</p>'; echo '<table><tr>'; ! echo '<td>'.get_string('USR_Username').'</td>'; echo '<td><input type="text" name="user[username]" size="25" value="'.stack_s($username).'" alt="User name" /></td><td>'.$err.'</td></tr>'; // TO DO: Need to fix typo in this form - institution --- 157,161 ---- echo '<p>'.get_string('FE_index_register_instruct','stack','').'</p>'; echo '<table><tr>'; ! echo '<td>'.get_string('USR_Username','stack','').'</td>'; echo '<td><input type="text" name="user[username]" size="25" value="'.stack_s($username).'" alt="User name" /></td><td>'.$err.'</td></tr>'; // TO DO: Need to fix typo in this form - institution |
From: Chris S. <san...@us...> - 2005-10-25 16:37:05
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30123/scripts Modified Files: stackQuestion.php stackUtility.php Log Message: Index: stackUtility.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackUtility.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** stackUtility.php 10 Oct 2005 16:19:51 -0000 1.35 --- stackUtility.php 25 Oct 2005 16:36:51 -0000 1.36 *************** *** 630,633 **** --- 630,668 ---- /** + * Takes a castext string, and takes out all the answer keys. + * + * @param string $strin The string input. + * @return array Field [0] contains the string with implicit local replacements, and field [1] contains the array of answer keys. + */ + function string_to_locvars_anskey($strin) { + $varno=1; // The current number of the temporary local variables + $tmplocs=''; + $implocs=''; + + // Grab all the potential locals + preg_match_all('|#(.*)#|U',$strin,$imp); + + foreach ($imp[0] as $key => $il) { + // Create a variable name + $varname = '<html><ansbox>'.$key.'</ansbox></html>'; + + // Split the string in the correct place + $offset = strpos($strin,$il); + $str_head = substr($strin, 0 , $offset); + $str_tail = substr($strin, $offset+strlen($il)); + + // Substitute in marker, and build implicit local + $strin = $str_head.$varname.$str_tail; + $implocs[]=array('key'=>$imp[1][$key]); + } + + $ret[0] = $strin; // The string with implicit local replacements. + $ret[1] = $implocs; // The array of implicit locals + + return $ret; + } + + + /** * Displays a block of castext after all variables have been instantiated by the CAS. * Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** stackQuestion.php 20 Oct 2005 13:25:59 -0000 1.45 --- stackQuestion.php 25 Oct 2005 16:36:51 -0000 1.46 *************** *** 1171,1174 **** --- 1171,1181 ---- } // end of grab implicit locvars loop. + // Get the list of student answer keys. + $ilocs = string_to_locvars_anskey($questionInst['questionStemInst']); + if (is_array($ilocs[1])){ // We have at least one answerKey + $questionInst['questionStemInst'] = $ilocs[0]; + $questionInst['questionAnsKey'] = $ilocs[1][0]['key']; // HACK + } + // Add the answer to the list of locals // Note, this ensures there is at least one local variable. |
From: Chris S. <san...@us...> - 2005-10-25 15:49:54
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17424 Modified Files: mei.php Log Message: Index: mei.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/mei.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mei.php 25 Oct 2005 15:02:06 -0000 1.1 --- mei.php 25 Oct 2005 15:49:46 -0000 1.2 *************** *** 40,44 **** if (array_key_exists('subjectID',$_GET)) { - // Check this is permitted. if (isset($MEI_subjects)) { --- 40,43 ---- *************** *** 70,73 **** echo $subject['subjectHTMLHead']; $quiz_store = stack_db_subject_quiz_list_student($subjectID); ! stack_quiz_student_select($subjectID,$quiz_store, $user, FALSE, "choosequiz.php"); echo $subject['subjectHTMLFoot']; --- 69,72 ---- echo $subject['subjectHTMLHead']; $quiz_store = stack_db_subject_quiz_list_student($subjectID); ! stack_quiz_student_select($subjectID,$quiz_store, $user, FALSE, "mei.php"); echo $subject['subjectHTMLFoot']; |
From: Chris S. <san...@us...> - 2005-10-25 15:02:17
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8318 Added Files: mei.php Log Message: --- NEW FILE: mei.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> * Copyright (c) 2005, Christopher James Sangwin * * @author Chris Sangwin C.J...@bh... * * @package Stack */ session_start(); require_once('stackConfig.php'); require_once('stackLib.php'); /** * To use this script, add a variable $choosequiz_store * to stackConfig.php which is an array of the subjectID numbers * of subjects you wish to be available through this page. * * eg $choosequiz_store = array('1','2'); * where 1 & 2 are the subjectID numbers you wish to release. * * You also need to add a variable $choosequiz_auth to stackConf.php * This is used by VISTA to authorise the page. */ $user = stack_user_guest(); if (array_key_exists('username',$_GET)) { $username = strtolower($_GET['username']); $userID = strtolower($_GET['userID']); $user = stack_user_login_vista($username,$userID); $_SESSION['user'] = $user; } if (array_key_exists('subjectID',$_GET)) { // Check this is permitted. if (isset($MEI_subjects)) { if (FALSE !== array_search($_GET['subjectID'],$MEI_subjects)) { $subjectID = $_GET['subjectID']; } else { echo "This subject is not available through this page."; die(); } } else { echo "The administrator of this STACK server has not released any subjects."; die(); } $subject = stack_db_subject_get($subjectID,FALSE); $_SESSION['subject'] = $subject; } else if (array_key_exists('subject',$_SESSION)) { $subject = $_SESSION['subject']; $subjectID = $subject['subjectID']; } else { echo "You need to supply details of a STACK subjectID number."; die(); } echo "<table width='100%'>\n<tr>\n <td align='left'><h1>STACK quizzes</h1></td>\n"; echo " <td align='right'><img src='pics/logo.png' alt='STACK logo' /></td>\n</tr>\n</table>"; echo $subject['subjectHTMLHead']; $quiz_store = stack_db_subject_quiz_list_student($subjectID); stack_quiz_student_select($subjectID,$quiz_store, $user, FALSE, "choosequiz.php"); echo $subject['subjectHTMLFoot']; |
From: Chris S. <san...@us...> - 2005-10-24 09:25:38
|
Update of /cvsroot/stack/stack-1-0/scripts/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25141/scripts/install Modified Files: stacktest.php Log Message: Index: stacktest.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/install/stacktest.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** stacktest.php 13 Sep 2005 08:46:12 -0000 1.12 --- stacktest.php 24 Oct 2005 09:25:27 -0000 1.13 *************** *** 29,32 **** --- 29,34 ---- require('../../stackLib.php'); + $some_errors = FALSE; + /************************************************/ /* Create maximalocal.php and CASKeywords.php. */ *************** *** 99,102 **** --- 101,105 ---- } else { echo "<font color='red'>No output from the LaTeX to HTML conversion.</font>"; + $some_errors = TRUE; } *************** *** 124,127 **** --- 127,131 ---- } else { echo "<font color='red'>No output from the CAS conversion.</font>"; + $some_errors = TRUE; } *************** *** 154,167 **** } else { echo "<br /><font color='red'>Quiz metadata not written out - check you have permissions to the schemas directory</font>"; } - ?> ! <h2>Next</h2> ! <p>If you have no errors, you are ready to go to your ! <?php ! /** ! * Echo URL. ! */ ! echo "<a href=\"$stack_web_url\">home page</a></p>"; ?> --- 158,172 ---- } else { echo "<br /><font color='red'>Quiz metadata not written out - check you have permissions to the schemas directory</font>"; + $some_errors = TRUE; } ! echo "<h2>Next</h2>\n\n"; ! ! if ($some_errors) { ! echo "You have Errors in your install."; ! phpinfo(); ! } else { ! echo "<p>Check the output carefully. If you have no errors you are ready to go to your <a href=\"$stack_web_url\">home page</a></p>"; ! } ?> |
From: Chris S. <san...@us...> - 2005-10-20 14:05:51
|
Update of /cvsroot/stack/stack-1-0/scripts/maxima In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10308/scripts/maxima Modified Files: stackmaxima.mac Log Message: Index: stackmaxima.mac =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/maxima/stackmaxima.mac,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** stackmaxima.mac 20 Oct 2005 13:25:59 -0000 1.38 --- stackmaxima.mac 20 Oct 2005 14:05:39 -0000 1.39 *************** *** 1149,1153 **** rawmk: String(0), ansnote: "ATPartFrac_ret_expression", ! fb: StackAddFeedback("", "ATPartFrac_ret_expression", StackDISP(factor(sExpr),"\$")) ) else if (isDenomSame(sExprL, tExprL) = false and isDenomSame(sExprL, tExprR) = false) --- 1149,1153 ---- rawmk: String(0), ansnote: "ATPartFrac_ret_expression", ! fb: StackAddFeedback("", "ATPartFrac_ret_expression", StackDISP(factor(sExpr),"\$\$")) ) else if (isDenomSame(sExprL, tExprL) = false and isDenomSame(sExprL, tExprR) = false) *************** *** 1164,1168 **** rawmk: String(0), ansnote: "ATPartFrac_ret_expression", ! fb: StackAddFeedback("", "ATPartFrac_ret_expression", StackDISP(factor(sExpr),"\$")) ), ret: StackReturnOb(val, rawmk,ansnote,fb), --- 1164,1168 ---- rawmk: String(0), ansnote: "ATPartFrac_ret_expression", ! fb: StackAddFeedback("", "ATPartFrac_ret_expression", StackDISP(factor(sExpr),"\$\$")) ), ret: StackReturnOb(val, rawmk,ansnote,fb), |
From: Chris S. <san...@us...> - 2005-10-20 14:05:50
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10308/lang/en Modified Files: stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/stack.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** stack.php 20 Oct 2005 13:33:10 -0000 1.33 --- stack.php 20 Oct 2005 14:05:39 -0000 1.34 *************** *** 402,406 **** $string['ATPartFrac_diff_variables'] ='The variables in your answer are different to those of the question, please check them. '; $string['ATPartFrac_denom_ret'] ='If your answer is written as a single fraction then the denominator would be {$a[0]}. In fact, it should be {$a[1]}. '; ! $string['ATPartFrac_ret_expression'] ='Your answer as a single fraction is {$a[0]}. '; $string['ATSingFrac_error_list'] = $string['ATFacForm_error_list']; --- 402,406 ---- $string['ATPartFrac_diff_variables'] ='The variables in your answer are different to those of the question, please check them. '; $string['ATPartFrac_denom_ret'] ='If your answer is written as a single fraction then the denominator would be {$a[0]}. In fact, it should be {$a[1]}. '; ! $string['ATPartFrac_ret_expression'] ='Your answer as a single fraction is {$a[0]} '; $string['ATSingFrac_error_list'] = $string['ATFacForm_error_list']; |
From: Chris S. <san...@us...> - 2005-10-20 13:33:22
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3670/lang/en Modified Files: stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/stack.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** stack.php 20 Oct 2005 13:25:59 -0000 1.32 --- stack.php 20 Oct 2005 13:33:10 -0000 1.33 *************** *** 372,376 **** $string['ATAlgEquiv_SA_not_set'] = 'Your answer should be a set, but is not. Note that the syntax to enter a set is to enclose the comma separated values with curly brackets.'; $string['ATAlgEquiv_SA_not_equation'] = 'Your answer should be an equation, but is not.'; ! $string['ATAlgEquiv_TA_not_equation'] = 'Your answer is an equation, but the answer supplied by the teaher is not. You may have typed something like \$y=x^2\$ when you only needed to type \$x^2\$.'; $string['ATAlgEquiv_SA_not_inequality'] = 'Your answer should be an inequality, but is not.'; --- 372,376 ---- $string['ATAlgEquiv_SA_not_set'] = 'Your answer should be a set, but is not. Note that the syntax to enter a set is to enclose the comma separated values with curly brackets.'; $string['ATAlgEquiv_SA_not_equation'] = 'Your answer should be an equation, but is not.'; ! $string['ATAlgEquiv_TA_not_equation'] = 'Your answer is an equation, but the answer supplied by the teaher is not. You may have typed something like \$y=2\$ when you only needed to type \$2\$.'; $string['ATAlgEquiv_SA_not_inequality'] = 'Your answer should be an inequality, but is not.'; |
From: Chris S. <san...@us...> - 2005-10-20 13:26:10
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1616/lang/en Modified Files: stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/stack.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** stack.php 14 Oct 2005 15:42:27 -0000 1.31 --- stack.php 20 Oct 2005 13:25:59 -0000 1.32 *************** *** 372,375 **** --- 372,376 ---- $string['ATAlgEquiv_SA_not_set'] = 'Your answer should be a set, but is not. Note that the syntax to enter a set is to enclose the comma separated values with curly brackets.'; $string['ATAlgEquiv_SA_not_equation'] = 'Your answer should be an equation, but is not.'; + $string['ATAlgEquiv_TA_not_equation'] = 'Your answer is an equation, but the answer supplied by the teaher is not. You may have typed something like \$y=x^2\$ when you only needed to type \$x^2\$.'; $string['ATAlgEquiv_SA_not_inequality'] = 'Your answer should be an inequality, but is not.'; |