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-07-25 11:26:27
|
Update of /cvsroot/stack/stack-1-0/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24226/html Modified Files: stack.css Log Message: Index: stack.css =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/stack.css,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** stack.css 25 Jul 2005 11:24:07 -0000 1.4 --- stack.css 25 Jul 2005 11:26:19 -0000 1.5 *************** *** 30,34 **** { display: block; ! color: #111100; padding: .1em .1em .1em .1em; margin: 0px; --- 30,34 ---- { display: block; ! color: #666666; padding: .1em .1em .1em .1em; margin: 0px; |
From: Chris S. <san...@us...> - 2005-07-25 11:24:22
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23611/scripts Modified Files: stackUtility.php Log Message: Index: stackUtility.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackUtility.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** stackUtility.php 18 Jul 2005 10:53:37 -0000 1.29 --- stackUtility.php 25 Jul 2005 11:24:08 -0000 1.30 *************** *** 16,19 **** --- 16,20 ---- // (1) remove stackData.php - and its reference in stackstd.php // (2) remove stackSocketSend.php - and its reference in stackstd.php + // (3) Add a way of putting the standard GNUplot header in stackstd.php if ($stack_stand_alone) { require_once("{$stack_root}/scripts/moodlelib.php"); *************** *** 949,953 **** echo "<body>\n"; echo "<table><tr>\n"; ! echo "<td><img src=\"{$stack_web_url}pics/logo.png\" width=\"115\" alt=\"".get_string('StackLogo','stack','')."\" /></td>\n"; echo "<td><h1><font face=\"arial\">STACK</font></h1></td>\n</tr></table>\n<h1>$title</h1>\n"; } --- 950,954 ---- echo "<body>\n"; echo "<table><tr>\n"; ! echo "<td><img src=\"{$stack_web_url}pics/logo.png\" width=\"120\" alt=\"".get_string('StackLogo','stack','')."\" /></td>\n"; echo "<td><h1><font face=\"arial\">STACK</font></h1></td>\n</tr></table>\n<h1>$title</h1>\n"; } |
From: Chris S. <san...@us...> - 2005-07-25 11:24:22
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23611 Modified Files: question_bank.php Log Message: Index: question_bank.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/question_bank.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** question_bank.php 14 Jul 2005 18:26:03 -0000 1.7 --- question_bank.php 25 Jul 2005 11:24:08 -0000 1.8 *************** *** 211,216 **** echo '<font color="red">Question ID '.$questionID.' has been deleted, it was used in the following quiz(zes)'; echo stack_db_question_quiz_list_printquizname($questionID)."</font>\n"; - stack_db_question_drop($questionID); } } $action = 'questionbank_screen'; --- 211,216 ---- echo '<font color="red">Question ID '.$questionID.' has been deleted, it was used in the following quiz(zes)'; echo stack_db_question_quiz_list_printquizname($questionID)."</font>\n"; } + stack_db_question_drop($questionID); } $action = 'questionbank_screen'; |
From: Chris S. <san...@us...> - 2005-07-25 11:24:22
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23611/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.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** stack.php 19 Jul 2005 13:31:32 -0000 1.15 --- stack.php 25 Jul 2005 11:24:08 -0000 1.16 *************** *** 148,152 **** $string['stackQuestion_questionSol'] = 'Worked solution'; $string['stackQuestion_questionOptions'] = 'Options'; ! $string['stackQuestion_questionMetadata'] = 'Metadata'; $string['stackQuestion_questionNote'] = 'Question note'; $string['stackQuestion_questionID'] = 'Unique question ID'; --- 148,152 ---- $string['stackQuestion_questionSol'] = 'Worked solution'; $string['stackQuestion_questionOptions'] = 'Options'; ! $string['stackQuestion_questionMetadata'] = 'Metadata'; $string['stackQuestion_questionNote'] = 'Question note'; $string['stackQuestion_questionID'] = 'Unique question ID'; *************** *** 275,279 **** $string['menu_Sourceforge'] = 'Sourceforge'; $string['menu_Contact'] = 'Contact'; ! $string['menu_logo'] = "<img src='pics/logo.png' width='120' alt='STACK logo' />"; // New entries on student page --- 275,279 ---- $string['menu_Sourceforge'] = 'Sourceforge'; $string['menu_Contact'] = 'Contact'; ! $string['menu_logo'] = "<img src='pics/logo.png' alt='STACK logo' />"; // New entries on student page |
From: Chris S. <san...@us...> - 2005-07-25 11:24:22
|
Update of /cvsroot/stack/stack-1-0/pics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23611/pics Modified Files: logo.png Log Message: Index: logo.png =================================================================== RCS file: /cvsroot/stack/stack-1-0/pics/logo.png,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvstwcRcZ and /tmp/cvsdWRKib differ |
From: Chris S. <san...@us...> - 2005-07-25 11:24:21
|
Update of /cvsroot/stack/stack-1-0/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23611/html Modified Files: pagehead.php stack.css Log Message: Index: pagehead.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/pagehead.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** pagehead.php 14 Jul 2005 18:19:57 -0000 1.10 --- pagehead.php 25 Jul 2005 11:24:07 -0000 1.11 *************** *** 27,31 **** <table width="95%" border="0" cellpadding="0" cellspacing="5"> <tr align="left" valign="top"> - <!--<td align="left"><img src="pics/logo.png" width='100' alt="STACK logo" /></td>--> <td align="left"><h1>STACK</h1> <font size='+2'>S</font><em>ystem for </em><font size='+2'>T</font><em>eaching and </em><font size='+2'>A</font><em>ssessment using a </em><font size='+2'>C</font><em>omputer algebra </em><font size='+2'>K</font><em>ernel</em></em></td> --- 27,30 ---- Index: stack.css =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/stack.css,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** stack.css 13 Jun 2005 12:58:22 -0000 1.3 --- stack.css 25 Jul 2005 11:24:07 -0000 1.4 *************** *** 5,12 **** #navigation{ padding: 1em 1em 1em 0em; ! border-top: 2px none #ffefa0; ! border-right: 2px solid #ffefa0; ! border-bottom: 2px solid #ffefa0; ! border-left: 2px solid #ffefa0; } --- 5,12 ---- #navigation{ padding: 1em 1em 1em 0em; ! border-top: 2px none #FFFEA0; ! border-right: 2px solid #FFFEA0; ! border-bottom: 2px solid #FFFEA0; ! border-left: 2px solid #FFFEA0; } *************** *** 30,34 **** { display: block; ! color: #666666; padding: .1em .1em .1em .1em; margin: 0px; --- 30,34 ---- { display: block; ! color: #111100; padding: .1em .1em .1em .1em; margin: 0px; *************** *** 48,59 **** #content { padding: 1em; ! border-top: 2px none #ffefa0; ! border-right: 2px solid #ffefa0; ! border-bottom: 2px solid #ffefa0; ! border-left: 2px none #ffefa0; } #header { padding: 1em; color: #000000; ! background-color: #ffefa0; } --- 48,59 ---- #content { padding: 1em; ! border-top: 2px none #FFFEA0; ! border-right: 2px solid #FFFEA0; ! border-bottom: 2px solid #FFFEA0; ! border-left: 2px none #FFFEA0; } #header { padding: 1em; color: #000000; ! background-color: #FFFEA0; } |
From: LastRenshai <las...@us...> - 2005-07-25 10:09:47
|
Update of /cvsroot/stack/stack-1-0/lang/en/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10188/lang/en/doc Modified Files: author_testsuite.php en_doc.php Log Message: Index: author_testsuite.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/doc/author_testsuite.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** author_testsuite.php 18 Jul 2005 11:58:09 -0000 1.5 --- author_testsuite.php 25 Jul 2005 10:09:32 -0000 1.6 *************** *** 146,157 **** //$testsuite[] = stack_testsuite_construct('FacForm','(x-1)*(x+(1+sqrt(3)*%i)/2)*(x+(1-sqrt(3)*%i)/2)','x^3-1',1,'x',''); $testsuite[] = stack_testsuite_construct('PartFrac','1/m','1/n',0,'n','Basic tests'); $testsuite[] = stack_testsuite_construct('PartFrac','1/n','1/n',0,'n',''); $testsuite[] = stack_testsuite_construct('PartFrac','1/(n+1)-1/n','1/(n+1)-1/n',1,'n','A simple correct answer'); $testsuite[] = stack_testsuite_construct('PartFrac','1/(n*(n-1))','1/(n*(n-1))',0,'n','Simple mistakes'); $testsuite[] = stack_testsuite_construct('PartFrac','1/(n-1)-1/n^2','1/((n+1)*n)',0,'n',''); $testsuite[] = stack_testsuite_construct('PartFrac','1/(n-1)-1/n','1/(n-1)+1/n',0,'n',''); $testsuite[] = stack_testsuite_construct('PartFrac','1/(x+1)-1/x','1/(x-1)+1/x',0,'x',''); ! $testsuite[] = stack_testsuite_construct('SA_factored','1/0','0',0,'x',''); --- 146,168 ---- //$testsuite[] = stack_testsuite_construct('FacForm','(x-1)*(x+(1+sqrt(3)*%i)/2)*(x+(1-sqrt(3)*%i)/2)','x^3-1',1,'x',''); + $testsuite[] = stack_testsuite_construct('PartFrac','1/m','1/n',0,'n','Basic tests'); $testsuite[] = stack_testsuite_construct('PartFrac','1/n','1/n',0,'n',''); $testsuite[] = stack_testsuite_construct('PartFrac','1/(n+1)-1/n','1/(n+1)-1/n',1,'n','A simple correct answer'); + $testsuite[] = stack_testsuite_construct('PartFrac','3/(x+1) + 3/(x+2)','3*(2*x+3)/((x+1)*(x+2))',1,'x','Correct Answer, unfactored'); + $testsuite[] = stack_testsuite_construct('PartFrac','3*(1/(x+1) + 1/(x+2))','3*(2*x+3)/((x+1)*(x+2))',1,'x','Correct Answer, factored'); + $testsuite[] = stack_testsuite_construct('PartFrac','3*x*(1/(x+1) + 2/(x+2))','3*x/(x+1)+6*x/(x+2)',1,'x',''); + $testsuite[] = stack_testsuite_construct('PartFrac','(3*x+3)*(1/(x+1) + 2/(x+2))','(3*x+3)/(x+1)+(6*x+6)/(x+2)',1,'x',''); + $testsuite[] = stack_testsuite_construct('PartFrac','10/(x+3) - 2/(x+2) + x -2','(x^3 + 3*x^2 + 4*x +2)/((x+2)*(x+3))',1,'x','Correct Answer, Numerator > Denominator'); $testsuite[] = stack_testsuite_construct('PartFrac','1/(n*(n-1))','1/(n*(n-1))',0,'n','Simple mistakes'); $testsuite[] = stack_testsuite_construct('PartFrac','1/(n-1)-1/n^2','1/((n+1)*n)',0,'n',''); $testsuite[] = stack_testsuite_construct('PartFrac','1/(n-1)-1/n','1/(n-1)+1/n',0,'n',''); $testsuite[] = stack_testsuite_construct('PartFrac','1/(x+1)-1/x','1/(x-1)+1/x',0,'x',''); ! $testsuite[] = stack_testsuite_construct('PartFrac','2/(x+1)-1/(x+2)','s/((s+1)*(s+2))',0,'s','Different Variables'); ! $testsuite[] = stack_testsuite_construct('PartFrac','s/((s+1)^2) + s/(s+2) - 1/(s+1)','s/((s+1)*(s+2))',0,'s','Too many parts in the partial fraction'); ! $testsuite[] = stack_testsuite_construct('PartFrac','s/(s+2) - 1/(s+1)','s/((s+1)*(s+2)*(s+3))',0,'s','Too few parts in the partial fraction'); ! $testsuite[] = stack_testsuite_construct('PartFrac','1/(x+1) + 1/(x+2)','2/(x+1) + 1/(x+2)',0,'x','Addition and Subtraction errors'); ! $testsuite[] = stack_testsuite_construct('PartFrac','1/(x+1) + 1/(x+2)','1/(x+1) + 2/(x+2)',0,'x',''); ! $testsuite[] = stack_testsuite_construct('PartFrac','1/(x+1) + 1/(x+2)','1/(x+3) + 1/(x+2)',0,'x','Denominator Error'); $testsuite[] = stack_testsuite_construct('SA_factored','1/0','0',0,'x',''); Index: en_doc.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/doc/en_doc.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** en_doc.php 19 Jul 2005 13:31:32 -0000 1.5 --- en_doc.php 25 Jul 2005 10:09:32 -0000 1.6 *************** *** 359,363 **** Literally in Maxima, is <tt>expand(SA)=SA</tt>?"; ! $stackAnswerTest['PartFrac']['doc']="This test has not yet been implemented."; $stackAnswerTest['Diff']['doc']="This test is a general differentiation test. --- 359,374 ---- Literally in Maxima, is <tt>expand(SA)=SA</tt>?"; ! $stackAnswerTest['PartFrac']['doc']="This test checks to see if the expression in <tt>SA</tt> is ! the partial fraction of <tt>tExpr</tt> which is the first part of the list SBL. It uses functions found in ! stackMaxima.mac in order to give feedback.<p> ! The function takes in the Students Answer (<tt>SA</tt>), and a List (<tt>SBL</tt>), SBL consist of ! 3 parts, the Teachers Expression (<tt>tExpr</tt>), the variable to which the partial fraction has respect to, and whether ! formative feedback is required. <p> ! Feedback comes in several forms, <tt>TRUE</tt> if and only if the answer is the partial fraction of ! the Teacher's Expression, whether it be a factored form or not. Feedback is also given based on ! incorrect answers in order to guide the student to the right answer. For exmaple the common denominator is returned ! in order for the student to check the denominators of their partial fraction. See the AnswerTest <tt>AT_PartFrac</tt> ! for more details."; ! $stackAnswerTest['Diff']['doc']="This test is a general differentiation test. |
From: LastRenshai <las...@us...> - 2005-07-25 10:09:46
|
Update of /cvsroot/stack/stack-1-0/scripts/maxima In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10188/scripts/maxima Modified Files: stackmaxima.mac Log Message: Index: stackmaxima.mac =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/maxima/stackmaxima.mac,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** stackmaxima.mac 18 Jul 2005 11:58:22 -0000 1.21 --- stackmaxima.mac 25 Jul 2005 10:09:32 -0000 1.22 *************** *** 723,737 **** /*****************************************************************/ ! /* Partial Fractions answer Test functions */ ! /* Author: LastRenshai */ /*****************************************************************/ /* *******Functions Used******** */ ! /* deg(Expr) */ /* isDenomSame(sExpr, tExpr) */ ! /* isNumSame(sExpr, tExpr) */ /* isPartFrac(sExpr, tExpr, wrt) */ /* quadTest(sExpr, tExpr, wrt) */ ! /* sameVars(expr1, expr2) */ /* tripTest(sExpr, tExpr, wrt) */ /* ***************************** */ --- 723,737 ---- /*****************************************************************/ ! /* Partial Fractions answer Test functions */ ! /* Author: LastRenshai */ /*****************************************************************/ /* *******Functions Used******** */ ! /* deg(Expr) */ /* isDenomSame(sExpr, tExpr) */ ! /* isNumSame(sExpr, tExpr) */ /* isPartFrac(sExpr, tExpr, wrt) */ /* quadTest(sExpr, tExpr, wrt) */ ! /* sameVars(expr1, expr2) */ /* tripTest(sExpr, tExpr, wrt) */ /* ***************************** */ *************** *** 739,744 **** /* ******************Degree Of Polynomial Test************************* */ /* Assumes expression isn't already expanded and contains a val of x */ ! /* requires : expression with variable such as x */ ! /* returns : degree of highest power of var */ /* ******************************************************************** */ deg(expr):= --- 739,744 ---- /* ******************Degree Of Polynomial Test************************* */ /* Assumes expression isn't already expanded and contains a val of x */ ! /* requires : expression with variable such as x */ ! /* returns : degree of highest power of var */ /* ******************************************************************** */ deg(expr):= *************** *** 774,781 **** /* ************Denominator Same Test*************************** */ ! /* requires: Students partial Fraction part */ ! /* Teachers Partial Fraction part */ ! /* returns: Boolean TRUE iff denominators are equivalent */ ! /* false otherwise */ /* ************************************************************ */ --- 774,781 ---- /* ************Denominator Same Test*************************** */ ! /* requires: Students partial Fraction part */ ! /* Teachers Partial Fraction part */ ! /* returns: Boolean TRUE iff denominators are equivalent */ ! /* false otherwise */ /* ************************************************************ */ *************** *** 791,798 **** /* **************Numerator Same Test*************************** */ ! /* requires: Students partial Fraction part */ ! /* Teachers Partial Fraction part */ ! /* returns: Boolean TRUE iff numerators are equivalent */ ! /* false otherwise */ /* ************************************************************ */ --- 791,798 ---- /* **************Numerator Same Test*************************** */ ! /* requires: Students partial Fraction part */ ! /* Teachers Partial Fraction part */ ! /* returns: Boolean TRUE iff numerators are equivalent */ ! /* false otherwise */ /* ************************************************************ */ *************** *** 809,822 **** /* **************************PartFrac Test***************************** */ ! /* requires: Student Answer */ ! /* Teachers Question */ ! /* Respect To which the fractions are parted */ ! /* returns: StackReturnOb */ ! /* CASE 1: topOp is divisor - single fraction */ ! /* CASE 2: CORRECT answer - true */ ! /* CASE 3: Different Variables - diff vars */ ! /* CASE 4: Different amount of parts - Diff parts */ ! /* CASE 5: Different Numerator - ret factored expression */ ! /* CASE 6: Different Denominator - ret sDenom and tDenom */ /* ******************************************************************** */ --- 809,822 ---- /* **************************PartFrac Test***************************** */ ! /* requires: Student Answer */ ! /* Teachers Question */ ! /* Respect To which the fractions are parted */ ! /* returns: StackReturnOb */ ! /* CASE 1: topOp is divisor - single fraction */ ! /* CASE 2: CORRECT answer - true */ ! /* CASE 3: Different Variables - diff vars */ ! /* CASE 4: Different amount of parts - Diff parts */ ! /* CASE 5: Different Numerator - ret factored expression */ ! /* CASE 6: Different Denominator - ret sDenom and tDenom */ /* ******************************************************************** */ *************** *** 876,886 **** /* **********************QUAD TEST***************************** */ /* Use: Degree of Expression is 2, expressions not equivalent */ ! /* Requires: SExpr - Students Expression */ ! /* TExpr - Teachers Expression */ ! /* wrt - Variable part frac occurs */ ! /* Returns: StackReturnOb */ ! /* CASE 1: different Numerators - factored sExpr */ ! /* CASE 2: diff denominators - sDenom and tDenom */ ! /* CASE 3: Other wise - Factored sExpr */ /* ************************************************************ */ --- 876,886 ---- /* **********************QUAD TEST***************************** */ /* Use: Degree of Expression is 2, expressions not equivalent */ ! /* Requires: SExpr - Students Expression */ ! /* TExpr - Teachers Expression */ ! /* wrt - Variable part frac occurs */ ! /* Returns: StackReturnOb */ ! /* CASE 1: different Numerators - factored sExpr */ ! /* CASE 2: diff denominators - sDenom and tDenom */ ! /* CASE 3: Other wise - Factored sExpr */ /* ************************************************************ */ *************** *** 900,904 **** rawmk: String(0), ansnote: "ATPartFrac_ret_expression", ! fb: Sconcat("AtPartFrac_ret_expression ", factor(sExpr)) ) else if (isDenomSame(sExprL, tExprL) = false and isDenomSame(sExprL, tExprR) = false) --- 900,904 ---- rawmk: String(0), ansnote: "ATPartFrac_ret_expression", ! fb: StackAddFeedback("", "ATPartFrac_ret_expression", StackDISP(factor(sExpr)),"\$") ) else if (isDenomSame(sExprL, tExprL) = false and isDenomSame(sExprL, tExprR) = false) *************** *** 908,912 **** rawmk: String(0), ansnote: "ATPartFrac_denom_ret", ! fb: Sconcat("AtPartFrac_denom_ret ", denom(factor(sExpr)), " " , denom(factor(tExpr))) ) else --- 908,912 ---- rawmk: String(0), ansnote: "ATPartFrac_denom_ret", ! fb: StackAddFeedback("","ATPartFrac_denom_ret", StackDISP(denom(factor(sExpr)),"\$"), StackDISP(denom(factor(tExpr)),"\$")) ) else *************** *** 915,919 **** rawmk: String(0), ansnote: "ATPartFrac_ret_expression", ! fb: Sconcat("AtPartFrac_ret_expression ", factor(sExpr)) ), ret: StackReturnOb(val, rawmk,ansnote,fb), --- 915,919 ---- rawmk: String(0), ansnote: "ATPartFrac_ret_expression", ! fb: StackAddFeedback("", "ATPartFrac_ret_expression", StackDISP(factor(sExpr)),"\$") ), ret: StackReturnOb(val, rawmk,ansnote,fb), *************** *** 924,930 **** /* ***************Variables used the Same********************** */ ! /* requires: 2 Expressions */ /* returns: TRUE: iff expr 1 and expr2 contain same vars */ ! /* FALSE: otherwise */ /* ************************************************************ */ --- 924,930 ---- /* ***************Variables used the Same********************** */ ! /* requires: 2 Expressions */ /* returns: TRUE: iff expr 1 and expr2 contain same vars */ ! /* FALSE: otherwise */ /* ************************************************************ */ *************** *** 941,951 **** /* ****************3rd Degree Partial Fraction***************** */ /* Use: Degree of Expression is 3, expressions not equivalent */ ! /* Requires: SExpr - Students Expression */ ! /* TExpr - Teachers Expression */ ! /* wrt - Variable part frac occurs */ ! /* Returns: StackReturnOb */ ! /* CASE 1: different Numerators - factored sExpr */ ! /* CASE 2: diff denominators - sDenom and tDenom */ ! /* CASE 3: Other wise - Factored sExpr */ /* ************************************************************ */ --- 941,951 ---- /* ****************3rd Degree Partial Fraction***************** */ /* Use: Degree of Expression is 3, expressions not equivalent */ ! /* Requires: SExpr - Students Expression */ ! /* TExpr - Teachers Expression */ ! /* wrt - Variable part frac occurs */ ! /* Returns: StackReturnOb */ ! /* CASE 1: different Numerators - factored sExpr */ ! /* CASE 2: diff denominators - sDenom and tDenom */ ! /* CASE 3: Other wise - Factored sExpr */ /* ************************************************************ */ *************** *** 967,971 **** rawmk: String(0), ansnote: "ATPartFrac_ret_expression", ! fb: Sconcat("AtPartFrac_single_Fraction ", factor(sExpr)) ) else if (isDenomSame(s1,t1) = false and isDenomSame(s1,t2) = false and isDenomSame(s1, t3) = false) --- 967,971 ---- rawmk: String(0), ansnote: "ATPartFrac_ret_expression", ! fb: StackAddFeedback("", "ATPartFrac_ret_expression", StackDISP(factor(sExpr)),"\$") ) else if (isDenomSame(s1,t1) = false and isDenomSame(s1,t2) = false and isDenomSame(s1, t3) = false) *************** *** 976,980 **** rawmk: String(0), ansnote: "ATPartFrac_denom_ret", ! fb: Sconcat("AtPartFrac_denom_ret ", denom(factor(sExpr)), " " , denom(factor(tExpr))) ) else --- 976,980 ---- rawmk: String(0), ansnote: "ATPartFrac_denom_ret", ! fb: StackAddFeedback("","ATPartFrac_denom_ret", StackDISP(denom(factor(sExpr)),"\$"), StackDISP(denom(factor(tExpr)),"\$")) ) else *************** *** 983,987 **** rawmk: String(0), ansnote: "ATPartFrac_ret_expression", ! fb: Sconcat("AtPartFrac_ret_expression ", factor(sExpr)) ), ret: StackReturnOb(val, rawmk, ansnote, fb), --- 983,987 ---- rawmk: String(0), ansnote: "ATPartFrac_ret_expression", ! fb: StackAddFeedback("", "ATPartFrac_ret_expression", StackDISP(factor(sExpr)),"\$") ), ret: StackReturnOb(val, rawmk, ansnote, fb), |
From: pkiddie <pk...@us...> - 2005-07-22 12:52:40
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4567/scripts Modified Files: stackQuestion.php stackQuiz.php stackXML.php Log Message: Using main stack version to output schemas Index: stackQuiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuiz.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** stackQuiz.php 19 Jul 2005 13:31:32 -0000 1.4 --- stackQuiz.php 22 Jul 2005 12:47:41 -0000 1.5 *************** *** 152,160 **** $stackQuiz['quizExcerciseType']['default']='unspecified'; - //Versioning required to check whether schema is up to date - //Where version number has form M.N where M is major version number - // N is minor version number - $stackQuiz['version']='1.0'; - /** * Displays the student quiz selection screen --- 152,155 ---- Index: stackXML.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackXML.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** stackXML.php 19 Jul 2005 13:31:32 -0000 1.12 --- stackXML.php 22 Jul 2005 12:47:41 -0000 1.13 *************** *** 7,14 **** * @subpackage Stack */ ! //require_once('stackstd.php'); //<PDK> sqlToSchemaMapping array maps basic SQL data types used in STAKCK to their respective XML schema data types ! /*$sqlToSchemaMapping['CHAR']='string'; $sqlToSchemaMapping['VARCHAR']='string'; $sqlToSchemaMapping['TEXT']='string'; --- 7,146 ---- * @subpackage Stack */ ! ! //<PDK> Simple XML document class for phpV4 - writes out UTF-8 conforming XML ! /** ! * XmlDocument ! * ! * Simple Xml writer class for phpV4. Writes out UTF-8 conforming XML ! * ! * @access public ! */ ! class XmlDocument ! { ! /** ! * XML string ! * ! * @var xml ! * @access public ! */ ! var $xml; ! ! /** ! * XML root node name ! * ! * @var xmlRootNode ! * @access public ! */ ! var $xmlRootNode; ! ! /** ! * Carriage return ! * ! * @var CR ! * @access static ! */ ! var $CR; ! ! /** ! * Placeholder for UTF-8 conforming XML ! * ! * @var xml ! * @access public ! */ ! var $utfEncXml; ! ! /** ! * Default constructor ! * ! * Initialises class object variables and writes XML header - same for all XML files ! * @access public ! */ ! function XmlDocument() { ! $this->xmlRootNode = ''; ! $this->CR = "\r\n"; ! $this->xml = '<?xml version="1.0" encoding="UTF-8"?>'.$this->CR; ! } ! ! /** ! * Creates a root node in the current XML document object ! * ! * @access public ! * @param string $rootElement Name of the root element of the XML file ! */ ! function CreateRootNode($rootElement) { ! $this->xmlRootNode = $rootElement; ! $this->xml.= "<$rootElement>".$this->CR; ! } ! ! /** ! * Creates a root node in the current XML document object with a reference to a schema for validation purposes ! * ! * @access public ! * @param string $rootElement Name of the root element of the XML file ! * @param string $namespace The namespace the schema elements should reside under ! * @param string $namespaceUri Location of the schema ! * @param string $version Version of schema to which XML complies with ! */ ! function CreateRootNodeFromSchema($rootElement,$namespace,$namespaceUri,$version){ ! $this->xmlRootNode = $rootElement; ! $this->xml.= '<'.$rootElement." xmlns:".$namespace.'="http://www.w3.org/2001/XMLSchema-instance"'." ". ! $namespace.':noNamespaceSchemaLocation="'.$namespaceUri.'"'." ". ! 'version="'.$version.'">'.$this->CR; ! } ! ! /** ! * Creates an element within the current XML document object ! * ! * @param string $elementName The name of the element tag ! * @param string $value The value of the current element ! * @access public ! */ ! function CreateElementNode($elementName, $value) { ! $pad = str_pad('',4); ! $this->xml.= $pad."<$elementName>$value</$elementName>".$this->CR; ! } ! ! /** ! * Writes the XML string encapsulated in the XML Document object as an XML file ! * ! * @param string $directory The directory to store the XML file ! * @param string $fileName The filename to store the XML file under ! * @access public ! */ ! function WriteXml($directory,$fileName) { ! // create the file we will use for writing ! $xml_file_handle = fopen($directory.$fileName, "w"); ! ! if (!$xml_file_handle) { ! // error condition ! echo "File could not be opened for writing."; ! } else { ! $this->xml.= "</$this->xmlRootNode>"; ! $this->utfEncXml = utf8_encode($this->xml); ! fputs($xml_file_handle, $this->utfEncXml); ! // close xml file ! fclose($xml_file_handle); ! } ! } ! ! /** ! * Retrieves the XML string stored in the object as a UTF-8 encoded string ! * ! * @access public ! */ ! function get_xml() ! { ! //Before we return the XML we must terminate the root node ! $this->xml.= "</$this->xmlRootNode>"; ! $this->utfEncXml = utf8_encode($this->xml); ! ! //return $this->xml; } ! return $this->utfEncXml; ! } ! ! } //<PDK> sqlToSchemaMapping array maps basic SQL data types used in STAKCK to their respective XML schema data types ! $sqlToSchemaMapping['CHAR']='string'; $sqlToSchemaMapping['VARCHAR']='string'; $sqlToSchemaMapping['TEXT']='string'; *************** *** 20,24 **** $sqlToSchemaMapping['TIME']='time'; $sqlToSchemaMapping['DATETIME']='dateTime'; ! $sqlToSchemaMapping['TIMESTAMP']='time';*/ /** --- 152,156 ---- $sqlToSchemaMapping['TIME']='time'; $sqlToSchemaMapping['DATETIME']='dateTime'; ! $sqlToSchemaMapping['TIMESTAMP']='time'; /** *************** *** 73,76 **** --- 205,209 ---- if (is_array($data)) { + print_r($data); // Deal with arrays of numbered attributes. if (array_key_exists('0',$data)) { *************** *** 124,127 **** --- 257,261 ---- } else { $xml = '<?xml version="1.0"?>'."\n".stack_xml_create_question($question); + fputs($xml_file_handle, $xml); // close xml file *************** *** 228,232 **** } } ! return $params; } --- 362,366 ---- } } ! return $params; } *************** *** 267,271 **** stack_schema_create_question_metadata(). stack_schema_escape_root(). ! stack_schema_create_enum_types(). //End of schema '</xs:schema>'; --- 401,405 ---- stack_schema_create_question_metadata(). stack_schema_escape_root(). ! stack_schema_create_question_enum_types(). //End of schema '</xs:schema>'; *************** *** 304,430 **** } - function stack_schema_write_quiz_metadata() - { - global $stackQuiz; - - $schema_file_name='stack_quiz_metadata-'.$stackQuiz['version'].'.xsd'; //File name of schema has version number of stackQuiz clearly identified - - //<TODO: Check if is compatible!!> - $xml_file_handle = fopen($directory."\\".$schema_file_name,"w"); - - if (!$xml_file_handle) - { - echo "File could not be opened for writing. Please contact the network administrator."; - return ''; - } - - else - { - //Write the XML schema header - same for all XML schemas - with version number. - //XML metadata files which validate against this schema will also have a version number - $xml = '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="'.$stackQuiz['version'].'">'. - "\n". - '<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>'. - //Create root element 'metadata'. - stack_schema_create_root("metadata"). - stack_schema_create_quiz_metadata(). - stack_schema_escape_root(). - stack_schema_create_enum_types(). - //End of schema - '</xs:schema>'; - - //write out xml string - fputs($xml_file_handle,$xml); - //close xml file - fclose($xml_file_handle); - } - } - - function stack_schema_create_quiz_metadata(); - { - global $sqlToSchemaMapping,$stackQuiz; - - include('../../stackstd.php'); - - $options = stack_options_set(array()); - $filename = stack_lang_filename($options,'doc/en_doc.php'); //Include documentation to document fields if it is available - include($filename); - - $xml = ""; - - //Do not export questionID - internal SQL variable - if (array_key_exists('questionID',$stackQuestion)) { - unset($stackQuestion['questionID']); - } - - //Do not export body - internal SQL variable. - if (array_key_exists('questionBody',$stackQuestion)) { - unset($stackQuestion['questionBody']); - } - - //Create a sequence of metadata tags - $xml.='<xs:sequence>'; - - foreach($stackQuestion as $arrayKey=>$questionField) //Iterate through sub array of each array object - { - //First check there is a type associated with that field and that the stackQuestion field is metadata - if (!empty($questionField['type']) && ($questionField['type']=='meta')) { - - //Check that a metadata tag has been supplied and do not write out if tag has not been supplied - if (empty($questionField['metatag'])) - { - echo'No metadata tag for stackQuestion field: '.$arrayKey.'<br> As a consequence it has not been written to the XML metadata schema<br>'; - } - - else - { - //If metadata is not a selection from a list of specified types - if (empty($questionField['values'])) - { - //Create XML schema fragment - //Documentation available for column - if (!empty($questionField['doc'])) { - $xml.=stack_schema_write_element_document($questionField['metatag'],$questionField['mysql'],$questionField['doc']); - - } - - //Documentation not available for column - else { - //echo "Doucmentation not avilable!"; - $xml.=stack_schema_write_element($questionField['metatag'],$questionField['mysql']); - } - } - - //The values field is not empty - else - { - //Create XML schema fragment, and default possible enumeration simpleTypes to be the lower case - //of the current metadata tag - if (!empty($questionField['doc'])) { - $xml.=stack_schema_write_element_document_enum_type($questionField['metatag'],strtolower($questionField['metatag']),$questionField['doc']); - } - - //Documentation not available for column - else { - $xml.=stack_schema_write_element_enum_type($questionField['metatag'],strtolower($questionField['metatag'])); - } - - //Furthermore, need to create - } - - - } - } - } - - //Terminate a sequence of metadata tags - $xml.='</xs:sequence>'; - - //We must now tag the 'metadata' tag with a version attribute - $xml.= stack_schema_write_attribute('version', true); - - return $xml; - } - /** * Writes the current stackQuestion metadata structure to an XML string --- 438,441 ---- *************** *** 763,767 **** * @return string $xml the XML string representing the entire metadata schema */ ! function stack_schema_create_enum_types() { global $stackQuestion; --- 774,778 ---- * @return string $xml the XML string representing the entire metadata schema */ ! function stack_schema_create_question_enum_types() { global $stackQuestion; *************** *** 834,837 **** --- 845,1461 ---- } + /** + * Writes an XML schema file of the current stackQuiz metadata tags + * + * XML schema used within STACK to validate quizzes on import/export, and provide a definition of the metadata document + * + * @param string $directory The directory to store the XSD file (web server must have permissions) + * @return the XSD filename representing the schema - only returned if xml was able to be written out + */ + function stack_schema_write_quiz_metadata($directory) + { + global $stackQuiz; + + $schema_file_name='stack_quiz_metadata-'.$stackQuiz['version'].'.xsd'; //File name of schema has version number of stackQuiz clearly identified + + //<TODO: Check if is compatible!!> + $xml_file_handle = fopen($directory."\\".$schema_file_name,"w"); + + if (!$xml_file_handle) + { + echo "File could not be opened for writing. Please contact the network administrator."; + return ''; + } + + else + { + //Write the XML schema header - same for all XML schemas - with version number. + //XML metadata files which validate against this schema will also have a version number + $xml = '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="'.$stackQuiz['version'].'">'. + "\n". + '<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>'. + //Create root element 'metadata'. + stack_schema_create_root("metadata"). + stack_schema_create_quiz_metadata(). + stack_schema_escape_root(). + stack_schema_create_quiz_enum_types(). + //End of schema + '</xs:schema>'; + + //write out xml string + fputs($xml_file_handle,$xml); + //close xml file + fclose($xml_file_handle); + } + + return $schema_file_name; + } + + /** + * Writes the current stackQuiz metadata structure to an XML string + * + * Iterates through each of the fields within the stackQuiz array. If the type 'meta' is detected, (ignoring the internal SQL + * questionID and body), the relevant documentation is looked up and a schema element is written out, of the correct type + * + * Will not write an field out that is marked as 'meta' and does not have a 'metatag' value, but will raise an error. + * + * @param + * @return the XML string representing the entire metadata schema + */ + function stack_schema_create_quiz_metadata() + { + global $sqlToSchemaMapping,$stackQuiz; + + include('../../stackstd.php'); + + $options = stack_options_set(array()); + $filename = stack_lang_filename($options,'doc/en_doc.php'); //Include documentation to document fields if it is available + include($filename); + + $xml = ""; + + //Do not export quizID - internal SQL variable + if (array_key_exists('quizid',$stackQuiz)) { + unset($stackQuiz['questionID']); + } + + //Create a sequence of metadata tags + $xml.='<xs:sequence>'; + + foreach($stackQuiz as $arrayKey=>$quizField) //Iterate through sub array of each array object + { + //First check there is a type associated with that field and that the stackQuestion field is metadata + if (!empty($quizField['type']) && ($quizField['type']=='meta')) { + + //Check that a metadata tag has been supplied and do not write out if tag has not been supplied + if (empty($quizField['metatag'])) + { + echo'No metadata tag for stackQuiz field: '.$arrayKey.'<br> As a consequence it has not been written to the XML metadata schema<br>'; + } + + else + { + //If metadata is not a selection from a list of specified types + if (empty($quizField['values'])) + { + //Create XML schema fragment + //Documentation available for column + if (!empty($quizField['doc'])) { + $xml.=stack_schema_write_element_document($quizField['metatag'],$quizField['mysql'],$quizField['doc']); + + } + + //Documentation not available for column + else { + //echo "Doucmentation not avilable!"; + $xml.=stack_schema_write_element($quizField['metatag'],$quizField['mysql']); + } + } + + //The values field is not empty + else + { + //Create XML schema fragment, and default possible enumeration simpleTypes to be the lower case + //of the current metadata tag + if (!empty($quizField['doc'])) { + $xml.=stack_schema_write_element_document_enum_type($quizField['metatag'],strtolower($quizField['metatag']),$quizField['doc']); + } + + //Documentation not available for column + else { + $xml.=stack_schema_write_element_enum_type($quizField['metatag'],strtolower($quizField['metatag'])); + } + + //Furthermore, need to create + } + } + } + } + + //Terminate a sequence of metadata tags + $xml.='</xs:sequence>'; + + //We must now tag the 'metadata' tag with a version attribute + $xml.= stack_schema_write_attribute('version', true); + + return $xml; + } + + /** + * Writes the current stackQuiz enumeration types to an XML string + * + * Iterates through each of the fields within the stackQuiz array. If the type 'meta' is detected, (ignoring the internal SQL + * questionID and body), and a list of values exist, an XML schema simpleType is created which encapsulates these. + * + * Will not write an field out that is marked as 'meta' and does not have a 'metatag' value, but will raise an error. + * + * @return string $xml the XML string representing the entire metadata schema + */ + function stack_schema_create_quiz_enum_types() + { + global $stackQuiz; + + $xml = ""; + + foreach($stackQuiz as $arrayKey=>$quizField) //Iterate through sub array of each array object + { + //Array item is metadata + if (!empty($quizField['type']) && $quizField['type']=='meta') { + + //check to see whether an enum type of values needs to be written out + if (!empty($quizField['values'])) + { + //Check that a metadata tag has been supplied and do not write out if tag has not been supplied + if (empty($quizField['metatag'])) + { + echo'No metadata tag for stackQuestion field: '.$arrayKey.'.<br> As a consequence this enum type has not been written to the XML metadata schema'; + } + + else + { + $xml.=stack_schema_create_simpletype(strtolower($quizField['metatag']),$quizField['values']); + } + } + } + } + + return $xml; + } + + /** + * Creates question metadata for the specified question when using PHP4. Use of proprietary XmlDocument class. + * + * References the question metadata schema within the XML file along with the schema/stackQuestion version in use. Then iterates through + * each of the fields within the instantiated question array. If the type 'meta' is detected, (ignoring the internal SQL questionID and body), + * the value of this field is written out. + * + * @param string $questionSchemaLocation The location of the question metadata schema for which this XML file should reflect + * @param string $questionSchemaVersion The version of the question metadata schema in use + * @param array $question The instantiated question from which the metadata fields should be grabbed for + * @param string $directory The directory to store the question metadata XML file + * @param string $filename The filename of the question metadata XML file. + * @return void + */ + function stack_xml_create_question_metadata_v4($questionSchemaLocation,$questionSchemaVersion,$question,$directory,$filename) + { + global $stackQuestion; + + // Don't export questionID within metadata + if (array_key_exists('questionID',$question)) { + unset($question['questionID']); + } + + //Dont export questionBody within metadata + if (array_key_exists('questionBody',$question)) { + unset($question['questionID']); + } + + // Make sure the question is validated. + // stack_question_validate($question,$errors); + + $questionMetadata = new XmlDocument(); //Using simple XML writer for phpV4 + + $questionMetadata->CreateRootNodeFromSchema('metadata', //Root element called metadata + 'xsi', //Default schema namespace + $schemaLocation,//Where schema resides (local or global??) + $schemaVersion);//Schema version + + if (is_array($question)) + { + //Check that a field is of type 'meta', and write out to XML file + foreach($question as $key => $metaField) { + if ('meta' == $metaField['type']) { + $questionMetadata->CreateElementNode($key,$metaField); + } + } + } + + $questionMetadata->WriteXml($directory,$filename); + } + /** + * Creates quiz metadata for the specified question when using PHP4. Use of proprietary XmlDocument class. + * + * References the quiz metadata schema within the XML file along with the schema/stackQuiz version in use. Then iterates through + * each of the fields within the instantiated quiz array. If the type 'meta' is detected, (ignoring the internal SQL quizID), + * the value of this field is written out. + * + * @param string $quizSchemaLocation The location of the quiz metadata schema for which this XML file should reflect + * @param string $quizSchemaVersion The version of the quiz metadata schema in use + * @param array $quiz The instantiated quiz from which the metadata fields should be grabbed for + * @param string $directory The directory to store the quiz metadata XML file + * @param string $filename The filename of the quiz metadata XML file. + * @return void + */ + function stack_xml_create_quiz_metadata_v4($quizSchemaLocation,$quizSchemaVersion,$quiz,$directory,$filename) + { + global $stackQuiz; + + if (array_key_exists('quizid',$quiz)) { + unset($quiz['quizid']); + } + + $quizMetadata = new XmlDocument(); //Using simple XML writer for phpV4 + + $quizMetadata->CreateRootNodeFromSchema('metadata', //Root element called metadata + 'xsi', //Default schema namespace + $schemaLocation,//Where schema resides (local or global??) + $schemaVersion);//Schema version + + if (is_array($quiz)) + { + //Check that a field is of type 'meta', and write out to XML file + foreach($quiz as $key => $metaField) { + if ('meta' == $metaField['type']) { + $quizMetadata->CreateElementNode($key,$metaField); + } + } + } + + $quizMetadata->WriteXml($directory,$filename); + } + + /** + * Creates question metadata for the specified question when using PHP5. Use of DOM XML. + * + * References the question metadata schema within the XML file along with the schema/stackQuestion version in use. Then iterates through + * each of the fields within the instantiated question array. If the type 'meta' is detected, (ignoring the internal SQL questionID and body), + * the value of this field is written out. + * + * @param string $questionSchemaLocation The location of the question metadata schema for which this XML file should reflect + * @param string $questionSchemaVersion The version of the question metadata schema in use + * @param array $question The instantiated question from which the metadata fields should be grabbed for + * @param string $directory The directory to store the question metadata XML file + * @param string $filename The filename of the question metadata XML file. + * @return void + */ + function stack_xml_create_question_metadata_v5($questionSchemaLocation,$questionSchemaVersion,$question,$directory,$filename) + { + global $stackQuestion; + + // Don't export questionID within metadata + if (array_key_exists('questionID',$question)) { + unset($question['questionID']); + } + + //Dont export questionBody within metadata + if (array_key_exists('questionBody',$question)) { + unset($question['questionID']); + } + + // Make sure the question is validated. + // stack_question_validate($question,$errors); + + $dom = new DomDocument(); + + //Create root metadata node + $root = $dom->createElement("metadata"); + + //PHP v5.0.4 stable - incorrect definition for createAttribute, only takes 1 param. + //Therefore we set value after instantiating object + //Create reference to stack question metadata schema + $rootNamespace = $dom->createAttribute('xmlns:xsi'); + $rootNamespace->value = "http://www.w3.org/2001/XMLSchema-instance"; + + $rootNamespaceUri = $dom->createAttribute('xsi:noNamespaceSchemaLocation'); + $rootNamespaceUri->value = $schemaLocation; + + $rootVersion = $dom->createAttribute('version'); + $rootVersion->value = $schemaVersion; + + $root->appendChild($rootNamespace); + $root->appendChild($rootNamespaceUri); + $root->appendChild($rootVersion); + + if (is_array($question)) + { + //Check that a field is of type 'meta', and write out to XML file + foreach($question as $key => $metaField) { + if ('meta' == $metaField['type']) { + $metaElement = $dom->createElement($key,$metaField); + $root->appendChild($metaElement); + } + } + } + + $dom->appendChild($root); + + $dom->save($directory.$filename); + } + + /** + * Creates quiz metadata for the specified question when using PHP5. Use of DOM XML extensions. + * + * References the quiz metadata schema within the XML file along with the schema/stackQuiz version in use. Then iterates through + * each of the fields within the instantiated quiz array. If the type 'meta' is detected, (ignoring the internal SQL quizID), + * the value of this field is written out. + * + * @param string $quizSchemaLocation The location of the quiz metadata schema for which this XML file should reflect + * @param string $quizSchemaVersion The version of the quiz metadata schema in use + * @param array $quiz The instantiated quiz from which the metadata fields should be grabbed for + * @param string $directory The directory to store the quiz metadata XML file + * @param string $filename The filename of the quiz metadata XML file. + * @return void + */ + function stack_xml_create_quiz_metadata_v5($quizSchemaLocation,$quizSchemaVersion,$quiz,$directory,$filename) + { + global $stackQuiz; + + // Don't export questionID within metadata + if (array_key_exists('quizid',$quiz)) { + unset($quiz['quizid']); + } + + // Make sure the question is validated. + // stack_question_validate($question,$errors); + + $dom = new DomDocument(); + + //Create root metadata node + $root = $dom->createElement("metadata"); + + //PHP v5.0.4 stable - incorrect definition for createAttribute, only takes 1 param. + //Therefore we set value after instantiating object + //Create reference to stack question metadata schema + $rootNamespace = $dom->createAttribute('xmlns:xsi'); + $rootNamespace->value = "http://www.w3.org/2001/XMLSchema-instance"; + + $rootNamespaceUri = $dom->createAttribute('xsi:noNamespaceSchemaLocation'); + $rootNamespaceUri->value = $schemaLocation; + + $rootVersion = $dom->createAttribute('version'); + $rootVersion->value = $schemaVersion; + + $root->appendChild($rootNamespace); + $root->appendChild($rootNamespaceUri); + $root->appendChild($rootVersion); + + if (is_array($question)) + { + //Check that a field is of type 'meta', and write out to XML file + foreach($quiz as $key => $metaField) { + if ('meta' == $metaField['type']) { + $metaElement = $dom->createElement($key,$metaField); + $root->appendChild($metaElement); + } + } + } + + $dom->appendChild($root); + + $dom->save($directory.$filename); + } + + //Checks the question schema version against the actual value held in stackQuestion, for regularity + + /** + * Checks the schema version reflecting questions against the version held in the stackQuestion data structure + * + * Loads the question metadata schema and checks the 'version' attribute for equality. + * + * @param string $questionSchemaLocation The location of the question metadata schema for which this XML file should reflect + * @return bool $latestVersion True if the schema is the latest version, False otherwise + */ + function stack_schema_check_question_version($questionSchemaLocation) + { + global $stackQuestion; + $latestVersion = false; + + if (is_array($stackQuestion)) + { + /*if($stackQuestion['version']!=schema version) { + $latestVersion = false; + } + + else { + $latestVersion = true; + }*/ + } + } + + /** + * Checks the schema version reflecting quiz metadata against the version held in the stackQuiz data structure + * + * Loads the quiz metadata schema and checks the 'version' attribute for equality. + * + * @param string $quizSchemaLocation The location of the quiz metadata schema for which this XML file should reflect + * @return bool $latestVersion True if the schema is the latest version, False otherwise + */ + function stack_xml_check_quiz_schema_version($quizSchemaLocation) + { + global $stackQuiz; + $latestVersion = false; + + if (is_array($stackQuiz)) + { + /*if($stackQuiz['version']!=/*schema version) { + $latestVersion = false; + } + + else { + $latestVersion = true; + }*/ + } + } + + function stack_xml_create_metadata() + { + //Checking code will go into other file + $phpV4 = false; + $phpV5 = false; + + // Get major revision of PHP in use + $phpVer = phpversion(); + + switch ($phpVer{0}) + { + case '4': + $phpV4 = true; + + case '5': + $phpV5 = true; + } + + print_r($phpVer{0}); + + if ($phpV4) + { + + $questionMetaData = new XmlDocument(); + //$questionMetaData->CreateRootNode('metadata'); + $questionMetaData->CreateRootNodeFromSchema('metadata','xsi','C:\Program Files\EasyPHP1-8\www\stack-1-0\stack_question_metadata-1.0.xsd','1.0'); + $questionMetaData->CreateElementNode("hello","value"); + $questionMetaData->CreateElementNode("hello2","value"); + $questionMetaData->CreateElementNode("hello2","value"); + $questionMetaData->CreateElementNode("hello2","value"); + $questionMetaData->CreateElementNode("hello2","value"); + $questionMetaData->WriteXml('','test.meta'); + } + + else + { + $dom = new DomDocument(); + + //Create root metadata node + $root = $dom->createElement("metadata"); + + //PHP v5.0.4 stable - incorrect definition for createAttribute, only takes 1 param. + //Therefore we set value after instantiating object + $rootNamespace = $dom->createAttribute('xmlns:xsi'); + $rootNamespace->value = "http://www.w3.org/2001/XMLSchema-instance"; + + $rootNamespaceUri = $dom->createAttribute('xsi:noNamespaceSchemaLocation'); + $rootNamespaceUri->value = "C:\Program Files\EasyPHP1-8\www\stack-1-0\stack_question_metadata-1.0.xsd"; + + $rootVersion = $dom->createAttribute('version'); + $rootVersion->value = '1.0'; + + //$root->createAttribute("align", "right"); + $title = $dom->createElement("title"); + $title->appendChild($rootNamespace); + $title->appendChild($rootNamespaceUri); + $title->appendChild($rootVersion); + + $root->appendChild($title); + $dom->appendChild($root); + $dom->save("test.xml"); + } + } + + //Writes XML schema file for the current stackQuestion tags excluding the metadata tags + function stack_schema_write_question($directory) + { + global $stackQuestion; + + $schema_file_name='stack_question'.$stackQuestion['version'].'.xsd'; + + //<TODO: Check if is compatible!!> + $xml_file_handle = fopen($directory."\\".$schema_file_name,"w"); + + if (!$xml_file_handle) + { + echo "File could not be opened for writing. Please contact the network administrator."; + return ''; + } + + else + { + //Write the XML schema header - same for all XML schemas - with version number. + //XML metadata files which validate against this schema will also have a version number + $xml = '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="'.$stackQuestion['version'].'">'. + "\n". + '<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>'. + //Create root element 'metadata'. + stack_schema_create_root("assessmentItem"). + stack_schema_create_question(). + stack_schema_escape_root(). + //stack_schema_create_question_enum_types(). + //End of schema + '</xs:schema>'; + + //write out xml string + fputs($xml_file_handle,$xml); + //close xml file + fclose($xml_file_handle); + } + } + + function stack_schema_create_question() + { + global $stackQuestion,$stackOptions,$stackQuestionPotResp; //use definitive stackQuestion data structure + + include('../../stackstd.php'); + + $options = stack_options_set(array()); + $filename = stack_lang_filename($options,'doc/en_doc.php'); //Include documentation to document fields if it is available + include($filename); + + $xml = ""; + + //Create a sequence of metadata tags + $xml.='<xs:sequence>'; + + //Skip over version. we dont want to write it out + if (array_key_exists('version',$stackQuestion)) { + unset($stackQuestion['version']); } + + //An assessment item consists of a single question, a number of reponses, and a set of options + foreach($stackQuestion as $arrayKey=>$questionField) //Iterate through sub array of each array object + { + //We dont want to parse metadata, but we do with other fields + if (!empty($questionField['type']) && ($questionField['type']!='meta')) { + + //Other fields are arrays of other structures, such as $stackOptions and $stackQuestionPotResp + if($questionField['type']=='other') + { + //foreach($arrayKey as + } + + //If of any other type except meta and other + else + { + if(!empty($questionField['doc'])) { + print_r($arrayKey); + print_r($questionField['mysql']); + print_r($questionField['doc']); + + $xml.=stack_schema_write_element_document($arrayKey,$questionField['mysql'],$questionField['doc']); + } + + else { + $xml.=stack_schema_write_element($arrayKey,$questionField['mysql']); + } + + } + } + } + + //Terminate a sequence of metadata tags + $xml.='</xs:sequence>'; + + //We must now tag the 'metadata' tag with a version attribute + $xml.= stack_schema_write_attribute('version', true); + + return $xml; + } ?> Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** stackQuestion.php 18 Jul 2005 16:23:13 -0000 1.29 --- stackQuestion.php 22 Jul 2005 12:47:40 -0000 1.30 *************** *** 350,358 **** $stackQuestion['questionExcerciseType']['default']='unspecified'; - //Versioning required to check whether schema is up to date - //Where version number has form M.N where M is major version number - // N is minor version number - $stackQuestion['version']='1.0'; - //////////////////////////////////// // $stackQuestionInst --- 350,353 ---- *************** *** 424,427 **** --- 419,423 ---- // 'Answer test options'; $stackQuestionPotResp['AnsTestOpt']['type']='option'; + // The following fields are indented within 'true' or 'false' branches // 'Mark modifier operation'; $stackQuestionPotResp['RawMarkMod']['type']='option'; |
From: pkiddie <pk...@us...> - 2005-07-19 13:31:42
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5086/scripts Modified Files: stackQuiz.php stackXML.php Log Message: Addition of metadata tags to quizzes, and relevant documentation Index: stackQuiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuiz.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** stackQuiz.php 14 Jul 2005 18:31:23 -0000 1.3 --- stackQuiz.php 19 Jul 2005 13:31:32 -0000 1.4 *************** *** 11,32 **** --- 11,160 ---- * */ + // 'Unique quiz ID - local mySQL value' $stackQuiz['quizid']['descript'] = 'Quiz ID number'; $stackQuiz['quizid']['mysql'] = 'INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY'; + // 'Quiz name' $stackQuiz['quizName']['descript'] = 'Quiz name'; $stackQuiz['quizName']['mysql'] = 'TINYTEXT'; + // 'Quiz description' $stackQuiz['quizDescription']['descript'] = 'Description'; $stackQuiz['quizDescription']['mysql'] = 'TINYTEXT'; + // 'Quiz options' $stackQuiz['quizOptions']['descript'] = 'Quiz options'; $stackQuiz['quizOptions']['mysql'] = 'TEXT'; + // 'Quiz due date' $stackQuiz['quizDueDate']['descript'] = 'Due date'; $stackQuiz['quizDueDate']['mysql'] = 'int(10)'; + // 'Quiz mode' $stackQuiz['quizMode']['descript'] = 'Mode'; $stackQuiz['quizMode']['mysql'] = 'TINYTEXT'; + //<PDK> Quiz Metadata added - database updated + // 'Globally unique quiz ID'; + $stackQuiz['quizGUID']['type']='meta'; + $stackQuiz['quizGUID']['required']='system'; + $stackQuiz['quizGUID']['mysql']='CHAR(22) UNIQUE KEY'; //GUID's are 32byte characters + $stackQuiz['quizGUID']['metatag']='Identifier'; + + // 'Keywords'; + $stackQuiz['quizKeywords']['type']='meta'; + $stackQuiz['quizKeywords']['required']='optional'; + $stackQuiz['quizKeywords']['mysql']='TINYTEXT'; + $stackQuiz['quizKeywords']['metatag']='Keyword'; + + // 'Last edited by'; + $stackQuiz['quizUserLastEdited']['type']='meta'; + $stackQuiz['quizUserLastEdited']['required']='system'; + $stackQuiz['quizUserLastEdited']['mysql']='INT UNSIGNED'; + $stackQuiz['quizUserLastEdited']['metatag']='Creator'; + + // 'Last edited on'; + $stackQuiz['quizDateLastEdited']['type']='meta'; + $stackQuiz['quizDateLastEdited']['required']='system'; + $stackQuiz['quizDateLastEdited']['mysql']='TIMESTAMP'; + $stackQuiz['quizDateLastEdited']['metatag']='Date'; + + //Publisher + $stackQuiz['quizPublisher']['type']='meta'; + $stackQuiz['quizPublisher']['required']='system'; + $stackQuiz['quizPublisher']['mysql']='TINYTEXT'; + $stackQuiz['quizPublisher']['metatag']='Publisher'; + + //Type: Hidden from user + $stackQuiz['type']['type']='meta'; + $stackQuiz['type']['values']=array('quiz','quiz'); //Default to 'type' enumeration in XSD file + $stackQuiz['type']['required']='optional'; + $stackQuiz['type']['mysql']='TINYTEXT'; + $stackQuiz['type']['metatag']='Type'; + + //Format: Hidden from user, selected by script + $stackQuiz['quizFormat']['type']='meta'; + $stackQuiz['quizFormat']['values']=array('application','audio','image', + 'message','model','text','video', + 'multipart'); + $stackQuiz['quizFormat']['required']='optional'; + $stackQuiz['quizFormat']['mysql']='TINYTEXT'; + $stackQuiz['quizFormat']['metatag']='Format'; + + //Language: Defaulted to current system language, but user definable + $stackQuiz['quizLanguage']['type']='meta'; + $stackQuiz['quizLanguage']['values']=array('en','fr','nl','es','unspecified'); + $stackQuiz['quizLanguage']['required']='optional'; + $stackQuiz['quizLanguage']['mysql']='TINYTEXT'; + $stackQuiz['quizLanguage']['metatag']='Language'; + $stackQuiz['quizLanguage']['default']='unspecified'; + + //Rights + $stackQuiz['quizRights']['type']='meta'; + $stackQuiz['quizRights']['required']='optional'; + $stackQuiz['quizRights']['mysql']='TEXT'; + $stackQuiz['quizRights']['metatag']='Rights'; + $stackQuiz['quizRights']['default']='http://www.gnu.org/copyleft/gpl.html'; + + //Learning context: Defaulted to system context, but user definable + $stackQuiz['quizLearningContext']['type']='meta'; + $stackQuiz['quizLearningContext']['values']=array('Primary Education','Secondary Education','Higher Education', + 'University First Cycle','University Second Cycle','University Post Grade', + 'Technical School First Cycle','Technical School Second Cycle','Professional Formation', + 'Continuous Formation','Vocational Training','unspecified'); + $stackQuiz['quizLearningContext']['required']='optional'; + $stackQuiz['quizLearningContext']['mysql']='TINYTEXT'; + $stackQuiz['quizLearningContext']['metatag']='LearningContext'; + $stackQuiz['quizLearningContext']['default']='unspecified'; + + //Difficulty: Default to null - up to user to specify this + $stackQuiz['quizDifficulty']['type']='meta'; + $stackQuiz['quizDifficulty']['values']=array('Very Easy','Easy','Medium', + 'Difficult','Very Difficult','unspecified'); + $stackQuiz['quizDifficulty']['required']='optional'; + $stackQuiz['quizDifficulty']['mysql']='TINYTEXT'; + $stackQuiz['quizDifficulty']['metatag']='Difficulty'; + $stackQuiz['quizDifficulty']['default']='unspecified'; + + //Competency: Default to solve - then up to user + $stackQuiz['quizCompetency']['type']='meta'; + $stackQuiz['quizCompetency']['values']=array('think','argue','solve', + 'represent','language','communicate', + 'tools','unspecified'); + $stackQuiz['quizCompetency']['required']='optional'; + $stackQuiz['quizCompetency']['mysql']='TINYTEXT'; + $stackQuiz['quizCompetency']['metatag']='Competency'; + $stackQuiz['quizCompetency']['default']='unspecified'; + + //CompetencyLevel: Default to null - then up to user + $stackQuiz['quizCompetencyLevel']['type']='meta'; + $stackQuiz['quizCompetencyLevel']['values']=array('elementary','simpleConceptual','multiStep', + 'complex','unspecified'); + $stackQuiz['quizCompetencyLevel']['required']='optional'; + $stackQuiz['quizCompetencyLevel']['mysql']='TINYTEXT'; + $stackQuiz['quizCompetencyLevel']['metatag']='CompetencyLevel'; + $stackQuiz['quizCompetencyLevel']['default']='unspecified'; + + //Time to allocate: Default to null - then up to user + $stackQuiz['quizTimeAllocated']['type']='meta'; + $stackQuiz['quizTimeAllocated']['required']='optional'; + $stackQuiz['quizTimeAllocated']['mysql']='TIME'; + $stackQuiz['quizTimeAllocated']['metatag']='TypicalLearningTime'; + $stackQuiz['quizTimeAllocated']['default']='0'; + + //Type of quiz: Default to algebraicExpression as that is only type of quiz atm, but provides extensibility + $stackQuiz['quizExcerciseType']['type']='meta'; + $stackQuiz['quizExcerciseType']['values']=array('algebraicExpression','mcqSingleAnswer','mcqMultipleAnswer', + 'fillInBlank','unspecified'); + $stackQuiz['quizExcerciseType']['required']='optional'; + $stackQuiz['quizExcerciseType']['mysql']='TINYTEXT'; + $stackQuiz['quizExcerciseType']['metatag']='ExcerciseType'; + $stackQuiz['quizExcerciseType']['default']='unspecified'; + + //Versioning required to check whether schema is up to date + //Where version number has form M.N where M is major version number + // N is minor version number + $stackQuiz['version']='1.0'; + /** * Displays the student quiz selection screen Index: stackXML.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackXML.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** stackXML.php 18 Jul 2005 16:23:13 -0000 1.11 --- stackXML.php 19 Jul 2005 13:31:32 -0000 1.12 *************** *** 234,245 **** //<PDK> /** ! * Writes an XML schema file of the current metadata tags used in STACK * * XML schema used within STACK to validate questions on import/export, and provide a definition of the metadata document * * @param string $directory The directory to store the XSD file (web server must have permissions) ! * @return the XSD filename representing the schema */ ! function stack_schema_write_metadata($directory) { global $stackQuestion; --- 234,245 ---- //<PDK> /** ! * Writes an XML schema file of the current stackQuestion metadata tags * * XML schema used within STACK to validate questions on import/export, and provide a definition of the metadata document * * @param string $directory The directory to store the XSD file (web server must have permissions) ! * @return the XSD filename representing the schema - only returned if xml was able to be written out */ ! function stack_schema_write_question_metadata($directory) { global $stackQuestion; *************** *** 247,255 **** $schema_file_name='stack_question_metadata-'.$stackQuestion['version'].'.xsd'; //File name of schema has version number of stackQuestion clearly identified //create file used for writing ! $xml_file_handle = fopen($directory.$schema_file_name,"w"); if (!$xml_file_handle) { echo "File could not be opened for writing. Please contact the network administrator."; } --- 247,257 ---- $schema_file_name='stack_question_metadata-'.$stackQuestion['version'].'.xsd'; //File name of schema has version number of stackQuestion clearly identified //create file used for writing ! //<TODO: Check if is compatible!!> ! $xml_file_handle = fopen($directory."\\".$schema_file_name,"w"); if (!$xml_file_handle) { echo "File could not be opened for writing. Please contact the network administrator."; + return ''; } *************** *** 263,267 **** //Create root element 'metadata'. stack_schema_create_root("metadata"). ! stack_schema_create_metadata(). stack_schema_escape_root(). stack_schema_create_enum_types(). --- 265,269 ---- //Create root element 'metadata'. stack_schema_create_root("metadata"). ! stack_schema_create_question_metadata(). stack_schema_escape_root(). stack_schema_create_enum_types(). *************** *** 301,304 **** --- 303,430 ---- '</xs:element>'; } + + function stack_schema_write_quiz_metadata() + { + global $stackQuiz; + + $schema_file_name='stack_quiz_metadata-'.$stackQuiz['version'].'.xsd'; //File name of schema has version number of stackQuiz clearly identified + + //<TODO: Check if is compatible!!> + $xml_file_handle = fopen($directory."\\".$schema_file_name,"w"); + + if (!$xml_file_handle) + { + echo "File could not be opened for writing. Please contact the network administrator."; + return ''; + } + + else + { + //Write the XML schema header - same for all XML schemas - with version number. + //XML metadata files which validate against this schema will also have a version number + $xml = '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="'.$stackQuiz['version'].'">'. + "\n". + '<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>'. + //Create root element 'metadata'. + stack_schema_create_root("metadata"). + stack_schema_create_quiz_metadata(). + stack_schema_escape_root(). + stack_schema_create_enum_types(). + //End of schema + '</xs:schema>'; + + //write out xml string + fputs($xml_file_handle,$xml); + //close xml file + fclose($xml_file_handle); + } + } + + function stack_schema_create_quiz_metadata(); + { + global $sqlToSchemaMapping,$stackQuiz; + + include('../../stackstd.php'); + + $options = stack_options_set(array()); + $filename = stack_lang_filename($options,'doc/en_doc.php'); //Include documentation to document fields if it is available + include($filename); + + $xml = ""; + + //Do not export questionID - internal SQL variable + if (array_key_exists('questionID',$stackQuestion)) { + unset($stackQuestion['questionID']); + } + + //Do not export body - internal SQL variable. + if (array_key_exists('questionBody',$stackQuestion)) { + unset($stackQuestion['questionBody']); + } + + //Create a sequence of metadata tags + $xml.='<xs:sequence>'; + + foreach($stackQuestion as $arrayKey=>$questionField) //Iterate through sub array of each array object + { + //First check there is a type associated with that field and that the stackQuestion field is metadata + if (!empty($questionField['type']) && ($questionField['type']=='meta')) { + + //Check that a metadata tag has been supplied and do not write out if tag has not been supplied + if (empty($questionField['metatag'])) + { + echo'No metadata tag for stackQuestion field: '.$arrayKey.'<br> As a consequence it has not been written to the XML metadata schema<br>'; + } + + else + { + //If metadata is not a selection from a list of specified types + if (empty($questionField['values'])) + { + //Create XML schema fragment + //Documentation available for column + if (!empty($questionField['doc'])) { + $xml.=stack_schema_write_element_document($questionField['metatag'],$questionField['mysql'],$questionField['doc']); + + } + + //Documentation not available for column + else { + //echo "Doucmentation not avilable!"; + $xml.=stack_schema_write_element($questionField['metatag'],$questionField['mysql']); + } + } + + //The values field is not empty + else + { + //Create XML schema fragment, and default possible enumeration simpleTypes to be the lower case + //of the current metadata tag + if (!empty($questionField['doc'])) { + $xml.=stack_schema_write_element_document_enum_type($questionField['metatag'],strtolower($questionField['metatag']),$questionField['doc']); + } + + //Documentation not available for column + else { + $xml.=stack_schema_write_element_enum_type($questionField['metatag'],strtolower($questionField['metatag'])); + } + + //Furthermore, need to create + } + + + } + } + } + + //Terminate a sequence of metadata tags + $xml.='</xs:sequence>'; + + //We must now tag the 'metadata' tag with a version attribute + $xml.= stack_schema_write_attribute('version', true); + + return $xml; + } + /** * Writes the current stackQuestion metadata structure to an XML string *************** *** 312,320 **** * @return the XML string representing the entire metadata schema */ ! function stack_schema_create_metadata() { global $sqlToSchemaMapping,$stackQuestion; //use definitive stackQuestion data structure ! include('../stackstd.php'); $options = stack_options_set(array()); --- 438,446 ---- * @return the XML string representing the entire metadata schema */ ! function stack_schema_create_question_metadata() { global $sqlToSchemaMapping,$stackQuestion; //use definitive stackQuestion data structure ! include('../../stackstd.php'); $options = stack_options_set(array()); |
From: pkiddie <pk...@us...> - 2005-07-19 13:31:42
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5086/lang/en Modified Files: stack.php Log Message: Addition of metadata tags to quizzes, and relevant documentation Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/stack.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** stack.php 18 Jul 2005 11:58:21 -0000 1.14 --- stack.php 19 Jul 2005 13:31:32 -0000 1.15 *************** *** 148,151 **** --- 148,152 ---- $string['stackQuestion_questionSol'] = 'Worked solution'; $string['stackQuestion_questionOptions'] = 'Options'; + $string['stackQuestion_questionMetadata'] = 'Metadata'; $string['stackQuestion_questionNote'] = 'Question note'; $string['stackQuestion_questionID'] = 'Unique question ID'; *************** *** 199,202 **** --- 200,219 ---- //////////////////////////////////// + // Quiz + //////////////////////////////////// + // <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'; + + //////////////////////////////////// // Options //////////////////////////////////// |
From: pkiddie <pk...@us...> - 2005-07-19 13:31:41
|
Update of /cvsroot/stack/stack-1-0/lang/en/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5086/lang/en/doc Modified Files: en_doc.php Log Message: Addition of metadata tags to quizzes, and relevant documentation Index: en_doc.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/doc/en_doc.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** en_doc.php 18 Jul 2005 14:32:13 -0000 1.4 --- en_doc.php 19 Jul 2005 13:31:32 -0000 1.5 *************** *** 373,376 **** --- 373,409 ---- $stackAnswerTest['True']['doc']="This is a catch-all AnswerTest which always evaluates to true. This is useful when providing feedback at the end of a list of potential responses."; + //<PDK> + //<PDK> New stackQuestion documentation for extra metadata tags + $stackQuiz['questionPublisher']['doc']="The server URL responsible for making the question available. Internal variable"; + + //Type + $stackQuiz['type']['doc']="Nature of genre of content of resource. Internal variable: most likely text for question"; + + //Format + $stackQuiz['quizFormat']['doc']="Digital manifestation of resource. Internal variable: most likely stackQuestion/(version number)"; + + //Language + $stackQuiz['quizLanguage']['doc']="language of content of resource. User defined, maybe default to users current Windows/Linux language setting"; + + //Rights + $stackQuiz['quizRights']['doc']="Rights management statement for the resource, or reference to a service providing such information"; + + //Learning context + $stackQuiz['quizLearningContext']['doc']="Describes the educational context of the intended target audience of the resource. User defined list type"; + + //Difficulty + $stackQuiz['quizDifficulty']['doc']="How difficult it is to work through the resource for the given target audience. Percieved difficulty, user defined list type"; + + //Competency + $stackQuiz['quizCompetency']['doc']="Mathematical competancies a resource trains. User defined, list type"; + + //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: pkiddie <pk...@us...> - 2005-07-19 13:31:40
|
Update of /cvsroot/stack/stack-1-0/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5086/html Modified Files: help_popup.php Log Message: Addition of metadata tags to quizzes, and relevant documentation Index: help_popup.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/help_popup.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** help_popup.php 14 Jul 2005 18:19:57 -0000 1.2 --- help_popup.php 19 Jul 2005 13:31:32 -0000 1.3 *************** *** 90,95 **** else if ('stackQuestionPotResp' == $variable) { $q_field = $stackQuestionPotResp[$field]; ! $fn = 'stackQuestion_PR_'.$field; ! } $fd = get_string($fn,'stack',''); --- 90,98 ---- else if ('stackQuestionPotResp' == $variable) { $q_field = $stackQuestionPotResp[$field]; ! $fn = 'stackQuestion_PR_'.$field; } ! else if ('stackQuiz' == $variable) { ! $q_field = $stackQuiz[$field]; ! $fn = 'stackQuiz_'.$field; ! } $fd = get_string($fn,'stack',''); |
From: pkiddie <pk...@us...> - 2005-07-18 16:23:35
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6294/scripts Modified Files: stackQuestion.php stackXML.php Log Message: Tweaks to stackXML Index: stackXML.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackXML.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** stackXML.php 18 Jul 2005 14:32:14 -0000 1.10 --- stackXML.php 18 Jul 2005 16:23:13 -0000 1.11 *************** *** 243,249 **** function stack_schema_write_metadata($directory) { ! //takethe stackQuestion and extract all the current metadata tags, putting them into a schema ! //file extension .xsd represents schema ! $schema_file_name='stack_metadata.xsd'; //create file used for writing $xml_file_handle = fopen($directory.$schema_file_name,"w"); --- 243,249 ---- function stack_schema_write_metadata($directory) { ! global $stackQuestion; ! ! $schema_file_name='stack_question_metadata-'.$stackQuestion['version'].'.xsd'; //File name of schema has version number of stackQuestion clearly identified //create file used for writing $xml_file_handle = fopen($directory.$schema_file_name,"w"); *************** *** 256,261 **** else { ! //Write the XML schema header - same for all XML schemas ! $xml = '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">'. "\n". '<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>'. --- 256,262 ---- else { ! //Write the XML schema header - same for all XML schemas - with version number. ! //XML metadata files which validate against this schema will also have a version number ! $xml = '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="'.$stackQuestion['version'].'">'. "\n". '<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>'. *************** *** 287,292 **** { return "<xs:element name=".'"'.$rootElement.'">'. ! '<xs:complexType>'. ! '<xs:sequence>'; } --- 288,292 ---- { return "<xs:element name=".'"'.$rootElement.'">'. ! '<xs:complexType>'; } *************** *** 298,306 **** function stack_schema_escape_root() { ! return '</xs:sequence>'. ! '</xs:complexType>'. ! "</xs:element>"; } - /** * Writes the current stackQuestion metadata structure to an XML string --- 298,304 ---- function stack_schema_escape_root() { ! return '</xs:complexType>'. ! '</xs:element>'; } /** * Writes the current stackQuestion metadata structure to an XML string *************** *** 316,326 **** function stack_schema_create_metadata() { ! global $sqlToSchemaMapping,$stackQuestion; //use definitive stackQuestion data structure ! include('../stackstd.php'); ! // HACK for now. $options = stack_options_set(array()); ! $filename = stack_lang_filename($options,'doc/en_doc.php'); //Include documentation to document the tags if it is available include($filename); --- 314,323 ---- function stack_schema_create_metadata() { ! global $sqlToSchemaMapping,$stackQuestion; //use definitive stackQuestion data structure ! include('../stackstd.php'); $options = stack_options_set(array()); ! $filename = stack_lang_filename($options,'doc/en_doc.php'); //Include documentation to document fields if it is available include($filename); *************** *** 337,340 **** --- 334,340 ---- } + //Create a sequence of metadata tags + $xml.='<xs:sequence>'; + foreach($stackQuestion as $arrayKey=>$questionField) //Iterate through sub array of each array object { *************** *** 374,378 **** if (!empty($questionField['doc'])) { $xml.=stack_schema_write_element_document_enum_type($questionField['metatag'],strtolower($questionField['metatag']),$questionField['doc']); - } --- 374,377 ---- *************** *** 389,392 **** --- 388,397 ---- } } + + //Terminate a sequence of metadata tags + $xml.='</xs:sequence>'; + + //We must now tag the 'metadata' tag with a version attribute + $xml.= stack_schema_write_attribute('version', true); return $xml; *************** *** 394,397 **** --- 399,458 ---- /** + * Constructs an XML schema attribute + * Example: <xs:attribute name="version" use="required"> + * <xs:simpleType> + * <xs:restriction base="xs:string"> + * <xs:pattern value="[1-9]+[0-9]*\.[0-9]+" /> + * </xs:restriction> + * </xs:simpleType> + * </xs:attribute> + * + * + * @param string $attribName The name of the attribute to be written to XML schema + * @param bool $isRequired Flag indicating whether attribute is mandatory + * @return string XML string representing schema attribute + */ + function stack_schema_write_attribute($attribName, $isRequired) + { + $xml=""; + + if ($isRequired) + { + $xml='<xs:attribute name = "'.$attribName.'" use = "required">'. + stack_schema_write_version_simpletype(). + '</xs:attribute>'; + + } + + else + { + $xml='<xs:attribute name = "'.$attribName.'" use = "optional">'. + stack_schema_write_version_simpletype(). + '</xs:attribute>'; + } + + return $xml; + } + + /** + * Writes a 'version' XML string based on a schema attribute + * + * @return string a simpleType encapsulating version convention: M.N, where M is major version, N is minor + */ + function stack_schema_write_version_simpletype() + { + $xml=""; + $versionFilter="[1-9]+[0-9]*\.[0-9]+"; + + $xml = '<xs:simpleType> + <xs:restriction base = "xs:string"> + <xs:pattern value = "'.$versionFilter.'"/> + </xs:restriction> + </xs:simpleType>'; + + return $xml; + } + + /** * Writes a given field within stackQuestion as a schema element, with a representative XML schema datatype * *************** *** 598,602 **** else { ! $xml.=stack_schema_create_simpletype($questionField['metatag'],$questionField['values']); } } --- 659,663 ---- else { ! $xml.=stack_schema_create_simpletype(strtolower($questionField['metatag']),$questionField['values']); } } Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** stackQuestion.php 18 Jul 2005 14:32:13 -0000 1.28 --- stackQuestion.php 18 Jul 2005 16:23:13 -0000 1.29 *************** *** 351,355 **** //Versioning required to check whether schema is up to date ! $stackQuestion['version']=1; //////////////////////////////////// --- 351,357 ---- //Versioning required to check whether schema is up to date ! //Where version number has form M.N where M is major version number ! // N is minor version number ! $stackQuestion['version']='1.0'; //////////////////////////////////// |
From: pkiddie <pk...@us...> - 2005-07-18 14:32:22
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14455/scripts Modified Files: stackQuestion.php stackXML.php Log Message: Versioning tag to stackQuestion, and hooking up stackXML to documentation Index: stackXML.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackXML.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** stackXML.php 18 Jul 2005 10:53:37 -0000 1.9 --- stackXML.php 18 Jul 2005 14:32:14 -0000 1.10 *************** *** 7,10 **** --- 7,11 ---- * @subpackage Stack */ + //require_once('stackstd.php'); //<PDK> sqlToSchemaMapping array maps basic SQL data types used in STAKCK to their respective XML schema data types *************** *** 242,246 **** function stack_schema_write_metadata($directory) { ! //take the stackQuestion and extract all the current metadata tags, putting them into a schema //file extension .xsd represents schema $schema_file_name='stack_metadata.xsd'; --- 243,247 ---- function stack_schema_write_metadata($directory) { ! //takethe stackQuestion and extract all the current metadata tags, putting them into a schema //file extension .xsd represents schema $schema_file_name='stack_metadata.xsd'; *************** *** 314,326 **** */ function stack_schema_create_metadata() ! { ! global $sqlToSchemaMapping,$stackQuestion; //use definitive stackQuestion data structure ! $xml = ""; ! //print_r($sqlToSchemaMapping); - //print_r($stackQuestion); - //Do not export questionID - internal SQL variable if (array_key_exists('questionID',$stackQuestion)) { --- 315,330 ---- */ function stack_schema_create_metadata() ! { ! global $sqlToSchemaMapping,$stackQuestion; //use definitive stackQuestion data structure ! include('../stackstd.php'); ! // HACK for now. ! $options = stack_options_set(array()); ! $filename = stack_lang_filename($options,'doc/en_doc.php'); //Include documentation to document the tags if it is available ! include($filename); ! ! $xml = ""; //Do not export questionID - internal SQL variable if (array_key_exists('questionID',$stackQuestion)) { *************** *** 335,345 **** foreach($stackQuestion as $arrayKey=>$questionField) //Iterate through sub array of each array object { ! //Array item is metadata ! if ($questionField['type']=='meta') { //Check that a metadata tag has been supplied and do not write out if tag has not been supplied if (empty($questionField['metatag'])) { ! echo'No metadata tag for stackQuestion field: '.$arrayKey.'.<br> As a consequence it has not been written to the XML metadata schema'; } --- 339,349 ---- foreach($stackQuestion as $arrayKey=>$questionField) //Iterate through sub array of each array object { ! //First check there is a type associated with that field and that the stackQuestion field is metadata ! if (!empty($questionField['type']) && ($questionField['type']=='meta')) { //Check that a metadata tag has been supplied and do not write out if tag has not been supplied if (empty($questionField['metatag'])) { ! echo'No metadata tag for stackQuestion field: '.$arrayKey.'<br> As a consequence it has not been written to the XML metadata schema<br>'; } *************** *** 581,585 **** { //Array item is metadata ! if ($questionField['type']=='meta') { //check to see whether an enum type of values needs to be written out --- 585,589 ---- { //Array item is metadata ! if (!empty($questionField['type']) && $questionField['type']=='meta') { //check to see whether an enum type of values needs to be written out Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** stackQuestion.php 18 Jul 2005 10:53:37 -0000 1.27 --- stackQuestion.php 18 Jul 2005 14:32:13 -0000 1.28 *************** *** 257,261 **** $stackQuestion['questionDateLastEdited']['metatag']='Date'; ! //Tags to be added to SQL server //Publisher $stackQuestion['questionPublisher']['type']='meta'; --- 257,261 ---- $stackQuestion['questionDateLastEdited']['metatag']='Date'; ! //<PDK> Metadata added - database updated //Publisher $stackQuestion['questionPublisher']['type']='meta'; *************** *** 350,353 **** --- 350,355 ---- $stackQuestion['questionExcerciseType']['default']='unspecified'; + //Versioning required to check whether schema is up to date + $stackQuestion['version']=1; //////////////////////////////////// |
From: pkiddie <pk...@us...> - 2005-07-18 14:32:22
|
Update of /cvsroot/stack/stack-1-0/lang/en/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14455/lang/en/doc Modified Files: en_doc.php Log Message: Versioning tag to stackQuestion, and hooking up stackXML to documentation Index: en_doc.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/doc/en_doc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** en_doc.php 18 Jul 2005 10:07:17 -0000 1.3 --- en_doc.php 18 Jul 2005 14:32:13 -0000 1.4 *************** *** 107,111 **** //Type ! $stackQuestion['questionType']['doc']="Nature of genre of content of resource. Internal variable: most likely text for question"; //Format --- 107,111 ---- //Type ! $stackQuestion['type']['doc']="Nature of genre of content of resource. Internal variable: most likely text for question"; //Format |
From: Chris S. <san...@us...> - 2005-07-18 12:09:21
|
Update of /cvsroot/stack/stack-1-0/scripts/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16983/scripts/install Modified Files: stackUpdateDatabase.php Log Message: Index: stackUpdateDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/install/stackUpdateDatabase.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** stackUpdateDatabase.php 18 Jul 2005 10:53:37 -0000 1.2 --- stackUpdateDatabase.php 18 Jul 2005 12:09:12 -0000 1.3 *************** *** 11,15 **** */ $addQuestionColumnQuery = ' ! ALTER TABLE stackquestion ADD COLUMN questionPublisher tinytext NULL, ADD COLUMN type tinytext NULL, --- 11,15 ---- */ $addQuestionColumnQuery = ' ! ALTER TABLE stackQuestion ADD COLUMN questionPublisher tinytext NULL, ADD COLUMN type tinytext NULL, *************** *** 27,31 **** $addQuizColumnQuery = ' ! ALTER TABLE stackquiz ADD COLUMN quizGUID varchar(22) NULL, ADD COLUMN quizKeywords tinytext NULL, --- 27,31 ---- $addQuizColumnQuery = ' ! ALTER TABLE stackQuiz ADD COLUMN quizGUID varchar(22) NULL, ADD COLUMN quizKeywords tinytext NULL, |
From: Chris S. <san...@us...> - 2005-07-18 12:09:20
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16983/scripts Modified Files: stackDatabase.php Log Message: Index: stackDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackDatabase.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** stackDatabase.php 18 Jul 2005 10:53:37 -0000 1.32 --- stackDatabase.php 18 Jul 2005 12:09:12 -0000 1.33 *************** *** 1655,1659 **** $result = mysql_query($query); ! if(0 == $result) { include('install/stackUpdateDatabase.php'); --- 1655,1659 ---- $result = mysql_query($query); ! if(0 == $result) { include('install/stackUpdateDatabase.php'); |
From: Chris S. <san...@us...> - 2005-07-18 11:58:59
|
Update of /cvsroot/stack/stack-1-0/lang/en/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15020/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.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** author_testsuite.php 14 Jul 2005 17:46:58 -0000 1.4 --- author_testsuite.php 18 Jul 2005 11:58:09 -0000 1.5 *************** *** 1,4 **** <?php - <?php /** * --- 1,3 ---- *************** *** 21,26 **** */ - - ?> require_once($stack_root.'/scripts/stackAuthor.php'); --- 20,23 ---- *************** *** 149,152 **** --- 146,157 ---- //$testsuite[] = stack_testsuite_construct('FacForm','(x-1)*(x+(1+sqrt(3)*%i)/2)*(x+(1-sqrt(3)*%i)/2)','x^3-1',1,'x',''); + $testsuite[] = stack_testsuite_construct('PartFrac','1/m','1/n',0,'n','Basic tests'); + $testsuite[] = stack_testsuite_construct('PartFrac','1/n','1/n',0,'n',''); + $testsuite[] = stack_testsuite_construct('PartFrac','1/(n+1)-1/n','1/(n+1)-1/n',1,'n','A simple correct answer'); + $testsuite[] = stack_testsuite_construct('PartFrac','1/(n*(n-1))','1/(n*(n-1))',0,'n','Simple mistakes'); + $testsuite[] = stack_testsuite_construct('PartFrac','1/(n-1)-1/n^2','1/((n+1)*n)',0,'n',''); + $testsuite[] = stack_testsuite_construct('PartFrac','1/(n-1)-1/n','1/(n-1)+1/n',0,'n',''); + $testsuite[] = stack_testsuite_construct('PartFrac','1/(x+1)-1/x','1/(x-1)+1/x',0,'x',''); + $testsuite[] = stack_testsuite_construct('SA_factored','1/0','0',0,'x',''); |
From: Chris S. <san...@us...> - 2005-07-18 11:58:33
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15020/scripts Modified Files: stackWin.php Log Message: Index: stackWin.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackWin.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** stackWin.php 18 Jul 2005 10:07:18 -0000 1.6 --- stackWin.php 18 Jul 2005 11:58:22 -0000 1.7 *************** *** 130,136 **** } ! //This is useful for debuggin. Removing the comments below will echo ! //exactly the CAS session ! echo "<pre>".$ret."</pre>"; $ret = trim($ret); --- 130,135 ---- } ! //This is useful for debugging. Removing the comments below will echo exactly the CAS session. ! //echo "<pre>".$ret."</pre>"; $ret = trim($ret); |
From: Chris S. <san...@us...> - 2005-07-18 11:58:31
|
Update of /cvsroot/stack/stack-1-0/scripts/maxima In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15020/scripts/maxima Modified Files: stackmaxima.mac Log Message: Index: stackmaxima.mac =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/maxima/stackmaxima.mac,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** stackmaxima.mac 14 Jul 2005 16:18:19 -0000 1.20 --- stackmaxima.mac 18 Jul 2005 11:58:22 -0000 1.21 *************** *** 1,669 **** ! /* ********************************** */ ! /* Set options */ ! /* ********************************** */ ! ! /* save("initial-world.lisp",all); */ ! /* KILL(ALL); */ ! /* load("initial-world.lisp"); */ ! ! SIMPSUM:TRUE; ! DISPLAY2D:FALSE; [...1629 lines suppressed...] ! ) ! else if (isDenomSame(s1,t1) = false and isDenomSame(s1,t2) = false and isDenomSame(s1, t3) = false) ! OR (isDenomSame(s2,t1) = false and isDenomSame(s2,t2) = false and isDenomSame(s2, t3) = false) ! OR (isDenomSame(s3,t1) = false and isDenomSame(s3,t2) = false and isDenomSame(s3, t3) = false) then ! BLOCK( ! val: "true", ! rawmk: String(0), ! ansnote: "ATPartFrac_denom_ret", ! fb: Sconcat("AtPartFrac_denom_ret ", denom(factor(sExpr)), " " , denom(factor(tExpr))) ! ) ! else ! BLOCK( ! val: "true", ! rawmk: String(0), ! ansnote: "ATPartFrac_ret_expression", ! fb: Sconcat("AtPartFrac_ret_expression ", factor(sExpr)) ! ), ! ret: StackReturnOb(val, rawmk, ansnote, fb), ! RETURN(ret) ! ); |
From: Chris S. <san...@us...> - 2005-07-18 11:58:31
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15020/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.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** stack.php 18 Jul 2005 10:07:18 -0000 1.13 --- stack.php 18 Jul 2005 11:58:21 -0000 1.14 *************** *** 159,173 **** // <PDK> $stackQuestion metadata added ! $string['stackQuestion_questionPublisher'] = 'Server published'; ! $string['stackQuestion_questionType'] = 'Nature of content'; ! $string['stackQuestion_questionFormat'] = 'Digital manifestation'; ! $string['stackQuestion_questionLanguage'] = 'Language of content'; $string['stackQuestion_questionLearningContext']= 'Targetted to'; ! $string['stackQuestion_questionDifficulty'] = 'Difficulty'; ! $string['stackQuestion_questionCompetency'] = 'Competencies trained'; $string['stackQuestion_questionCompetencyLevel']= 'Skills required'; ! $string['stackQuestion_questionTimeAllocated'] = 'Recommended time to take'; ! $string['stackQuestion_questionExcerciseType'] = 'Type of question'; ! $string['stackQuestion_questionRights'] = 'Rights statement'; // Used in the question bank order select form to indicate no selection. --- 159,173 ---- // <PDK> $stackQuestion metadata added ! $string['stackQuestion_questionPublisher'] = 'Server published'; ! $string['stackQuestion_questionType'] = 'Nature of content'; ! $string['stackQuestion_questionFormat'] = 'Digital manifestation'; ! $string['stackQuestion_questionLanguage'] = 'Language of content'; $string['stackQuestion_questionLearningContext']= 'Targetted to'; ! $string['stackQuestion_questionDifficulty'] = 'Difficulty'; ! $string['stackQuestion_questionCompetency'] = 'Competencies trained'; $string['stackQuestion_questionCompetencyLevel']= 'Skills required'; ! $string['stackQuestion_questionTimeAllocated'] = 'Recommended time to take'; ! $string['stackQuestion_questionExcerciseType'] = 'Type of question'; ! $string['stackQuestion_questionRights'] = 'Rights statement'; // Used in the question bank order select form to indicate no selection. *************** *** 330,334 **** $string['ATFacForm_notalgequiv'] = 'Note that your answer is not algebarically equivalent to the correct answer. You must have done something wrong. '; // needs a space at the end. ! $string['ATPartFrac_error_list'] = $string['ATFacForm_error_list']; $string['ATInt_error_list'] = $string['ATFacForm_error_list']; --- 330,339 ---- $string['ATFacForm_notalgequiv'] = 'Note that your answer is not algebarically equivalent to the correct answer. You must have done something wrong. '; // needs a space at the end. ! $string['ATPartFrac_error_list'] = $string['ATFacForm_error_list']; ! $string['ATPartFrac_true'] = ''; ! $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]}. '; $string['ATInt_error_list'] = $string['ATFacForm_error_list']; *************** *** 341,345 **** $string['ATDiff_int'] = 'It looks like you have integrated instead!'; ! $string[''] = ''; $string[''] = ''; $string[''] = ''; --- 346,350 ---- $string['ATDiff_int'] = 'It looks like you have integrated instead!'; ! $string[''] = ''; $string[''] = ''; |
From: Chris S. <san...@us...> - 2005-07-18 10:53:45
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2466/scripts Modified Files: stackDatabase.php stackQuestion.php stackUtility.php stackXML.php Log Message: Index: stackDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackDatabase.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** stackDatabase.php 14 Jul 2005 07:27:03 -0000 1.31 --- stackDatabase.php 18 Jul 2005 10:53:37 -0000 1.32 *************** *** 1629,1632 **** --- 1629,1669 ---- } + /** + * Run the database update script if needed. + * + */ + function stack_db_database_update() + { + global $stack_mysql; + extract($stack_mysql); + + // If the options exists we are in business. + $query = 'SELECT options FROM stackUser'; + + if (!$connection=mysql_connect($host,$user,$pswd)) { + $msg = mysql_error(); + echo "<b>Could not connet to MYSQL on host '$host', as user '$user'. The attempt to connect generated the MYSQL Error ".mysql_errno().": ".mysql_error()."</b>"; + die(); + } + + $db = mysql_select_db($stackdb,$connection); + + 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: stackXML.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackXML.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** stackXML.php 18 Jul 2005 10:44:18 -0000 1.8 --- stackXML.php 18 Jul 2005 10:53:37 -0000 1.9 *************** *** 315,319 **** function stack_schema_create_metadata() { ! global $stackQuestion, $sqlToSchemaMapping; //use definitive stackQuestion data structure $xml = ""; --- 315,319 ---- function stack_schema_create_metadata() { ! global $sqlToSchemaMapping,$stackQuestion; //use definitive stackQuestion data structure $xml = ""; Index: stackUtility.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackUtility.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** stackUtility.php 14 Jul 2005 18:31:23 -0000 1.28 --- stackUtility.php 18 Jul 2005 10:53:37 -0000 1.29 *************** *** 23,28 **** require_once("{$stack_root}/frontend_general/frontend_util.php"); - - /** * Displays the contents of an array for HTML display. --- 23,26 ---- Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** stackQuestion.php 18 Jul 2005 10:44:18 -0000 1.26 --- stackQuestion.php 18 Jul 2005 10:53:37 -0000 1.27 *************** *** 274,279 **** $stackQuestion['questionFormat']['type']='meta'; $stackQuestion['questionFormat']['values']=array('application','audio','image', ! 'message','model','text','video', ! 'multipart'); $stackQuestion['questionFormat']['required']='optional'; $stackQuestion['questionFormat']['mysql']='TINYTEXT'; --- 274,279 ---- $stackQuestion['questionFormat']['type']='meta'; $stackQuestion['questionFormat']['values']=array('application','audio','image', ! 'message','model','text','video', ! 'multipart'); $stackQuestion['questionFormat']['required']='optional'; $stackQuestion['questionFormat']['mysql']='TINYTEXT'; *************** *** 298,304 **** $stackQuestion['questionLearningContext']['type']='meta'; $stackQuestion['questionLearningContext']['values']=array('Primary Education','Secondary Education','Higher Education', ! 'University First Cycle','University Second Cycle','University Post Grade', ! 'Technical School First Cycle','Technical School Second Cycle','Professional Formation', ! 'Continuous Formation','Vocational Training','unspecified'); $stackQuestion['questionLearningContext']['required']='optional'; $stackQuestion['questionLearningContext']['mysql']='TINYTEXT'; --- 298,304 ---- $stackQuestion['questionLearningContext']['type']='meta'; $stackQuestion['questionLearningContext']['values']=array('Primary Education','Secondary Education','Higher Education', ! 'University First Cycle','University Second Cycle','University Post Grade', ! 'Technical School First Cycle','Technical School Second Cycle','Professional Formation', ! 'Continuous Formation','Vocational Training','unspecified'); $stackQuestion['questionLearningContext']['required']='optional'; $stackQuestion['questionLearningContext']['mysql']='TINYTEXT'; *************** *** 309,313 **** $stackQuestion['questionDifficulty']['type']='meta'; $stackQuestion['questionDifficulty']['values']=array('Very Easy','Easy','Medium', ! 'Difficult','Very Difficult','unspecified'); $stackQuestion['questionDifficulty']['required']='optional'; $stackQuestion['questionDifficulty']['mysql']='TINYTEXT'; --- 309,313 ---- $stackQuestion['questionDifficulty']['type']='meta'; $stackQuestion['questionDifficulty']['values']=array('Very Easy','Easy','Medium', ! 'Difficult','Very Difficult','unspecified'); $stackQuestion['questionDifficulty']['required']='optional'; $stackQuestion['questionDifficulty']['mysql']='TINYTEXT'; *************** *** 318,323 **** $stackQuestion['questionCompetency']['type']='meta'; $stackQuestion['questionCompetency']['values']=array('think','argue','solve', ! 'represent','language','communicate', ! 'tools','unspecified'); $stackQuestion['questionCompetency']['required']='optional'; $stackQuestion['questionCompetency']['mysql']='TINYTEXT'; --- 318,323 ---- $stackQuestion['questionCompetency']['type']='meta'; $stackQuestion['questionCompetency']['values']=array('think','argue','solve', ! 'represent','language','communicate', ! 'tools','unspecified'); $stackQuestion['questionCompetency']['required']='optional'; $stackQuestion['questionCompetency']['mysql']='TINYTEXT'; *************** *** 328,332 **** $stackQuestion['questionCompetencyLevel']['type']='meta'; $stackQuestion['questionCompetencyLevel']['values']=array('elementary','simpleConceptual','multiStep', ! 'complex','unspecified'); $stackQuestion['questionCompetencyLevel']['required']='optional'; $stackQuestion['questionCompetencyLevel']['mysql']='TINYTEXT'; --- 328,332 ---- $stackQuestion['questionCompetencyLevel']['type']='meta'; $stackQuestion['questionCompetencyLevel']['values']=array('elementary','simpleConceptual','multiStep', ! 'complex','unspecified'); $stackQuestion['questionCompetencyLevel']['required']='optional'; $stackQuestion['questionCompetencyLevel']['mysql']='TINYTEXT'; *************** *** 344,348 **** $stackQuestion['questionExcerciseType']['type']='meta'; $stackQuestion['questionExcerciseType']['values']=array('algebraicExpression','mcqSingleAnswer','mcqMultipleAnswer', ! 'fillInBlank','unspecified'); $stackQuestion['questionExcerciseType']['required']='optional'; $stackQuestion['questionExcerciseType']['mysql']='TINYTEXT'; --- 344,348 ---- $stackQuestion['questionExcerciseType']['type']='meta'; $stackQuestion['questionExcerciseType']['values']=array('algebraicExpression','mcqSingleAnswer','mcqMultipleAnswer', ! 'fillInBlank','unspecified'); $stackQuestion['questionExcerciseType']['required']='optional'; $stackQuestion['questionExcerciseType']['mysql']='TINYTEXT'; |
From: Chris S. <san...@us...> - 2005-07-18 10:53:45
|
Update of /cvsroot/stack/stack-1-0/scripts/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2466/scripts/install Modified Files: stackInstall.php stackUpdateDatabase.php Log Message: Index: stackUpdateDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/install/stackUpdateDatabase.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** stackUpdateDatabase.php 18 Jul 2005 10:11:12 -0000 1.1 --- stackUpdateDatabase.php 18 Jul 2005 10:53:37 -0000 1.2 *************** *** 2,79 **** <head><title>Update STACK Database utility</title><head> <body> ! <p><b>This script updates the STACK database with new metadata fields. Please enter your mySQL username and password in the following boxes</b></p> ! <form action="stackUpdateDatabase.php" method="POST"> ! <p>mySQL Username:</p> ! <input type="text" name="userName"> ! <p>mySQL Password:</p> ! <input type="password" name="password"> ! <br><br> ! <input type="submit" value="Update STACK database" name="submit"> ! </form> ! <body><html> <?php /** This PHP script simply adds new fields to mySQL for metadata. This affects both questions and quizzes */ $addQuestionColumnQuery = ' ALTER TABLE stackquestion ! ADD COLUMN questionPublisher tinytext NULL, ! ADD COLUMN type tinytext NULL, ! ADD COLUMN questionFormat tinytext NULL, ! ADD COLUMN questionLanguage tinytext NULL, ! ADD COLUMN questionRights text NULL, ! ADD COLUMN questionLearningContext tinytext NULL, ! ADD COLUMN questionDifficulty tinytext NULL, ! ADD COLUMN questionCompetency tinytext NULL, ! ADD COLUMN questionCompetencyLevel tinytext NULL, ! ADD COLUMN questionTimeAllocated time NULL, ! ADD COLUMN questionExcerciseType tinytext NULL, ! ADD COLUMN questionDateLastEdited datetime NULL, ! DROP COLUMN questionDateLastEdited;'; ! $addQuizColumnQuery = ' ALTER TABLE stackquiz ! 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, ! ADD COLUMN quizFormat tinytext NULL, ! ADD COLUMN quizLanguage tinytext NULL, ! ADD COLUMN quizRights text NULL, ! ADD COLUMN quizLearningContext tinytext NULL, ! ADD COLUMN quizDifficulty tinytext NULL, ! ADD COLUMN quizCompetency text NULL, ! ADD COLUMN quizCompetencyLevel text NULL, ! ADD COLUMN quizTimeAllocated time NULL, ! ADD COLUMN quizExcerciseType text NULL;'; ! ! //Global mysql connection settings ! $stack_mysql['host'] = 'localhost'; ! $stack_mysql['user'] = ''; ! $stack_mysql['pswd'] = ''; ! $stack_mysql['stackdb'] = 'stack'; ! ! //Catch a postback event ! if (isset($_POST["submit"])) ! { ! if (!empty($_POST["userName"]) && !empty($_POST["password"])) ! { ! $stack_mysql['user'] = $_POST["userName"]; ! $stack_mysql['pswd'] = $_POST["password"]; ! ! stack_mysqlcmd($addQuestionColumnQuery,$stack_mysql['user'],$error); ! stack_mysqlcmd($addQuizColumnQuery,$stack_mysql['user'],$error); ! ! echo($error); ! ! } ! ! else ! { ! echo("Please ensure you have entered your mySQL username and password!"); ! } ! } /** --- 2,56 ---- <head><title>Update STACK Database utility</title><head> <body> ! <H1>Update STACK Database utility</H1> ! <p><b>This script updates the STACK database with new fields in various tables. </p> <?php + require_once('stackstd.php'); + /** This PHP script simply adds new fields to mySQL for metadata. This affects both questions and quizzes */ $addQuestionColumnQuery = ' ALTER TABLE stackquestion ! ADD COLUMN questionPublisher tinytext NULL, ! ADD COLUMN type tinytext NULL, ! ADD COLUMN questionFormat tinytext NULL, ! ADD COLUMN questionLanguage tinytext NULL, ! ADD COLUMN questionRights text NULL, ! ADD COLUMN questionLearningContext tinytext NULL, ! ADD COLUMN questionDifficulty tinytext NULL, ! ADD COLUMN questionCompetency tinytext NULL, ! ADD COLUMN questionCompetencyLevel tinytext NULL, ! ADD COLUMN questionTimeAllocated time NULL, ! ADD COLUMN questionExcerciseType tinytext NULL, ! ADD COLUMN questionDateLastEdited datetime NULL, ! DROP COLUMN questionDateLastEdited;'; ! $addQuizColumnQuery = ' ALTER TABLE stackquiz ! 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, ! ADD COLUMN quizFormat tinytext NULL, ! ADD COLUMN quizLanguage tinytext NULL, ! ADD COLUMN quizRights text NULL, ! ADD COLUMN quizLearningContext tinytext NULL, ! ADD COLUMN quizDifficulty tinytext NULL, ! ADD COLUMN quizCompetency text NULL, ! ADD COLUMN quizCompetencyLevel text NULL, ! ADD COLUMN quizTimeAllocated time NULL, ! ADD COLUMN quizExcerciseType text NULL;'; ! ! $addUserColumnQuery = ' ! ALTER TABLE stackUser ! ADD COLUMN options text NULL;'; ! ! ! stack_mysqlcmd($addQuestionColumnQuery,$stack_mysql['user'],$error); ! stack_mysqlcmd($addQuizColumnQuery,$stack_mysql['user'],$error); ! stack_mysqlcmd($addUserColumnQuery,$stack_mysql['user'],$error); ! /** *************** *** 136,137 **** --- 113,116 ---- } ?> + + </body></html> Index: stackInstall.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/install/stackInstall.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** stackInstall.php 14 Jul 2005 18:44:55 -0000 1.12 --- stackInstall.php 18 Jul 2005 10:53:37 -0000 1.13 *************** *** 194,197 **** --- 194,198 ---- `department` varchar(30) default NULL, `address` varchar(70) default NULL, + `options` text default NULL, `firstaccess` int(10) unsigned NOT NULL default '0', `lastaccess` int(10) unsigned NOT NULL default '0', |
From: pkiddie <pk...@us...> - 2005-07-18 10:44:48
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv656/scripts Modified Files: stackAuthor.php stackQuestion.php stackXML.php Log Message: Addition of XML metadata to questions, and prelim authoring fields Index: stackAuthor.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackAuthor.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** stackAuthor.php 18 Jul 2005 10:07:18 -0000 1.27 --- stackAuthor.php 18 Jul 2005 10:44:17 -0000 1.28 *************** *** 371,398 **** } ! //<PDK> Insert user definable metadata here ! /* echo "\n<hr />\n ! <table cellboarder='0' cellpadding='2'> ! <tr> <td>".get_string('stackQuestion_questionLanguage','stack','').":</td> ! <td><input type='input' name='questionLanguage' value='".sf($question,'questionLanguage')."' size='10' /></tr> ! <tr> <td>".get_string('stackQuestion_questionLearningContext','stack','').":</td> ! <td><input type='input' name='questionLearningContext' value='".sf($question,'questionLearningContext')."' size='20' /></tr> ! <tr> <td>".get_string('stackQuestion_questionDifficulty','stack','').":</td> ! <td><input type='input' name='questionDifficulty' value='".sf($question,'questionDifficulty')."' size='20' /></tr> ! <tr> <td>".get_string('stackQuestion_questionCompetency','stack','').":</td> ! <td><input type='input' name='questionCompetency' value='".sf($question,'questionCompetency')."' size='20' /></tr> ! <tr> <td>".get_string('stackQuestion_questionCompetencyLevel','stack','').":</td> ! <td><input type='input' name='questionCompetencyLevel' value='".sf($question,'questionCompetency')."' size='20' /></tr> ! <tr> <td>".get_string('stackQuestion_questionTimeAllocated','stack','').":</td> ! <td><input type='input' name='questionTimeAllocated' value='".sf($question,'questionTimeAllocated')."' size='20' /></tr> ! <tr> <td>".get_string('stackQuestion_questionExcerciseType','stack','').":</td> ! <td><input type='input' name='questionExcerciseType' value='".sf($question,'questionExcerciseType')."' size='20' /></tr> ! </table> "; */ ! ! include('stackXML.php'); ! stack_schema_write_metadata(""); ! ! echo "\n<hr />\n"; $qfield='questionLanguage'; $qfield_name = "question[{$qfield}]"; --- 371,382 ---- } ! $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'); ! ! echo "\n<hr />\n"; + //<PDK> Insert user definable metadata here $qfield='questionLanguage'; $qfield_name = "question[{$qfield}]"; *************** *** 456,463 **** echo "\n<hr />\n"; - $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'); --- 440,443 ---- Index: stackXML.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackXML.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** stackXML.php 18 Jul 2005 10:16:57 -0000 1.7 --- stackXML.php 18 Jul 2005 10:44:18 -0000 1.8 *************** *** 9,13 **** //<PDK> sqlToSchemaMapping array maps basic SQL data types used in STAKCK to their respective XML schema data types ! $sqlToSchemaMapping['CHAR']='string'; $sqlToSchemaMapping['VARCHAR']='string'; $sqlToSchemaMapping['TEXT']='string'; --- 9,13 ---- //<PDK> sqlToSchemaMapping array maps basic SQL data types used in STAKCK to their respective XML schema data types ! /*$sqlToSchemaMapping['CHAR']='string'; $sqlToSchemaMapping['VARCHAR']='string'; $sqlToSchemaMapping['TEXT']='string'; *************** *** 19,23 **** $sqlToSchemaMapping['TIME']='time'; $sqlToSchemaMapping['DATETIME']='dateTime'; ! $sqlToSchemaMapping['TIMESTAMP']='time'; /** --- 19,23 ---- $sqlToSchemaMapping['TIME']='time'; $sqlToSchemaMapping['DATETIME']='dateTime'; ! $sqlToSchemaMapping['TIMESTAMP']='time';*/ /** *************** *** 315,322 **** function stack_schema_create_metadata() { ! global $stackQuestion; //use definitive stackQuestion data structure ! global $sqlToSchemaMapping; $xml = ""; //Do not export questionID - internal SQL variable --- 315,325 ---- function stack_schema_create_metadata() { ! global $stackQuestion, $sqlToSchemaMapping; //use definitive stackQuestion data structure $xml = ""; + + //print_r($sqlToSchemaMapping); + + //print_r($stackQuestion); //Do not export questionID - internal SQL variable *************** *** 427,431 **** $elementDataType = explode("(", $elementDataType[0]); ! echo $sqlToSchemaMapping[$elementDataType[0]]; return "<xs:element name=".'"'.$elementName.'"'.' type="xs:'.$sqlToSchemaMapping[$elementDataType[0]].'"/>'; --- 430,434 ---- $elementDataType = explode("(", $elementDataType[0]); ! //echo $sqlToSchemaMapping[$elementDataType[0]]; return "<xs:element name=".'"'.$elementName.'"'.' type="xs:'.$sqlToSchemaMapping[$elementDataType[0]].'"/>'; Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** stackQuestion.php 18 Jul 2005 10:07:18 -0000 1.25 --- stackQuestion.php 18 Jul 2005 10:44:18 -0000 1.26 *************** *** 118,122 **** $stackOptions['ShowSol']['default']='On request'; ! //////////////////////////////////////////////////////////////////////// --- 118,134 ---- $stackOptions['ShowSol']['default']='On request'; ! //<PDK> sqlToSchemaMapping array maps basic SQL data types used in STAKCK to their respective XML schema data types ! //Only place temporarily here pending a resolution! ! $sqlToSchemaMapping['CHAR']='string'; ! $sqlToSchemaMapping['VARCHAR']='string'; ! $sqlToSchemaMapping['TEXT']='string'; ! $sqlToSchemaMapping['TINYTEXT']='string'; ! $sqlToSchemaMapping['INT']='int'; ! $sqlToSchemaMapping['INT UNSIGNED']='int'; ! $sqlToSchemaMapping['DECIMAL']='decimal'; ! $sqlToSchemaMapping['DATE']='date'; ! $sqlToSchemaMapping['TIME']='time'; ! $sqlToSchemaMapping['DATETIME']='dateTime'; ! $sqlToSchemaMapping['TIMESTAMP']='time'; //////////////////////////////////////////////////////////////////////// |