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: Ben H. <bdv...@us...> - 2010-12-08 16:53:29
|
Update of /cvsroot/stack/stack-dev/lib/database In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv31054/lib/database Modified Files: StackDBReporting.php Log Message: Some improvements. Getting errors with unserialising a question item. Index: StackDBReporting.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/StackDBReporting.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** StackDBReporting.php 1 Dec 2010 12:09:57 -0000 1.32 --- StackDBReporting.php 8 Dec 2010 16:53:21 -0000 1.33 *************** *** 47,59 **** * @return array the questions produced */ ! public function questionList($ids = null) { $sql = 'SELECT questionID, questionName, questionDescription ! FROM stackquestion, question_lines ! WHERE questionID = latestVersion'; ! ! if (isset($ids)) $sql .= " AND questionID IN ($ids)"; ! //$sql .= ' GROUP BY line'; $this->connect(); --- 47,56 ---- * @return array the questions produced */ ! public function questionList($onlyLatest = True) { $sql = 'SELECT questionID, questionName, questionDescription ! FROM stackquestion, question_lines'; ! if ($onlyLatest) $sql .= " WHERE questionID = latestVersion"; $this->connect(); *************** *** 109,113 **** $sql = "SELECT AttemptID, qID, UserID, question_attempts.TimeStamp, RawAns, Status, ModMark, currentTotalMark, totalPossibleMarks ! FROM display_cache, display_cache_sequence, attempt_meta_answer, question_attempts, attempt_meta_PRT WHERE display_cache_sequence.nextNode = display_cache.id AND display_cache_sequence.id = question_attempts.TransitionID --- 106,110 ---- $sql = "SELECT AttemptID, qID, UserID, question_attempts.TimeStamp, RawAns, Status, ModMark, currentTotalMark, totalPossibleMarks ! FROM display_cache, display_cache_sequence, attempt_meta_answer, question_attempts, attempt_meta_PRT, question_lines WHERE display_cache_sequence.nextNode = display_cache.id AND display_cache_sequence.id = question_attempts.TransitionID *************** *** 115,119 **** AND attempt_meta_PRT.CacheID = display_cache.id \n"; ! if (isset($question)) $sql .= "AND display_cache.qID = $question \n"; if (isset($student)) $sql .= "AND question_attempts.UserID = $student \n"; --- 112,118 ---- AND attempt_meta_PRT.CacheID = display_cache.id \n"; ! if (isset($question)) $sql .= "AND display_cache.qID = $question \n"; ! else $sql .= "AND display_cache.qID = latestVersion \n"; ! if (isset($student)) $sql .= "AND question_attempts.UserID = $student \n"; *************** *** 327,337 **** $sql = "SELECT dc1.qID, dc1.currentTotalMark, ( SELECT COUNT(qID) ! FROM question_attempts, display_cache dc2, display_cache_sequence WHERE question_attempts.UserID = $studentID AND question_attempts.TransitionID = display_cache_sequence.id AND nextNode = dc2.id AND dc2.qID = dc1.qID ) as attempts ! FROM question_attempts, display_cache_sequence, display_cache dc1 WHERE question_attempts.TimeStamp = ( SELECT MAX(question_attempts.TimeStamp) --- 326,337 ---- $sql = "SELECT dc1.qID, dc1.currentTotalMark, ( SELECT COUNT(qID) ! FROM question_attempts, display_cache dc2, display_cache_sequence, question_lines WHERE question_attempts.UserID = $studentID + AND qID = latestVersion AND question_attempts.TransitionID = display_cache_sequence.id AND nextNode = dc2.id AND dc2.qID = dc1.qID ) as attempts ! FROM question_attempts, display_cache_sequence, display_cache dc1, question_lines WHERE question_attempts.TimeStamp = ( SELECT MAX(question_attempts.TimeStamp) *************** *** 339,342 **** --- 339,343 ---- WHERE question_attempts.UserID = $studentID AND TransitionID = display_cache_sequence.id + AND dc1.qID = latestVersion AND nextNode = dc2.id AND dc2.qID = dc1.qID |
From: Chris S. <san...@us...> - 2010-12-06 19:19:04
|
Update of /cvsroot/stack/stack-dev/lib/ui In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv5225 Modified Files: OptionsEdit.php questionTest.php Log Message: Index: questionTest.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/ui/questionTest.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** questionTest.php 2 Dec 2010 19:25:54 -0000 1.27 --- questionTest.php 6 Dec 2010 19:18:56 -0000 1.28 *************** *** 85,88 **** --- 85,90 ---- // We now have a $question with which to work. + //echo "<pre>";print_r($question);echo"</pre>"; + // now process the question $id=$question->getQuestionId(); *************** *** 132,134 **** ?> </body> ! </html> \ No newline at end of file --- 134,136 ---- ?> </body> ! </html> \ No newline at end of file Index: OptionsEdit.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/ui/OptionsEdit.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OptionsEdit.php 30 Sep 2010 16:56:15 -0000 1.6 --- OptionsEdit.php 6 Dec 2010 19:18:56 -0000 1.7 *************** *** 16,19 **** --- 16,21 ---- * @package stackAdminUI */ + session_start(); + require_once('../../config.php'); $config = new stackConfig(); |
From: Chris S. <san...@us...> - 2010-12-06 19:18:34
|
Update of /cvsroot/stack/stack-dev/maxima In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv5140/maxima Modified Files: assessment.mac rtest_assessment_simpboth.mac Removed Files: noun_arith.mac unittests.mac Log Message: --- noun_arith.mac DELETED --- Index: assessment.mac =================================================================== RCS file: /cvsroot/stack/stack-dev/maxima/assessment.mac,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** assessment.mac 6 Dec 2010 16:03:38 -0000 1.2 --- assessment.mac 6 Dec 2010 19:18:25 -0000 1.3 *************** *** 24,34 **** /* ********************************** */ - /* Load assessment files */ - /* ********************************** */ - - load("noun_arith.mac")$ - - - /* ********************************** */ /* General list and utility functions */ /* ********************************** */ --- 24,27 ---- *************** *** 312,315 **** --- 305,432 ---- )$ + /* ********************************** */ + /* Noun arithmatic */ + /* ********************************** */ + + /* ** Noun forms of the arithmatic functions ** */ + + /* These function define arithmetic functions which do + not perform their actual mathematical functions. That is to say + noun forms of the standard arithmetic functions. This is to + give much finer control over the simplification of very elementary + expressions. + + Chris Sangwin 21 Oct 2005. + Chris Sangwin 7 Nov 2009, with help from JHD. + */ + + /* Create noun forms of the functions of +, -, *, / and ^ + as follows. + + noun+ + - noun- + * noun* + / noun/ + ^ noun^ + */ + + /* For each of these we do the following. + (1) They are defined as infix and nary operators in Maxima + with the binding precedences of their namesakes. + (2) The tex() function is modified to display them exactly as + their namesakes. This should work with a *mix* of noun and + active operators + (3) verb_arith(expr) which will replace noun versions with their + active counterparts. + (4) noun_arith(expr) which will replace arithmetic operators with their + noun counterparts. + */ + + /* (1) */ + nary("noun+",100); + prefix("noun-",100); + nary("noun*",120); + infix("noun/",122,123); + infix("noun^",140,139); + prefix("UNARY_RECIP",100); + + /* (2) */ + load("noun_arith.lisp"); + + /* (3) */ + + declare("noun+",commutative); + declare("noun+",lassociative); + declare("noun+",rassociative); + + declare("noun*",commutative); + declare("noun*",lassociative); + declare("noun*",rassociative); + + /* (4) */ + verb_arith(ex) := block( + ex:subst("+","noun+",ex), + ex:subst("*","noun*",ex), + ex:subst("-","noun-",ex), + ex:subst(DIV_OP,"noun/",ex), + ex:subst("^","noun^",ex), + define(UNARY_RECIP a, a^(-1)), + ex:ev(ex,UNARY_MINUS=-1), + remfunction("noun+","noun*","noun/","noun^","noun-"),ex)$ + + /* (5) */ + noun_arith(ex) := block( + ex:subst("noun+","+",ex), + ex:subst("noun*","*",ex), + ex:subst(lambda([ex],UNARY_MINUS noun* ex),"-",ex), /* Unary minus really communtes with multipication*/ + ex:subst(lambda([ex1,ex2], ex1 noun* (UNARY_RECIP ex2)),DIV_OP,ex), /* Turn 1/x into x^(-1), in a special form */ + ex:subst("noun^","^",ex), + ev(ex))$ + + /* (6) */ + gather_reduce(ex) := block( + ex:subst("+","noun+",ex), + ex:subst("*","noun*",ex), + ex:subst("-","noun-",ex), + ex:ev(ex,simp), + ex:subst("noun+","+",ex), + ex:subst("noun*","*",ex), + ex:subst("noun-","-",ex), + ex)$ + + /* (7) */ + /* Returns true iff ex1 and ex2 are equal up to commutativity and associativity */ + equals_commute_associate(ex1,ex2) := block([oldsimp,ex1n,ex2n,ret], + oldsimp:simp, + simp:false, + ex1n:noun_arith(ex1), + ex2n:noun_arith(ex2), + simp:true, + if ex1n=ex2n then ret:true else ret:false, + simp:oldsimp, + ret)$ + + /* An answer test in the context of commutative+associative addition and multiplication.*/ + ATEqual_com_ass(sa,sb) := + block([RawMark,FeedBack,AnswerNote,ret,SAA,SBB], + RawMark:0, FeedBack:"", AnswerNote:"", + SAA:errcatch(ev(sa,simp,fullratsimp,nouns)), + if (is(SAA=[STACKERROR]) or is(SAA=[])) then return(StackReturnOb("0","ATEqual_com_ass_STACKERROR_SAns","")), + SBB:errcatch(ev(sb,simp,fullratsimp,nouns)), + if (is(SBB=[STACKERROR]) or is(SBB=[])) then return(StackReturnOb("0","ATEqual_com_ass_STACKERROR_TAns","")), + /* We need to check things are of the same type */ + ret:ATSameTypefun(sa,sb), + if ret[2]=0 then + (ret[3]:concat("ATEqual_com_ass:",ret[3]), return(StackReturnOb(string(ret[2]),ret[3],ret[4])) ), + ret:block([simp:true,ret],ATAlgEquivfun(sa,sb)), + if ret[2]=0 then + (ret[3]:concat("ATEqual_com_ass: (not AlgEquiv) ",ret[3]), return(StackReturnOb(string(ret[2]),ret[3],"")) ), + /* Now actually apply this test */ + if equals_commute_associate(sa,sb) then + (RawMark:1, AnswerNote:"") + else + (RawMark:0, AnswerNote:"AlgEquiv, but not equal"), + return(StackReturnOb(string(RawMark),AnswerNote,FeedBack)) + )$ + /* ********************************** */ Index: rtest_assessment_simpboth.mac =================================================================== RCS file: /cvsroot/stack/stack-dev/maxima/rtest_assessment_simpboth.mac,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rtest_assessment_simpboth.mac 1 Dec 2010 18:32:25 -0000 1.2 --- rtest_assessment_simpboth.mac 6 Dec 2010 19:18:25 -0000 1.3 *************** *** 208,238 **** false$ ! stack_op(1); ""$ ! stack_op(x); ""$ ! stack_op(%pi); ""$ ! stack_op(z+3); "+"$ ! stack_op(3*z); "*"$ ! stack_op(3^z); "^"$ ! stack_op(3/z); "/"$ ! stack_op(sin(3*z)); "sin"$ ! stack_op((-1)/(1+x^2)); "/"$ ! stack_op(1-x); "+"$ ! stack_op(x-1); "+"$ ! stack_op(-(x-1)); "+"$ ! stack_op(-1/(1+x^2)); "/"$ ! stack_op(-2*x); "*"$ --- 208,238 ---- false$ ! safe_op(1); ""$ ! safe_op(x); ""$ ! safe_op(%pi); ""$ ! safe_op(z+3); "+"$ ! safe_op(3*z); "*"$ ! safe_op(3^z); "^"$ ! safe_op(3/z); "/"$ ! safe_op(sin(3*z)); "sin"$ ! safe_op((-1)/(1+x^2)); "/"$ ! safe_op(1-x); "+"$ ! safe_op(x-1); "+"$ ! safe_op(-(x-1)); "+"$ ! safe_op(-1/(1+x^2)); "/"$ ! safe_op(-2*x); "*"$ --- unittests.mac DELETED --- |
From: Chris S. <san...@us...> - 2010-12-06 19:18:33
|
Update of /cvsroot/stack/stack-dev/install In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv5140/install Modified Files: answer_test_testsuite.php Log Message: Index: answer_test_testsuite.php =================================================================== RCS file: /cvsroot/stack/stack-dev/install/answer_test_testsuite.php,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** answer_test_testsuite.php 8 Nov 2010 14:26:44 -0000 1.59 --- answer_test_testsuite.php 6 Dec 2010 19:18:25 -0000 1.60 *************** *** 711,716 **** - <pre> - <?php if(function_exists('memory_get_peak_usage')) --- 711,714 ---- |
From: Simon H. <sim...@us...> - 2010-12-06 16:37:21
|
Update of /cvsroot/stack/stack-dev/lib/database In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv1381/lib/database Modified Files: StackDBCache.php Log Message: Just a small whitespace tidy. Index: StackDBCache.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/StackDBCache.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** StackDBCache.php 17 Nov 2010 11:28:31 -0000 1.24 --- StackDBCache.php 6 Dec 2010 16:37:13 -0000 1.25 *************** *** 139,147 **** if($this->noRows()<=0) return NULL; ! else { ! $this->logger->finest("new state id = ".$this->result(0, 'id')); ! $this->logger->finest("latest mark is $currentTotalMark"); ! return $this->result(0, 'id'); ! } } --- 139,147 ---- if($this->noRows()<=0) return NULL; ! else { ! $this->logger->finest("new state id = ".$this->result(0, 'id')); ! $this->logger->finest("latest mark is $currentTotalMark"); ! return $this->result(0, 'id'); ! } } *************** *** 150,154 **** // get connection to cache $db = new StackDBCache(); ! $db->connect(); $newStates = array(); --- 150,154 ---- // get connection to cache $db = new StackDBCache(); ! $db->connect(); $newStates = array(); *************** *** 168,172 **** // create a cache state $xhtml = $instance->processQuestion(NULL, true, false); ! $sql = "INSERT INTO display_cache(qID, state, xhtml, questionNote, currentTotalMark, totalPossibleMarks, expired, lastActive) VALUES ($qID," . "'STATE GOES HERE'".//$this->dbSafeString($this->base64_serialize($instance)) . later... ", ".$db->dbSafeString(StackDBCache::hackSlashes($xhtml)).", ".$db->dbSafeString(StackDBCache::hackSlashes($instance->getQuestionNote())). --- 168,172 ---- // create a cache state $xhtml = $instance->processQuestion(NULL, true, false); ! $sql = "INSERT INTO display_cache(qID, state, xhtml, questionNote, currentTotalMark, totalPossibleMarks, expired, lastActive) VALUES ($qID," . "'STATE GOES HERE'".//$this->dbSafeString($this->base64_serialize($instance)) . later... ", ".$db->dbSafeString(StackDBCache::hackSlashes($xhtml)).", ".$db->dbSafeString(StackDBCache::hackSlashes($instance->getQuestionNote())). *************** *** 197,202 **** $db->query($sql); } ! $db->disconnect(); ! return $newStates; } --- 197,202 ---- $db->query($sql); } ! $db->disconnect(); ! return $newStates; } *************** *** 223,227 **** if($this->noRows()<=0) return NULL; ! else return $this->result(0, 'id'); } --- 223,227 ---- if($this->noRows()<=0) return NULL; ! else return $this->result(0, 'id'); } |
From: Chris S. <san...@us...> - 2010-12-06 16:03:47
|
Update of /cvsroot/stack/stack-dev/maxima In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv26851/maxima Modified Files: stackmaxima.mac assessment.mac unittests_load.mac noun_arith.mac rtest_assessment_simpfalse.mac Added Files: .cvsignore Log Message: --- NEW FILE: .cvsignore --- stackmaxima_loc.bat *.ERR Index: stackmaxima.mac =================================================================== RCS file: /cvsroot/stack/stack-dev/maxima/stackmaxima.mac,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** stackmaxima.mac 1 Dec 2010 18:32:25 -0000 1.87 --- stackmaxima.mac 6 Dec 2010 16:03:38 -0000 1.88 *************** *** 38,43 **** OPT_OUTPUT:"LaTeX", /* */ ! STACK_DIV_OP:"//", ! if MAXIMA_VERSION_NUM>=15.0 then STACK_DIV_OP:"/", true --- 38,43 ---- OPT_OUTPUT:"LaTeX", /* */ ! DIV_OP:"//", ! if MAXIMA_VERSION_NUM>=15.0 then DIV_OP:"/", true *************** *** 54,57 **** --- 54,60 ---- alias(simplify,fullratsimp); /* Allows simplify to be something */ + alias(Stack_Test,algebraic_equivalence); /*Legacy: 6/12/10 */ + + infix("=>"); "=>"(a,b):=a>=b; *************** *** 444,486 **** /* ********************************** */ - /* expandp(p) is true if p equals its expanded form */ - expandp(p):= block([simp:true], if p=expand(p) then true else false)$ - - /* factorp(p) is true if p equals its factored form */ - factorp(p) := block([a], - if ev(p=factor(p),simp) then return(true), - if atom(p) then return(false), - /* Note, in Maxima factor((1-x)) = -(x-1), so we need to fix this, for learning and teaching! */ - if ev(-1*factor(p) = expand(-1*p),simp) then return(true), - if op(p)="^" and atom(part(p,1)) then return(true), - if op(p)="^" and factorp(part(p,1)) then return(true), - if op(p)="*" then return(all_listp(factorp,args(p))), - return(false) )$ - - - /* A general all purpose function on **expressions**. - Takes two objects and returns true if they are equal, and false otherwise - This is a "bash as hard as possible" function - */ - Stack_Test(SA,SB) := - block([keepfloat,trigexpand,logexpand,ex,vi], - trigexpand:true, /* see pg 80 */ - logexpand:super, - keepfloat:true, /* see pg 23 */ - ex:errcatch(ev(fullratsimp(SA-SB),simp)), - if ex=[] then return(false), - ex:ex[1], - if floatnump(ex) then return(false), - ex:num(ex), /* after a fullratsimp, we have a ratio. We should only need to consider the top */ - ex:trigsimp(ex), - /* ex:trigreduce(ex), CJS, removed 21/1/2010. This was breaking ATSingleFrac! Don't know why. */ - if fullratsimp(ex)=0 then return(true), - ex:radcan(ex), - ex:factcomb(ex), - if fullratsimp(ex)=0 then return(true), - for vi:1 while ex#sqrtdenest(ex) do ex:sqrtdenest(ex), - if fullratsimp(ex)=0 then return(true) else return(false) - )$ - /* A general, all purpose answer test based maximum simplifiaction. --- 447,450 ---- *************** *** 560,566 **** return([false,0,"ATAlgEquiv_SA_not_expression",StackAddFeedback("","ATAlgEquiv_SA_not_expression")]), /* Otherwise we have two expressions*/ ! if Stack_Test(SA,SB) then RawMark:1 ! else if Stack_Test(exdowncase(SA),exdowncase(SB)) then AnswerNote:"ATAlgEquiv WrongCase ", ret:[true,RawMark,AnswerNote,FeedBack], --- 524,530 ---- return([false,0,"ATAlgEquiv_SA_not_expression",StackAddFeedback("","ATAlgEquiv_SA_not_expression")]), /* Otherwise we have two expressions*/ ! if algebraic_equivalence(SA,SB) then RawMark:1 ! else if algebraic_equivalence(exdowncase(SA),exdowncase(SB)) then AnswerNote:"ATAlgEquiv WrongCase ", ret:[true,RawMark,AnswerNote,FeedBack], *************** *** 674,682 **** SA1:ev(part(SA,1),simp), SB1:ev(part(SB,1),simp), ! sameex:Stack_Test(SA1,SB1), if (op(SA)=op(SB) and sameex) then RawMark:1, if op(SA)=">" and op(SB)=">=" then (AnswerNote:"ATInequality_strict",FeedBack:StackAddFeedback("","ATInequality_strict")), if op(SA)=">=" and op(SB)=">" then (AnswerNote:"ATInequality_nonstrict",FeedBack:StackAddFeedback("","ATInequality_nonstrict")), ! if Stack_Test(-1*SA1,SB1) then (AnswerNote:concat(AnswerNote," ATInequality_backwards"),FeedBack:StackAddFeedback(FeedBack,"ATInequality_backwards")), return([true,RawMark,AnswerNote,FeedBack]) )$ --- 638,646 ---- SA1:ev(part(SA,1),simp), SB1:ev(part(SB,1),simp), ! sameex:algebraic_equivalence(SA1,SB1), if (op(SA)=op(SB) and sameex) then RawMark:1, if op(SA)=">" and op(SB)=">=" then (AnswerNote:"ATInequality_strict",FeedBack:StackAddFeedback("","ATInequality_strict")), if op(SA)=">=" and op(SB)=">" then (AnswerNote:"ATInequality_nonstrict",FeedBack:StackAddFeedback("","ATInequality_nonstrict")), ! if algebraic_equivalence(-1*SA1,SB1) then (AnswerNote:concat(AnswerNote," ATInequality_backwards"),FeedBack:StackAddFeedback(FeedBack,"ATInequality_backwards")), return([true,RawMark,AnswerNote,FeedBack]) )$ *************** *** 798,840 **** - /* This function takes two expressions. - It establishes if there exists a substitution of the variables of ex2 into ex1 which renders - ex1 algebraically equivalent to ex2. - If such a substitution exists the function returns it in a form so that - - ex2 = ev(ex1, subst_equiv(ex1,ex2)) - - If no such permutation exists it returns the empty list []. - If it could not establish this, because there are too many combinations to reasonably consider, - then the function returns false. - */ - subst_equiv(ex1,ex2):=block([lv1,lv2,lvi,lvp,lvs,lve,il,perm_size,simp], - simp:true, - perm_size:4, /* This algorithm is order factorial(perm_size) and so this needs to be small. */ - lv1:listofvars(ex1), - lv2:listofvars(ex2), - if length(lv1)#length(lv2) then return([]), - /* If the lists are too long, try a weaker condition */ - /* We assume the variables which occur in both are correctly assigned. */ - /* Can we find a permutation of those left in each? */ - if length(lv1)>perm_size then ( - lv1:setify(lv1), - lv2:setify(lv2), - lvi:intersection(lv1,lv2), - lv1:listify(setdifference(lv1,lvi)), - lv2:listify(setdifference(lv2,lvi)) - ), - if length(lv1)>perm_size then return(false), - /* */ - lvp:listify(permutations(lv2)), - /* Create a list of subsitutions */ - lvs:map(lambda([ex],zip_with("=",lv1,ex)),lvp), - /* Create list of expressions with which to compare ex1 */ - lve:map(lambda([ex],ev(ex1,ex)),lvs), - lve:map(lambda([ex],ATAlgEquivfun(ex,ex2)),lve), - lve:map(second,lve), - lve:map(lambda([ex],equal(ex,1)),lve), - if apply("or",lve) then (il:sublist_indices(lve,identity),lvs[il[1]]) else [] - )$ ATSubstEquiv(SA,SB) :=block([simp:true,ret], --- 762,765 ---- *************** *** 857,870 **** - /* This function makes a substitution of all variables for their lower case equivalents. - Useful when wanting to do a specific case sensitivity - check, e.g. that X^2=1 is x^2=1, without using subst_equiv. - - Note that exdowncase(X-x)=0, of course! - */ - exdowncase(ex):=block([lv], - lv:listofvars(ex), - lv:map(lambda([v],v=parse_string(sdowncase(string(v)))),lv), - return(subst(lv,ex)))$ /**********************************************/ --- 782,785 ---- *************** *** 1192,1196 **** fb: StackAddFeedback("","ATFacForm_error_degreeSA") ), ! aequiv:Stack_Test(SA,SB), /* An integer answer is always correct. */ if (integerp(SA)) then --- 1107,1111 ---- fb: StackAddFeedback("","ATFacForm_error_degreeSA") ), ! aequiv:algebraic_equivalence(SA,SB), /* An integer answer is always correct. */ if (integerp(SA)) then *************** *** 1299,1307 **** val:true, rawmk:1, fb: "", ansnote: "", ret:[val,rawmk,ansnote,fb], ! if Stack_Test(sExpr,tExpr) then block([topOp, list], topOp: op( sExpr ), list: args( sExpr ), ! if topOp = STACK_DIV_OP then block( val: true, /* Whether a single fraction is an invalid answer is really a matter of taste! */ rawmk :0, --- 1214,1222 ---- val:true, rawmk:1, fb: "", ansnote: "", ret:[val,rawmk,ansnote,fb], ! if algebraic_equivalence(sExpr,tExpr) then block([topOp, list], topOp: op( sExpr ), list: args( sExpr ), ! if topOp = DIV_OP then block( val: true, /* Whether a single fraction is an invalid answer is really a matter of taste! */ rawmk :0, *************** *** 1399,1403 **** if atom(SA) then ! if Stack_Test(SA,SB) then return(StackReturnOb("1","","")) else --- 1314,1318 ---- if atom(SA) then ! if algebraic_equivalence(SA,SB) then return(StackReturnOb("1","","")) else *************** *** 1406,1411 **** /* Check for single fraction */ fbn:"", ! if op(SA) = STACK_DIV_OP then block( ! if (freeof(STACK_DIV_OP,num(SA)) and freeof(STACK_DIV_OP,denom(SA))) then block( rawmk:"1", ansnote: "ATSingleFrac_true") --- 1321,1326 ---- /* Check for single fraction */ fbn:"", ! if op(SA) = DIV_OP then block( ! if (freeof(DIV_OP,num(SA)) and freeof(DIV_OP,denom(SA))) then block( rawmk:"1", ansnote: "ATSingleFrac_true") *************** *** 1419,1423 **** fb: StackAddFeedback(fb,ansnote), /* Check for algebraic equivalence */ ! if not(Stack_Test(SA,SB)) then block( rawmk:"0", fbn:"ATSingleFrac_ret_exp", --- 1334,1338 ---- fb: StackAddFeedback(fb,ansnote), /* Check for algebraic equivalence */ ! if not(algebraic_equivalence(SA,SB)) then block( rawmk:"0", fbn:"ATSingleFrac_ret_exp", *************** *** 1434,1438 **** divthru(q):= ! if (not atom(q) and part(q,0)=STACK_DIV_OP) then block([num,den,div,quo,rem], --- 1349,1353 ---- divthru(q):= ! if (not atom(q) and part(q,0)=DIV_OP) then block([num,den,div,quo,rem], *************** *** 1564,1568 **** /* case: (x-1)^2/k */ ! if opa=STACK_DIV_OP and elementp(wrt,setify(listofvars(denom(SA))))#true and atom(num(SA))#true and op(num(SA))="^" and part(num(SA),2)=2 then cform:true, /* The sum of somthing */ --- 1479,1483 ---- /* case: (x-1)^2/k */ ! if opa=DIV_OP and elementp(wrt,setify(listofvars(denom(SA))))#true and atom(num(SA))#true and op(num(SA))="^" and part(num(SA),2)=2 then cform:true, /* The sum of somthing */ *************** *** 1588,1592 **** /* Check for algebraic equivalence */ ! if cform and Stack_Test(SA,SB) then return(StackReturnOb("1","ATCompSquare_true","")), --- 1503,1507 ---- /* Check for algebraic equivalence */ ! if cform and algebraic_equivalence(SA,SB) then return(StackReturnOb("1","ATCompSquare_true","")), *************** *** 1599,1640 **** - /* ********************************** */ - /* Analysis tests */ - /* ********************************** */ - - /* This determines if an expression is continuous - ex the expression, - v the variable, - xp the point at which to evaluate. */ - continuousp(ex,v,xp) := block([lp,lm], - lp: ev(limit(ex,v,xp,minus),simp), - lm: ev(limit(ex,v,xp,plus),simp), - /* print(lp), print(lm), */ - if lp # und - and lm # und - and lp # ind - and lm # ind - and lp # inf - and lm # inf - and lp # minf - and lm # minf - and lp = lm - then true else false - )$ - - - /* This determines if an expression is differentiable - ex the expression, - v the variable, - xp the point at which to evaluate, - n the number of times it is differentiated (optional). - */ - diffp(ex,[args]) := block([v,xp,n], - v:args[1], - xp:args[2], - n:1, - if length(args)=3 then n:args[3], - return(continuousp(diff(ex,v,n),v,xp)) - )$ /*********************/ --- 1514,1517 ---- *************** *** 1709,1713 **** /* This strips off any trailing constant of integration from the student's answer */ SAa:strip_int_const(ev(SA,logexpand:super),v), ! /* Check for constant of integration - code copied from Stack_Test */ ex:errcatch(ev(fullratsimp(SA-SB),simp,trigexpand:true,logexpand:super,keepfloat:true)), if ex=[] then return(false), --- 1586,1590 ---- /* This strips off any trailing constant of integration from the student's answer */ SAa:strip_int_const(ev(SA,logexpand:super),v), ! /* Check for constant of integration - code copied from algebraic_equivalence */ ex:errcatch(ev(fullratsimp(SA-SB),simp,trigexpand:true,logexpand:super,keepfloat:true)), if ex=[] then return(false), *************** *** 1720,1732 **** SAd:diff(SA,v), SBd:diff(SB,v), ! if Stack_Test(SAd,SBd) then if dc then (rawmk:0, fb:StackAddFeedback("","ATInt_const_int"), ansnote:"ATInt_const_int") else if freeof(log,SA) and not(atom(ex)) and not(atom(-ex)) then (rawmk:0, fb:StackAddFeedback("","ATInt_wierdconst"), ansnote:"ATInt_wierdconst") ! else if Stack_Test(SA,SB) then (rawmk:0, fb:StackAddFeedback("","ATInt_const"), ansnote:"ATInt_const") else /* Check the student's answer has the correct form */ ! ( if Stack_Test(SAa,SB) then (rawmk:1, ansnote:"ATInt_true") else --- 1597,1609 ---- SAd:diff(SA,v), SBd:diff(SB,v), ! if algebraic_equivalence(SAd,SBd) then if dc then (rawmk:0, fb:StackAddFeedback("","ATInt_const_int"), ansnote:"ATInt_const_int") else if freeof(log,SA) and not(atom(ex)) and not(atom(-ex)) then (rawmk:0, fb:StackAddFeedback("","ATInt_wierdconst"), ansnote:"ATInt_wierdconst") ! else if algebraic_equivalence(SA,SB) then (rawmk:0, fb:StackAddFeedback("","ATInt_const"), ansnote:"ATInt_const") else /* Check the student's answer has the correct form */ ! ( if algebraic_equivalence(SAa,SB) then (rawmk:1, ansnote:"ATInt_true") else *************** *** 1734,1738 **** ) else /* Check for the special cases where the buggy rule is true */ ! if Stack_Test(SAa,diff(SBd,v)) and Stack_Test(exp(x),SBd)#true then (rawmk:0, fb:StackAddFeedback("","ATInt_diff"), ansnote:"ATInt_diff") else ( --- 1611,1615 ---- ) else /* Check for the special cases where the buggy rule is true */ ! if algebraic_equivalence(SAa,diff(SBd,v)) and algebraic_equivalence(exp(x),SBd)#true then (rawmk:0, fb:StackAddFeedback("","ATInt_diff"), ansnote:"ATInt_diff") else ( *************** *** 1790,1797 **** val:true, rawmk:0, fb:"", ansnote:"", ret:[val,rawmk,ansnote,fb], ! if Stack_Test(SA,SB) then (rawmk:1, ansnote:"ATDiff_true") else ! if Stack_Test(diff(SA,v),int(SB,v)) then (rawmk:0, ansnote:"ATDiff_int ", fb:StackAddFeedback("","ATDiff_int")) else ( --- 1667,1674 ---- val:true, rawmk:0, fb:"", ansnote:"", ret:[val,rawmk,ansnote,fb], ! if algebraic_equivalence(SA,SB) then (rawmk:1, ansnote:"ATDiff_true") else ! if algebraic_equivalence(diff(SA,v),int(SB,v)) then (rawmk:0, ansnote:"ATDiff_int ", fb:StackAddFeedback("","ATDiff_int")) else ( Index: assessment.mac =================================================================== RCS file: /cvsroot/stack/stack-dev/maxima/assessment.mac,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** assessment.mac 1 Dec 2010 18:32:25 -0000 1.1 --- assessment.mac 6 Dec 2010 16:03:38 -0000 1.2 *************** *** 7,10 **** --- 7,16 ---- /****************************************************************/ + MAXIMA_VERSION:map(parse_string, tokens(?\*autoconf\-version\*, 'digitcharp))$ + MAXIMA_VERSION_NUM:float(MAXIMA_VERSION[2]+MAXIMA_VERSION[3]/10)$ + + /* Note how Maxima has changes this.... */ + DIV_OP:"//"$ + if MAXIMA_VERSION_NUM>=15.0 then DIV_OP:"/"$ /* ********************************** */ *************** *** 52,55 **** --- 58,72 ---- )$ + /* This function makes a substitution of all variables for their lower case equivalents. + Useful when wanting to do a specific case sensitivity + check, e.g. that X^2=1 is x^2=1, without using subst_equiv. + + Note that exdowncase(X-x)=0, of course! + */ + exdowncase(ex):=block([lv], + lv:listofvars(ex), + lv:map(lambda([v],v=parse_string(sdowncase(string(v)))),lv), + return(subst(lv,ex)))$ + /* ********************************** */ *************** *** 123,127 **** lowesttermsp(ex) := block([simp:false,ex1,ex2,ex3], if atom(ex) then return(true), ! if op(ex)#STACK_DIV_OP then return(true), if gcd(num(ex),denom(ex))=1 then return(true) else return(false) )$ --- 140,144 ---- lowesttermsp(ex) := block([simp:false,ex1,ex2,ex3], if atom(ex) then return(true), ! if op(ex)#DIV_OP then return(true), if gcd(num(ex),denom(ex))=1 then return(true) else return(false) )$ *************** *** 131,135 **** if atom(ex) then (if numberp(ex) then return([ex]) else return([])) else ( ! if op(ex)=STACK_DIV_OP and simp_numberp(num(ex)) and simp_numberp(denom(ex)) then return([ex]), ex2:args(ex), flatten(maplist(list_expression_numbers,ex2))) --- 148,152 ---- if atom(ex) then (if numberp(ex) then return([ex]) else return([])) else ( ! if op(ex)=DIV_OP and simp_numberp(num(ex)) and simp_numberp(denom(ex)) then return([ex]), ex2:args(ex), flatten(maplist(list_expression_numbers,ex2))) *************** *** 227,228 **** --- 244,387 ---- polynomialpsimp(e):= polynomialp(e, listofvars(e))$ + /* ********************************** */ + /* Equivalence */ + /* ********************************** */ + + /* A general all purpose function on **expressions**. + Takes two objects and returns true if they are equal, and false otherwise + This is a "bash as hard as possible" function + */ + algebraic_equivalence(SA,SB) := + block([keepfloat,trigexpand,logexpand,ex,vi], + trigexpand:true, /* see pg 80 */ + logexpand:super, + keepfloat:true, /* see pg 23 */ + ex:errcatch(ev(fullratsimp(SA-SB),simp)), + if ex=[] then return(false), + ex:ex[1], + if floatnump(ex) then return(false), + ex:num(ex), /* after a fullratsimp, we have a ratio. We should only need to consider the top */ + ex:trigsimp(ex), + /* ex:trigreduce(ex), CJS, removed 21/1/2010. This was breaking ATSingleFrac! Don't know why. */ + if fullratsimp(ex)=0 then return(true), + ex:radcan(ex), + ex:factcomb(ex), + if fullratsimp(ex)=0 then return(true), + for vi:1 while ex#sqrtdenest(ex) do ex:sqrtdenest(ex), + if fullratsimp(ex)=0 then return(true) else return(false) + )$ + + /* This function takes two expressions. + It establishes if there exists a substitution of the variables of ex2 into ex1 which renders + ex1 algebraically equivalent to ex2. + If such a substitution exists the function returns it in a form so that + + ex2 = ev(ex1, subst_equiv(ex1,ex2)) + + If no such permutation exists it returns the empty list []. + If it could not establish this, because there are too many combinations to reasonably consider, + then the function returns false. + */ + subst_equiv(ex1,ex2):=block([lv1,lv2,lvi,lvp,lvs,lve,il,perm_size,simp], + simp:true, + perm_size:4, /* This algorithm is order factorial(perm_size) and so this needs to be small. */ + lv1:listofvars(ex1), + lv2:listofvars(ex2), + if length(lv1)#length(lv2) then return([]), + /* If the lists are too long, try a weaker condition */ + /* We assume the variables which occur in both are correctly assigned. */ + /* Can we find a permutation of those left in each? */ + if length(lv1)>perm_size then ( + lv1:setify(lv1), + lv2:setify(lv2), + lvi:intersection(lv1,lv2), + lv1:listify(setdifference(lv1,lvi)), + lv2:listify(setdifference(lv2,lvi)) + ), + if length(lv1)>perm_size then return(false), + /* */ + lvp:listify(permutations(lv2)), + /* Create a list of subsitutions */ + lvs:map(lambda([ex],zip_with("=",lv1,ex)),lvp), + /* Create list of expressions with which to compare ex1 */ + lve:map(lambda([ex],ev(ex1,ex)),lvs), + lve:map(lambda([ex],ATAlgEquivfun(ex,ex2)),lve), + lve:map(second,lve), + lve:map(lambda([ex],equal(ex,1)),lve), + if apply("or",lve) then (il:sublist_indices(lve,identity),lvs[il[1]]) else [] + )$ + + + /* ********************************** */ + /* Algebraic form tests */ + /* ********************************** */ + + /* expandp(p) is true if p equals its expanded form */ + expandp(p):= block([simp:true], if p=expand(p) then true else false)$ + + /* factorp(p) is true if p equals its factored form */ + factorp(p) := block([a], + if ev(p=factor(p),simp) then return(true), + if atom(p) then return(false), + /* Note, in Maxima factor((1-x)) = -(x-1), so we need to fix this, for learning and teaching! */ + if ev(-1*factor(p) = expand(-1*p),simp) then return(true), + if op(p)="^" and atom(part(p,1)) then return(true), + if op(p)="^" and factorp(part(p,1)) then return(true), + if op(p)="*" then return(all_listp(factorp,args(p))), + return(false) )$ + + + + /* ********************************** */ + /* Analysis tests */ + /* ********************************** */ + + /* This determines if an expression is continuous + ex the expression, + v the variable, + xp the point at which to evaluate. */ + continuousp(ex,v,xp) := block([lp,lm], + lp: ev(limit(ex,v,xp,minus),simp), + lm: ev(limit(ex,v,xp,plus),simp), + /* print(lp), print(lm), */ + if lp # und + and lm # und + and lp # ind + and lm # ind + and lp # inf + and lm # inf + and lp # minf + and lm # minf + and lp = lm + then true else false + )$ + + + /* This determines if an expression is differentiable + ex the expression, + v the variable, + xp the point at which to evaluate, + n the number of times it is differentiated (optional). + */ + diffp(ex,[args]) := block([v,xp,n], + v:args[1], + xp:args[2], + n:1, + if length(args)=3 then n:args[3], + return(continuousp(diff(ex,v,n),v,xp)) + )$ + + /* ********************************** */ + /* Buggy rules */ + /* ********************************** */ + + + /* (a+b)^n -> a^n+b^n */ + buggy_pow(ex) := block([ex_ex], + if atom(ex) then return(ex), + if op(ex)="/" and atom(part(ex,2))#true and op(part(ex,2))="+" then return(map(lambda([ex2],part(ex,1)/ex2),part(ex,2))), + if atom(part(ex,1)) or op(part(ex,1))#"+" then return(map(buggy_pow,ex)), + if op(ex)="^" then return(map(lambda([ex2],ex2^buggy_pow(part(ex,2))),map(buggy_pow,part(ex,1)))), + if op(ex)=sqrt then return(map(sqrt,map(buggy_pow,part(ex,1)))), + print(op(ex)) + )$ Index: unittests_load.mac =================================================================== RCS file: /cvsroot/stack/stack-dev/maxima/unittests_load.mac,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** unittests_load.mac 1 Dec 2010 18:32:25 -0000 1.5 --- unittests_load.mac 6 Dec 2010 16:03:38 -0000 1.6 *************** *** 5,9 **** /* NOTE: we need to run tests with simp:false and simp:true */ ! no_fails:0$ all_pass:true$ --- 5,11 ---- /* NOTE: we need to run tests with simp:false and simp:true */ ! /* C:\Program Files\Maxima-5.22.1\share\maxima\5.22.1\src */ ! /* The testsuite uses the function approx-alike (defined in src/mload.lisp) to check for equality. */ ! /* I think you'll need to write your own approx-alike function. */ no_fails:0$ all_pass:true$ Index: noun_arith.mac =================================================================== RCS file: /cvsroot/stack/stack-dev/maxima/noun_arith.mac,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** noun_arith.mac 19 Jan 2010 18:01:21 -0000 1.6 --- noun_arith.mac 6 Dec 2010 16:03:38 -0000 1.7 *************** *** 65,69 **** ex:subst("*","noun*",ex), ex:subst("-","noun-",ex), ! ex:subst(STACK_DIV_OP,"noun/",ex), ex:subst("^","noun^",ex), define(UNARY_RECIP a, a^(-1)), --- 65,69 ---- ex:subst("*","noun*",ex), ex:subst("-","noun-",ex), ! ex:subst(DIV_OP,"noun/",ex), ex:subst("^","noun^",ex), define(UNARY_RECIP a, a^(-1)), *************** *** 71,90 **** remfunction("noun+","noun*","noun/","noun^","noun-"),ex)$ - - /* This is too complex, OH! if I had thought of subst earlier...... :-( - - verb_arith_sum(a,b) := if listp(b) then a+apply("+",b) else a+b; - verb_arith_prod(a,b) := if listp(b) then a*apply("*",b) else a*b; - - verb_arith(ex) := block( - define((a noun+ [b]), 'verb_arith_sum(a,b)), - define((a noun* [b]), 'verb_arith_prod(a,b)), - define(a noun/ b, a/b), - define(a noun^ b, a^b), - define(noun- a, -1*a), - ex:ev(ex,nouns), - remfunction("noun+","noun*","noun/","noun^","noun-"),ex)$ - */ - /* (5) */ noun_arith(ex) := block( --- 71,74 ---- *************** *** 92,96 **** ex:subst("noun*","*",ex), ex:subst(lambda([ex],UNARY_MINUS noun* ex),"-",ex), /* Unary minus really communtes with multipication*/ ! ex:subst(lambda([ex1,ex2], ex1 noun* (UNARY_RECIP ex2)),STACK_DIV_OP,ex), /* Turn 1/x into x^(-1), in a special form */ ex:subst("noun^","^",ex), ev(ex))$ --- 76,80 ---- ex:subst("noun*","*",ex), ex:subst(lambda([ex],UNARY_MINUS noun* ex),"-",ex), /* Unary minus really communtes with multipication*/ ! ex:subst(lambda([ex1,ex2], ex1 noun* (UNARY_RECIP ex2)),DIV_OP,ex), /* Turn 1/x into x^(-1), in a special form */ ex:subst("noun^","^",ex), ev(ex))$ *************** *** 144,179 **** )$ - /* ************************************** */ - /* Test suite */ - /* ************************************** */ - - /* p:[/*x n+ x, - x n+ n- x n+ 1 n+ n- z, - n- z, - - z, */ - 1-z, - noun_arith(1-z), /* tex(1-z) works, but tex(noun_arith(1-z)) does not. - 1 + x n+ x, - 2 n* 3 n* x n+ z^2, - 1 + (x n+ x), - 2 n^ t, - x n^ 2 n+ 1, - 1 n/ (1 n+ n n^ 2), - 2 n/ 4, */ - sin(1 n+ x n^ 2)]$ - */ - - /* FOR kloop:1 THRU length(p) DO - (print(p[kloop]),tex(p[kloop]),ex:verb_arith(p[kloop]),print(ex),print(noun_arith(ex)),print(""))$ - */ - /* Things to consider: 7/11/9 - - (1) What about pushing -1 thorugh /, - eg x*(-y) vs -(x*y) - - (2) What about even powers? - e.g. (1-x)^2 vs (x-1)^2 - - */ --- 128,131 ---- Index: rtest_assessment_simpfalse.mac =================================================================== RCS file: /cvsroot/stack/stack-dev/maxima/rtest_assessment_simpfalse.mac,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rtest_assessment_simpfalse.mac 1 Dec 2010 18:32:25 -0000 1.2 --- rtest_assessment_simpfalse.mac 6 Dec 2010 16:03:38 -0000 1.3 *************** *** 99,100 **** --- 99,114 ---- "-\\left(x-1\\right)"$ + buggy_pow( 3*(x+1)^2 ); + 3*(x^2+1^2)$ + buggy_pow(x^(a+b)^2); + x^(a^2+b^2)$ + buggy_pow(x^(a+b)^(1/2)); + x^(a^(1/2)+b^(1/2))$ + buggy_pow((x+1)^(a+b)^2); + x^(a^2+b^2)+1^(a^2+b^2)$ + buggy_pow( 3*(x+1)^-1 ); + 3*(1/x+1/1)$ + buggy_pow( 3*(x+1)^-2 ); + 3*(1/x^2+1/1^2)$ + buggy_pow(sin(sqrt(a+b))); + sin(sqrt(a)+sqrt(b))$ |
From: Simon H. <sim...@us...> - 2010-12-06 15:30:10
|
Update of /cvsroot/stack/stack-dev/lib/ui/inputTypes In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20389/lib/ui/inputTypes Modified Files: Slider.php Log Message: Fixed stepping in Slider. Index: Slider.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/ui/inputTypes/Slider.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Slider.php 30 Sep 2010 16:56:13 -0000 1.2 --- Slider.php 6 Dec 2010 15:30:02 -0000 1.3 *************** *** 24,55 **** class Slider extends AnswerInputType { ! // Attributes ! //protected $min; ! //protected $max; ! //protected $step; ! ! public function __construct($name, $width = null, $default = null, $maxLength = null, $height = null, $param = null) { - //if (!isset($width)) $width = '200'; $this->name = $name; ! $this->boxWidth = $width; ! ! if($param == NULL) ! { ! $this->parameters['slider_min'] = new Meta('required', '0'); ! $this->parameters['slider_max'] = new Meta('required', '100'); ! $this->parameters['slider_step'] = new Meta('required', '1'); ! } else $this->parameters = $param; ! ! // parent::__construct($name, $width); ! //$this->min = $param['min']; ! //$this->max = $param['max']; ! //$this->step = $param['step']; ! parent::__construct($name, $width, $default, $maxLength, $height, $param); ! } ! public function getXHTML() { $url = $GLOBALS['config']->get('weburl'); --- 24,44 ---- class Slider extends AnswerInputType { ! public function __construct($name, $width = null, $default = null, $maxLength = null, $height = null, $param = null) { $this->name = $name; ! $this->boxWidth = $width; ! parent::__construct($name, $width, $default, $maxLength, $height, $param); ! // slider values hard-wired for now ! $this->parameters['slider_min'] = new Meta('required', '0'); ! $this->parameters['slider_max'] = new Meta('required', '100'); ! $this->parameters['slider_step'] = new Meta('required', '25'); ! } ! public function getXHTML() { ! $min = $this->parameters['slider_min']->getSelection(); ! $max = $this->parameters['slider_max']->getSelection(); ! $step = $this->parameters['slider_step']->getSelection(); $url = $GLOBALS['config']->get('weburl'); *************** *** 68,76 **** $("#' . $this->name . '_slider").slider({' . (is_numeric($this->default) ? "value: {$this->default}," : '') ! . (isset($this->parameters['slider_min']) ? "min: {$this->parameters['slider_min']}," : '') ! . (isset($this->parameters['slider_max']) ? "max: {$this->parameters['slider_max']}," : '') ! . (isset($this->parameters['slider_step']) ? "step: {$this->parameters['slider_step']}," : '') ! . ' slide: function(event, ui) { ! $("#' . $this->name . '").val(ui.value) $("#' . $this->name . '_value").text(ui.value); } --- 57,63 ---- $("#' . $this->name . '_slider").slider({' . (is_numeric($this->default) ? "value: {$this->default}," : '') ! . "min: $min, max: $max, step: $step,". ! ' slide: function(event, ui) { ! $("#' . $this->name . '").val(ui.value); $("#' . $this->name . '_value").text(ui.value); } *************** *** 78,107 **** }); </script>'; ! return $slider; ! } ! ! /** ! * Modifies the default parameters of this Input type based on the authors inputs ! * If authors input is null, returns the defaults. ! * ! * @access public ! * @param array $param ! * @return array ! */ ! public function getDefaultParam($param=NULL) ! { ! if(!empty($param['slider_min'])) ! { ! $this->parameters['slider_min']->setSelection($param['slider_min']); ! } ! if(!empty($param['slider_max'])) ! { ! $this->parameters['slider_max']->setSelection($param['slider_max']); ! } ! return $this->parameters; ! } --- 65,93 ---- }); </script>'; + return $slider; + } ! /** ! * Modifies the default parameters of this Input type based on the authors inputs ! * If authors input is null, returns the defaults. ! * ! * @access public ! * @param array $param ! * @return array ! */ ! public function getDefaultParam($param=NULL) ! { ! if(!empty($param['slider_min'])) ! { ! $this->parameters['slider_min']->setSelection($param['slider_min']); ! } ! if(!empty($param['slider_max'])) ! { ! $this->parameters['slider_max']->setSelection($param['slider_max']); ! } ! return $this->parameters; ! } |
From: Simon H. <sim...@us...> - 2010-12-02 19:26:03
|
Update of /cvsroot/stack/stack-dev/lang/en In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv29786/lang/en Modified Files: stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lang/en/stack.php,v retrieving revision 1.160 retrieving revision 1.161 diff -C2 -d -r1.160 -r1.161 *** stack.php 2 Nov 2010 18:07:49 -0000 1.160 --- stack.php 2 Dec 2010 19:25:55 -0000 1.161 *************** *** 533,537 **** $string['stackQuestion_authorPotentConclusion'] = 'potential responses. '; $string['stackQuestion_noQuestionParts'] = 'This item has no question parts. It cannot be answered.'; ! $string['stackQuestion_authorNewVersion'] = 'new version'; --- 533,537 ---- $string['stackQuestion_authorPotentConclusion'] = 'potential responses. '; $string['stackQuestion_noQuestionParts'] = 'This item has no question parts. It cannot be answered.'; ! $string['stackQuestion_authorNewInstance'] = 'new instance'; |
From: Simon H. <sim...@us...> - 2010-12-02 19:26:03
|
Update of /cvsroot/stack/stack-dev/lib/ui In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv29786/lib/ui Modified Files: questionTest.php questionDeploy.php Log Message: Index: questionDeploy.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/ui/questionDeploy.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** questionDeploy.php 30 Sep 2010 16:56:15 -0000 1.10 --- questionDeploy.php 2 Dec 2010 19:25:54 -0000 1.11 *************** *** 141,144 **** --- 141,145 ---- </div> <?php + /* if($earliest == $latestVersion) { echo '<div class="section80">'; *************** *** 152,155 **** --- 153,157 ---- // should output responses defined (counted) and their test result } + */ ?> </div> \ No newline at end of file Index: questionTest.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/ui/questionTest.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** questionTest.php 30 Sep 2010 16:56:15 -0000 1.26 --- questionTest.php 2 Dec 2010 19:25:54 -0000 1.27 *************** *** 94,98 **** echo get_string('stackAuthor_qid','stack').' '.$id; ! echo " <a href='questionTest.php?id=$id'>".get_string('stackQuestion_authorNewVersion','stack')."</a> "; echo '<input type="input" name="seed" value="'.$seed.'" />'; --- 94,98 ---- echo get_string('stackAuthor_qid','stack').' '.$id; ! echo " <a href='questionTest.php?id=$id'>".get_string('stackQuestion_authorNewInstance','stack')."</a> "; echo '<input type="input" name="seed" value="'.$seed.'" />'; |
From: Chris S. <san...@us...> - 2010-12-01 18:58:51
|
Update of /cvsroot/stack/stack-dev/install In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv802/install Modified Files: installFunctions.php Log Message: Index: installFunctions.php =================================================================== RCS file: /cvsroot/stack/stack-dev/install/installFunctions.php,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** installFunctions.php 27 Oct 2010 13:40:51 -0000 1.42 --- installFunctions.php 1 Dec 2010 18:58:43 -0000 1.43 *************** *** 230,233 **** --- 230,237 ---- $this->casArray["command"] = $this->configArray["docroot"]."/maxima/stackmaxima_5.20.1.bat"; break; + + case "5.22.1": + $this->casArray["command"] = $this->configArray["docroot"]."/maxima/stackmaxima_5.20.1.bat"; + break; } |
Update of /cvsroot/stack/stack-dev/maxima In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25820 Modified Files: stackmaxima.mac unittests_load.mac Added Files: assessment.mac rtest_assessment_simpboth.mac rtest_assessment_simpfalse.mac rtest_assessment_simptrue.mac Log Message: Assessment package Index: stackmaxima.mac =================================================================== RCS file: /cvsroot/stack/stack-dev/maxima/stackmaxima.mac,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** stackmaxima.mac 28 Nov 2010 17:34:18 -0000 1.86 --- stackmaxima.mac 1 Dec 2010 18:32:25 -0000 1.87 *************** *** 77,85 **** "|"([a]):=apply(abs,a); ! load("powers.lisp"); ! load("format/coeflist.lisp"); ! load("format/format.lisp"); load("implicit_plot.lisp"); ! load("grobner.lisp"); /* Does not quite work yet ..... */ --- 77,83 ---- "|"([a]):=apply(abs,a); ! load("implicit_plot.lisp"); ! /* Does not quite work yet ..... */ *************** *** 104,110 **** /* ********************************** */ load("stacktex.lisp"); /* Loads LaTeX adaptions and preferences */ load("mathml.lisp"); /* loads MathML */ - load("noun_arith.mac")$ make_complexJ(OPT_COMPLEXJ) := block( --- 102,109 ---- /* ********************************** */ + load("assessment.mac"); /* Currently part of the STACK distribution */ + load("stacktex.lisp"); /* Loads LaTeX adaptions and preferences */ load("mathml.lisp"); /* loads MathML */ make_complexJ(OPT_COMPLEXJ) := block( *************** *** 400,437 **** /* ********************************** */ - /* numberp() does not "work" when simp:false, since unary minus is an unevaluated function... */ - simp_numberp(ex) := block( - if numberp(ex) then return(true), - if atom(ex) then return(false), - if op(ex)="-" and numberp(first(args(ex))) then return(true), - false - )$ - - /* Do we have a real number?*/ - /* Code taken from Stack_Test */ - real_numberp(ex):= - block([keepfloat,trigexpand,logexpand], - trigexpand:true, /* see pg 80 */ - logexpand:super, - keepfloat:true, /* see pg 23 */ - ex:errcatch(ev(fullratsimp(ex),simp)), - if ex=[] then return(false), - ex:ev(float(ex[1]),simp), - if listofvars(ex)#[] then return(false), - if floatnump(ex) then return(true) else return(false) - )$ - - decimalplaces(x,n) := block([simp:true,fpprintprec],fpprintprec:n,float(round(10^n*float(x))/(10^n)))$ - - - /* Write numbers in significant figures */ - significantfigures(x,n) := block([fpprec:128,fpprintprec,simp:true,ex,ex2], - ex:floor(float(log(x)/log(10))), - ex2:round(float(x/10^(ex-n+1))), - ex2:float(ex2*10^(ex-n+1)), - if floor(ex2)=ratsimp(ex2) then ex2:ratsimp(ex2), - return(ex2) - ); - ATNumSigFigs(SA,SBL) := block([RawMark,FeedBack,AnswerNote,ret,ol,nsf,asf,c0,c1,c2,SAA,SBB], --- 399,402 ---- *************** *** 472,640 **** )$ - scientific_notation(x) := block([simp:true,fpprintprec,ex,ex2], - ex:floor(float(log(x)/log(10))), - ex2:float(x/10^ex), - return((ex2)*10^(ex)) - ); - - /* commonfac(l) returns the gcd of a list of numbers */ - commonfaclist(l) := block([i,a,ret], - if listp(l) then - ret:( a:l[1], - if length(l)>1 then - ev(for i:2 thru length(l) do (a:ev(gcd(a,l[i]),simp)),simp), - return(a)) - else ret:"fail", - return(ret) )$ - - /* Returns a list of factors of ex without multiplicities */ - factorlist(ex) := block([simp:false,ret:"",ex2], - ex:ev(factor(ex),simp), - if atom(ex) then return([ex]), - if op(ex)#"*" then - ret:[ex] - else - ret:args(ex), - /* now strip off powers */ - ret:maplist(lambda([ex2],if atom(ex2) then ex2 else if op(ex2)="^" then part(ex2,1) else ex2),ret), - return(ret) - )$ - - /* Is the fraction in its lowest terms? */ - lowesttermsp(ex) := block([simp:false,ex1,ex2,ex3], - if atom(ex) then return(true), - if op(ex)#STACK_DIV_OP then return(true), - if gcd(num(ex),denom(ex))=1 then return(true) else return(false) - )$ - - /* Create a list with all parts for which numberp(ex)=true */ - list_expression_numbers(ex) := block([ex2], - if atom(ex) then (if numberp(ex) then return([ex]) else return([])) - else ( - if op(ex)=STACK_DIV_OP and simp_numberp(num(ex)) and simp_numberp(denom(ex)) then return([ex]), - ex2:args(ex), - flatten(maplist(list_expression_numbers,ex2))) - )$ - - all_lowest_termsex(ex):= block([simp:false,ex2], - ex2:list_expression_numbers(ex), - all_listp(lowesttermsp,ex2) - )$ - - /* anyfloats(l) returns true if any of the list are floats */ - anyfloat(l) := block([ret:false], - if listp(l)=false then ret:"fail", - ev(l:map('floatnump,l),simp), - ev(for i:1 thru length(l) do (ret:ret or l[i]),simp), - return(ret) )$ - - /* Decides if any floats are in the expression. */ - anyfloatex(ex) := block([partswitch,ret,kloop], - ret:false, - ex:ev(ex,simp), - if floatnump(ex) then return(true), - if atom(ex) then return(false), - partswitch:true, - ev(for kloop:1 while part(ex,kloop)#end do - ret:ret or anyfloatex(part(ex,kloop)),simp), - return(ret) - )$ - - /* compare with*/ - /* coefl:map('first,rest(coeffs(SA,x))) */ - - /* ********************************** */ - /* General list functions */ - /* ********************************** */ - - /* all_listp(p,l) true if all elements of l satisfy p */ - all_listp(p,l):= if listp(l) then ret:apply("and",maplist(p,l)) else ret:"fail"$ - - /* any_listp(p,l) true if all elements of l satisfy p */ - any_listp(p,l):= if listp(l) then ret:apply("or",maplist(p,l)) else ret:"fail"$ - - /* Return a list containing only those elements for which the predicate p is true */ - filter(p,l):= block( - if listp(l)=false then return(false), - if l = [] then return([]), - if p(first(l)) then cons(first(l),filter(p,rest(l))) - else filter(p,rest(l)) - )$ - - /* This function applies the binary function f to two lists a and b returning a list - [ f(a[1],b[1]), f(a[2],b[2]), ... ] zip_with quietly gives up when one of the list runs out of elements. */ - zip_with(f,a,b) := block( - if not(listp(a)) then return(false), - if not(listp(b)) then return(false), - if emptyp(a) then return([]), - if emptyp(b) then return([]), - cons(f(first(a),first(b)),zip_with(f,rest(a),rest(b))) - )$ - - /* ********************************** */ - /* Parts of expressions */ - /* ********************************** */ - - /* op(ex) is unsafe on atoms: this is a fix. */ - /* This function always returns a string */ - stack_op(ex) := block( - if atom(ex) then return(""), - if op(ex)#"-" then - if stringp(op(ex)) then return(op(ex)) else return(string(op(ex))) - else - if atom(first(ex)) then - return("") - else - if stringp(op(first(ex))) then return(op((first(ex)))) else return(string(op(ex))) - )$ - - /* This function takes an expression ex and returns a list of coefficients of v */ - coeff_list(ex,v):= block([deg,kloop,cl], - cl:[], - ex:ev(expand(ex),simp), - deg:degree(ex,v), - ev(for kloop:0 thru deg do - cl:append(cl,[coeff(ex,v,kloop)]),simp), - cl - )$ - - /* This function takes an expression ex and returns a list of nonzero coefficients of v */ - coeff_list_nz(ex,v):= block([deg,kloop,cl], - cl:[], - ex:ev(expand(ex),simp), - deg:degree(ex,v), - ev(for kloop:0 thru deg do - if coeff(ex,v,kloop)#0 then cl:append(cl,[[kloop,coeff(ex,v,kloop)]]),simp), - cl - )$ - - - /* ********************************** */ - /* Type predicates */ - /* ********************************** */ - - /* Determines if we are using an equation */ - equationp(ex) := block( - if atom(ex) then return(false), - if "="= op(ex) then return(true), - return(false) - )$ - - /* Determines if we are using an inequality */ - inequalityp(ex) := block( - if atom(ex) then return(false), - if ">"= op(ex) or "<"= op(ex) or ">="= op(ex) or "<="= op(ex) then return(true), - return(false) - )$ - - expressionp(ex) := block( - if matrixp(ex) or listp(ex) or equationp(ex) or inequalityp(ex) or setp(ex) then - return (false), - return(true) - ); - /* ********************************** */ - /* Logarithms to the base 10 */ - /* ********************************** */ --- 437,441 ---- *************** *** 1067,1070 **** --- 868,1028 ---- return(subst(lv,ex)))$ + /**********************************************/ + /* */ + /* System Equivalence Test */ + /* */ + /* An addition to STACK using Grobner Bases */ + /* */ + /**********************************************/ + + + /* + + What these functions do: + + - Determine whether the student's and teacher's answers are systems of equations + - Convert the two systems of equations into two systems of expressions + - Determine whether both systems are systems of multivariate polynomials + - Compare the variables in student's and teacher's answers, if they're not the same tell the student + - Find their Buchberger polynomials of the two systems + - Use the Buchberger polynomials to compare the Grobner bases of the two systems + - If the Grobner bases are not equal, determine whether the student's is a subset of the teacher's + - If student's system has equations which should not be there, tell them which ones. + */ + + + + /* + Main function of the System Equivalence test + + Takes two inputs, checks whether they are + lists of polynomials and delegates everything + else to other functions. + + Process: + + - Is each answer a list? + - Is each list element not an atom? + - Is each list element an equation? + - Is each list element a polynomial? + */ + + /* Edited files: SysEquiv.php, AnsTestcontroller.php, lang/en/stack.php */ + + ATSysEquiv(SA,SB):=block([keepfloat,RawMark,FeedBack,AnswerNote,SAA,SAB,S1,S2,varlist,GA,GB,ret], + RawMark:0, FeedBack:"", AnswerNote:"", + keepfloat:true, /* See pg 23 */ + + /* Turn on simplification and error catch */ + SAA:errcatch(ev(SA,simp,fullratsimp,nouns)), + if (is(SAA=[STACKERROR]) or is(SAA=[])) then return(StackReturnOb("0","ATLowestTerms_STACKERROR_SAns","")), + SAB:errcatch(ev(SB,simp,fullratsimp,nouns)), + if (is(SAB=[STACKERROR]) or is(SAB=[])) then return(StackReturnOb("0","ATLowestTerms_STACKERROR_TAns","")), + + /* Are both answers lists? */ + if not listp(SA) then + return(StackReturnOb("0","ATSysEquiv_SA_not_list",StackAddFeedback("","ATSysEquiv_SA_not_list"))), + if not listp(SB) then + return(StackReturnOb("0","ATSysEquiv_SB_not_list",StackAddFeedback("","ATSysEquiv_SB_not_list"))), + + /* Are all list elements not atoms? */ + if ev(all_listp(atom,SA),simp) then + return(StackReturnOb("0","ATSysEquiv_SA_not_eq_list",StackAddFeedback("","ATSysEquiv_SA_not_eq_list"))), + if ev(all_listp(atom,SB),simp) then + return(StackReturnOb("0","ATSysEquiv_SB_not_eq_list",StackAddFeedback("","ATSysEquiv_SB_not_eq_list"))), + + /* Are all list elements equations? */ + if ev(not all_listp(equationp,SA),simp) then + return(StackReturnOb("0","ATSysEquiv_SA_not_eq_list",StackAddFeedback("","ATSysEquiv_SA_not_eq_list"))), + if ev(not all_listp(equationp,SB),simp) then + return(StackReturnOb("0","ATSysEquiv_SB_not_eq_list",StackAddFeedback("","ATSysEquiv_SB_not_eq_list"))), + + /* Turn our equations into expressions */ + S1: ev(maplist(stack_eqnprepare,stack_eval_assignments(exdowncase(SA))),simp), + S2: ev(maplist(stack_eqnprepare,stack_eval_assignments(exdowncase(SB))),simp), + kill(SB), + + /* Is each expression a polynomial? */ + if not all_listp(polynomialpsimp, S1) then + return(StackReturnOb("0","ATSysEquiv_SA_not_poly_eq_list",StackAddFeedback("","ATSysEquiv_SA_not_poly_eq_list"))), + if not all_listp(polynomialpsimp, S2) then + return(StackReturnOb("0","ATSysEquiv_SB_not_poly_eq_list",StackAddFeedback("","ATSysEquiv_SB_not_poly_eq_list"))), + + /* + At this point have two lists of polynomials. We now check whether the + student's and teacher's polynomials have the same variables. If they do, + we find their Grobner bases and determine whether the systems of + equations have the same solutions + */ + + varlist: listofvars(S2), + if not is(ev(setify(listofvars(S1)),simp)=ev(setify(varlist), simp)) then + return(ATSysEquivVars(S1,S2)), + + GA :ev(poly_buchberger(S1,varlist),simp), + GB :ev(poly_buchberger(S2,varlist),simp), + kill(S1,S2), + + /* Determine whether our two lists of polynomials have the same Grobner Bases */ + if poly_grobner_equal(GA, GB, varlist) then + return(StackReturnOb("1","","")), + + /* + We now know the student's answer is in the correct form but there is + something wrong with it. From here we use the grobner package to + determine which, if any, of their equations is correct. + */ + + return(ATSysEquivGrob(GA, GB, SA, varlist)) + + + )$ + + + /* Takes two lists of expressions and compares the variables in each */ + + ATSysEquivVars(S1,S2):=block([XA,XB], + XA: setify(listofvars(S1)), + XB: setify(listofvars(S2)), + if subsetp(XA,XB) then + return(StackReturnOb("0","ATSysEquiv_SA_missing_variables",StackAddFeedback("","ATSysEquiv_SA_missing_variables"))), + if subsetp(XB,XA) then + return(StackReturnOb("0","ATSysEquiv_SA_extra_variables",StackAddFeedback("","ATSysEquiv_SA_extra_variables"))), + return(StackReturnOb("0","ATSysEquiv_SA_wrong_variables",StackAddFeedback("","ATSysEquiv_SA_wrong_variables"))) + )$ + + /* + Grobner basis comparison + + This function takes two Grobner bases and a set of variables and determines + whether the student's system is underdetermined or overdetermined. It also + takes the student's original system so that if it is overdetermined it can + tell them which equations should not be there. + */ + + ATSysEquivGrob(GA,GB,SA,varlist):=block([retl,ret], + + /* Is the student's system underdetermined? */ + + if poly_grobner_subsetp(GA,GB,varlist) then + return(StackReturnOb("0","ATSysEquiv_SA_system_underdetermined",StackAddFeedback("","ATSysEquiv_SA_system_underdetermined"))), + + /* + Given that the student's system is neither underdetermined nor equal to + the teacher's, we need to find which equations do not belong in the system. + */ + + ret:[], + + for k:1 thru length(SA) do block([], + if ev(poly_grobner_member(stack_eqnprepare(stack_eval_assignments(exdowncase(SA[k]))), GB, varlist),simp) then + ret:append(ret,[SA[ev(k,simp)]]) + else + ret:append(ret,[texcolor("red", SA[ev(k,simp)])])), + + return(StackReturnOb("0","ATSysEquiv_SA_system_overdetermined",StackAddFeedback("","ATSysEquiv_SA_system_overdetermined", StackDISP(ret, "\$\$")))) + + )$ + /*****************************************************************/ *************** *** 1688,1692 **** subst_int_const(ex,v):=block([lv,li,ls], lv:listofvars(ex), ! li:sublist_indices(lv, lambda([ex],is(smismatch("integrationconstant",string(ex))>19)) ), if emptyp(li) then return(ex), /* If we have only one variable v, then use this */ --- 1646,1650 ---- subst_int_const(ex,v):=block([lv,li,ls], lv:listofvars(ex), ! li:sublist_indices(lv, lambda([ex],is(smismatch("integrationconstant",string(ex))>19) or is(smismatch("%c",string(ex))>2)) ), if emptyp(li) then return(ex), /* If we have only one variable v, then use this */ *************** *** 1697,1705 **** /* This function strips off any trailing constant of integration from an expression, which is not a number */ ! strip_int_const(ex,v):=block([ex2], ex2:ex, ! if not(atom(ex)) then ! if op(ex)="+" then ! ex2:apply("+",filter(lambda([ex2],not(freeof(v,ex2)) or simp_numberp(ex2)),args(ex))), return(ex2))$ --- 1655,1664 ---- /* This function strips off any trailing constant of integration from an expression, which is not a number */ ! strip_int_const(ex,v):=block([ex2,fargs], ex2:ex, ! if atom(ex) then return(ex), ! if op(ex)="+" then ! (fargs:filter(lambda([ex2],not(freeof(v,ex2)) or simp_numberp(ex2)),args(ex)), ! if length(fargs)=1 then ex2:fargs[1] else ex2:apply("+",fargs)), return(ex2))$ *************** *** 1853,1856 **** --- 1812,1820 ---- )$ + + /*********************/ + /* Matrix operations */ + /*********************/ + /* Description : forme echelonne par lignes d'une matrice rectangulaire --- NEW FILE: assessment.mac --- /****************************************************************/ /* An assessment package for Maxima */ /* */ /* Chris Sangwin, <ch...@sa...> */ /* V0.1 December 2010 */ /* */ /****************************************************************/ /* ********************************** */ /* Load contributed packages */ /* ********************************** */ load("powers.lisp"); load("format/coeflist.lisp"); load("format/format.lisp"); load("grobner.lisp"); /* ********************************** */ /* Load assessment files */ /* ********************************** */ load("noun_arith.mac")$ /* ********************************** */ /* General list and utility functions */ /* ********************************** */ /* all_listp(p,l) true if all elements of l satisfy p */ all_listp(p,l):= if listp(l) then ret:apply("and",maplist(p,l)) else ret:"fail"$ /* any_listp(p,l) true if all elements of l satisfy p */ any_listp(p,l):= if listp(l) then ret:apply("or",maplist(p,l)) else ret:"fail"$ /* Return a list containing only those elements for which the predicate p is true */ filter(p,l):= block( if listp(l)=false then return(false), if l = [] then return([]), if p(first(l)) then cons(first(l),filter(p,rest(l))) else filter(p,rest(l)) )$ /* This function applies the binary function f to two lists a and b returning a list [ f(a[1],b[1]), f(a[2],b[2]), ... ] zip_with quietly gives up when one of the list runs out of elements. */ zip_with(f,a,b) := block( if not(listp(a)) then return(false), if not(listp(b)) then return(false), if emptyp(a) then return([]), if emptyp(b) then return([]), cons(f(first(a),first(b)),zip_with(f,rest(a),rest(b))) )$ /* ********************************** */ /* Numerical operations */ /* ********************************** */ /* numberp() does not "work" when simp:false, since unary minus is an unevaluated function... */ simp_numberp(ex) := block( if numberp(ex) then return(true), if atom(ex) then return(false), if op(ex)="-" and numberp(first(args(ex))) then return(true), false )$ /* Do we have a real number?*/ /* Code taken from Stack_Test */ real_numberp(ex):= block([keepfloat,trigexpand,logexpand], trigexpand:true, /* see pg 80 */ logexpand:super, keepfloat:true, /* see pg 23 */ ex:errcatch(ev(fullratsimp(ex),simp)), if ex=[] then return(false), ex:ev(float(ex[1]),simp), if listofvars(ex)#[] then return(false), if floatnump(ex) then return(true) else return(false) )$ /* Write the number x in n decimal places */ decimalplaces(x,n) := block([simp:true,fpprintprec],fpprintprec:n,float(round(10^n*float(x))/(10^n)))$ /* Write numbers in significant figures */ significantfigures(x,n) := block([fpprec:128,fpprintprec,simp:true,ex,ex2], ex:floor(float(log(x)/log(10))), ex2:round(float(x/10^(ex-n+1))), ex2:float(ex2*10^(ex-n+1)), if floor(ex2)=ratsimp(ex2) then ex2:ratsimp(ex2), return(ex2) ); scientific_notation(x) := block([simp:true,fpprintprec,ex,ex2], ex:floor(float(log(x)/log(10))), ex2:float(x/10^ex), return((ex2)*10^(ex)) ); /* commonfac(l) returns the gcd of a list of numbers */ commonfaclist(l) := block([i,a,ret], if listp(l) then ret:( a:l[1], if length(l)>1 then ev(for i:2 thru length(l) do (a:ev(gcd(a,l[i]),simp)),simp), return(a)) else ret:"fail", return(ret) )$ /* Returns a list of factors of ex without multiplicities */ factorlist(ex) := block([simp:false,ret:"",ex2], ex:ev(factor(ex),simp), if atom(ex) then return([ex]), if op(ex)#"*" then ret:[ex] else ret:args(ex), /* now strip off powers */ ret:maplist(lambda([ex2],if atom(ex2) then ex2 else if op(ex2)="^" then part(ex2,1) else ex2),ret), return(ret) )$ /* Is the fraction in its lowest terms? */ lowesttermsp(ex) := block([simp:false,ex1,ex2,ex3], if atom(ex) then return(true), if op(ex)#STACK_DIV_OP then return(true), if gcd(num(ex),denom(ex))=1 then return(true) else return(false) )$ /* Create a list with all parts for which numberp(ex)=true */ list_expression_numbers(ex) := block([ex2], if atom(ex) then (if numberp(ex) then return([ex]) else return([])) else ( if op(ex)=STACK_DIV_OP and simp_numberp(num(ex)) and simp_numberp(denom(ex)) then return([ex]), ex2:args(ex), flatten(maplist(list_expression_numbers,ex2))) )$ all_lowest_termsex(ex):= block([simp:false,ex2], ex2:list_expression_numbers(ex), all_listp(lowesttermsp,ex2) )$ /* anyfloats(l) returns true if any of the list are floats */ anyfloat(l) := block([ret:false], if listp(l)=false then ret:"fail", ev(l:map('floatnump,l),simp), ev(for i:1 thru length(l) do (ret:ret or l[i]),simp), return(ret) )$ /* Decides if any floats are in the expression. */ anyfloatex(ex) := block([partswitch,ret,kloop], ret:false, ex:ev(ex,simp), if floatnump(ex) then return(true), if atom(ex) then return(false), partswitch:true, ev(for kloop:1 while part(ex,kloop)#end do ret:ret or anyfloatex(part(ex,kloop)),simp), return(ret) )$ /* compare with*/ /* coefl:map('first,rest(coeffs(SA,x))) */ /* ********************************** */ /* Parts of expressions */ /* ********************************** */ /* op(ex) is unsafe on atoms: this is a fix. */ /* This function always returns a string */ safe_op(ex) := block( if atom(ex) then return(""), if op(ex)#"-" then if stringp(op(ex)) then return(op(ex)) else return(string(op(ex))) else if atom(first(ex)) then return("") else if stringp(op(first(ex))) then return(op((first(ex)))) else return(string(op(ex))) )$ /* This function takes an expression ex and returns a list of coefficients of v */ coeff_list(ex,v):= block([deg,kloop,cl], cl:[], ex:ev(expand(ex),simp), deg:degree(ex,v), ev(for kloop:0 thru deg do cl:append(cl,[coeff(ex,v,kloop)]),simp), cl )$ /* This function takes an expression ex and returns a list of nonzero coefficients of v */ coeff_list_nz(ex,v):= block([deg,kloop,cl], cl:[], ex:ev(expand(ex),simp), deg:degree(ex,v), ev(for kloop:0 thru deg do if coeff(ex,v,kloop)#0 then cl:append(cl,[[kloop,coeff(ex,v,kloop)]]),simp), cl )$ /* ********************************** */ /* Type predicates */ /* ********************************** */ /* Determines if we are using an equation */ equationp(ex) := block( if atom(ex) then return(false), if "="= op(ex) then return(true), return(false) )$ /* Determines if we are using an inequality */ inequalityp(ex) := block( if atom(ex) then return(false), if ">"= op(ex) or "<"= op(ex) or ">="= op(ex) or "<="= op(ex) then return(true), return(false) )$ expressionp(ex) := block( if matrixp(ex) or listp(ex) or equationp(ex) or inequalityp(ex) or setp(ex) then return (false), return(true) ); /* Checks that an expression is a polynomial */ polynomialpsimp(e):= polynomialp(e, listofvars(e))$ Index: unittests_load.mac =================================================================== RCS file: /cvsroot/stack/stack-dev/maxima/unittests_load.mac,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** unittests_load.mac 11 Dec 2008 12:15:02 -0000 1.4 --- unittests_load.mac 1 Dec 2010 18:32:25 -0000 1.5 *************** *** 5,36 **** /* NOTE: we need to run tests with simp:false and simp:true */ - UT(ex,r):= if not(equal(ev(ex,nouns),r)) then ( - no_fails:ev(no_fails+1,simp), - all_pass:false, - print(sconcat(string(ex))," gave ",string(ev(ex,nouns))," not ",string(r)) - )$ - - /* Display the results */ - UTD(ex,r):= block( - if ev(ex,nouns)#r then ( - no_fails:ev(no_fails+1,simp), - all_pass:false, - outcome:" FAILED" - ) - else - outcome:" PASSED", - print(sconcat(string(ex))," gave ",string(ev(ex,nouns))," Expecting ",string(r),outcome) - )$ no_fails:0$ all_pass:true$ ! simp:true$ print("simp is ",simp); ! load("unittests.mac"); ! simp:false$ print("simp is ",simp); ! load("unittests.mac"); - if all_pass then - (print("All tests passed"),true) - else - (print("Number of tests which failed: "),print(string(no_fails)),false)$ --- 5,26 ---- /* NOTE: we need to run tests with simp:false and simp:true */ no_fails:0$ all_pass:true$ ! simp:true$ ! STT:batch("rtest_assessment_simptrue.mac", test); ! STB:batch("rtest_assessment_simpboth.mac", test); ! ! simp:false$ ! SFF:batch("rtest_assessment_simpfalse.mac", test); ! SFB:batch("rtest_assessment_simpboth.mac", test); ! ! print("************ simp is true"); ! print(STT); ! print(STB); ! ! print("************ simp is false."); ! print(SFF); ! print(SFB); --- NEW FILE: rtest_assessment_simpfalse.mac --- factorp(x); true$ factorp(2); true$ factorp(4); false$ factorp(2^2); true$ factorp(2^2*x^3); true$ factorp(x^2); true$ factorp(y^2*x^2); true$ factorp((y*x)^2); true$ factorp((x-1)*(1+x)); true$ factorp((x-1)^2); true$ factorp((1-x)^2); true$ factorp(2*(x-1)); true$ factorp(2*x-1); true$ factorp(x^2-1); false$ factorp(1+x^2); true$ factorp((x-1)*(1+x)); true$ factorp((x-%i)*(%i+x)); true$ factorp(4*(x-1/2)^2); false$ commonfaclist([12,15]); 3$ commonfaclist([12,15,60,9]); 3$ commonfaclist([x^2-1,x^3-1]); x-1$ commonfaclist([x = 6,8]); 1$ factorlist(15); [3,5]$ factorlist(x^3-1); [x-1,1+x+x^2]$ lowesttermsp(x); true$ lowesttermsp(0.5); true$ lowesttermsp(1/2); true$ lowesttermsp((-1)/2); true$ lowesttermsp(1/(-2)); true$ lowesttermsp((-3)/6); false$ lowesttermsp((-x)/x^2); false$ lowesttermsp(15/3); false$ lowesttermsp(3/15); false$ lowesttermsp((x-1)/(x^2-1)); false$ lowesttermsp(x/(x^2-1)); true$ lowesttermsp((2+x)/(x^2-1)); true$ all_lowest_termsex(x); true$ all_lowest_termsex(0.5); true$ all_lowest_termsex(1/2); true$ all_lowest_termsex(2/4); false$ all_lowest_termsex(15/3); false$ all_lowest_termsex(0.3*x^2+3/15); false$ all_lowest_termsex(x/(x^3+x)); true$ list_expression_numbers(0.3*x+1/2); [1/2,0.3]$ exdowncase(X-x); x-x$ StackDISP(-(x-1),""); "-\\left(x-1\\right)"$ --- NEW FILE: rtest_assessment_simpboth.mac --- decimalplaces(1.123456789,3); 1.123$ decimalplaces(1.123456789,8); 1.12345679$ decimalplaces(1.1292,2); 1.13$ decimalplaces(%pi,5); 3.14159$ decimalplaces(%pi,4); 3.1416$ significantfigures(11292,2); 11000$ significantfigures(11292,3); 11300$ significantfigures(1.1292,3); 1.13$ significantfigures(0.011292,3); 0.0113$ significantfigures(0.09999,3); 0.1$ scientific_notation(1.123); 1.123$ scientific_notation(1123); 1123.0$ all_listp(real_numberp,[1,exp(1)^(%i*%pi),sqrt(2)+1,sin(1)]); true$ any_listp(real_numberp,[%i,%i+1,3+x,sqrt(-3)+1]); false$ expandp((x-1)*(1+x)); false$ expandp(2*(x-1)); false$ expandp(2*x-1); true$ expandp(x-1); true$ expandp((p-1)*(1+p)); false$ expandp(2*(p-1)); false$ expandp(3*y+6*p); true$ stack_ineqprepare(x>1); x-1>0$ list_expression_numbers(x); []$ list_expression_numbers(%pi); []$ list_expression_numbers(1+x); [1]$ list_expression_numbers(1/2+x); [1/2]$ list_expression_numbers(4/2+x); [4/2]$ list_expression_numbers(1/sin(2*x)); [1,2]$ filter(floatnump,0.5); false$ filter(floatnump,[0.5]); [0.5]$ filter(floatnump,[1,0.5]); [0.5]$ anyfloatex(0.5); true$ anyfloatex(x); false$ anyfloatex(1+x); false$ anyfloatex(0.5*x); true$ anyfloatex(sin(x*0.2)); true$ irred_Q(0,x); [true,""]$ irred_Q(x,x); [true,""]$ irred_Q(1+x,x); [true,""]$ irred_Q(1-x,x); [true,""]$ irred_Q(2-3*x,x); [true,""]$ irred_Q(2*x-2,x); [false,"stack_trans('irred_Q_commonint'); "]$ irred_Q(t+t*x,x); [false,""]$ irred_Q(3*x^2,x); [true,""]$ irred_Q(4*x^2,x); [true,"stack_trans('irred_Q_optional_fac' , !quot!$4\\,x^2$!quot! ); "]$ irred_Q(x^2-4,x); [false,""]$ irred_Q(x^2-2,x); [true,""]$ irred_Q(n+n^2,n); [false,""]$ irred_Q(n*(1+n),n); [false,""]$ irred_Q(n^3-1,n); [false,""]$ irred_Q(0.5+x,x); [true,""]$ irred_Q(2-3*x+x^2,x); [false,""]$ irred_Q(9-3*x+3*x^5,x); [false,"stack_trans('irred_Q_commonint'); "]$ irred_Q(1+x^2+x^5,x); [true,""]$ continuousp(x^2,x,1); true$ continuousp(abs(x),x,1); true$ continuousp(abs(x),x,0); true$ continuousp(sgn(x),x,0); false$ continuousp(sin(1/x),x,0); false$ continuousp(x*sin(1/x),x,0); true$ diffp(x^2,x,1); true$ diffp(abs(x),x,1); true$ diffp(abs(x),x,0); false$ diffp(sgn(x),x,0); false$ diffp(sin(1/x),x,0); false$ diffp(x^2*sin(1/x),x,0); false$ diffp(x^3*sin(1/x),x,0); true$ listsoverlap([1,2],[2,3]); true$ listsoverlap([8,9],[2,3]); false$ listscontain([1,2],[2,3],1); false$ listscontain([8,9],[2,3],1); false$ listscontain([1,2],[1,3],1); true$ subst_int_const(x^4/4+c*x+x = %c9,k); x^4/4+c*x+x = k$ subst_int_const(x^4/4+c*x+x = %c9,v); x^4/4+c*x+x = v$ subst_int_const(x^2,k); x^2$ subst_int_const(c*x^4/4+c^2*x/2+c*x = %c9*c+%c10,[v]); c*x^4/4+c^2*x/2+c*x = %c9*c+v$ subst_int_const(c*x^4/4+c^2*x/2+c*x = %c9*c+%c10,[k1,k2]); c*x^4/4+c^2*x/2+c*x = k1+c*k2$ subst_int_const(c*x^4/4+c^2*x/2+c*x = %c9*c+%c10,[k1,k2,k3]); c*x^4/4+c^2*x/2+c*x = k1+c*k2$ subst_equiv(y+x^2,1+a^2); []$ subst_equiv(1-2*x+x^2,(X-1)^2); [x = X]$ subst_equiv(y+x^2,b+a^2); [x = a,y = b]$ subst_equiv(y+x^2,b+a^2); [x = a,y = b]$ subst_equiv(y/z+x^2,c/b+a^2); [x = a,y = c,z = b]$ subst_equiv(y/z+x^2,z/x+y^2); [x = y,y = z,z = x]$ subst_equiv(y+x^2,x^2+y^2); []$ subst_equiv(u^6+w^5+v^4+z^3+y^2+x,f+g^2+d^3+c^4+b^5+a^6); false$ subst_equiv(w+u+v+y+x^2,w+v+y+b+a^2); [u = b,x = a]$ exdowncase(1+X+X^2); 1+x+x^2$ exdowncase(%pi); %pi$ stack_assignmentp(x = 1); true$ stack_assignmentp(x = sqrt(2)); true$ stack_assignmentp(3 = 1); false$ stack_assignmentp(d = v*t); false$ stack_assignmentp(1 = x); false$ stack_op(1); ""$ stack_op(x); ""$ stack_op(%pi); ""$ stack_op(z+3); "+"$ stack_op(3*z); "*"$ stack_op(3^z); "^"$ stack_op(3/z); "/"$ stack_op(sin(3*z)); "sin"$ stack_op((-1)/(1+x^2)); "/"$ stack_op(1-x); "+"$ stack_op(x-1); "+"$ stack_op(-(x-1)); "+"$ stack_op(-1/(1+x^2)); "/"$ stack_op(-2*x); "*"$ StackDISP(a/b,""); "\\frac{a}{b}"$ StackDISP(-27,""); "-27"$ StackDISP(-sin(x^2),""); "-\\sin \\left( x^2 \\right)"$ StackDISP(asin(x),""); "\\sin^{-1} \\left( x \\right)"$ StackDISP(log(x),""); "\\ln \\left( x \\right)"$ strip_int_const(k+x,x); x$ strip_int_const(k+1+x,x); 1+x$ strip_int_const(k^2+(x-1)^2,x); (x-1)^2$ strip_int_const(c+(t-1)^4/4,t); (t-1)^4/4$ --- NEW FILE: rtest_assessment_simptrue.mac --- exdowncase(X-x); 0$ list_expression_numbers(0.3*x+1/2); [0.3,1/2]$ StackDISP(-(x-1),""); "1-x"$ |
From: Simon H. <sim...@us...> - 2010-12-01 18:21:40
|
Update of /cvsroot/stack/stack-dev/lib/ui In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv22401/lib/ui Modified Files: Tag: item_state_separation DisplayItem.php Log Message: Ongoing debugging Index: DisplayItem.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/ui/DisplayItem.php,v retrieving revision 1.91.2.4.2.6 retrieving revision 1.91.2.4.2.7 diff -C2 -d -r1.91.2.4.2.6 -r1.91.2.4.2.7 *** DisplayItem.php 30 Nov 2010 10:34:33 -0000 1.91.2.4.2.6 --- DisplayItem.php 1 Dec 2010 18:21:32 -0000 1.91.2.4.2.7 *************** *** 212,217 **** $this->seed = $seed; } ! //$this->itemOpts = new ItemOption(); // but will load the options stored with the question - check line a little below ! $this->itemOpts = NULL; $this->item = new InstantiatedItem($questionId, $this->itemOpts, $this->seed, $userId); --- 212,218 ---- $this->seed = $seed; } ! $this->itemOpts = new ItemOption(); // but will load the options stored with the question - check line a little below ! //$this->itemOpts = NULL; ! //echo "jellyfish:<pre>";var_dump(ItemOption::$options);//$this->itemOpts); $this->item = new InstantiatedItem($questionId, $this->itemOpts, $this->seed, $userId); *************** *** 350,354 **** } } ! else { //check if worked solution has been requested --- 351,355 ---- } } ! else // posted != NULL { //check if worked solution has been requested *************** *** 365,369 **** // update student answers, add attempt, update answerboxes. $this->updateSAnswer($posted, $processRequest); ! $xhtml .= $this->cachedQuestionStem; --- 366,370 ---- // update student answers, add attempt, update answerboxes. $this->updateSAnswer($posted, $processRequest); ! $xhtml .= $this->cachedQuestionStem; *************** *** 742,745 **** --- 743,748 ---- //for example the matrix input type needs to join multiple answers into one maxima command. + //echo "ipad:<pre>";var_dump($this->itemOpts); + //echo "<pre>";print_r($posted); $posted = $this->filterInputs($posted); *************** *** 772,776 **** if($process == true) { ! //var_dump($implicitForbid); $this->studentAnswers->syntaxCheck($this->itemOpts, $this->item->getQuestionPartsByStudentAnsKey(), $implicitForbid); $this->studentAnswers->scoreIfValid($this->item->getQuestionPartsByStudentAnsKey()); --- 775,779 ---- if($process == true) { ! //var_dump($implicitForbid); $this->studentAnswers->syntaxCheck($this->itemOpts, $this->item->getQuestionPartsByStudentAnsKey(), $implicitForbid); $this->studentAnswers->scoreIfValid($this->item->getQuestionPartsByStudentAnsKey()); |
From: Simon H. <sim...@us...> - 2010-12-01 18:21:40
|
Update of /cvsroot/stack/stack-dev/lib/items In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv22401/lib/items Modified Files: Tag: item_state_separation StudentAns.php ItemOption.php Log Message: Ongoing debugging Index: ItemOption.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/items/ItemOption.php,v retrieving revision 1.19.8.3 retrieving revision 1.19.8.4 diff -C2 -d -r1.19.8.3 -r1.19.8.4 *** ItemOption.php 28 Nov 2010 16:15:45 -0000 1.19.8.3 --- ItemOption.php 1 Dec 2010 18:21:32 -0000 1.19.8.4 *************** *** 107,116 **** $this->addOption('OptWorkedSol','list','true',array('true' => get_string('stack_True','stack',''),'false' => get_string('stack_False', 'stack','')),'',''); } ! public function __clone() { // obsolete? } ! /** * Validates every option. --- 107,117 ---- $this->addOption('OptWorkedSol','list','true',array('true' => get_string('stack_True','stack',''),'false' => get_string('stack_False', 'stack','')),'',''); } ! /* public function __clone() { // obsolete? + echo "6:17pm:";var_dump(self::$options); } ! */ /** * Validates every option. *************** *** 148,154 **** * @access public */ ! public function addOption($name, $type, $default, $value ='', $casKey = NULL, $casType = NULL) { ! $tmp = new StackOption($type, $default, $value, $casKey, $casType); $valid = $tmp->validate(); --- 149,155 ---- * @access public */ ! public function addOption($name, $type, $default, $values = NULL, $casKey = NULL, $casType = NULL) { ! $tmp = new StackOption($type, $default, $values, $casKey, $casType); $valid = $tmp->validate(); *************** *** 156,160 **** { self::$options[$name] = $tmp; // new option for ItemOption ! $this->selected[$name] = $value; // and value set for the instance } else --- 157,161 ---- { self::$options[$name] = $tmp; // new option for ItemOption ! $this->selected[$name] = $default; // and value set for the instance } else *************** *** 366,370 **** public function setSelected($name, $value) { ! if(array_key_exists($name, $this->selected)) // we have the option { $this->selected[$name] = $value; --- 367,372 ---- public function setSelected($name, $value) { ! echo "6pm:";var_dump(self::$options); ! if(array_key_exists($name, self::$options)) // we have the option { $this->selected[$name] = $value; *************** *** 401,410 **** public function getWidget($name, $size=NULL) { ! if(array_key_exists($name, $this->options)) ! { // rather kludgy way of setting Option up with correct selection $option = clone self::$options[$name]; $option->setSelected($this->selected[$name]); ! return $options->editWidget($name, $size); } else --- 403,411 ---- public function getWidget($name, $size=NULL) { ! if(array_key_exists($name, self::$options)) { // rather kludgy way of setting Option up with correct selection $option = clone self::$options[$name]; $option->setSelected($this->selected[$name]); ! return $option->editWidget($name, $size); } else *************** *** 446,467 **** */ public function copyFrom($src) { ! if(!empty($src->options)) ! { ! foreach($src->options as $optName => $option) ! { ! // check src option even exists in this ! if(array_key_exists($optName, $this->options)) { ! ! $selection = $src->selection[$optName]; ! ! // copy value over, involves checks. ! self::$options[$optName]->setSelected($src->options[$optName]->getSelected()); ! $this->selected[$optName] = $selection; ! ! } else { ! self::$errorLog->addError('Attempted to copy selection of '.$optName.' which does not exist in current item.'); ! } ! } ! } } --- 447,456 ---- */ public function copyFrom($src) { ! // assuming default options are static, we just need to copy over selection ! if(!empty($src->selected)) { ! foreach($src->selected as $key => $val) { ! $this->selected[$key] = $val; ! } ! } } Index: StudentAns.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/items/StudentAns.php,v retrieving revision 1.42.6.2.2.1 retrieving revision 1.42.6.2.2.2 diff -C2 -d -r1.42.6.2.2.1 -r1.42.6.2.2.2 *** StudentAns.php 9 Nov 2010 16:51:37 -0000 1.42.6.2.2.1 --- StudentAns.php 1 Dec 2010 18:21:32 -0000 1.42.6.2.2.2 *************** *** 217,220 **** --- 217,221 ---- { $itemOptions = clone $itemOpts; + echo "snow:<pre>";print_r($itemOpts); $toReturn = true; foreach($this->studentAnswers as $label => $sAns) |
From: Simon H. <sim...@us...> - 2010-12-01 18:21:40
|
Update of /cvsroot/stack/stack-dev/lib/database In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv22401/lib/database Modified Files: Tag: item_state_separation StackDBCache.php Log Message: Ongoing debugging Index: StackDBCache.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/StackDBCache.php,v retrieving revision 1.12.6.2.2.9 retrieving revision 1.12.6.2.2.10 diff -C2 -d -r1.12.6.2.2.9 -r1.12.6.2.2.10 *** StackDBCache.php 30 Nov 2010 10:34:34 -0000 1.12.6.2.2.9 --- StackDBCache.php 1 Dec 2010 18:21:32 -0000 1.12.6.2.2.10 *************** *** 163,167 **** $instance = new DisplayItem($userID, $qID, false, $seed); // non user-specific starter question ! $instance->reduceToState(); $logger = new Logger("STATIC deploy cache"); $logger->debug("state in deployCache: ".print_r($instance, true)); --- 163,167 ---- $instance = new DisplayItem($userID, $qID, false, $seed); // non user-specific starter question ! //$instance->reduceToState(); done below $logger = new Logger("STATIC deploy cache"); $logger->debug("state in deployCache: ".print_r($instance, true)); |
From: Simon H. <sim...@us...> - 2010-12-01 18:21:40
|
Update of /cvsroot/stack/stack-dev/lib/ui/inputTypes In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv22401/lib/ui/inputTypes Modified Files: Tag: item_state_separation InputTypeController.php Log Message: Ongoing debugging Index: InputTypeController.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/ui/inputTypes/InputTypeController.php,v retrieving revision 1.12.8.2 retrieving revision 1.12.8.3 diff -C2 -d -r1.12.8.2 -r1.12.8.3 *** InputTypeController.php 16 Nov 2010 19:04:31 -0000 1.12.8.2 --- InputTypeController.php 1 Dec 2010 18:21:32 -0000 1.12.8.3 *************** *** 173,177 **** //display a drop down list $widget = '<select name="'.$prefix.'">'; ! foreach(InputTypeController::availableTypes as $key => $val) { //if indexed array of values, use val for both display and return --- 173,177 ---- //display a drop down list $widget = '<select name="'.$prefix.'">'; ! foreach(InputTypeController::$availableTypes as $key => $val) { //if indexed array of values, use val for both display and return |
Update of /cvsroot/stack/stack-dev/maxima In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv12303/maxima Modified Files: Tag: grobner stackmaxima.mac unittests_load.mac Added Files: Tag: grobner rtest_assessment_simpboth.mac rtest_assessment_simpfalse.mac rtest_assessment_simptrue.mac Log Message: Changes to the unit testing scheme to link into Maxima's own testing system. Index: unittests_load.mac =================================================================== RCS file: /cvsroot/stack/stack-dev/maxima/unittests_load.mac,v retrieving revision 1.4 retrieving revision 1.4.16.1 diff -C2 -d -r1.4 -r1.4.16.1 *** unittests_load.mac 11 Dec 2008 12:15:02 -0000 1.4 --- unittests_load.mac 1 Dec 2010 13:27:23 -0000 1.4.16.1 *************** *** 5,36 **** /* NOTE: we need to run tests with simp:false and simp:true */ - UT(ex,r):= if not(equal(ev(ex,nouns),r)) then ( - no_fails:ev(no_fails+1,simp), - all_pass:false, - print(sconcat(string(ex))," gave ",string(ev(ex,nouns))," not ",string(r)) - )$ - - /* Display the results */ - UTD(ex,r):= block( - if ev(ex,nouns)#r then ( - no_fails:ev(no_fails+1,simp), - all_pass:false, - outcome:" FAILED" - ) - else - outcome:" PASSED", - print(sconcat(string(ex))," gave ",string(ev(ex,nouns))," Expecting ",string(r),outcome) - )$ no_fails:0$ all_pass:true$ ! simp:true$ print("simp is ",simp); ! load("unittests.mac"); ! simp:false$ print("simp is ",simp); ! load("unittests.mac"); - if all_pass then - (print("All tests passed"),true) - else - (print("Number of tests which failed: "),print(string(no_fails)),false)$ --- 5,26 ---- /* NOTE: we need to run tests with simp:false and simp:true */ no_fails:0$ all_pass:true$ ! simp:true$ ! STT:batch("rtest_assessment_simptrue.mac", test); ! STB:batch("rtest_assessment_simpboth.mac", test); ! ! simp:false$ ! SFF:batch("rtest_assessment_simpfalse.mac", test); ! SFB:batch("rtest_assessment_simpboth.mac", test); ! ! print("************ simp is true"); ! print(STT); ! print(STB); ! ! print("************ simp is false."); ! print(SFF); ! print(SFB); --- NEW FILE: rtest_assessment_simpboth.mac --- decimalplaces(1.123456789,3); 1.123$ decimalplaces(1.123456789,8); 1.12345679$ decimalplaces(1.1292,2); 1.13$ decimalplaces(%pi,5); 3.14159$ decimalplaces(%pi,4); 3.1416$ significantfigures(11292,2); 11000$ significantfigures(11292,3); 11300$ significantfigures(1.1292,3); 1.13$ significantfigures(0.011292,3); 0.0113$ significantfigures(0.09999,3); 0.1$ scientific_notation(1.123); 1.123$ scientific_notation(1123); 1123.0$ all_listp(real_numberp,[1,exp(1)^(%i*%pi),sqrt(2)+1,sin(1)]); true$ any_listp(real_numberp,[%i,%i+1,3+x,sqrt(-3)+1]); false$ expandp((x-1)*(1+x)); false$ expandp(2*(x-1)); false$ expandp(2*x-1); true$ expandp(x-1); true$ expandp((p-1)*(1+p)); false$ expandp(2*(p-1)); false$ expandp(3*y+6*p); true$ stack_ineqprepare(x>1); x-1>0$ list_expression_numbers(x); []$ list_expression_numbers(%pi); []$ list_expression_numbers(1+x); [1]$ list_expression_numbers(1/2+x); [1/2]$ list_expression_numbers(4/2+x); [4/2]$ list_expression_numbers(1/sin(2*x)); [1,2]$ filter(floatnump,0.5); false$ filter(floatnump,[0.5]); [0.5]$ filter(floatnump,[1,0.5]); [0.5]$ anyfloatex(0.5); true$ anyfloatex(x); false$ anyfloatex(1+x); false$ anyfloatex(0.5*x); true$ anyfloatex(sin(x*0.2)); true$ irred_Q(0,x); [true,""]$ irred_Q(x,x); [true,""]$ irred_Q(1+x,x); [true,""]$ irred_Q(1-x,x); [true,""]$ irred_Q(2-3*x,x); [true,""]$ irred_Q(2*x-2,x); [false,"stack_trans('irred_Q_commonint'); "]$ irred_Q(t+t*x,x); [false,""]$ irred_Q(3*x^2,x); [true,""]$ irred_Q(4*x^2,x); [true,"stack_trans('irred_Q_optional_fac' , !quot!$4\\,x^2$!quot! ); "]$ irred_Q(x^2-4,x); [false,""]$ irred_Q(x^2-2,x); [true,""]$ irred_Q(n+n^2,n); [false,""]$ irred_Q(n*(1+n),n); [false,""]$ irred_Q(n^3-1,n); [false,""]$ irred_Q(0.5+x,x); [true,""]$ irred_Q(2-3*x+x^2,x); [false,""]$ irred_Q(9-3*x+3*x^5,x); [false,"stack_trans('irred_Q_commonint'); "]$ irred_Q(1+x^2+x^5,x); [true,""]$ continuousp(x^2,x,1); true$ continuousp(abs(x),x,1); true$ continuousp(abs(x),x,0); true$ continuousp(sgn(x),x,0); false$ continuousp(sin(1/x),x,0); false$ continuousp(x*sin(1/x),x,0); true$ diffp(x^2,x,1); true$ diffp(abs(x),x,1); true$ diffp(abs(x),x,0); false$ diffp(sgn(x),x,0); false$ diffp(sin(1/x),x,0); false$ diffp(x^2*sin(1/x),x,0); false$ diffp(x^3*sin(1/x),x,0); true$ listsoverlap([1,2],[2,3]); true$ listsoverlap([8,9],[2,3]); false$ listscontain([1,2],[2,3],1); false$ listscontain([8,9],[2,3],1); false$ listscontain([1,2],[1,3],1); true$ subst_int_const(x^4/4+c*x+x = %c9,k); x^4/4+c*x+x = k$ subst_int_const(x^4/4+c*x+x = %c9,v); x^4/4+c*x+x = v$ subst_int_const(x^2,k); x^2$ subst_int_const(c*x^4/4+c^2*x/2+c*x = %c9*c+%c10,[v]); c*x^4/4+c^2*x/2+c*x = %c9*c+v$ subst_int_const(c*x^4/4+c^2*x/2+c*x = %c9*c+%c10,[k1,k2]); c*x^4/4+c^2*x/2+c*x = k1+c*k2$ subst_int_const(c*x^4/4+c^2*x/2+c*x = %c9*c+%c10,[k1,k2,k3]); c*x^4/4+c^2*x/2+c*x = k1+c*k2$ subst_equiv(y+x^2,1+a^2); []$ subst_equiv(1-2*x+x^2,(X-1)^2); [x = X]$ subst_equiv(y+x^2,b+a^2); [x = a,y = b]$ subst_equiv(y+x^2,b+a^2); [x = a,y = b]$ subst_equiv(y/z+x^2,c/b+a^2); [x = a,y = c,z = b]$ subst_equiv(y/z+x^2,z/x+y^2); [x = y,y = z,z = x]$ subst_equiv(y+x^2,x^2+y^2); []$ subst_equiv(u^6+w^5+v^4+z^3+y^2+x,f+g^2+d^3+c^4+b^5+a^6); false$ subst_equiv(w+u+v+y+x^2,w+v+y+b+a^2); [u = b,x = a]$ exdowncase(1+X+X^2); 1+x+x^2$ exdowncase(%pi); %pi$ stack_assignmentp(x = 1); true$ stack_assignmentp(x = sqrt(2)); true$ stack_assignmentp(3 = 1); false$ stack_assignmentp(d = v*t); false$ stack_assignmentp(1 = x); false$ stack_op(1); ""$ stack_op(x); ""$ stack_op(%pi); ""$ stack_op(z+3); "+"$ stack_op(3*z); "*"$ stack_op(3^z); "^"$ stack_op(3/z); "/"$ stack_op(sin(3*z)); "sin"$ stack_op((-1)/(1+x^2)); "/"$ stack_op(1-x); "+"$ stack_op(x-1); "+"$ stack_op(-(x-1)); "+"$ stack_op(-1/(1+x^2)); "/"$ stack_op(-2*x); "*"$ StackDISP(a/b,""); "\\frac{a}{b}"$ StackDISP(-27,""); "-27"$ StackDISP(-sin(x^2),""); "-\\sin \\left( x^2 \\right)"$ StackDISP(asin(x),""); "\\sin^{-1} \\left( x \\right)"$ StackDISP(log(x),""); "\\ln \\left( x \\right)"$ strip_int_const(k+x,x); x$ strip_int_const(k+1+x,x); 1+x$ strip_int_const(k^2+(x-1)^2,x); (x-1)^2$ strip_int_const(c+(t-1)^4/4,t); (t-1)^4/4$ --- NEW FILE: rtest_assessment_simptrue.mac --- exdowncase(X-x); 0$ list_expression_numbers(0.3*x+1/2); [0.3,1/2]$ StackDISP(-(x-1),""); "1-x"$ --- NEW FILE: rtest_assessment_simpfalse.mac --- factorp(x); true$ factorp(2); true$ factorp(4); false$ factorp(2^2); true$ factorp(2^2*x^3); true$ factorp(x^2); true$ factorp(y^2*x^2); true$ factorp((y*x)^2); true$ factorp((x-1)*(1+x)); true$ factorp((x-1)^2); true$ factorp((1-x)^2); true$ factorp(2*(x-1)); true$ factorp(2*x-1); true$ factorp(x^2-1); false$ factorp(1+x^2); true$ factorp((x-1)*(1+x)); true$ factorp((x-%i)*(%i+x)); true$ factorp(4*(x-1/2)^2); false$ commonfaclist([12,15]); 3$ commonfaclist([12,15,60,9]); 3$ commonfaclist([x^2-1,x^3-1]); x-1$ commonfaclist([x = 6,8]); 1$ factorlist(15); [3,5]$ factorlist(x^3-1); [x-1,1+x+x^2]$ lowesttermsp(x); true$ lowesttermsp(0.5); true$ lowesttermsp(1/2); true$ lowesttermsp((-1)/2); true$ lowesttermsp(1/(-2)); true$ lowesttermsp((-3)/6); false$ lowesttermsp((-x)/x^2); false$ lowesttermsp(15/3); false$ lowesttermsp(3/15); false$ lowesttermsp((x-1)/(x^2-1)); false$ lowesttermsp(x/(x^2-1)); true$ lowesttermsp((2+x)/(x^2-1)); true$ all_lowest_termsex(x); true$ all_lowest_termsex(0.5); true$ all_lowest_termsex(1/2); true$ all_lowest_termsex(2/4); false$ all_lowest_termsex(15/3); false$ all_lowest_termsex(0.3*x^2+3/15); false$ all_lowest_termsex(x/(x^3+x)); true$ list_expression_numbers(0.3*x+1/2); [1/2,0.3]$ exdowncase(X-x); x-x$ StackDISP(-(x-1),""); "-\\left(x-1\\right)"$ Index: stackmaxima.mac =================================================================== RCS file: /cvsroot/stack/stack-dev/maxima/stackmaxima.mac,v retrieving revision 1.84.2.6 retrieving revision 1.84.2.7 diff -C2 -d -r1.84.2.6 -r1.84.2.7 *** stackmaxima.mac 18 Nov 2010 09:53:52 -0000 1.84.2.6 --- stackmaxima.mac 1 Dec 2010 13:27:23 -0000 1.84.2.7 *************** *** 1847,1851 **** subst_int_const(ex,v):=block([lv,li,ls], lv:listofvars(ex), ! li:sublist_indices(lv, lambda([ex],is(smismatch("integrationconstant",string(ex))>19)) ), if emptyp(li) then return(ex), /* If we have only one variable v, then use this */ --- 1847,1851 ---- subst_int_const(ex,v):=block([lv,li,ls], lv:listofvars(ex), ! li:sublist_indices(lv, lambda([ex],is(smismatch("integrationconstant",string(ex))>19) or is(smismatch("%c",string(ex))>2)) ), if emptyp(li) then return(ex), /* If we have only one variable v, then use this */ *************** *** 1856,1864 **** /* This function strips off any trailing constant of integration from an expression, which is not a number */ ! strip_int_const(ex,v):=block([ex2], ex2:ex, ! if not(atom(ex)) then ! if op(ex)="+" then ! ex2:apply("+",filter(lambda([ex2],not(freeof(v,ex2)) or simp_numberp(ex2)),args(ex))), return(ex2))$ --- 1856,1865 ---- /* This function strips off any trailing constant of integration from an expression, which is not a number */ ! strip_int_const(ex,v):=block([ex2,fargs], ex2:ex, ! if atom(ex) then return(ex), ! if op(ex)="+" then ! (fargs:filter(lambda([ex2],not(freeof(v,ex2)) or simp_numberp(ex2)),args(ex)), ! if length(fargs)=1 then ex2:fargs[1] else ex2:apply("+",fargs)), return(ex2))$ |
From: Simon H. <sim...@us...> - 2010-12-01 12:10:06
|
Update of /cvsroot/stack/stack-dev/lib/database In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv30184/lib/database Modified Files: StackDBReporting.php Log Message: DB query tweak to return only versions which are latest in line. Index: StackDBReporting.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/StackDBReporting.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** StackDBReporting.php 29 Nov 2010 15:40:05 -0000 1.31 --- StackDBReporting.php 1 Dec 2010 12:09:57 -0000 1.32 *************** *** 51,59 **** $sql = 'SELECT questionID, questionName, questionDescription FROM stackquestion, question_lines ! WHERE line = question_lines.id'; if (isset($ids)) $sql .= " AND questionID IN ($ids)"; ! $sql .= ' GROUP BY line'; $this->connect(); --- 51,59 ---- $sql = 'SELECT questionID, questionName, questionDescription FROM stackquestion, question_lines ! WHERE questionID = latestVersion'; if (isset($ids)) $sql .= " AND questionID IN ($ids)"; ! //$sql .= ' GROUP BY line'; $this->connect(); |
From: Simon H. <sim...@us...> - 2010-12-01 12:05:23
|
Update of /cvsroot/stack/stack-dev/lib/reporting In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv29333/lib/reporting Modified Files: StackReport.php Log Message: Fixed error from no attempts. Index: StackReport.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/reporting/StackReport.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** StackReport.php 29 Nov 2010 15:40:04 -0000 1.26 --- StackReport.php 1 Dec 2010 12:05:14 -0000 1.27 *************** *** 112,127 **** $generalAttemptsData = $generalAttemptsGraph = array(); ! foreach ($attempts as $attempt) { ! $time = $attempt['timeSeconds']; ! // This data is used to lookup detailed information about graph entries ! $generalAttemptsData[strval($time)] = array( ! $attempt['runningTotal'], // effectively the score ! $attempt['question'], ! $attempt['student'] ! ); ! // The data that is used to actually render the graph ! $generalAttemptsGraph[] = array( $time * 1000, (float) $attempt['runningTotal'] ); // JS likes milliseconds } --- 112,129 ---- $generalAttemptsData = $generalAttemptsGraph = array(); ! if(!empty($attempts)) { ! foreach ($attempts as $attempt) { ! $time = $attempt['timeSeconds']; ! // This data is used to lookup detailed information about graph entries ! $generalAttemptsData[strval($time)] = array( ! $attempt['runningTotal'], // effectively the score ! $attempt['question'], ! $attempt['student'] ! ); ! // The data that is used to actually render the graph ! $generalAttemptsGraph[] = array( $time * 1000, (float) $attempt['runningTotal'] ); // JS likes milliseconds ! } } |
From: Tim H. <tj...@us...> - 2010-11-30 15:45:46
|
Update of /cvsroot/stack/stack-dev/lib/ui In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv12186/lib/ui Modified Files: questionBank.php Log Message: Fix a whole bunch of notices encountered while importing questions. Index: questionBank.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/ui/questionBank.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** questionBank.php 30 Sep 2010 16:56:15 -0000 1.7 --- questionBank.php 30 Nov 2010 15:45:35 -0000 1.8 *************** *** 189,194 **** $filter_name = $filter['name']; $filter_des = $filter['description']; ! $filter_kw = $filter['keywords']; ! $filter_kw_I = $filter['invertKeywords']; $q_name = $question['questionName']; $q_des = $question['questionDescription']; --- 189,198 ---- $filter_name = $filter['name']; $filter_des = $filter['description']; ! $filter_kw = $filter['keywords']; ! if (array_key_exists('invertKeywords', $filter)) { ! $filter_kw_I = $filter['invertKeywords']; ! } else { ! $filter_kw_I = false; ! } $q_name = $question['questionName']; $q_des = $question['questionDescription']; |
From: Tim H. <tj...@us...> - 2010-11-30 15:45:45
|
Update of /cvsroot/stack/stack-dev/lib/database In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv12186/lib/database Modified Files: StackDBItem.php MoodleDB.php Log Message: Fix a whole bunch of notices encountered while importing questions. Index: MoodleDB.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/MoodleDB.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** MoodleDB.php 12 Nov 2010 10:11:06 -0000 1.17 --- MoodleDB.php 30 Nov 2010 15:45:35 -0000 1.18 *************** *** 580,583 **** --- 580,584 ---- $this->query($sql); + $return = array(); $no = $this->noRows(); for($i =0; $i < $no; $i++) Index: StackDBItem.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/StackDBItem.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** StackDBItem.php 1 Nov 2010 18:18:29 -0000 1.38 --- StackDBItem.php 30 Nov 2010 15:45:35 -0000 1.39 *************** *** 622,626 **** $qList[$i]['published'] = $this->result($i,'published'); $qList[$i]['status'] = $this->result($i,'status'); ! $qList[$i]['nodeployed'] = $deployCount[$qList[$i]['id']];//TOO MANY QUERIES --> $dbc->countInstances($qList[$i]['id']); if(!isset($qList[$i]['nodeployed'])) $qList[$i]['nodeployed'] = 0; $i++; --- 622,630 ---- $qList[$i]['published'] = $this->result($i,'published'); $qList[$i]['status'] = $this->result($i,'status'); ! if (isset($deployCount[$qList[$i]['id']])) { ! $qList[$i]['nodeployed'] = $deployCount[$qList[$i]['id']];//TOO MANY QUERIES --> $dbc->countInstances($qList[$i]['id']); ! } else { ! $qList[$i]['nodeployed'] = 0; ! } if(!isset($qList[$i]['nodeployed'])) $qList[$i]['nodeployed'] = 0; $i++; |
From: Tim H. <tj...@us...> - 2010-11-30 15:45:43
|
Update of /cvsroot/stack/stack-dev/lib/XML In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv12186/lib/XML Modified Files: ImportStackTwoItem.php Log Message: Fix a whole bunch of notices encountered while importing questions. Index: ImportStackTwoItem.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/XML/ImportStackTwoItem.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** ImportStackTwoItem.php 30 Sep 2010 16:56:16 -0000 1.24 --- ImportStackTwoItem.php 30 Nov 2010 15:45:35 -0000 1.25 *************** *** 186,199 **** { $elem = $this->dom->getElementsByTagName($tag); - $node = $elem->item(0); - return $node->textContent; } else { $elem = $docElement->getElementsByTagName($tag); - $node = $elem->item(0); - return $node->textContent; } } --- 186,201 ---- { $elem = $this->dom->getElementsByTagName($tag); } else { $elem = $docElement->getElementsByTagName($tag); } + $node = $elem->item(0); + if ($node) { + return $node->textContent; + } else { + return null; + } } |
From: Tim H. <tj...@us...> - 2010-11-30 15:45:43
|
Update of /cvsroot/stack/stack-dev In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv12186 Modified Files: index.php Log Message: Fix a whole bunch of notices encountered while importing questions. Index: index.php =================================================================== RCS file: /cvsroot/stack/stack-dev/index.php,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** index.php 1 Oct 2010 15:02:54 -0000 1.44 --- index.php 30 Nov 2010 15:45:35 -0000 1.45 *************** *** 63,66 **** --- 63,67 ---- if(!empty($selected)) { + $msg = ''; $msg .= '<h3 class="section">'.get_string('FE_confirmDelete','stack').'</h3>'; $msg .= '<p>'.get_string('FE_deleteMsg','stack',count($selected)).'</p>'; *************** *** 245,253 **** // get question list ! $filter=array('order1'=>'','order2'=>'','order2'=>''); if (array_key_exists('bank_filter',$_POST)) { $filter['order1']=$_POST['bank_filter']['order1']; $filter['order2']=$_POST['bank_filter']['order2']; ! $filter['order3']=$_POST['bank_filter']['order3']; } --- 246,256 ---- // get question list ! $filter=array('order1'=>'','order2'=>'','order3'=>''); if (array_key_exists('bank_filter',$_POST)) { $filter['order1']=$_POST['bank_filter']['order1']; $filter['order2']=$_POST['bank_filter']['order2']; ! if (array_key_exists('order3', $_POST['bank_filter'])) { ! $filter['order3']=$_POST['bank_filter']['order3']; ! } } |
From: Simon H. <sim...@us...> - 2010-11-30 13:30:55
|
Update of /cvsroot/stack/stack-dev/sample_questions In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv10765/sample_questions Modified Files: test-venn.xml Log Message: Added mandatory question note. Other sample question may need similar completion. Index: test-venn.xml =================================================================== RCS file: /cvsroot/stack/stack-dev/sample_questions/test-venn.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test-venn.xml 8 Feb 2010 17:22:18 -0000 1.1 --- test-venn.xml 30 Nov 2010 13:30:45 -0000 1.2 *************** *** 6,8 **** What is the size of $B$? <br /> ! #ans# <IEfeedback>ans</IEfeedback></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals>a = 30 + rand(20); b = 40 + rand(50); anb = 5 + rand(20); aub = a+b-anb</rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></workedSolution><questionNote type="CasText"><castext></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionNote></questionCasValues><questionparts><questionpart><name>ans</name><inputType type="Meta"><selection>Algebraic Input</selection><default>Algebraic Input</default><values/></inputType><boxsize>5</boxsize><teachersAns type="CasString"><casString>b</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>ans</studentAnsKey><syntax type="Meta"><selection></selection><default></default><values/></syntax><stackoption><name>formalSyntax</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>forbidFloats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>insertStars</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>false</selected></stackoption><stackoption><name>sameType</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>lowestTerms</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_LowestTerms</casKey><casType>ex</casType><selected>true</selected></stackoption><inputTypesParameters/></questionpart></questionparts><PotentialResponseTrees/><MetaData><dc:Publisher stackname="lastUserEditor" type="Meta"><selection>2</selection><default></default><values/></dc:Publisher><dc:language stackname="language" type="Meta"><selection>en</selection><default>en</default><values><value key="en">en</value><value key="fr">fr</value><value key="nl">nl</value><value key="es">es</value><value key="unspecified">Unspecified</value></values></dc:language><dc:title stackname="questionName" type="Meta"><selection>test-venn</selection><default></default><values/></dc:title><dc:description stackname="questionDescription" type="Meta"><selection>Demonstrates embedding question variables inside img tags to access third-party graphics api.</selection><default></default><values/></dc:description><dc:publisher stackname="questionPublisher" type="Meta"><selection>http://localhost/stack-dev</selection><default>http://stack.bham.ac.uk/new-stack-dev</default><values/></dc:publisher><dc:format stackname="questionFormat" type="Meta"><selection>text/xml; charset="utf-8"</selection><default>text/xml; charset="utf-8"</default><values><value key="0">application</value><value key="1">audio</value><value key="2">image</value><value key="3">message</value><value key="4">model</value><value key="5">text</value><value key="6">video</value><value key="7">multipart</value></values></dc:format><lom:context stackname="questionLearningContext" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="PrimaryEducation">Primary Education</value><value key="SecondaryEducation">Secondary Education</value><value key="HigherEducation">Higher Education</value><value key="UniversityFirstCycle">University First Cycle</value><value key="UniversitySecondCycle">University Second Cycle</value><value key="UniversityPostGrade">University Post Grade</value><value key="TechnicalSchoolFirstCycle">Technical School First Cycle</value><value key="TechnicalSchoolSecondCycle">Technical School Second Cycle</value><value key="ProfessionalFormation">Professional Formation</value><value key="ContinuousFormation">Continuous Formation</value><value key="VocationalTraining">Vocational Training</value><value key="unspecified">Unspecified</value></values></lom:context><lom:difficulty stackname="questionDifficulty" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="VeryEasy">Very Easy</value><value key="Easy">Easy</value><value key="Medium">Medium</value><value key="Difficult">Difficult</value><value key="VeryDifficult">Very Difficult</value><value key="unspecified">Unspecified</value></values></lom:difficulty><questionCompetency type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Think">Think</value><value key="Argue">Argue</value><value key="Solve">Solve</value><value key="Represent">Represent</value><value key="Language">Language</value><value key="Communicate">Communicate</value><value key="Tools">Tools</value><value key="unspecified">Unspecified</value></values></questionCompetency><questionCompentencyLevel type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Elementary">Elementary</value><value key="SimpleConceptual">Simple conceptual</value><value key="Multi-step">Multi-step</value><value key="Complex">Complex</value><value key="unspecified">Unspecified</value></values></questionCompentencyLevel><lom:typicallearningtime stackname="questionTimeAllocated" type="Meta"><selection>00:00:00</selection><default>00:00:00</default><values/></lom:typicallearningtime><dc:rights stackname="questionRights" type="Meta"><selection>http://www.gnu.org/copyleft/gpl.html</selection><default>http://www.gnu.org/copyleft/gpl.html</default><values/></dc:rights><questionExerciseType type="Meta"><selection>AlgebraicExpression</selection><default>AlgebraicExpression</default><values><value key="AlgebraicExpression">Algebraic Expression</value><value key="MCQSingleAnswer">MCQ Single Answer</value><value key="MCQMultpleAnswer">MCQ Multiple Answer</value><value key="FillInBlank">Fill in blank</value><value key="Unspecified">Unspecified</value></values></questionExerciseType><dc:date stackname="questionDateLastEdited" type="Meta"><selection>2010-02-08 17:17:40</selection><default>2010-02-08 17:17:22</default><values/></dc:date><lom:status stackname="questionStatus" type="Meta"><selection>Draft</selection><default>Draft</default><values><value key="Draft">Draft</value><value key="Deployed">Deployed</value><value key="Buggy">Buggy</value></values></lom:status><published type="Meta"><selection>Unpublished</selection><default>Unpublished</default><values><value key="Unpublished">Unpublished</value><value key="Published">Published</value><value key="Private">Private</value></values></published><lom:keyword stackname="keywords" type="Meta"><selection>demo, test, venn, sets, size</selection><default>demo, test, venn, sets, size</default><values/></lom:keyword></MetaData><ItemOptions><stackoption><name>Display</name><type>list</type><default>LaTeX</default><values><value>LaTeX</value><value>MathML</value></values><casKey>OPT_OUTPUT</casKey><casType>string</casType><selected>LaTeX</selected></stackoption><stackoption><name>MultiplicationSign</name><type>list</type><default>dot</default><values><value>(none)</value><value>dot</value><value>cross</value></values><casKey>make_multsgn</casKey><casType>fun</casType><selected>dot</selected></stackoption><stackoption><name>ComplexNo</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>make_complexI</casKey><casType>fun</casType><selected>true</selected></stackoption><stackoption><name>Floats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>SqrtSign</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>sqrtdispflag</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>Simplify</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>simp</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>MarkModMethod</name><type>list</type><default>Penalty</default><values><value>Penalty</value><value>First Answer</value><value>Last Answer</value></values><casKey></casKey><casType></casType><selected>Penalty</selected></stackoption><stackoption><name>AssumePos</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey>assume_pos</casKey><casType>ex</casType><selected>false</selected></stackoption><stackoption><name>TeacherEmail</name><type>string</type><default></default><casKey></casKey><casType></casType><selected></selected></stackoption><stackoption><name>Feedback</name><type>list</type><default>TGS</default><values><value>TGS</value><value>TG</value><value>GS</value><value>T</value><value>G</value><value>S</value><value>none</value></values><casKey></casKey><casType></casType><selected>TGS</selected></stackoption><stackoption><name>FeedbackGenericCorrect</name><type>html</type><default><span class='correct'>Correct answer, well done.</span></default><casKey></casKey><casType></casType><selected><span class='correct'>Correct answer, well done.</span></selected></stackoption><stackoption><name>FeedbackGenericIncorrect</name><type>html</type><default><span class='incorrect'>Incorrect answer.</span></default><casKey></casKey><casType></casType><selected><span class='incorrect'>Incorrect answer.</span></selected></stackoption><stackoption><name>FeedbackGenericPCorrect</name><type>html</type><default><span class='partially'>Your answer is partially correct.</span></default><casKey></casKey><casType></casType><selected><span class='partially'>Your answer is partially correct.</span></selected></stackoption><stackoption><name>OptWorkedSol</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption></ItemOptions><ItemTests/></assessmentItem> --- 6,8 ---- What is the size of $B$? <br /> ! #ans# <IEfeedback>ans</IEfeedback></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals>a = 30 + rand(20); b = 40 + rand(50); anb = 5 + rand(20); aub = a+b-anb</rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></workedSolution><questionNote type="CasText"><castext>a = @a@, b = @b@</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionNote></questionCasValues><questionparts><questionpart><name>ans</name><inputType type="Meta"><selection>Algebraic Input</selection><default>Algebraic Input</default><values/></inputType><boxsize>20</boxsize><teachersAns type="CasString"><casString>b</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>ans</studentAnsKey><syntax type="Meta"><selection></selection><default></default><values/></syntax><stackoption><name>formalSyntax</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>forbidFloats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>insertStars</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>false</selected></stackoption><stackoption><name>sameType</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>lowestTerms</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_LowestTerms</casKey><casType>ex</casType><selected>true</selected></stackoption><inputTypesParameters/></questionpart></questionparts><PotentialResponseTrees/><MetaData><dc:Publisher stackname="lastUserEditor" type="Meta"><selection>2</selection><default></default><values/></dc:Publisher><dc:language stackname="language" type="Meta"><selection>en</selection><default>en</default><values><value key="en">en</value><value key="fr">fr</value><value key="nl">nl</value><value key="es">es</value><value key="unspecified">Unspecified</value></values></dc:language><dc:title stackname="questionName" type="Meta"><selection>test-venn</selection><default></default><values/></dc:title><dc:description stackname="questionDescription" type="Meta"><selection>Demonstrates embedding question variables inside img tags to access third-party graphics api.</selection><default></default><values/></dc:description><dc:publisher stackname="questionPublisher" type="Meta"><selection>http://localhost/stack-dev</selection><default>http://localhost/stack-dev</default><values/></dc:publisher><dc:format stackname="questionFormat" type="Meta"><selection>text/xml; charset="utf-8"</selection><default>text/xml; charset="utf-8"</default><values><value key="0">application</value><value key="1">audio</value><value key="2">image</value><value key="3">message</value><value key="4">model</value><value key="5">text</value><value key="6">video</value><value key="7">multipart</value></values></dc:format><lom:context stackname="questionLearningContext" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="PrimaryEducation">Primary Education</value><value key="SecondaryEducation">Secondary Education</value><value key="HigherEducation">Higher Education</value><value key="UniversityFirstCycle">University First Cycle</value><value key="UniversitySecondCycle">University Second Cycle</value><value key="UniversityPostGrade">University Post Grade</value><value key="TechnicalSchoolFirstCycle">Technical School First Cycle</value><value key="TechnicalSchoolSecondCycle">Technical School Second Cycle</value><value key="ProfessionalFormation">Professional Formation</value><value key="ContinuousFormation">Continuous Formation</value><value key="VocationalTraining">Vocational Training</value><value key="unspecified">Unspecified</value></values></lom:context><lom:difficulty stackname="questionDifficulty" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="VeryEasy">Very Easy</value><value key="Easy">Easy</value><value key="Medium">Medium</value><value key="Difficult">Difficult</value><value key="VeryDifficult">Very Difficult</value><value key="unspecified">Unspecified</value></values></lom:difficulty><questionCompetency type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Think">Think</value><value key="Argue">Argue</value><value key="Solve">Solve</value><value key="Represent">Represent</value><value key="Language">Language</value><value key="Communicate">Communicate</value><value key="Tools">Tools</value><value key="unspecified">Unspecified</value></values></questionCompetency><questionCompentencyLevel type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Elementary">Elementary</value><value key="SimpleConceptual">Simple conceptual</value><value key="Multi-step">Multi-step</value><value key="Complex">Complex</value><value key="unspecified">Unspecified</value></values></questionCompentencyLevel><lom:typicallearningtime stackname="questionTimeAllocated" type="Meta"><selection>00:00:00</selection><default>00:00:00</default><values/></lom:typicallearningtime><dc:rights stackname="questionRights" type="Meta"><selection>http://www.gnu.org/copyleft/gpl.html</selection><default>http://www.gnu.org/copyleft/gpl.html</default><values/></dc:rights><questionExerciseType type="Meta"><selection>AlgebraicExpression</selection><default>AlgebraicExpression</default><values><value key="AlgebraicExpression">Algebraic Expression</value><value key="MCQSingleAnswer">MCQ Single Answer</value><value key="MCQMultpleAnswer">MCQ Multiple Answer</value><value key="FillInBlank">Fill in blank</value><value key="Unspecified">Unspecified</value></values></questionExerciseType><dc:date stackname="questionDateLastEdited" type="Meta"><selection>2010-11-30 13:25:46</selection><default>2010-11-30 13:24:20</default><values/></dc:date><lom:status stackname="questionStatus" type="Meta"><selection>Draft</selection><default>Draft</default><values><value key="Draft">Draft</value><value key="Deployed">Deployed</value><value key="Buggy">Buggy</value></values></lom:status><published type="Meta"><selection>Unpublished</selection><default>Unpublished</default><values><value key="Unpublished">Unpublished</value><value key="Published">Published</value><value key="Private">Private</value></values></published><lom:keyword stackname="keywords" type="Meta"><selection>demo, sets, test, venn, size</selection><default>demo, sets, test, venn, size</default><values/></lom:keyword></MetaData><ItemOptions><stackoption><name>Display</name><type>list</type><default>LaTeX</default><values><value>LaTeX</value><value>MathML</value></values><casKey>OPT_OUTPUT</casKey><casType>string</casType><selected>LaTeX</selected></stackoption><stackoption><name>MultiplicationSign</name><type>list</type><default>dot</default><values><value>(none)</value><value>dot</value><value>cross</value></values><casKey>make_multsgn</casKey><casType>fun</casType><selected>dot</selected></stackoption><stackoption><name>ComplexNo</name><type>list</type><default>i</default><values><value>i</value><value>j</value><value>symi</value><value>symj</value></values><casKey>make_complexJ</casKey><casType>fun</casType><selected>i</selected></stackoption><stackoption><name>Floats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>SqrtSign</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>sqrtdispflag</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>Simplify</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>simp</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>MarkModMethod</name><type>list</type><default>Penalty</default><values><value>Penalty</value><value>First Answer</value><value>Last Answer</value></values><casKey></casKey><casType></casType><selected>Penalty</selected></stackoption><stackoption><name>AssumePos</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey>assume_pos</casKey><casType>ex</casType><selected>false</selected></stackoption><stackoption><name>TeacherEmail</name><type>string</type><default> </default><casKey></casKey><casType></casType><selected></selected></stackoption><stackoption><name>Feedback</name><type>list</type><default>TGS</default><values><value>TGS</value><value>TG</value><value>GS</value><value>T</value><value>G</value><value>S</value><value>none</value></values><casKey></casKey><casType></casType><selected>TGS</selected></stackoption><stackoption><name>FeedbackGenericCorrect</name><type>html</type><default><span class='correct'>Correct answer, well done.</span></default><casKey></casKey><casType></casType><selected><span class='correct'>Correct answer, well done.</span></selected></stackoption><stackoption><name>FeedbackGenericIncorrect</name><type>html</type><default><span class='incorrect'>Incorrect answer.</span></default><casKey></casKey><casType></casType><selected><span class='incorrect'>Incorrect answer.</span></selected></stackoption><stackoption><name>FeedbackGenericPCorrect</name><type>html</type><default><span class='partially'>Your answer is partially correct.</span></default><casKey></casKey><casType></casType><selected><span class='partially'>Your answer is partially correct.</span></selected></stackoption><stackoption><name>OptWorkedSol</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption></ItemOptions><ItemTests/></assessmentItem> |
From: Chris S. <san...@us...> - 2010-11-30 11:44:36
|
Update of /cvsroot/stack/stack-dev/lib/ui/inputTypes In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv11203/lib/ui/inputTypes Modified Files: Tag: grobner ListIT.php Log Message: Index: ListIT.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/ui/inputTypes/ListIT.php,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** ListIT.php 30 Sep 2010 16:56:13 -0000 1.7 --- ListIT.php 30 Nov 2010 11:44:28 -0000 1.7.2.1 *************** *** 299,303 **** foreach($randomSet as $id) { ! $xhtml .= '<option value="'.$displayVals[$id]['list_label'].'">'.$displayVals[$id]['list_label'].'</option>'; } } else { --- 299,303 ---- foreach($randomSet as $id) { ! $xhtml .= '<option value="'.$displayVals[$id]['list_label'].'">'.$displayVals[$id]['list_display'].'</option>'; } } else { *************** *** 307,315 **** if($this->default == $displayVals[$id]['list_label']) { ! $xhtml .= '<option value="'.$displayVals[$id]['list_label'].'" selected>'.$displayVals[$id]['list_label'].'</option>'; } else { ! $xhtml .= '<option value="'.$displayVals[$id]['list_label'].'">'.$displayVals[$id]['list_label'].'</option>'; } } --- 307,315 ---- if($this->default == $displayVals[$id]['list_label']) { ! $xhtml .= '<option value="'.$displayVals[$id]['list_label'].'" selected>'.$displayVals[$id]['list_display'].'</option>'; } else { ! $xhtml .= '<option value="'.$displayVals[$id]['list_label'].'">'.$displayVals[$id]['list_display'].'</option>'; } } |
From: Chris S. <san...@us...> - 2010-11-30 11:44:30
|
Update of /cvsroot/stack/stack-dev/lang/en In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv11170/lang/en Modified Files: Tag: grobner stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lang/en/stack.php,v retrieving revision 1.160.2.3 retrieving revision 1.160.2.4 diff -C2 -d -r1.160.2.3 -r1.160.2.4 *** stack.php 9 Nov 2010 14:50:20 -0000 1.160.2.3 --- stack.php 30 Nov 2010 11:44:21 -0000 1.160.2.4 *************** *** 1334,1338 **** $string['matrix_noDim'] = 'Could not get matrix dimensions, Please check Teachers answer is a matrix.'; ! $string['list_label'] = 'Label'; $string['list_display'] = 'Displayed'; $string['list_input_type'] = 'Display Type'; --- 1334,1338 ---- $string['matrix_noDim'] = 'Could not get matrix dimensions, Please check Teachers answer is a matrix.'; ! $string['list_label'] = 'Value'; $string['list_display'] = 'Displayed'; $string['list_input_type'] = 'Display Type'; |