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-08-17 11:35:44
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24703/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.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** stack.php 17 Aug 2005 10:20:15 -0000 1.19 --- stack.php 17 Aug 2005 11:35:35 -0000 1.20 *************** *** 358,362 **** $string['ATSingFrac_part'] = 'Your answer needs to be in Single Fraction of the form a/b. '; $string['ATSingFrac_var'] = 'The variables in your answer are different to the those of the question, please check them. '; ! $string['ATSingFrac_ret_Q'] = 'It appears that you have simplified ($a[0]}. '; $string['ATSingFrac_ret_exp'] = 'Your answer {$a[0]} is not algebraically equivalent to the answer. You must have done something wrong. '; --- 358,362 ---- $string['ATSingFrac_part'] = 'Your answer needs to be in Single Fraction of the form a/b. '; $string['ATSingFrac_var'] = 'The variables in your answer are different to the those of the question, please check them. '; ! $string['ATSingFrac_ret_Q'] = 'It appears that you have simplified {$a[0]}. '; $string['ATSingFrac_ret_exp'] = 'Your answer {$a[0]} is not algebraically equivalent to the answer. You must have done something wrong. '; |
From: pkiddie <pk...@us...> - 2005-08-17 11:24:15
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23006/scripts Modified Files: Tag: development_xmlrqp stackAuthor.php stackDatabase.php stackQuestion.php stackQuiz.php Log Message: Mini changes to ensure all metadata is written out into the schema correctly, question done, quizzes in progress Index: stackQuiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuiz.php,v retrieving revision 1.5.2.4 retrieving revision 1.5.2.5 diff -C2 -d -r1.5.2.4 -r1.5.2.5 *** stackQuiz.php 16 Aug 2005 16:04:08 -0000 1.5.2.4 --- stackQuiz.php 17 Aug 2005 11:24:06 -0000 1.5.2.5 *************** *** 106,110 **** $stackQuiz['quizLanguage']['metatag']='language'; //dc:language $stackQuiz['quizLanguage']['metatype']='dublincore'; ! $stackQuiz['quizLanguage']['default']='unspecified'; //Rights --- 106,110 ---- $stackQuiz['quizLanguage']['metatag']='language'; //dc:language $stackQuiz['quizLanguage']['metatype']='dublincore'; ! $stackQuiz['quizLanguage']['default']=$stack_defaultlang; //take the default language; //Rights *************** *** 165,169 **** $stackQuiz['quizTimeAllocated']['metatag']='typicallearningtime'; //lom:typicallearningtime $stackQuiz['quizTimeAllocated']['metatype']='lom'; ! $stackQuiz['quizTimeAllocated']['default']='0'; //Type of quiz: Default to algebraicExpression as that is only type of quiz atm, but provides extensibility --- 165,169 ---- $stackQuiz['quizTimeAllocated']['metatag']='typicallearningtime'; //lom:typicallearningtime $stackQuiz['quizTimeAllocated']['metatype']='lom'; ! $stackQuiz['quizTimeAllocated']['default']="00:00:00"; //Type of quiz: Default to algebraicExpression as that is only type of quiz atm, but provides extensibility Index: stackDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackDatabase.php,v retrieving revision 1.34.2.4 retrieving revision 1.34.2.5 diff -C2 -d -r1.34.2.4 -r1.34.2.5 *** stackDatabase.php 16 Aug 2005 15:51:35 -0000 1.34.2.4 --- stackDatabase.php 17 Aug 2005 11:24:06 -0000 1.34.2.5 *************** *** 520,524 **** // If a question has an ID number, and $newq = FALSE, then we update the existing question. // Otherwise we store it as a new question. ! global $stackQuestion,$stack_web_url, $user; // Take the first 30 chars from the question stem $pdes = substr($question['questionStem'],0,30); --- 520,524 ---- // If a question has an ID number, and $newq = FALSE, then we update the existing question. // Otherwise we store it as a new question. ! global $stackQuestion,$stack_web_url; // Take the first 30 chars from the question stem $pdes = substr($question['questionStem'],0,30); *************** *** 546,574 **** } - // The question GUID is not serialised into the database. - if (array_key_exists('questionGUID',$question)) { - $questionGUID = $question['questionGUID']; - unset($question['questionGUID']); - } else { - $questionGUID = stack_generate_guid($stack_web_url); - } - - // New questions get a new GUID. - //<PDK> new questions also get tagged with a creator, an URL representing the publisher, the type 'question', and format... hidden tags - // if ($newq) { ! ! $questionGUID = stack_generate_guid($stack_web_url); ! ! $question['questionFormat'] = 'text/xml; charset="utf-8"'; ! $question['questionPublisher'] = $stack_web_url; ! $question['type'] = 'question'; ! $question['questionUserLastEdited'] = $user['firstname']." ".$user['lastname']; ! ! //show_array("db:"); ! //show_array($question); ! //show_array($user); } ! // Let SQL add the "last edit" if (array_key_exists('questionDateLastEdited',$question)) { --- 546,553 ---- } if ($newq) { ! $question['questionGUID'] = stack_generate_guid($stack_web_url); } ! // Let SQL add the "last edit" if (array_key_exists('questionDateLastEdited',$question)) { *************** *** 592,601 **** $qu_meta['questionBody']=$question; // Is this a new question, or an update of an existing one? if ($newq) { // update question $query='INSERT INTO stackQuestion'; - $qu_fields = ' questionGUID'; - $qu_data = ' "'.$questionGUID.'" '; foreach( $qu_meta as $qfield => $val){ // print_r($qfield); --- 571,580 ---- $qu_meta['questionBody']=$question; + $qu_fields=''; + $qu_data=''; // Is this a new question, or an update of an existing one? if ($newq) { // update question $query='INSERT INTO stackQuestion'; foreach( $qu_meta as $qfield => $val){ // print_r($qfield); *************** *** 607,620 **** $qu_add = addslashes($val); } - $qu_data .= ',"'.$qu_add.'" '; } ! ! // Strip off the initial comma. ! //$qu_fields = substr($qu_fields,1,strlen($qu_fields)-1); ! //$qu_data = substr($qu_data,1,strlen($qu_data)-1); // Build the query $query .= ' ('.$qu_fields.') VALUES ('.$qu_data.')'; } else {// update question --- 586,598 ---- $qu_add = addslashes($val); } $qu_data .= ',"'.$qu_add.'" '; } ! ! $qu_fields = substr($qu_fields, 1); //Strip initial comma ! $qu_data = substr($qu_data, 1); // Build the query $query .= ' ('.$qu_fields.') VALUES ('.$qu_data.')'; + print_r($query); } else {// update question Index: stackAuthor.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackAuthor.php,v retrieving revision 1.29.2.8 retrieving revision 1.29.2.9 diff -C2 -d -r1.29.2.8 -r1.29.2.9 *** stackAuthor.php 16 Aug 2005 15:51:35 -0000 1.29.2.8 --- stackAuthor.php 17 Aug 2005 11:24:06 -0000 1.29.2.9 *************** *** 1,1093 **** ! <?php ! /** ! * Functions which deal with authoring questions and quizzes. These only need to be ! * loaded when an edit page needs to be generated. ! * ! * @package scripts ! * @subpackage Stack ! */ ! ! //****************************************************** [...2158 lines suppressed...] ! echo "\n</table>\n\n\n"; ! } ! ! /** ! * Display the name of a quizField, in a link generating a popup window. ! * ! * @param string $field The field name ! * @return string The link to the popup window ! */ ! function stack_quiz_edit_dispquizfield($field) { ! global $stackQuiz; ! ! $fd='stackQuiz_'.$field; ! ! $fd=get_string($fd,'stack',''); ! $strout = "<a border=\"none\" href=\"javascript:HelpPopup('$field','stackQuiz');\"><img align=\"middle\" border=\"0\" alt=\"$fd\" src=\"pics/help.gif\" /></a> $fd"; ! return($strout); ! } ! ! ?> Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.30.2.12 retrieving revision 1.30.2.13 diff -C2 -d -r1.30.2.12 -r1.30.2.13 *** stackQuestion.php 16 Aug 2005 22:43:29 -0000 1.30.2.12 --- stackQuestion.php 17 Aug 2005 11:24:06 -0000 1.30.2.13 *************** *** 282,286 **** $stackQuestion['questionLanguage']['metatype']='dublincore'; $stackQuestion['questionLanguage']['default']=//'unspecified'; ! $stackQuestion['questionLanguage']['default']=$stack_defaultlang; //Rights --- 282,286 ---- $stackQuestion['questionLanguage']['metatype']='dublincore'; $stackQuestion['questionLanguage']['default']=//'unspecified'; ! $stackQuestion['questionLanguage']['default']=$stack_defaultlang; //take the default language //Rights *************** *** 341,345 **** $stackQuestion['questionTimeAllocated']['metatag']='typicallearningtime'; $stackQuestion['questionTimeAllocated']['metatype']='lom'; ! $stackQuestion['questionTimeAllocated']['default']='0'; //Type of question: Default to algebraicExpression as that is only type of question atm, but provides extensibility --- 341,345 ---- $stackQuestion['questionTimeAllocated']['metatag']='typicallearningtime'; $stackQuestion['questionTimeAllocated']['metatype']='lom'; ! $stackQuestion['questionTimeAllocated']['default']="00:00:00"; //Type of question: Default to algebraicExpression as that is only type of question atm, but provides extensibility |
From: pkiddie <pk...@us...> - 2005-08-17 11:24:14
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23006 Modified Files: Tag: development_xmlrqp changelog.txt editquiz.php import.php question_bank.php Log Message: Mini changes to ensure all metadata is written out into the schema correctly, question done, quizzes in progress Index: changelog.txt =================================================================== RCS file: /cvsroot/stack/stack-1-0/Attic/changelog.txt,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -C2 -d -r1.1.2.7 -r1.1.2.8 *** changelog.txt 15 Aug 2005 16:09:23 -0000 1.1.2.7 --- changelog.txt 17 Aug 2005 11:24:05 -0000 1.1.2.8 *************** *** 33,36 **** --- 33,41 ---- Each potential response now has a order element, as order is crucial. Question variable keyval types are encompassed within a <questionVar> XML declaration + Each questionVar also has an order for XML parsing to work + + - Question and quiz metadata now defaults to to the specified 'default' + - update database to work on questionUserLastEdited - should be of type 'text' + - Known issues: Index: import.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/Attic/import.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 *** import.php 16 Aug 2005 22:43:28 -0000 1.1.2.3 --- import.php 17 Aug 2005 11:24:05 -0000 1.1.2.4 *************** *** 356,360 **** { ! echo "<h2>Details of questions uploaded</h2>"; echo '<table><thead><tr>'; --- 356,362 ---- { ! include("{$stack_root}/html/qselectform.php"); ! ! echo "<h2>Details of the uploaded</h2>"; echo '<table><thead><tr>'; *************** *** 406,409 **** --- 408,414 ---- echo "</tbody></table>\n"; + echo "<p><a href=\"javascript:SelectQs('export_xml_list');\">Edit imported question</a> "; + echo "<p><a href=\"javascript:SelectQs('edit_metadata');\">View list of questions</a> "; + } Index: editquiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/editquiz.php,v retrieving revision 1.13.2.2 retrieving revision 1.13.2.3 diff -C2 -d -r1.13.2.2 -r1.13.2.3 *** editquiz.php 15 Aug 2005 16:09:23 -0000 1.13.2.2 --- editquiz.php 17 Aug 2005 11:24:05 -0000 1.13.2.3 *************** *** 143,150 **** $quiz['quizid'] = $quizid; //<TODO> Automatically generated quiz metadata ! $quiz['questionFormat'] = 'text/xml; charset="utf-8"'; ! $quiz['questionPublisher'] = $stack_web_url; $quiz['type'] = 'quiz'; ! $quiz['questionUserLastEdited'] = $user['firstname']." ".$user['lastname']; $action = 'quiz_edit'; } --- 143,157 ---- $quiz['quizid'] = $quizid; //<TODO> Automatically generated quiz metadata ! $quiz['quizGUID'] = stack_generate_guid($stack_web_url); ! $quiz['quizFormat'] = 'text/xml; charset="utf-8"'; ! $quiz['quizPublisher'] = $stack_web_url; $quiz['type'] = 'quiz'; ! $quiz['quizUserLastEdited'] = $user['firstname']." ".$user['lastname']; ! ! if ($user['email']!='') ! { ! $question['questionUserLastEdited'].=' <'.$user['email'].'>'; ! } ! $action = 'quiz_edit'; } Index: question_bank.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/question_bank.php,v retrieving revision 1.8.2.6 retrieving revision 1.8.2.7 diff -C2 -d -r1.8.2.6 -r1.8.2.7 *** question_bank.php 16 Aug 2005 15:24:16 -0000 1.8.2.6 --- question_bank.php 17 Aug 2005 11:24:06 -0000 1.8.2.7 *************** *** 86,90 **** } ! if ('edit_from_db' == $action or 'edit_new' == $action) { $action = 'edit'; } --- 86,90 ---- } ! if ('edit_from_db' == $action) { $action = 'edit'; } |
From: pkiddie <pk...@us...> - 2005-08-17 11:24:14
|
Update of /cvsroot/stack/stack-1-0/scripts/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23006/scripts/install Modified Files: Tag: development_xmlrqp stackUpdateDatabase.php Log Message: Mini changes to ensure all metadata is written out into the schema correctly, question done, quizzes in progress Index: stackUpdateDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/install/stackUpdateDatabase.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 *** stackUpdateDatabase.php 28 Jul 2005 13:36:22 -0000 1.3.2.1 --- stackUpdateDatabase.php 17 Aug 2005 11:24:06 -0000 1.3.2.2 *************** *** 12,15 **** --- 12,17 ---- /** This PHP script simply adds new fields to mySQL for metadata. This affects both questions and quizzes */ + // v1.1 - Changed questionUserLastEdited field to text type + // v1.0 - initial - added metadata fields $addQuestionColumnQuery = ' ALTER TABLE stackQuestion *************** *** 25,30 **** ADD COLUMN questionTimeAllocated time NULL, ADD COLUMN questionExcerciseType tinytext NULL, ! ADD COLUMN questionDateLastEdited datetime NULL, ! DROP COLUMN questionDateLastEdited;'; $addQuizColumnQuery = ' --- 27,32 ---- ADD COLUMN questionTimeAllocated time NULL, ADD COLUMN questionExcerciseType tinytext NULL, ! CHANGE questionDateLastEdited questionDateLastEdited TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ! CHANGE questionUserLastEdited questionUserLastEdited TEXT NULL;'; $addQuizColumnQuery = ' *************** *** 32,37 **** ADD COLUMN quizGUID varchar(22) NULL, ADD COLUMN quizKeywords tinytext NULL, ! ADD COLUMN quizUserLastEdited int NULL, ! ADD COLUMN quizDateLastEdited datetime NULL, ADD COLUMN quizPublisher tinytext NULL, ADD COLUMN type tinytext NULL, --- 34,39 ---- ADD COLUMN quizGUID varchar(22) NULL, ADD COLUMN quizKeywords tinytext NULL, ! ADD COLUMN quizUserLastEdited TEXT NULL, ! ADD COLUMN quizDateLastEdited TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD COLUMN quizPublisher tinytext NULL, ADD COLUMN type tinytext NULL, |
From: pkiddie <pk...@us...> - 2005-08-17 11:24:14
|
Update of /cvsroot/stack/stack-1-0/scripts/rqp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23006/scripts/rqp Modified Files: Tag: development_xmlrqp RQPv1p0Server.php Added Files: Tag: development_xmlrqp RQPv1p0Server_old.php Log Message: Mini changes to ensure all metadata is written out into the schema correctly, question done, quizzes in progress Index: RQPv1p0Server.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/rqp/Attic/RQPv1p0Server.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 *** RQPv1p0Server.php 11 Aug 2005 16:21:18 -0000 1.1.2.3 --- RQPv1p0Server.php 17 Aug 2005 11:24:06 -0000 1.1.2.4 *************** *** 1,2470 **** ! <?php ! ! include("nb_easyxml_lite.php"); ! ! include("nb_soapfuncs.php"); ! ! include("rqp_util.php"); //Stack/RQP utility functions ! ! include("../../stackstd.php"); //Reqd for version info for STACK ! [...3224 lines suppressed...] ! else ! $ret .= $this->soapify_anyURI($input, "anyURI") . "\n"; ! $ret .= "</$name>\n"; ! return $ret; ! } ! ! function desoap_anyURIArray($xml, $idx, $name) ! { ! $ret = array(); ! $cidx = $xml->FindChildElement($idx); ! while($cidx != false) ! { ! $ret[] = $this->desoap_anyURI($xml, $cidx, "anyURI"); ! $cidx = $xml->FindNextPeer($cidx); ! } ! } ! ! } ! ?> \ No newline at end of file --- NEW FILE: RQPv1p0Server_old.php --- <?php include("nb_easyxml_lite.php"); include("nb_soapfuncs.php"); include("rqp_util.php"); //Stack/RQP utility functions include("../../stackstd.php"); //Reqd for version info for STACK /********* Data structures used by this web service ********* * * type ServerInformationDType{ * ['name']=>string [...2431 lines suppressed...] $cidx = $xml->FindChildElement($idx); while($cidx != false) { $ret[] = $this->desoap_anyURI($xml, $cidx, "anyURI"); } } } ?> |
From: pkiddie <pk...@us...> - 2005-08-17 11:24:14
|
Update of /cvsroot/stack/stack-1-0/frontend_general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23006/frontend_general Modified Files: Tag: development_xmlrqp question_bank_util.php Log Message: Mini changes to ensure all metadata is written out into the schema correctly, question done, quizzes in progress Index: question_bank_util.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/frontend_general/question_bank_util.php,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** question_bank_util.php 14 Jul 2005 18:44:54 -0000 1.3 --- question_bank_util.php 17 Aug 2005 11:24:06 -0000 1.3.2.1 *************** *** 95,99 **** */ function stack_get_question($source) { ! $question = NULL; --- 95,100 ---- */ function stack_get_question($source) { ! global $stack_web_url,$user; ! $question = NULL; *************** *** 111,116 **** if ('new' == $source or NULL == $question) { ! $question['questionID']='0'; ! $question['questionAnsKey']='ans1'; } return $question; --- 112,129 ---- if ('new' == $source or NULL == $question) { ! ! show_array($user); ! $question['questionID'] = '0'; ! $question['questionAnsKey'] = 'ans1'; ! $question['questionGUID'] = stack_generate_guid($stack_web_url); ! $question['questionFormat'] = 'text/xml; charset="utf-8"'; ! $question['questionPublisher'] = $stack_web_url; ! $question['type'] = 'question'; ! $question['questionUserLastEdited'] = $user['firstname']." ".$user['lastname']; ! ! if ($user['email']!='') ! { ! $question['questionUserLastEdited'].=' <'.$user['email'].'>'; ! } } return $question; |
From: Chris S. <san...@us...> - 2005-08-17 10:20:50
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10761/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.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** stack.php 16 Aug 2005 12:34:14 -0000 1.18 --- stack.php 17 Aug 2005 10:20:15 -0000 1.19 *************** *** 351,355 **** $string['ATPartFrac_single_fraction'] ='Your answer seems to be a single fraction, it needs to be in a partial fraction form. '; $string['ATPartFrac_diff_variables'] ='The variables in your answer are different to those of the question, please check them. '; ! $string['ATPartFrac_denom_ret'] ='The denominator of your answer is {$a[0]} it should be {$a[1]}. '; $string['ATPartFrac_ret_expression'] ='Your answer as a single fraction is {$a[0]}. '; --- 351,355 ---- $string['ATPartFrac_single_fraction'] ='Your answer seems to be a single fraction, it needs to be in a partial fraction form. '; $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]}. '; |
From: pkiddie <pk...@us...> - 2005-08-16 22:43:43
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23459 Modified Files: Tag: development_xmlrqp import.php Log Message: ShowSol removed from documentation Importing questions and question lists New functions in stackXML to define an order schema attribute, and keyval order attribute. Use of attributes in potential responses and questionVars Index: import.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/Attic/import.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 *** import.php 16 Aug 2005 15:24:16 -0000 1.1.2.2 --- import.php 16 Aug 2005 22:43:28 -0000 1.1.2.3 *************** *** 1,138 **** ! <?php ! ! /** Provides the front end interactions for the import functionality, and then returns the user to the correct page, i.e. if they ! are uploading a question,quiz or list of questions ! */ ! ! session_start(); ! ! require_once("other/ListMenu.php"); ! require_once("stackstd.php"); ! ! require_once("{$stack_root}/html/trypopupform.html"); ! require_once("{$stack_root}/frontend_general/editquiz_display.php"); ! require_once("{$stack_root}/html/helpform.php"); ! require_once("{$stack_root}/html/quizjava.html"); ! require_once("{$stack_root}/scripts/stackAuthor.php"); ! ! ! /////////////////////////////////////////////////////////////// ! // (1) Process Input - this sets $action, $user and $username ! /////////////////////////////////////////////////////////////// ! $default_action = 'import'; ! include('frontend_general/process_input.php'); ! ! //include_once('frontend_general/edit_quiz_util.php'); ! $PostTo = 'import.php'; ! $filter = ''; ! $quizid = NULL; ! ! include('html/pagehead.php'); ! ! if (!stack_user_is_admin($user) or !stack_is_logged_in($user)) { ! stack_display_editquiz_error_not_admin($user); ! include('html/pagefoot.php'); ! die(); ! } ! ! $upload_successful = FALSE; ! if ($action == 'uploaded_xml') { ! if (array_key_exists('xmlfile',$_FILES)) { ! if (is_uploaded_file($_FILES['xmlfile']['tmp_name'])) { ! ! include_once("{$stack_root}/scripts/stackXML.php"); ! $qu = stack_xml_parse_file($_FILES['xmlfile']['tmp_name']); ! // If a single question has been uploaded, edit it, if multiple ! // questions store them in the database ! show_array($qu); ! ! if (array_key_exists('assessmentItem',$qu)) { ! $imported= $qu['assessmentItem']; ! //$action = 'edit'; ! //$upload_successful = TRUE; ! ! } else if (array_key_exists('mathQuiz',$qu)) { ! $imported = $qu['mathQuiz']; ! //We need to be able to discern between a quiz and a list of questions. ! //A quiz will have arraykeys other than assessment items ! } ! ! $upload_successful = TRUE; ! } ! } ! } ! ! switch ($action) { ! case 'import': ! stack_display_import($errors); ! break; ! ! case 'uploaded_xml': ! if ($upload_successful) { ! stack_display_show_imported($imported); ! } ! break; ! } ! ! /** ! * Displays the form for importing a file ! * @return void ! */ ! function stack_display_import($errors) { ! echo nsf($errors,'import'); ! echo "Select a file to upload and edit: ! <br /> ! <form enctype='multipart/form-data' action=\"import.php\"' method='POST'><br />\n ! <input type ='file' name='xmlfile' />\n ! <input type ='hidden' name='action' value='uploaded_xml' /> ! <input type ='submit' name='go' value='Upload'> ! </form>\n\n"; ! } ! ! /** ! * Displays the imported questions ! * @param array $quiz The imported quiz ! * @return void ! */ ! function stack_display_show_imported($imported) { ! show_array($imported); ! //if (array_key_exists('assessmentItem',$qu)) ! // { ! ! ! /*echo "<h2>Details of questions uploaded</h2>"; ! echo '<table><thead><tr>'; ! echo '<th>ID</th><th>Name</th> <th>Description</th> <th>Key words</th> <th></th>'; ! echo '</tr></thead><tbody>'; ! ! $errs = NULL; ! ! foreach ($question as $key => $qu) { ! ! stack_question_validate($quiz[$key],$errs[$key]); ! $qu['questionID'] = stack_db_addquestion($qu); ! echo "<tr>\n <td>".sf($qu,'questionID')."</td> <td>".sf($qu,'questionName')." </td> <td>".sf($qu,'questionDescription')." </td> <td>".sf($qu,'questionKeywords')." </td>"; ! $errc = FALSE; ! if (nsf($errs,$key)) { ! if (is_array($errs[$key])) { ! $errc = TRUE; ! } ! } ! if ($errc) { ! echo "<td><font color=\"red\">Invalid question</font></td>"; ! echo "</tr></tbody></table>\n\n"; ! echo stack_question_errstr($errs[$key]); ! echo "\n\n<table><thead><tr>"; ! echo '<th>ID</th><th>Name</th> <th>Description</th> <th>Key words</th> <th></th>'; ! echo '</tr></thead><tbody>'; ! } else { ! echo "<td><font color=\"greed\">Valid question</font></td>"; ! } ! echo "</tr>\n"; ! } ! ! echo "</tbody></table>\n"; ! echo "<h2>Current database of questions</h2>";*/ ! } ! ! ?> --- 1,412 ---- ! <?php ! ! ! ! /** Provides the front end interactions for the import functionality, and then returns the user to the correct page, i.e. if they ! ! are uploading a question,quiz or list of questions ! ! */ ! ! ! ! session_start(); ! ! require_once("other/ListMenu.php"); ! ! include('stackstd.php'); ! ! ! ! require_once("{$stack_root}/html/trypopupform.html"); ! ! require_once("{$stack_root}/frontend_general/editquiz_display.php"); ! ! require_once("{$stack_root}/html/helpform.php"); ! ! require_once("{$stack_root}/html/quizjava.html"); ! ! require_once("{$stack_root}/scripts/stackAuthor.php"); ! ! ! ! ! ! /////////////////////////////////////////////////////////////// ! ! // (1) Process Input - this sets $action, $user and $username ! ! /////////////////////////////////////////////////////////////// ! ! $default_action = 'import'; ! ! include('frontend_general/process_input.php'); ! ! ! ! //include_once('frontend_general/edit_quiz_util.php'); ! ! $PostTo = 'import.php'; ! ! $filter = ''; ! ! $quizid = NULL; ! ! ! ! include('html/pagehead.php'); ! ! ! ! if (!stack_user_is_admin($user) or !stack_is_logged_in($user)) { ! ! stack_display_editquiz_error_not_admin($user); ! ! include('html/pagefoot.php'); ! ! die(); ! ! } ! ! ! ! $upload_successful = FALSE; ! ! if ($action == 'uploaded_xml') { ! ! if (array_key_exists('xmlfile',$_FILES)) { ! ! if (is_uploaded_file($_FILES['xmlfile']['tmp_name'])) { ! ! ! ! include_once("{$stack_root}/scripts/stackXML.php"); ! ! $imported = stack_xml_parse_file($_FILES['xmlfile']['tmp_name']); ! ! // If a single question has been uploaded, edit it, if multiple ! ! // questions store them in the database ! ! $upload_successful = TRUE; ! ! } ! ! } ! ! } ! ! ! ! switch ($action) { ! ! case 'import': ! ! stack_display_import($errors); ! ! break; ! ! ! ! case 'uploaded_xml': ! ! if ($upload_successful) { ! ! stack_display_parse_imported($imported); ! ! } ! ! break; ! ! } ! ! ! ! /** ! ! * Displays the form for importing a file ! ! * @return void ! ! */ ! ! function stack_display_import($errors) { ! ! echo nsf($errors,'import'); ! ! echo "Select a file to upload and edit: ! ! <br /> ! ! <form enctype='multipart/form-data' action=\"import.php\"' method='POST'><br />\n ! ! <input type ='file' name='xmlfile' />\n ! ! <input type ='hidden' name='action' value='uploaded_xml' /> ! ! <input type ='submit' name='go' value='Upload'> ! ! </form>\n\n"; ! ! } ! ! ! ! /** ! ! * Displays the imported questions ! ! * @param array $quiz The imported quiz ! ! * @return void ! ! */ ! ! function stack_display_parse_imported($imported) { ! ! global $stackQuiz; ! //show_array($imported); ! ! //First decide what has been imported ! //If it is a quiz/list of questions ! if (array_key_exists('mathQuiz',$imported)) ! { ! $quiz = $imported['mathQuiz']; ! ! $isQuiz=false; ! //Now check for quiz level components, like a GUID ! foreach($stackQuiz as $arrayKey=>$quizField) ! { ! show_array($arrayKey); ! show_array($imported); ! if (array_key_exists($arrayKey,$quiz)) ! { ! print_r("true"); ! $isQuiz = true; ! break; ! } ! } ! ! //At this point we are ready to decide if its a quiz or list of questions ! if ($isQuiz) { ! stack_display_show_imported_quiz($quiz); ! } ! ! else ! { ! //No quiz level metadata/options, thus is a list of questions ! $quiz=$imported['mathQuiz']['assessmentItem']; ! stack_display_show_imported_qulist($quiz); ! } ! } ! ! //Just double check it is a question ! else if (array_key_exists('assessmentItem',$imported)) ! { ! $question = $imported['assessmentItem']; ! ! stack_display_show_imported_question($question); ! } ! ! else ! { ! echo("No valid data could be read from this file"); ! } ! ! } ! ! function stack_display_show_imported_quiz($quiz) ! { ! echo "<h2>Details of quiz uploaded</h2>"; ! ! echo '<table><thead><tr>'; ! ! echo '<th>ID</th><th>Name</th> <th>Description</th> <th>Key words</th> <th></th>'; ! ! echo '</tr></thead><tbody>'; ! ! //Validate quiz ! ! //Add quiz to database ! ! //Show quiz stuff to screen ! echo "<tr>\n <td>".sf($quiz,'quizID')."</td> <td>".sf($quiz,'quizName')." </td> <td>".sf($quiz,'quizDescription')." </td> <td>".sf($quiz,'quizKeywords')." </td>"; ! ! $errs = NULL; ! ! show_array($quiz); ! ! //Work on each question ! foreach ($quiz as $key => $qu) { ! ! /*if $key==('assessmentItem') ! stack_question_validate($quiz[$key],$errs[$key]); ! ! $qu['questionID'] = stack_db_question_add($qu); ! ! echo "<tr>\n <td>".sf($qu,'questionID')."</td> <td>".sf($qu,'questionName')." </td> <td>".sf($qu,'questionDescription')." </td> <td>".sf($qu,'questionKeywords')." </td>"; ! ! $errc = FALSE; ! ! if (nsf($errs,$key)) { ! ! if (is_array($errs[$key])) { ! ! $errc = TRUE; ! ! } ! ! } ! ! if ($errc) { ! ! echo "<td><font color=\"red\">Invalid question</font></td>"; ! ! echo "</tr></tbody></table>\n\n"; ! ! echo stack_question_errstr($errs[$key]); ! ! echo "\n\n<table><thead><tr>"; ! ! echo '<th>ID</th><th>Name</th> <th>Description</th> <th>Key words</th> <th></th>'; ! ! echo '</tr></thead><tbody>'; ! ! } else { ! ! echo "<td><font color=\"greed\">Valid question</font></td>"; ! ! } ! ! echo "</tr>\n"; ! ! }*/ ! } ! ! ! ! echo "</tbody></table>\n"; ! ! } ! ! function stack_display_show_imported_qulist($quiz) ! { ! echo "<h2>Details of questions uploaded</h2>"; ! ! echo '<table><thead><tr>'; ! ! echo '<th>ID</th><th>Name</th> <th>Description</th> <th>Key words</th> <th></th>'; ! ! echo '</tr></thead><tbody>'; ! ! $errs = NULL; ! ! foreach ($quiz as $key => $qu) { ! ! show_array($qu); ! ! stack_question_validate($quiz[$key],$errs[$key]); ! ! $qu['questionID'] = stack_db_question_add($qu); ! ! echo "<tr>\n <td>".sf($qu,'questionID')."</td> <td>".sf($qu,'questionName')." </td> <td>".sf($qu,'questionDescription')." </td> <td>".sf($qu,'questionKeywords')." </td>"; ! ! $errc = FALSE; ! ! if (nsf($errs,$key)) { ! ! if (is_array($errs[$key])) { ! ! $errc = TRUE; ! ! } ! ! } ! ! if ($errc) { ! ! echo "<td><font color=\"red\">Invalid question</font></td>"; ! ! echo "</tr></tbody></table>\n\n"; ! ! echo stack_question_errstr($errs[$key]); ! ! echo "\n\n<table><thead><tr>"; ! ! echo '<th>ID</th><th>Name</th> <th>Description</th> <th>Key words</th> <th></th>'; ! ! echo '</tr></thead><tbody>'; ! ! } else { ! ! echo "<td><font color=\"greed\">Valid question</font></td>"; ! ! } ! ! echo "</tr>\n"; ! ! } ! ! ! ! echo "</tbody></table>\n"; ! } ! ! function stack_display_show_imported_question($question) ! { ! ! echo "<h2>Details of questions uploaded</h2>"; ! ! echo '<table><thead><tr>'; ! ! echo '<th>ID</th><th>Name</th> <th>Description</th> <th>Key words</th> <th></th>'; ! ! echo '</tr></thead><tbody>'; ! ! show_array($question); ! ! stack_question_validate($question,$errs); ! ! $question['questionID'] = stack_db_question_add($question); ! ! echo "<tr>\n <td>".sf($question,'questionID')."</td> <td>".sf($question,'questionName')." </td> <td>".sf($question,'questionDescription')." </td> <td>".sf($question,'questionKeywords')." </td>"; ! ! $errc = FALSE; ! ! if (!empty($errs)) { ! ! $errc = TRUE; ! ! } ! ! if ($errc) { ! ! echo "<td><font color=\"red\">Invalid question</font></td>"; ! ! echo "</tr></tbody></table>\n\n"; ! ! echo stack_question_errstr($errs); ! ! echo "\n\n<table><thead><tr>"; ! ! echo '<th>ID</th><th>Name</th> <th>Description</th> <th>Key words</th> <th></th>'; ! ! echo '</tr></thead><tbody>'; ! ! } else { ! ! echo "<td><font color=\"greed\">Valid question</font></td>"; ! ! } ! ! echo "</tr>\n"; ! ! ! ! echo "</tbody></table>\n"; ! ! } ! ! ! ?> ! |
From: pkiddie <pk...@us...> - 2005-08-16 22:43:41
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23459/scripts Modified Files: Tag: development_xmlrqp stackQuestion.php stackXML.php Log Message: ShowSol removed from documentation Importing questions and question lists New functions in stackXML to define an order schema attribute, and keyval order attribute. Use of attributes in potential responses and questionVars Index: stackXML.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackXML.php,v retrieving revision 1.13.2.15 retrieving revision 1.13.2.16 diff -C2 -d -r1.13.2.15 -r1.13.2.16 *** stackXML.php 16 Aug 2005 15:24:16 -0000 1.13.2.15 --- stackXML.php 16 Aug 2005 22:43:29 -0000 1.13.2.16 *************** *** 189,195 **** //Order of potential reponses is important. //Thus create an 'order' element and append to potential response head ! $potRespOrder = &$xmlDoc->createElementNS('','order'); $potRespOrder->setText($order); ! $potRespElem->appendChild($potRespOrder); //Iterate through fields of a potential response --- 189,195 ---- //Order of potential reponses is important. //Thus create an 'order' element and append to potential response head ! $potRespOrder = &$xmlDoc->createAttributeNS('','order'); $potRespOrder->setText($order); ! $potRespElem->setAttributeNode($potRespOrder); //Iterate through fields of a potential response *************** *** 253,260 **** if ($attribs['type']=='keyval') { ! foreach ($question[$qfield] as $keyvalType) { $questionElement = &$xmlDoc->createElementNS('',$qfield); $keyElement = &$xmlDoc->createElementNS('',"key"); $keyElement->setText($keyvalType['key']); --- 253,263 ---- if ($attribs['type']=='keyval') { ! foreach ($question[$qfield] as $order=>$keyvalType) { $questionElement = &$xmlDoc->createElementNS('',$qfield); + $keyValOrder = &$xmlDoc->createAttributeNS('','order'); + $keyValOrder->setText($order); + $keyElement = &$xmlDoc->createElementNS('',"key"); $keyElement->setText($keyvalType['key']); *************** *** 264,268 **** $questionElement->appendChild($keyElement); ! $questionElement->appendChild($valElement); //Then append this type onto question fragment --- 267,272 ---- $questionElement->appendChild($keyElement); ! $questionElement->appendChild($valElement); ! $questionElement->setAttributeNode($keyValOrder); //Then append this type onto question fragment *************** *** 967,970 **** --- 971,983 ---- } + //Need to check whether an ordered attribute has been appended onto the current node + //If so: + if ($node->hasAttributeNS('','order')) + { + $order = $node->getAttributeNS('','order'); + stack_xml_parse_element_into_array($children[$i],$array[$nodeName][],$arrayType); + } + + //print_r($length); //show_array($nodeList); *************** *** 972,976 **** //If there are multiple elements of the same name //Deal with arrays of values: for example potential responses and questionVar/answerVar ! if ($length>1) { switch ($nodeName) --- 985,989 ---- //If there are multiple elements of the same name //Deal with arrays of values: for example potential responses and questionVar/answerVar ! else if ($length>1) { switch ($nodeName) *************** *** 982,985 **** --- 995,999 ---- } + //And the same with mathQuiz fields case('mathQuiz'): { stack_xml_parse_element_into_array($children[$i],$array[$nodeName][],'stackQuiz'); *************** *** 1615,1698 **** foreach($stackOptions as $arrayKey=>$optionField) ! { ! switch($optionField['type']) { ! case('list'): { ! //List type takes the lower case of the field ! if (!empty($optionField['minoccurs']) && (!empty($optionField['maxoccurs']))) { ! $schemaField = &stack_xml_create_schema_field($arrayKey, FALSE, strtolower($arrayKey), ! $optionField['minoccurs'], $optionField['maxocurrs']); } ! else { ! $schemaField = &stack_xml_create_schema_field($arrayKey, FALSE, strtolower($arrayKey)); } ! //<TODO>If of list type we should also output the list of possible values into the schema root ! $schemaSimpleType = &stack_xml_create_schema_vocabulary(strtolower($arrayKey),$optionField['values']); ! ! $schemaElem->appendChild($schemaSimpleType); ! ! break; ! } ! ! case('number'): ! { ! //Output of type xs:float ! if (!empty($optionField['minoccurs']) && (!empty($optionField['maxoccurs']))) { ! $schemaField = &stack_xml_create_schema_field($arrayKey, TRUE, 'FLOAT', ! $optionField['minoccurs'], $optionField['maxocurrs']); } ! else { ! $schemaField = &stack_xml_create_schema_field($arrayKey, TRUE, 'FLOAT'); ! } ! ! break; ! } ! ! case('html' || 'string' ): ! { ! //Output type xs:string ! if (!empty($optionField['minoccurs']) && (!empty($optionField['maxoccurs']))) ! { ! $schemaField = &stack_xml_create_schema_field($arrayKey, TRUE, 'TEXT', ! $optionField['minoccurs'], $optionField['maxocurrs']); } - - else - { - $schemaField = &stack_xml_create_schema_field($arrayKey, TRUE, 'TEXT'); - } - - break; } ! ! default: { ! if (!empty($optionField['minoccurs']) && (!empty($optionField['maxoccurs']))) ! { ! $schemaField = &stack_xml_create_schema_field($arrayKey, TRUE, 'TEXT', ! $optionField['minoccurs'], $optionField['maxocurrs']); ! } ! ! else ! { ! $schemaField = &stack_xml_create_schema_field($arrayKey, TRUE, 'TEXT'); ! } ! ! break; } } ! ! //Now add any documentation to the field ! if (!empty($optionField['doc'])) { ! stack_xml_create_field_documentation($schemaField,$optionField['doc']); } --- 1629,1720 ---- foreach($stackOptions as $arrayKey=>$optionField) ! { ! if (!empty($optionField['type'])) { ! switch($optionField['type']) { ! case('list'): { ! //List type takes the lower case of the field ! if (!empty($optionField['minoccurs']) && (!empty($optionField['maxoccurs']))) ! { ! $schemaField = &stack_xml_create_schema_field($arrayKey, FALSE, strtolower($arrayKey), ! $optionField['minoccurs'], $optionField['maxocurrs']); ! } ! ! else ! { ! $schemaField = &stack_xml_create_schema_field($arrayKey, FALSE, strtolower($arrayKey)); ! } ! ! //<TODO>If of list type we should also output the list of possible values into the schema root ! $schemaSimpleType = &stack_xml_create_schema_vocabulary(strtolower($arrayKey),$optionField['values']); ! ! $schemaElem->appendChild($schemaSimpleType); ! ! break; } ! case('number'): { ! //Output of type xs:float ! if (!empty($optionField['minoccurs']) && (!empty($optionField['maxoccurs']))) ! { ! $schemaField = &stack_xml_create_schema_field($arrayKey, TRUE, 'FLOAT', ! $optionField['minoccurs'], $optionField['maxocurrs']); ! } ! ! else ! { ! $schemaField = &stack_xml_create_schema_field($arrayKey, TRUE, 'FLOAT'); ! } ! ! break; } ! case('html' || 'string' ): { ! //Output type xs:string ! if (!empty($optionField['minoccurs']) && (!empty($optionField['maxoccurs']))) ! { ! $schemaField = &stack_xml_create_schema_field($arrayKey, TRUE, 'TEXT', ! $optionField['minoccurs'], $optionField['maxocurrs']); ! } ! ! else ! { ! $schemaField = &stack_xml_create_schema_field($arrayKey, TRUE, 'TEXT'); ! } ! ! break; } ! default: { ! if (!empty($optionField['minoccurs']) && (!empty($optionField['maxoccurs']))) ! { ! $schemaField = &stack_xml_create_schema_field($arrayKey, TRUE, 'TEXT', ! $optionField['minoccurs'], $optionField['maxocurrs']); ! } ! ! else ! { ! $schemaField = &stack_xml_create_schema_field($arrayKey, TRUE, 'TEXT'); ! } ! ! break; } } ! ! //Now add any documentation to the field ! if (!empty($optionField['doc'])) { ! stack_xml_create_field_documentation($schemaField,$optionField['doc']); } } ! ! else { ! echo("<b>Developer notice:</b>The field $optionField does not have a type associated with it and will not be written out<br>"); } *************** *** 1707,1714 **** $schemaElement = &stack_xml_create_root_schema_field('questionPotResp',FALSE,'',0,'unbounded'); $xmlElements[] = 'questionPotResp'; - - //3.1.3 Each potential response has an order field - $orderElement = &stack_xml_create_schema_field('order',FALSE,'',1,1); - $orderElement->appendChild($schemaElement); $schemaComplexType = &new DOMIT_Element('xs:complexType'); --- 1729,1732 ---- *************** *** 1935,1938 **** --- 1953,1960 ---- $schemaElem->appendChild($schemaElement); + //3.1.2.2 Each potential response has an order attribute - the order where this is appended onto potential response schema structure IS IMPORTANT + $orderElement = &stack_xml_create_field_order(); + $schemaComplexType->appendChild($orderElement); + //4. The keyval type - call function $schemaKeyValElement = stack_xml_create_schema_keyval_type(); *************** *** 1960,1963 **** --- 1982,1986 ---- * @return DOMIT_Element $schemaSimpleType A SimpleType schema definition, which may be appended into the schema */ + function stack_xml_create_schema_vocabulary($name,$values) { *************** *** 2240,2243 **** --- 2263,2291 ---- /** + * Creates a schema definition of an order attribute, which is used in ordering potential responses, and variables + * + * Example: + * <xs:attribute name="order" type="xs:int" /> + * + * @see stack_xml_create_question_schema() + * + * @return $schemaComplexType The complex type schema definition of a 'keyval' PHP type + */ + function stack_xml_create_field_order() + { + $schemaFieldOrder = &new DOMIT_Element('xs:attribute'); + + $schemaOrderNameAttr = &new DOMIT_Attr('name'); + $schemaOrderNameAttr->nodeValue='order'; + $schemaOrderTypeAttr = &new DOMIT_Attr('type'); + $schemaOrderTypeAttr->nodeValue='xs:int'; + + $schemaFieldOrder->setAttributeNode($schemaOrderNameAttr); + $schemaFieldOrder->setAttributeNode($schemaOrderTypeAttr); + + return $schemaFieldOrder; + } + + /** * Creates a schema definition of a key val type, which is used in the stackQuestion data structure - questionVars * *************** *** 2250,2253 **** --- 2298,2310 ---- * </xs:complexType> * + * + * <xs:complexType name="keyval"> + * <xs:sequence> + * <xs:element name="key" type="xs:string" /> + * <xs:element name="val" type="xs:string" /> + * </xs:sequence> + * <xs:attribute name="order" type="xs:int" /> + * </xs:complexType> + * * @see stack_xml_create_question_schema() * *************** *** 2264,2268 **** $schemaSequence = &new DOMIT_Element('xs:sequence'); ! //Making the 'key' element $schemaField = &new DOMIT_Element('xs:element'); --- 2321,2325 ---- $schemaSequence = &new DOMIT_Element('xs:sequence'); ! //1. Making the 'key' element $schemaField = &new DOMIT_Element('xs:element'); *************** *** 2278,2282 **** $schemaSequence->appendChild($schemaField); ! //Making the 'val' element $schemaField = &new DOMIT_Element('xs:element'); --- 2335,2339 ---- $schemaSequence->appendChild($schemaField); ! //2. Making the 'val' element $schemaField = &new DOMIT_Element('xs:element'); *************** *** 2290,2296 **** --- 2347,2357 ---- $schemaField->setAttributeNode($schemaTypeAttr); + //3. Making the 'order' element + $keyValOrderElem = &stack_xml_create_field_order(); + $schemaSequence->appendChild($schemaField); $schemaComplexType->appendChild($schemaSequence); + $schemaComplexType->appendChild($keyValOrderElem); return $schemaComplexType; Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.30.2.11 retrieving revision 1.30.2.12 diff -C2 -d -r1.30.2.11 -r1.30.2.12 *** stackQuestion.php 16 Aug 2005 15:51:35 -0000 1.30.2.11 --- stackQuestion.php 16 Aug 2005 22:43:29 -0000 1.30.2.12 *************** *** 766,769 **** --- 766,770 ---- // (5) Potential responses. + if (array_key_exists('questionPotResp',$question)) { stack_question_validate_potresp($question['questionAnsKey'],$question['questionAns'],$question['questionPotResp'],$errors); *************** *** 840,844 **** // Validate the potential responses field of the question. // We have checked this exists ! // Do we need to add new potential responses? if (is_array($quPR)) { --- 841,845 ---- // Validate the potential responses field of the question. // We have checked this exists ! // Do we need to add new potential responses? if (is_array($quPR)) { |
From: pkiddie <pk...@us...> - 2005-08-16 22:43:38
|
Update of /cvsroot/stack/stack-1-0/lang/en/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23459/lang/en/doc Modified Files: Tag: development_xmlrqp en_doc.php Log Message: ShowSol removed from documentation Importing questions and question lists New functions in stackXML to define an order schema attribute, and keyval order attribute. Use of attributes in potential responses and questionVars Index: en_doc.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/doc/en_doc.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** en_doc.php 25 Jul 2005 10:09:32 -0000 1.6 --- en_doc.php 16 Aug 2005 22:43:29 -0000 1.6.2.1 *************** *** 1,420 **** ! <?php ! /** ! * Describes the data structure stackQuestion ! * ! * @package documentation ! * @subpackage Stack ! */ ! ! $stackQuestion['questionVarsRaw']['doc']="This field is a string which contains a list of assignments ! of the form <br /> [...1231 lines suppressed...] ! //CompetencyLevel ! ! $stackQuiz['quizCompetencyLevel']['doc']="Mathematical skills a resource requires/trains. User defined, list type"; ! ! ! ! //Time to allocate ! ! $stackQuiz['quizTimeAllocated']['doc']="An approximate time it takes to work with the resource. User defined, list type"; ! ! ! ! //Type of question ! ! $stackQuiz['quizExcerciseType']['doc']="Type of interactive elements used in the context of the excercise. User defined, list type"; ! ! ! ! ?> ! |
From: Chris S. <san...@us...> - 2005-08-16 16:04:17
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23002 Modified Files: Tag: development_xmlrqp quiz.php Log Message: Index: quiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/quiz.php,v retrieving revision 1.25.2.3 retrieving revision 1.25.2.4 diff -C2 -d -r1.25.2.3 -r1.25.2.4 *** quiz.php 16 Aug 2005 15:51:35 -0000 1.25.2.3 --- quiz.php 16 Aug 2005 16:04:08 -0000 1.25.2.4 *************** *** 145,153 **** $duedate_passed = FALSE; if (array_key_exists('quizDueDate',$quiz)){ ! $duedate = $quiz['quizDueDate']; ! $duedate_display = stack_time_display($duedate); ! if ($tnow>$duedate) { ! $duedate_passed = TRUE; ! } } --- 145,155 ---- $duedate_passed = FALSE; if (array_key_exists('quizDueDate',$quiz)){ ! if ('' != $quiz['quizDueDate']) { ! $duedate = $quiz['quizDueDate']; ! $duedate_display = stack_time_display($duedate); ! if ($tnow>$duedate) { ! $duedate_passed = TRUE; ! } ! } } *************** *** 666,689 **** if ('solutions' != $action) { ! if ($focus) { ! echo " <tr><td nowrap='nowrap'><a href=\"javascript:takeaction('unfocus',0);\">".get_string('UnFocus','stack','')."</a></td> ! <td> ".get_string('UnFocusExplain','stack','')."</td></tr>\n"; ! } else { ! echo " <tr><td nowrap='nowrap'><a href=\"javascript:takeaction('focus',0);\">".get_string('Focus','stack','')."</a></td> ! <td> ".get_string('FocusExplain','stack','')."</td></tr>\n"; ! } ! echo " <tr><td nowrap='nowrap'><a href=\"javascript:takeaction('validate',0);\">".get_string('Validate','stack','')."</a></td> ! <td> ".get_string('ValidateExplain','stack','')."</td></tr>\n ! <tr><td></td><td>".get_string('ValidateExplain2','stack','')."</td></tr> ! <tr><td><a href=\"javascript:takeaction('mark',0);\">".get_string('Mark','stack','')."</a></td> ! <td>".get_string('MarkExplain','stack','')."</td></tr>\n"; } - echo " <tr><td><a href=\"javascript:takeaction('solutions',0);\">".get_string('Solutions','stack','')."</a></td> - <td>".get_string('SolutionsExplain','stack','')."</td></tr>\n - <tr><td></td><td>".get_string('SolutionsExplain2','stack','')."</td></tr>"; - if ('Practice' == $quizmode) { echo " <tr><td nowrap='nowrap'><a href=\"javascript:takeaction('new_quiz_version',$quizid);\">".get_string('NewVersion','stack','')."</a></td> <td>".get_string('NewVersionExplain','stack','')."</td></tr>"; --- 668,690 ---- if ('solutions' != $action) { ! if ($focus) { ! echo " <tr><td nowrap='nowrap'><a href=\"javascript:takeaction('unfocus',0);\">".get_string('UnFocus','stack','')."</a></td> ! <td> ".get_string('UnFocusExplain','stack','')."</td></tr>\n"; ! } else { ! echo " <tr><td nowrap='nowrap'><a href=\"javascript:takeaction('focus',0);\">".get_string('Focus','stack','')."</a></td> ! <td> ".get_string('FocusExplain','stack','')."</td></tr>\n"; ! } ! echo " <tr><td nowrap='nowrap'><a href=\"javascript:takeaction('validate',0);\">".get_string('Validate','stack','')."</a></td> ! <td> ".get_string('ValidateExplain','stack','')."</td></tr>\n ! <tr><td></td><td>".get_string('ValidateExplain2','stack','')."</td></tr> ! <tr><td><a href=\"javascript:takeaction('mark',0);\">".get_string('Mark','stack','')."</a></td> ! <td>".get_string('MarkExplain','stack','')."</td></tr>\n"; } if ('Practice' == $quizmode) { + echo " <tr><td><a href=\"javascript:takeaction('solutions',0);\">".get_string('Solutions','stack','')."</a></td> + <td>".get_string('SolutionsExplain','stack','')."</td></tr>\n + <tr><td></td><td>".get_string('SolutionsExplain2','stack','')."</td></tr>"; echo " <tr><td nowrap='nowrap'><a href=\"javascript:takeaction('new_quiz_version',$quizid);\">".get_string('NewVersion','stack','')."</a></td> <td>".get_string('NewVersionExplain','stack','')."</td></tr>"; |
From: Chris S. <san...@us...> - 2005-08-16 16:04:16
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23002/scripts Modified Files: Tag: development_xmlrqp stackQuiz.php Log Message: Index: stackQuiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuiz.php,v retrieving revision 1.5.2.3 retrieving revision 1.5.2.4 diff -C2 -d -r1.5.2.3 -r1.5.2.4 *** stackQuiz.php 16 Aug 2005 10:08:09 -0000 1.5.2.3 --- stackQuiz.php 16 Aug 2005 16:04:08 -0000 1.5.2.4 *************** *** 194,198 **** <input type='hidden' name='action' value='continue_quiz'>"; echo "\n<table cellpadding='2'>\n"; ! echo "\n<tr><th>{$stackQuiz['quizName']['descript']}</th><th>{$stackQuiz['quizDescription']['descript']}</th><th>Last mark (%)</th></tr>"; foreach ($quiz_store as $qs => $quiz) { $qname = $quiz['quizName']; --- 194,198 ---- <input type='hidden' name='action' value='continue_quiz'>"; echo "\n<table cellpadding='2'>\n"; ! echo "\n<tr><th>{$stackQuiz['quizName']['descript']}</th><th>{$stackQuiz['quizDescription']['descript']}</th><th>Last mark (%)</th><th>{$stackQuiz['quizDueDate']['descript']}</th></tr>"; foreach ($quiz_store as $qs => $quiz) { $qname = $quiz['quizName']; *************** *** 211,215 **** echo "<tr><td><a href=\"javascript:takeaction('continue_quiz','$qID');\">{$qname}</a></td>\n"; ! echo "<td>".$quiz['quizDescription']."</td><td align='center'>$mark</td></tr>\n"; } echo "\n</table>\n</form>\n</p>"; --- 211,219 ---- echo "<tr><td><a href=\"javascript:takeaction('continue_quiz','$qID');\">{$qname}</a></td>\n"; ! echo "<td>".$quiz['quizDescription']."</td><td align='center'>$mark</td>\n"; ! if ('' != $quiz['quizDueDate']) { ! echo "<td>".stack_time_display($quiz['quizDueDate'])."</td>"; ! } ! echo "</tr>\n"; } echo "\n</table>\n</form>\n</p>"; |
From: Chris S. <san...@us...> - 2005-08-16 16:04:16
|
Update of /cvsroot/stack/stack-1-0/lang/en/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23002/lang/en/doc Modified Files: Tag: development_xmlrqp student_assessmentmode.php Log Message: Index: student_assessmentmode.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/doc/student_assessmentmode.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 *** student_assessmentmode.php 16 Aug 2005 15:51:35 -0000 1.2.2.1 --- student_assessmentmode.php 16 Aug 2005 16:04:08 -0000 1.2.2.2 *************** *** 46,51 **** before proceeding. When you are satisfied with your answers, you can click the <b>Mark</b> button. Stack 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. --- 46,51 ---- before proceeding. When you are satisfied with your answers, you can click the <b>Mark</b> button. Stack will tell you whether ! your answers are right or wrong and may give some ! feedback about any answers that are wrong, but it will not tell you the right answers. *************** *** 81,83 **** If you access the test after the due date, then Stack will tell ! you your marks and give the solutions to the questions. --- 81,84 ---- If you access the test after the due date, then Stack will tell ! you your marks and give any solutions which the teacher ! has provided to the questions. |
From: Chris S. <san...@us...> - 2005-08-16 15:51:53
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18518/scripts Modified Files: Tag: development_xmlrqp stackAuthor.php stackDatabase.php stackQuestion.php stackUtility.php Log Message: Index: stackDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackDatabase.php,v retrieving revision 1.34.2.3 retrieving revision 1.34.2.4 diff -C2 -d -r1.34.2.3 -r1.34.2.4 *** stackDatabase.php 15 Aug 2005 16:09:23 -0000 1.34.2.3 --- stackDatabase.php 16 Aug 2005 15:51:35 -0000 1.34.2.4 *************** *** 1,3389 **** <?php - - /** - * Functions to access the MySQL Database. This should allow other - * databases to be used without too much pain. - [...5064 lines suppressed...] if (!$db) { echo "<b>Could not connet to the MYSQL database '$stackdb' (on host '$host', as user '$user'). The attempt to connect generated the MYSQL Error ".mysql_errno().": ".mysql_error()."</b>"; die(); } $result = mysql_query($query); if(0 == $result) { include('install/stackUpdateDatabase.php'); die(); } } /***** * Check if updates are necessary **/ stack_db_database_update(); ?> Index: stackAuthor.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackAuthor.php,v retrieving revision 1.29.2.7 retrieving revision 1.29.2.8 diff -C2 -d -r1.29.2.7 -r1.29.2.8 *** stackAuthor.php 16 Aug 2005 14:00:59 -0000 1.29.2.7 --- stackAuthor.php 16 Aug 2005 15:51:35 -0000 1.29.2.8 *************** *** 719,725 **** $stimestr = ''; if ('' != $quiz[$key]) { ! $stimestr = strftime('%c',$quiz[$key]); } ! echo "<td><input type=\"text\" name=\"quiz[$key]\" size=\"35\" value=\"$stimestr\" alt=\"$key\" /></td><td>".$err.'</td></tr>'; } else { echo "<td><input type=\"text\" name=\"quiz[$key]\" size=\"35\" value=\"".nsf($quiz,$key)."\" alt=\"$key\" /></td><td>".$err.'</td></tr>'; --- 719,725 ---- $stimestr = ''; if ('' != $quiz[$key]) { ! $stimestr = stack_time_display($quiz[$key]); } ! echo "<td><input type=\"text\" name=\"quiz[quizDueDate_text]\" size=\"35\" value=\"$stimestr\" alt=\"$key\" /></td><td>".$err.'</td></tr>'; } else { echo "<td><input type=\"text\" name=\"quiz[$key]\" size=\"35\" value=\"".nsf($quiz,$key)."\" alt=\"$key\" /></td><td>".$err.'</td></tr>'; *************** *** 912,917 **** // (5) Sort out any time stamp for the due date. ! if ('' != $quiz['quizDueDate']) { ! $quiz['quizDueDate'] = strtotime($quiz['quizDueDate']); } --- 912,923 ---- // (5) Sort out any time stamp for the due date. ! if ('' != $quiz['quizDueDate_text']) { ! $duedate = strtotime($quiz['quizDueDate_text']); ! if ($duedate > -1) { ! $quiz['quizDueDate'] = $duedate; ! } else { ! $errors['quiz']['quizDueDate'] = '<br />Could not decode your quiz due date of '.$quiz['quizDueDate_text']; ! } ! unset($quiz['quizDueDate_text']); } Index: stackUtility.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackUtility.php,v retrieving revision 1.30.2.4 retrieving revision 1.30.2.5 diff -C2 -d -r1.30.2.4 -r1.30.2.5 *** stackUtility.php 16 Aug 2005 11:22:51 -0000 1.30.2.4 --- stackUtility.php 16 Aug 2005 15:51:35 -0000 1.30.2.5 *************** *** 928,931 **** --- 928,941 ---- } + /** + * Generates a string to display a time, form a Unix time stamp. + * + * @return float + */ + function stack_time_display($timestamp) { + //return date("F j, Y, g:i a",$timestamp); + //return date("r",$timestamp); + return date("D, j M Y H:i:s ",$timestamp); + } Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.30.2.10 retrieving revision 1.30.2.11 diff -C2 -d -r1.30.2.10 -r1.30.2.11 *** stackQuestion.php 16 Aug 2005 15:24:16 -0000 1.30.2.10 --- stackQuestion.php 16 Aug 2005 15:51:35 -0000 1.30.2.11 *************** *** 114,120 **** // 'Show solution'; ! $stackOptions['QuizMode']['type']='list'; ! $stackOptions['QuizMode']['values']=array('Practice','Assessment','Strict'); ! $stackOptions['QuizMode']['default']='On request'; //<PDK> sqlToSchemaMapping array maps basic SQL data types used in STAKCK to their respective XML schema data types --- 114,120 ---- // 'Show solution'; ! $stackOptions['QuizMode']['type'] = 'list'; ! $stackOptions['QuizMode']['values'] = array('Practice','Assessment','Strict'); ! $stackOptions['QuizMode']['default'] = 'Practice'; //<PDK> sqlToSchemaMapping array maps basic SQL data types used in STAKCK to their respective XML schema data types |
From: Chris S. <san...@us...> - 2005-08-16 15:51:53
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18518 Modified Files: Tag: development_xmlrqp index.php quiz.php Log Message: Index: quiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/quiz.php,v retrieving revision 1.25.2.2 retrieving revision 1.25.2.3 diff -C2 -d -r1.25.2.2 -r1.25.2.3 *** quiz.php 16 Aug 2005 14:00:59 -0000 1.25.2.2 --- quiz.php 16 Aug 2005 15:51:35 -0000 1.25.2.3 *************** *** 54,58 **** // Now datetime $tnow = time(); ! $dtnow = date("F j, Y, g:i a"); //////////////////////////////////////////////// --- 54,58 ---- // Now datetime $tnow = time(); ! $dtnow = stack_time_display($tnow); //////////////////////////////////////////////// *************** *** 132,135 **** --- 132,136 ---- // (4.4) At this point we should have a $quiz and $quizInst to work on. + // Find out if we have quiz options. $quiz_options = array(); *************** *** 137,142 **** $quiz_options = $quiz['quizOptions']; } - $quizmode = $quiz_options['QuizMode']; // (4.5) Reconstruct $quizInst from previous data --- 138,154 ---- $quiz_options = $quiz['quizOptions']; } + $quizmode = $quiz_options['QuizMode']; + + $duedate = ''; + $duedate_display = ''; + $duedate_passed = FALSE; + if (array_key_exists('quizDueDate',$quiz)){ + $duedate = $quiz['quizDueDate']; + $duedate_display = stack_time_display($duedate); + if ($tnow>$duedate) { + $duedate_passed = TRUE; + } + } // (4.5) Reconstruct $quizInst from previous data *************** *** 488,503 **** stack_page_header($title,''); - echo "\n<a name='top'></a>\n"; - echo "<h2>".$quiz['quizName']."</h2>"; - - echo get_string('stackOptions_QuizMode','stack','').': '.$quizmode; - - echo "<font size='-2'>(".get_string('quiz_page_created','stack',$dtnow).")</font>"; - - // echo get_string('quiz_due_date','stack',''); - // Add javascript for quiz forms require_once("{$stack_root}/html/quizjava.html"); if ('quiz_error' == $action) { --- 500,524 ---- stack_page_header($title,''); // Add javascript for quiz forms require_once("{$stack_root}/html/quizjava.html"); + + // (3.1) Print a summary of the context of this quiz. + 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>'; + if ( '' != $duedate_display) { + echo '<tr><td><b>'.get_string('quiz_duedate','stack','').'</b></td><td>'. $duedate_display.'</td></tr>'; + } + //echo '<tr><td><b></b></td><td></td></tr>'; + echo '</table>'; + + // (3.2) Has the due date passed? + if ($duedate_passed) { + echo "<p><font color='red'>".get_string('quiz_duedate_passed','stack','')."</font></p>"; + } + if ('quiz_error' == $action) { *************** *** 597,630 **** } ! if ('solutions' != $action) { $RA = $this_attempt['RawAns']; ! echo stack_question_inst_try_formfrag($RA,"RawAns[$key]"); } // Do we show solutions? ! if ('Always' == $options['ShowSol']) { ! stack_question_inst_show_sol($qInst,$errors); ! } else if ('Never' != $options['ShowSol'] and 'solutions' == $action) { stack_question_inst_show_sol($qInst,$errors); ! } else if ('After correct answer' == $options['ShowSol']) { ! ! $show_sol = FALSE; ! if (array_key_exists('questionAttempts',$qInst)) { ! if (is_array($qInst['questionAttempts'])) { ! foreach($qInst['questionAttempts'] as $atn=>$anattempt) { ! if (1 == $anattempt['RawMark'] and 'mark' == $anattempt['Action'] ) { ! $show_sol = TRUE; ! } ! } ! } ! } ! ! if ($show_sol) { ! stack_question_inst_show_sol($qInst,$errors); ! } ! ! } ! ! } // End of feedback & errors } // End of print if focused. --- 618,631 ---- } ! if ('solutions' != $action and TRUE != $duedate_passed) { $RA = $this_attempt['RawAns']; ! echo stack_question_inst_try_formfrag($RA,"RawAns[$key]"); } // Do we show solutions? ! if ('solutions' == $action or $duedate_passed) { stack_question_inst_show_sol($qInst,$errors); ! } ! } // End of feedback & errors } // End of print if focused. *************** *** 682,688 **** echo " <tr><td><a href=\"javascript:takeaction('solutions',0);\">".get_string('Solutions','stack','')."</a></td> <td>".get_string('SolutionsExplain','stack','')."</td></tr>\n ! <tr><td></td><td>".get_string('SolutionsExplain2','stack','')."</td></tr> ! <tr><td nowrap='nowrap'><a href=\"javascript:takeaction('new_quiz_version',$quizid);\">".get_string('NewVersion','stack','')."</a></td> ! <td>".get_string('NewVersionExplain','stack','')."</td></tr>"; echo "<tr><td nowrap='nowrap'><a href=\"index.php?action=choose_quiz\">".get_string('ChooseQuiz','stack','')."</a></td> <td>".get_string('ClickHereTryQuiz','stack','')."</td></tr>\n --- 683,693 ---- echo " <tr><td><a href=\"javascript:takeaction('solutions',0);\">".get_string('Solutions','stack','')."</a></td> <td>".get_string('SolutionsExplain','stack','')."</td></tr>\n ! <tr><td></td><td>".get_string('SolutionsExplain2','stack','')."</td></tr>"; ! ! if ('Practice' == $quizmode) { ! echo " <tr><td nowrap='nowrap'><a href=\"javascript:takeaction('new_quiz_version',$quizid);\">".get_string('NewVersion','stack','')."</a></td> ! <td>".get_string('NewVersionExplain','stack','')."</td></tr>"; ! } ! echo "<tr><td nowrap='nowrap'><a href=\"index.php?action=choose_quiz\">".get_string('ChooseQuiz','stack','')."</a></td> <td>".get_string('ClickHereTryQuiz','stack','')."</td></tr>\n Index: index.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/index.php,v retrieving revision 1.23.2.1 retrieving revision 1.23.2.2 diff -C2 -d -r1.23.2.1 -r1.23.2.2 *** index.php 3 Aug 2005 17:02:21 -0000 1.23.2.1 --- index.php 16 Aug 2005 15:51:35 -0000 1.23.2.2 *************** *** 1,239 **** <?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... - * @author Juliette White jv...@jv... - * - * This file contains the front end logic for the main frontend pages - * TO DO: Some of the code in this file needs to be factored out into separate - * algorithms- ideally we should have a function for each action on entry and - * for display. - * @package Stack - */ - - - /** - * - */ - session_start(); - - /////////////////////////////////////////////////////////////// - // (1) Process Input - this sets $action, $user and $username - /////////////////////////////////////////////////////////////// - - if (file_exists('stackstd.php')) { - include('stackstd.php'); - } else { - //echo "STACK is not correctly installed."; //View the installation instructions include('lang/en/doc/about_install.php'); - die(); - } - - $default_action = 'loginscreen'; - include_once($stack_root.'/frontend_general/front_end_display.php'); - include($stack_root.'/frontend_general/process_input.php'); - - - /////////////////////////////////////////////////////////////// - // (2) Take any actions required - /////////////////////////////////////////////////////////////// - - // Note that we need to unset the user before printing the header. - if ('logout' == $action) { - $user = NULL; - session_unregister('user'); - unset($_SESSION['user']); - $_GET['expand'] = 0; - } - - include('frontend_general/loginregister.php'); - $err = nsf($errors,'user'); - $errun = stack_get_errun($err); - $errps = stack_get_errps($err); - - ////////////////////////////////////////////////////////////// - // (2) Print the page. - ////////////////////////////////////////////////////////////// - - include('html/pagehead.php'); - - if ('logout' == $action) { - echo '<h1>Thank you</h1><p>Thank you for using STACK.'; - $action = 'loginscreen'; - } - - if ('welcome' == $action) { - echo "<h1>Welcome</h1> <p>Welcome to STACK, {$user['firstname']} {$user['lastname']}.</p>"; - if ('admin' != $user['username']) { - $action = 'choose_quiz'; - } - } - - if ('loginerr' == $action) { - echo "<h1>Problems with your login.</h1> <p>You could not be logged into STACK as <tt>{$user['username']}</tt> for the following reason.</p>"; - echo $errors['user']; - $action = 'loginscreen'; - } - - switch ($action) { - case 'loginscreen': - stack_display_main_login($username, $errun, $errps); - break; - case 'registration_screen': - include_once($stack_root."/scripts/stackUser.php"); - stack_display_main_register($username, $user, $errors, $err); - break; - case 'update_info': - if (stack_is_logged_in($user) and !stack_user_is_guest($user)) { - stack_user_update_info($user, $errors); - } else { - echo '<h1>Update user information</h1>'; - echo '<p>Please logout and login as a personal user first to update your information.</p>'; - } - break; - case 'error': - echo "There was an error with the login or registration"; - break; - case 'choose_quiz': - $quiz_store = stack_db_quiz_get(); - stack_quiz_student_select($quiz_store, $user); - break; - } - - include('html/pagefoot.php'); - - ?> - - --- 1,121 ---- |
From: Chris S. <san...@us...> - 2005-08-16 15:51:52
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18518/lang/en Modified Files: Tag: development_xmlrqp stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/stack.php,v retrieving revision 1.16.2.2 retrieving revision 1.16.2.3 diff -C2 -d -r1.16.2.2 -r1.16.2.3 *** stack.php 16 Aug 2005 14:00:59 -0000 1.16.2.2 --- stack.php 16 Aug 2005 15:51:35 -0000 1.16.2.3 *************** *** 11,46 **** */ ! $string['TrySTACKQuiz'] = 'Try a STACK quiz'; ! $string['STACKHomePage'] = 'STACK home page'; ! $string['Home'] = 'Home'; ! $string['ClickHereTryQuiz'] = 'Click here to try a new quiz.'; ! $string['ChooseQuiz'] = 'Choose quiz'; ! $string['Focus'] = 'Focus'; ! $string['FocusExplain'] = 'Click here to see one question at a time.'; ! $string['UnFocus'] = 'Unfocus'; ! $string['UnFocusExplain'] = 'Click here to see all questions in the quiz.'; ! $string['Score'] = 'Mark'; // Mark for a question. ! $string['Mark'] = 'Mark'; // Mark as an action request. ! $string['MarkThisQ'] = 'Mark this question'; // Mark as an action request. ! $string['MarkQ'] = 'Mark Q.'; // Mark as an action request. ! $string['MarkExplain'] = 'Click here to mark your answers.'; ! $string['Validate'] = 'Validate'; ! $string['ValidateExplain'] = 'Click here to check that your answers have no syntax errors and that the system interprets them in the way that you intended.'; ! $string['ValidateExplain2'] = '(Note, your answers will be stored when you validate.)'; ! $string['Solutions'] = 'Solutions'; ! $string['SolutionsExplain'] = 'Click here to mark the whole quiz and show all the solutions.'; ! $string['SolutionsExplain2'] = '(No further attempts will be permitted)'; ! $string['NewVersion'] = 'New version'; ! $string['NewVersionExplain'] = 'Click here to try a new version of this quiz.'; ! $string['MarkSummary'] = 'Mark Summary'; ! $string['Question'] = 'Question'; ! $string['Value'] = 'Value'; // Number of marks available for a question ! $string['Total'] = 'Total'; ! $string['Help'] = 'Help'; ! $string['Top'] = 'Top'; ! $string['Bottom'] = 'Bottom'; ! $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: $a.'; ! $string['quiz_due_date'] = 'Quiz due: $a.'; --- 11,47 ---- */ ! $string['TrySTACKQuiz'] = 'Try a STACK quiz'; ! $string['STACKHomePage'] = 'STACK home page'; ! $string['Home'] = 'Home'; ! $string['ClickHereTryQuiz'] = 'Click here to try a new quiz.'; ! $string['ChooseQuiz'] = 'Choose quiz'; ! $string['Focus'] = 'Focus'; ! $string['FocusExplain'] = 'Click here to see one question at a time.'; ! $string['UnFocus'] = 'Unfocus'; ! $string['UnFocusExplain'] = 'Click here to see all questions in the quiz.'; ! $string['Score'] = 'Mark'; // Mark for a question. ! $string['Mark'] = 'Mark'; // Mark as an action request. ! $string['MarkThisQ'] = 'Mark this question'; // Mark as an action request. ! $string['MarkQ'] = 'Mark Q.'; // Mark as an action request. ! $string['MarkExplain'] = 'Click here to mark your answers.'; ! $string['Validate'] = 'Validate'; ! $string['ValidateExplain'] = 'Click here to check that your answers have no syntax errors and that the system interprets them in the way that you intended.'; ! $string['ValidateExplain2'] = '(Note, your answers will be stored when you validate.)'; ! $string['Solutions'] = 'Solutions'; ! $string['SolutionsExplain'] = 'Click here to mark the whole quiz and show all the solutions.'; ! $string['SolutionsExplain2'] = '(No further attempts will be permitted)'; ! $string['NewVersion'] = 'New version'; ! $string['NewVersionExplain'] = 'Click here to try a new version of this quiz.'; ! $string['MarkSummary'] = 'Mark Summary'; ! $string['Question'] = 'Question'; ! $string['Value'] = 'Value'; // Number of marks available for a question ! $string['Total'] = 'Total'; ! $string['Help'] = 'Help'; ! $string['Top'] = 'Top'; ! $string['Bottom'] = 'Bottom'; ! $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_duedate'] = 'Quiz due'; ! $string['quiz_duedate_passed'] = 'It is now after the quiz due date. You may not make further attempts at this quiz.'; *************** *** 205,208 **** --- 206,211 ---- // Quiz //////////////////////////////////// + $string['stackQuiz_quizName'] = 'Quiz name'; + // <PDK> $stackQuestion metadata added $string['stackQuiz_quizPublisher'] = 'Server published'; |
From: Chris S. <san...@us...> - 2005-08-16 15:51:52
|
Update of /cvsroot/stack/stack-1-0/lang/en/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18518/lang/en/doc Modified Files: Tag: development_xmlrqp student_assessmentmode.php student_practicemode.php Log Message: Index: student_assessmentmode.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/doc/student_assessmentmode.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** student_assessmentmode.php 14 Jul 2005 17:46:58 -0000 1.2 --- student_assessmentmode.php 16 Aug 2005 15:51:35 -0000 1.2.2.1 *************** *** 30,37 **** practice mode. ! The questions will involve some randomly generated parameters, so different students will get slightly different questions. ! <br /><br /> A test in assessment mode will usually have a "Due date" --- 30,37 ---- practice mode. ! The questions will often involve some randomly generated parameters, so different students will get slightly different questions. ! <br /> A test in assessment mode will usually have a "Due date" Index: student_practicemode.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/doc/student_practicemode.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** student_practicemode.php 14 Jul 2005 17:46:58 -0000 1.2 --- student_practicemode.php 16 Aug 2005 15:51:35 -0000 1.2.2.1 *************** *** 25,40 **** <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. --- 25,41 ---- <a name="practice"><h2>Practice mode</h2></a> ! If a test is set up in practice mode, it will say so when you ! load the test at the top of the test page. 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 ! and may give some feedback about any answers that are wrong, ! but it will not tell you the right answers. ! You can correct any mistakes, and ! try again. ! ! If you would like to go away and come back some other ! time press the Validate button; 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. |
From: Chris S. <san...@us...> - 2005-08-16 15:51:51
|
Update of /cvsroot/stack/stack-1-0/frontend_general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18518/frontend_general Modified Files: Tag: development_xmlrqp editquiz_display.php Log Message: Index: editquiz_display.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/frontend_general/editquiz_display.php,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** editquiz_display.php 14 Jul 2005 18:44:54 -0000 1.8 --- editquiz_display.php 16 Aug 2005 15:51:35 -0000 1.8.2.1 *************** *** 95,100 **** */ function stack_display_editquiz_error($errors) { ! echo "<font color=\"red\">"; show_array($errors); ! echo "</font>"; } --- 95,108 ---- */ function stack_display_editquiz_error($errors) { ! if (is_array($errors)) { ! echo "<font color=\"red\">Errors exist!</font><br/>"; ! if (array_key_exists('quiz',$errors)) { ! foreach($errors['quiz'] as $key => $val) { ! echo "The field $key, gave the following error."; ! echo $val; ! } ! } ! ! } } |
From: pkiddie <pk...@us...> - 2005-08-16 15:24:24
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12333/scripts Modified Files: Tag: development_xmlrqp stackQuestion.php stackXML.php Log Message: Index: stackXML.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackXML.php,v retrieving revision 1.13.2.14 retrieving revision 1.13.2.15 diff -C2 -d -r1.13.2.14 -r1.13.2.15 *** stackXML.php 15 Aug 2005 16:09:23 -0000 1.13.2.14 --- stackXML.php 16 Aug 2005 15:24:16 -0000 1.13.2.15 *************** *** 106,110 **** stack_question_validate($question,$errors); ! $xmlDoc = new DOMIT_Document(); $xmlDoc->setNamespaceAwareness(true); //We need namespace awareness here //Append processing instructions --- 106,110 ---- stack_question_validate($question,$errors); ! $xmlDoc = &new DOMIT_Document(); $xmlDoc->setNamespaceAwareness(true); //We need namespace awareness here //Append processing instructions *************** *** 197,200 **** --- 197,201 ---- { $potRespFieldElem = &$xmlDoc->createElementNS('',$potRespKey); //Create a potential response field element + print_r($potRespField); if (is_array($potRespField)) //Test for true/false branches { *************** *** 785,789 **** //2. An XML file with an array of questions. //Either return a question, or quiz data structure, then detect the head element? ! function stack_xml_parse_question_file($fileName) { global $stack_root; --- 786,790 ---- //2. An XML file with an array of questions. //Either return a question, or quiz data structure, then detect the head element? ! function stack_xml_parse_file($fileName) { global $stack_root; *************** *** 819,823 **** { //A list of questions or a quiz? ! $questionList = stack_xml_parse_question_list($xmlDoc); break; } --- 820,825 ---- { //A list of questions or a quiz? ! $quiz = stack_xml_parse_quiz($xmlDoc); ! return $quiz; break; } *************** *** 838,842 **** } ! //This function is called when Quiz->Import is selected. //The user is simply trying to import a quiz file //1. Uploading a XML file containing a quiz --- 840,844 ---- } ! /*//This function is called when Quiz->Import is selected. //The user is simply trying to import a quiz file //1. Uploading a XML file containing a quiz *************** *** 869,873 **** } ! } //This function simply maps from an element in a particular namespace onto the correct stackQuestion/stackQuiz data structure field, --- 871,875 ---- } ! }*/ //This function simply maps from an element in a particular namespace onto the correct stackQuestion/stackQuiz data structure field, *************** *** 878,883 **** global $stackQuestion, $stackQuiz; - //print_r($element->localName); - switch($arrayType) { --- 880,883 ---- *************** *** 888,892 **** if((!empty($questionField['type']) && $questionField['type']=='meta')) { ! show_array($questionField); if ((!empty($questionField['metatag']) && ($questionField['metatag']==$element->localName))) { return $arrayKey; --- 888,892 ---- if((!empty($questionField['type']) && $questionField['type']=='meta')) { ! //show_array($questionField); if ((!empty($questionField['metatag']) && ($questionField['metatag']==$element->localName))) { return $arrayKey; *************** *** 902,908 **** foreach($stackQuiz as $arrayKey=>$quizField) { ! if((!empty($stackQuestion['type']) && $stackQuestion['type']=='meta')) { ! if ($stackQuestion['metatag']==$element->localName) { return $arrayKey; } --- 902,908 ---- foreach($stackQuiz as $arrayKey=>$quizField) { ! if((!empty($quizField['type']) && $quizField['type']=='meta')) { ! if ((!empty($quizField['metatag']) && ($quizField['metatag']==$element->localName))) { return $arrayKey; } *************** *** 918,924 **** function stack_xml_parse_element_into_array(&$element,&$array,$arrayType) { $children = &$element->childNodes; //Retrieve all child nodes ! $noChildren = count($children); //Count the number of ! print_r($noChildren); for ($i = 0; $i < $noChildren; $i++) { --- 918,925 ---- function stack_xml_parse_element_into_array(&$element,&$array,$arrayType) { + show_array($array); + $children = &$element->childNodes; //Retrieve all child nodes ! $noChildren = count($children); //Count the number of children for ($i = 0; $i < $noChildren; $i++) { *************** *** 931,935 **** if (!empty($node->namespaceURI)) { - print_r("Gone here!"); $nodeName = stack_xml_map_element_ns($node,$arrayType); } //We will have a nodeName at this point, whether the actual element or resolved from namespace --- 932,935 ---- *************** *** 947,960 **** //1==element - another child, so recurse else if ($node->childNodes[0]->nodeType==1); ! { //Check whether there are multiple types of the same node within the XML tree $nodeList = &$element->getElementsByTagName("$node->nodeName"); $length = $nodeList->getLength(); //If there are multiple elements of the same name //Deal with arrays of values: for example potential responses and questionVar/answerVar if ($length>1) { ! stack_xml_parse_element_into_array($children[$i],$array[$nodeName][],$arrayType); } --- 947,995 ---- //1==element - another child, so recurse else if ($node->childNodes[0]->nodeType==1); ! { //Check whether there are multiple types of the same node within the XML tree $nodeList = &$element->getElementsByTagName("$node->nodeName"); $length = $nodeList->getLength(); + //Need to check that these nodes are direct children of the current node + for ($j = 0; $j < $length; $j++) { + //Get the item + $item = $nodeList->item($j); + //print_r("List item: ".$item->parentNode->nodeName); + //print_r("<br>"); + //print_r("Parent node: ".$node->parentNode->nodeName); + //print_r("<br>"); + if ($item->parentNode->nodeName!=$node->parentNode->nodeName) + { + $length=1; + } + + } + + //print_r($length); + //show_array($nodeList); + //If there are multiple elements of the same name //Deal with arrays of values: for example potential responses and questionVar/answerVar if ($length>1) { ! switch ($nodeName) ! { ! //We want to resolve assessmentItems to their respective stackQuestion fields ! case('assessmentItem'): { ! stack_xml_parse_element_into_array($children[$i],$array[$nodeName][],'stackQuestion'); ! break; ! } ! ! case('mathQuiz'): { ! stack_xml_parse_element_into_array($children[$i],$array[$nodeName][],'stackQuiz'); ! break; ! } ! ! default: { ! stack_xml_parse_element_into_array($children[$i],$array[$nodeName][],$arrayType); ! break; ! } ! } } *************** *** 962,966 **** else { ! stack_xml_parse_element_into_array($children[$i],$array[$nodeName],$arrayType); } --- 997,1017 ---- else { ! switch ($nodeName) ! { ! case('assessmentItem'): { ! stack_xml_parse_element_into_array($children[$i],$array[$nodeName],'stackQuestion'); ! break; ! } ! ! case('mathQuiz'): { ! stack_xml_parse_element_into_array($children[$i],$array[$nodeName],'stackQuiz'); ! break; ! } ! ! default: { ! stack_xml_parse_element_into_array($children[$i],$array[$nodeName],$arrayType); ! break; ! } ! } } *************** *** 985,1000 **** stack_xml_parse_element_into_array($elements,$question['assessmentItem'],'stackQuestion'); - show_array("stack_xml_parse_question"); - show_array($question); - return $question; } ! function stack_xml_parse_quiz() ! { ! } ! ! function stack_xml_parse_question_list() { } --- 1036,1052 ---- stack_xml_parse_element_into_array($elements,$question['assessmentItem'],'stackQuestion'); return $question; } ! function stack_xml_parse_quiz(&$questionXmlDoc) { + global $namespaces, $stackQuiz; + $quiz = array(); + + $elements = &$questionXmlDoc->documentElement; + + stack_xml_parse_element_into_array($elements,$quiz['mathQuiz'],'stackQuiz'); + + return $quiz; } Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.30.2.9 retrieving revision 1.30.2.10 diff -C2 -d -r1.30.2.9 -r1.30.2.10 *** stackQuestion.php 16 Aug 2005 14:00:59 -0000 1.30.2.9 --- stackQuestion.php 16 Aug 2005 15:24:16 -0000 1.30.2.10 *************** *** 449,453 **** $stackQuestionPotResp['FeedBack']['type']='castext'; $stackQuestionPotResp['FeedBack']['branch']=TRUE; ! // Answer note'; $stackQuestionPotResp['AnswerNote']['type']='string'; $stackQuestionPotResp['AnswerNote']['branch']=TRUE; --- 449,453 ---- $stackQuestionPotResp['FeedBack']['type']='castext'; $stackQuestionPotResp['FeedBack']['branch']=TRUE; ! // 'Answer note'; $stackQuestionPotResp['AnswerNote']['type']='string'; $stackQuestionPotResp['AnswerNote']['branch']=TRUE; |
From: pkiddie <pk...@us...> - 2005-08-16 15:24:24
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12333 Modified Files: Tag: development_xmlrqp import.php question_bank.php Log Message: Index: import.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/Attic/import.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 *** import.php 15 Aug 2005 16:09:23 -0000 1.1.2.1 --- import.php 16 Aug 2005 15:24:16 -0000 1.1.2.2 *************** *** 36,54 **** } ! if ($action=='import') ! { ! stack_display_qb_import($errors); ! } ! /** * Displays the form for importing a file * @return void */ ! function stack_display_qb_import($errors) { echo nsf($errors,'import'); echo "Select a file to upload and edit: <br /> ! <form enctype='multipart/form-data' action=\"question_bank.php\"' method='POST'><br />\n <input type ='file' name='xmlfile' />\n <input type ='hidden' name='action' value='uploaded_xml' /> --- 36,87 ---- } ! $upload_successful = FALSE; ! if ($action == 'uploaded_xml') { ! if (array_key_exists('xmlfile',$_FILES)) { ! if (is_uploaded_file($_FILES['xmlfile']['tmp_name'])) { ! ! include_once("{$stack_root}/scripts/stackXML.php"); ! $qu = stack_xml_parse_file($_FILES['xmlfile']['tmp_name']); ! // If a single question has been uploaded, edit it, if multiple ! // questions store them in the database ! show_array($qu); ! ! if (array_key_exists('assessmentItem',$qu)) { ! $imported= $qu['assessmentItem']; ! //$action = 'edit'; ! //$upload_successful = TRUE; ! ! } else if (array_key_exists('mathQuiz',$qu)) { ! $imported = $qu['mathQuiz']; ! //We need to be able to discern between a quiz and a list of questions. ! //A quiz will have arraykeys other than assessment items ! } ! ! $upload_successful = TRUE; ! } ! } ! } ! switch ($action) { ! case 'import': ! stack_display_import($errors); ! break; ! ! case 'uploaded_xml': ! if ($upload_successful) { ! stack_display_show_imported($imported); ! } ! break; ! } ! /** * Displays the form for importing a file * @return void */ ! function stack_display_import($errors) { echo nsf($errors,'import'); echo "Select a file to upload and edit: <br /> ! <form enctype='multipart/form-data' action=\"import.php\"' method='POST'><br />\n <input type ='file' name='xmlfile' />\n <input type ='hidden' name='action' value='uploaded_xml' /> *************** *** 62,68 **** * @return void */ ! function stack_display_qb_show_imported($quiz) { ! ! echo "<h2>Details of questions uploaded</h2>"; echo '<table><thead><tr>'; echo '<th>ID</th><th>Name</th> <th>Description</th> <th>Key words</th> <th></th>'; --- 95,105 ---- * @return void */ ! function stack_display_show_imported($imported) { ! show_array($imported); ! //if (array_key_exists('assessmentItem',$qu)) ! // { ! ! ! /*echo "<h2>Details of questions uploaded</h2>"; echo '<table><thead><tr>'; echo '<th>ID</th><th>Name</th> <th>Description</th> <th>Key words</th> <th></th>'; *************** *** 71,75 **** $errs = NULL; ! foreach ($quiz as $key => $qu) { stack_question_validate($quiz[$key],$errs[$key]); --- 108,112 ---- $errs = NULL; ! foreach ($question as $key => $qu) { stack_question_validate($quiz[$key],$errs[$key]); *************** *** 96,100 **** echo "</tbody></table>\n"; ! echo "<h2>Current database of questions</h2>"; } --- 133,137 ---- echo "</tbody></table>\n"; ! echo "<h2>Current database of questions</h2>";*/ } Index: question_bank.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/question_bank.php,v retrieving revision 1.8.2.5 retrieving revision 1.8.2.6 diff -C2 -d -r1.8.2.5 -r1.8.2.6 *** question_bank.php 16 Aug 2005 09:45:04 -0000 1.8.2.5 --- question_bank.php 16 Aug 2005 15:24:16 -0000 1.8.2.6 *************** *** 152,155 **** --- 152,156 ---- if ('export_xml' == $action) { include_once("{$stack_root}/scripts/stackXML.php"); + show_array($question); stack_question_validate($question,$errors); $name = stack_xml_write_question_new($question, "{$stack_root}/tmp/"); |
From: Chris S. <san...@us...> - 2005-08-16 14:01:13
|
Update of /cvsroot/stack/stack-1-0/scripts/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23797/scripts/install Modified Files: Tag: development_xmlrqp stacktest.php Log Message: Index: stacktest.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/install/stacktest.php,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -C2 -d -r1.5.2.2 -r1.5.2.3 *** stacktest.php 4 Aug 2005 12:09:43 -0000 1.5.2.2 --- stacktest.php 16 Aug 2005 14:00:59 -0000 1.5.2.3 *************** *** 1,3 **** ! ?<php /** * Installs the various functions needed by STACK. --- 1,3 ---- ! <?php /** * Installs the various functions needed by STACK. *************** *** 119,123 **** /***********************************************/ ! /* Creation of schemas */ /***********************************************/ --- 119,123 ---- /***********************************************/ ! /* Creation of schemas */ /***********************************************/ |
From: Chris S. <san...@us...> - 2005-08-16 14:01:13
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23797 Modified Files: Tag: development_xmlrqp quiz.php Log Message: Index: quiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/quiz.php,v retrieving revision 1.25.2.1 retrieving revision 1.25.2.2 diff -C2 -d -r1.25.2.1 -r1.25.2.2 *** quiz.php 16 Aug 2005 11:22:51 -0000 1.25.2.1 --- quiz.php 16 Aug 2005 14:00:59 -0000 1.25.2.2 *************** *** 137,140 **** --- 137,142 ---- $quiz_options = $quiz['quizOptions']; } + $quizmode = $quiz_options['QuizMode']; + // (4.5) Reconstruct $quizInst from previous data *************** *** 403,407 **** ! // (2.9) Store the modified information in the $_SESSION if ('solutions' == $action) { // (2.9.1) record the fact we have asked for solutions --- 405,409 ---- ! // (2.9) if ('solutions' == $action) { // (2.9.1) record the fact we have asked for solutions *************** *** 487,490 **** --- 489,499 ---- echo "\n<a name='top'></a>\n"; + echo "<h2>".$quiz['quizName']."</h2>"; + + echo get_string('stackOptions_QuizMode','stack','').': '.$quizmode; + + echo "<font size='-2'>(".get_string('quiz_page_created','stack',$dtnow).")</font>"; + + // echo get_string('quiz_due_date','stack',''); // Add javascript for quiz forms |
From: Chris S. <san...@us...> - 2005-08-16 14:01:13
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23797/scripts Modified Files: Tag: development_xmlrqp stackAuthor.php stackQuestion.php Log Message: Index: stackAuthor.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackAuthor.php,v retrieving revision 1.29.2.6 retrieving revision 1.29.2.7 diff -C2 -d -r1.29.2.6 -r1.29.2.7 *** stackAuthor.php 16 Aug 2005 11:22:51 -0000 1.29.2.6 --- stackAuthor.php 16 Aug 2005 14:00:59 -0000 1.29.2.7 *************** *** 351,356 **** } ! $options_headings = array(get_string('stackOptions_edit_inmeth','stack'),'','','',get_string('stackOptions_edit_resppro','stack'),'','','','','',get_string('stackOptions_edit_out','stack'),''); ! $options_list = array('InsertStars','InformalSyntax','AllowInputTool','SyntaxHint','Forbid','Allow','MarkModMethod','FeedBackGenericCorrect','FeedBackGenericPCorrect','FeedBackGenericIncorrect','Display','ShowSol'); stack_options_edit_form($options_headings,$options_list,$optval,'questionOptions'); --- 351,356 ---- } ! $options_headings = array(get_string('stackOptions_edit_inmeth','stack'),'','','',get_string('stackOptions_edit_resppro','stack'),'','','','','',get_string('stackOptions_edit_out','stack')); ! $options_list = array('InsertStars','InformalSyntax','AllowInputTool','SyntaxHint','Forbid','Allow','MarkModMethod','FeedBackGenericCorrect','FeedBackGenericPCorrect','FeedBackGenericIncorrect','Display'); stack_options_edit_form($options_headings,$options_list,$optval,'questionOptions'); *************** *** 519,523 **** echo "<tr><td></td> <td></td><td align ='right' colspan='2'><a href=\"javascript:HelpPopup('AnswerNote','stackQuestionPotResp');\">AnswerNote</a></td>"; $strin = $potresp['true']['AnswerNote']; ! stack_question_edit_input_textfield($bname,$strin,get_string('stackQuestion_PR_AnswerNote','stack'),55,3); echo "</tr>"; --- 519,523 ---- echo "<tr><td></td> <td></td><td align ='right' colspan='2'><a href=\"javascript:HelpPopup('AnswerNote','stackQuestionPotResp');\">AnswerNote</a></td>"; $strin = $potresp['true']['AnswerNote']; ! stack_question_edit_input_textfield($bname,$strin,'AnswerNote',55,3); echo "</tr>"; *************** *** 731,735 **** $options_headings = array('',''); ! $options_list = array('ShowSol','TeacherEmail'); $fieldname = 'quiz[quizOptions]'; --- 731,735 ---- $options_headings = array('',''); ! $options_list = array('QuizMode','TeacherEmail'); $fieldname = 'quiz[quizOptions]'; Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.30.2.8 retrieving revision 1.30.2.9 diff -C2 -d -r1.30.2.8 -r1.30.2.9 *** stackQuestion.php 16 Aug 2005 11:22:51 -0000 1.30.2.8 --- stackQuestion.php 16 Aug 2005 14:00:59 -0000 1.30.2.9 *************** *** 114,120 **** // 'Show solution'; ! $stackOptions['ShowSol']['type']='list'; ! $stackOptions['ShowSol']['values']=array('After Due Date','On request','Always','Never','After correct answer',); ! $stackOptions['ShowSol']['default']='On request'; //<PDK> sqlToSchemaMapping array maps basic SQL data types used in STAKCK to their respective XML schema data types --- 114,120 ---- // 'Show solution'; ! $stackOptions['QuizMode']['type']='list'; ! $stackOptions['QuizMode']['values']=array('Practice','Assessment','Strict'); ! $stackOptions['QuizMode']['default']='On request'; //<PDK> sqlToSchemaMapping array maps basic SQL data types used in STAKCK to their respective XML schema data types |
From: Chris S. <san...@us...> - 2005-08-16 14:01:13
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23797/lang/en Modified Files: Tag: development_xmlrqp stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/stack.php,v retrieving revision 1.16.2.1 retrieving revision 1.16.2.2 diff -C2 -d -r1.16.2.1 -r1.16.2.2 *** stack.php 16 Aug 2005 11:22:51 -0000 1.16.2.1 --- stack.php 16 Aug 2005 14:00:59 -0000 1.16.2.2 *************** *** 41,44 **** --- 41,46 ---- $string['Bottom'] = 'Bottom'; $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: $a.'; + $string['quiz_due_date'] = 'Quiz due: $a.'; *************** *** 204,218 **** //////////////////////////////////// // <PDK> $stackQuestion metadata added ! $string['stackQuiz_quizPublisher'] = 'Server published'; ! $string['stackQuiz_quizType'] = 'Nature of content'; ! $string['stackQuiz_quizFormat'] = 'Digital manifestation'; ! $string['stackQuiz_quizLanguage'] = 'Language of content'; $string['stackQuiz_quizLearningContext']= 'Targetted to'; ! $string['stackQuiz_quizDifficulty'] = 'Difficulty'; ! $string['stackQuiz_quizCompetency'] = 'Competencies trained'; $string['stackQuiz_quizCompetencyLevel']= 'Skills required'; $string['stackQuiz_quizTimeAllocated'] = 'Recommended time to take'; $string['stackQuiz_quizExcerciseType'] = 'Type of quiz'; ! $string['stackQuiz_quizRights'] = 'Rights statement'; //////////////////////////////////// --- 206,220 ---- //////////////////////////////////// // <PDK> $stackQuestion metadata added ! $string['stackQuiz_quizPublisher'] = 'Server published'; ! $string['stackQuiz_quizType'] = 'Nature of content'; ! $string['stackQuiz_quizFormat'] = 'Digital manifestation'; ! $string['stackQuiz_quizLanguage'] = 'Language of content'; $string['stackQuiz_quizLearningContext']= 'Targetted to'; ! $string['stackQuiz_quizDifficulty'] = 'Difficulty'; ! $string['stackQuiz_quizCompetency'] = 'Competencies trained'; $string['stackQuiz_quizCompetencyLevel']= 'Skills required'; $string['stackQuiz_quizTimeAllocated'] = 'Recommended time to take'; $string['stackQuiz_quizExcerciseType'] = 'Type of quiz'; ! $string['stackQuiz_quizRights'] = 'Rights statement'; //////////////////////////////////// *************** *** 248,252 **** $string['stackOptions_FeedBackGenericPCorrect'] = 'Feedback: partially correct'; $string['stackOptions_FeedBackGenericPCorrect_def'] = "<font color='orange'>Your answer is partially correct.</font>"; ! $string['stackOptions_ShowSol'] = 'Show solution'; //////////////////////////////////// --- 250,254 ---- $string['stackOptions_FeedBackGenericPCorrect'] = 'Feedback: partially correct'; $string['stackOptions_FeedBackGenericPCorrect_def'] = "<font color='orange'>Your answer is partially correct.</font>"; ! $string['stackOptions_QuizMode'] = 'Quiz mode'; //////////////////////////////////// *************** *** 308,312 **** $string['qp_notadmin'] = "<p><font color='red'>Warning!</font> You are not the admin user and any changes will not be stored in the database.</p>"; - //////////////////////////////////// // Interactions with the CAS --- 310,313 ---- |
From: LastRenshai <las...@us...> - 2005-08-16 12:44:39
|
Update of /cvsroot/stack/stack-1-0/lang/en/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2497/lang/en/doc Modified Files: author_testsuite.php Log Message: Index: author_testsuite.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/doc/author_testsuite.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** author_testsuite.php 16 Aug 2005 12:34:14 -0000 1.7 --- author_testsuite.php 16 Aug 2005 12:44:30 -0000 1.8 *************** *** 177,180 **** --- 177,192 ---- $testsuite[] = stack_testsuite_construct('SA_expanded','(x-1)*(x+1)','0',0,'',''); + + //Single Fraction Test + $testsuite[] = stack_testsuite_construct('SingFrac','1/m','1/n',0,'n','Basic tests'); + $testsuite[] = stack_testsuite_construct('SingFrac','1/n','1/n',1,'n',''); + $testsuite[] = stack_testsuite_construct('SingFrac','1/n +2/(n+1)','(3*n+1)/(n*(n+1))',0,'n',''); + $testsuite[] = stack_testsuite_construct('SingFrac','2*(1/n)','2/n',1,'n','2 Correct answers for the same question'); + $testsuite[] = stack_testsuite_construct('SingFrac','2/n','2/n',1,'n',''); + $testsuite[] = stack_testsuite_construct('SingFrac','2/(n+1)','1/(n+1)',0,'n','Simple Mistakes'); + $testsuite[] = stack_testsuite_construct('SingFrac','(2*n+1)/(n+2)','1/n',0,'n',''); + $testsuite[] = stack_testsuite_construct('SingFrac','(2*n)/(n*(n+2))','(2*n)/(n*(n+3))',0,'n',''); + + $testsuite[] = stack_testsuite_construct('String','Hello','hello',0,'',''); $testsuite[] = stack_testsuite_construct('String','hello','hello',1,'',''); |