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: Simon H. <sim...@us...> - 2010-09-07 13:40:18
|
Update of /cvsroot/stack/stack-dev/lib/deployment In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20768/lib/deployment Modified Files: Tag: STACK2_2 Deployment.php Log Message: Diagnostic reporting patch. Index: Deployment.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/deployment/Deployment.php,v retrieving revision 1.11.2.8 retrieving revision 1.11.2.9 diff -C2 -d -r1.11.2.8 -r1.11.2.9 *** Deployment.php 20 Aug 2010 11:29:46 -0000 1.11.2.8 --- Deployment.php 7 Sep 2010 13:40:07 -0000 1.11.2.9 *************** *** 61,66 **** //$xhtml = "<form method='POST' action='?id=".$this->version."'> $xhtml = "<input type='submit' name='submit' value='add'> ! <input type='text' name='add' value='1' size='3' maxlength='3'/> " . get_string('FE_deployQuestion_newversions', 'stack'). ! " <input type='checkbox' name='autoprime' ".(isset($_POST['autoprime'])?'checked="checked"':"")."> ".get_string('FE_deployQuestion_autoprime', 'stack'); /*" <input type='submit' onclick='return confirm(\"" . get_string('FE_deployQuestion_confirmUndeployAll', 'stack')."\")' name='dropall' value='" . --- 61,66 ---- //$xhtml = "<form method='POST' action='?id=".$this->version."'> $xhtml = "<input type='submit' name='submit' value='add'> ! <input type='text' name='add' value='1' size='3' maxlength='3'/> " . get_string('FE_deployQuestion_newversions', 'stack'); ! //" <input type='checkbox' name='autoprime' ".(isset($_POST['autoprime'])?'checked="checked"':"")."> ".get_string('FE_deployQuestion_autoprime', 'stack'); /*" <input type='submit' onclick='return confirm(\"" . get_string('FE_deployQuestion_confirmUndeployAll', 'stack')."\")' name='dropall' value='" . |
From: Simon H. <sim...@us...> - 2010-09-07 13:40:15
|
Update of /cvsroot/stack/stack-dev/lib/database In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20768/lib/database Modified Files: Tag: STACK2_2 MoodleDB.php Log Message: Diagnostic reporting patch. Index: MoodleDB.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/MoodleDB.php,v retrieving revision 1.14.10.5 retrieving revision 1.14.10.6 diff -C2 -d -r1.14.10.5 -r1.14.10.6 *** MoodleDB.php 24 Aug 2010 17:23:39 -0000 1.14.10.5 --- MoodleDB.php 7 Sep 2010 13:40:07 -0000 1.14.10.6 *************** *** 674,678 **** } ! /** * Return all the responses from the student for the given attempt, in order, as well as (Moodle) question id * @access public --- 674,678 ---- } ! /** * Return all the responses from the student for the given attempt, in order, as well as (Moodle) question id * @access public *************** *** 680,684 **** * @return array $responses */ ! public function getAttemptResponses($attempt) { global $config; $prefix = $config->getMoodle('prefix'); --- 680,684 ---- * @return array $responses */ ! public function getQuestionAttemptResponses($attempt) { global $config; $prefix = $config->getMoodle('prefix'); *************** *** 691,706 **** $result = $this->query($sql); ! $responses = NULL; if($result) { for($i = 0; $i < $this->noRows(); $i++) { ! $responses[$this->result($i, 'seq_number')]['answer'] = $this->result($i, 'answer'); ! $responses[$this->result($i, 'seq_number')]['event'] = $this->result($i, 'event'); } - $return['question'] = $this->result(0, 'question'); - $return['version'] = substr($this->result(0, 'remoteid'), 1); // strip off 'q' - $return['responses'] = $responses; } return $return; ! } } --- 691,706 ---- $result = $this->query($sql); ! // $responses = NULL; if($result) { for($i = 0; $i < $this->noRows(); $i++) { ! $q = $this->result($i, 'question'); ! $s = $this->result($i, 'seq_number'); ! $return[$q]['version'] = substr($this->result($i, 'remoteid'), 1); // strip off 'q' ! $return[$q][$s]['answer'] = $this->result($i, 'answer'); ! $return[$q][$s]['event'] = $this->result($i, 'event'); } } return $return; ! } } |
From: Simon H. <sim...@us...> - 2010-09-07 13:40:15
|
Update of /cvsroot/stack/stack-dev/lib/reporting In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20768/lib/reporting Modified Files: Tag: STACK2_2 SkillsResources.php Log Message: Diagnostic reporting patch. Index: SkillsResources.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/reporting/Attic/SkillsResources.php,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** SkillsResources.php 1 Sep 2010 16:51:00 -0000 1.1.2.5 --- SkillsResources.php 7 Sep 2010 13:40:06 -0000 1.1.2.6 *************** *** 579,584 **** // return a (ranked?) list of resources for the passed skills public function getResourcesForSkills($skills) { foreach($skills as $skill) { ! $return[] = $this->resourceMap[$skill]; } return $return; --- 579,585 ---- // return a (ranked?) list of resources for the passed skills public function getResourcesForSkills($skills) { + $return = array(); foreach($skills as $skill) { ! if(!empty($this->resourceMap[$skill])) $return[] = $this->resourceMap[$skill]; } return $return; |
From: Chris S. <san...@us...> - 2010-09-06 08:18:48
|
Update of /cvsroot/stack/stack-dev/sample_questions/diagnostictests In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv16092/sample_questions/diagnostictests Modified Files: Tag: STACK2_2 DiagnosticTests.xml Log Message: Index: DiagnosticTests.xml =================================================================== RCS file: /cvsroot/stack/stack-dev/sample_questions/diagnostictests/Attic/DiagnosticTests.xml,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** DiagnosticTests.xml 31 Aug 2010 14:14:32 -0000 1.1.2.1 --- DiagnosticTests.xml 6 Sep 2010 08:18:39 -0000 1.1.2.2 *************** *** 1,254 **** <?xml version="1.0" encoding="UTF-8"?> ! <mathQuiz version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><assessmentItem version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><questionCasValues><questionStem type="CasText"><castext>Express ! ! \[@f@\] ! ! as a sum of a linear function and a rational function with a linear numerator and denominator @den@. ! ! #ans1# <IEfeedback>ans1</IEfeedback> ! <PRTfeedback>Result</PRTfeedback></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals>aval = rand(8) + 2; bval = 2*rand(2)-1; cval = rand(8)+2; mag_d = rand(4)+2; sign_d = 2*rand(2)-1; dval = mag_d*sign_d; gval = rand(8) + 2; mag_h = rand(4)+2; sign_h = 2*rand(2)-1; hval = mag_h*sign_h; mval = rand(8) + 2; mag_n = rand(4)+2; sign_n = 2*rand(2)-1; nval = mag_n*sign_n; den = aval * x^2 + bval * x + cval; num = expand(den * (gval*x + hval)) + mval*x + nval; f = num/den; p = g*x+h; q = m*x+n; denq = expand(den*q); answer = partfrac(f,x)</rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext>We note that the numerator @num@ is cubic and that the denominator @den@ is quadratic. Dividing @num@ by @den@ we obtain a quotient with a linear numerator of the form @p@ and a linear term of the form @q@, that is ! [...2918 lines suppressed...] ! </castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals>a = rand(9)+1; mag_b = rand(9)+1; sign_b = 2*rand(2)-1; b = mag_b*sign_b; c = 2*rand(2)-1; mag_d = rand(8)+2; sign_d = 2*rand(2)-1; d = mag_d*sign_d; numerat = a*x+b; den1 = x+c; den2 = x+d; den2_squared = den2^2; Aden2_squared = A * den2_squared; Bden1_den2 = B * den1 * den2; Cden1 = C * den1; den = den1 * den2_squared; f = numerat/den; c_minus_d = c-d; mc = -c; md = -d; Aval = (b-a*c)/c_minus_d^2; Cval = (b-a*d)/c_minus_d; Bval = (b - Aval*d^2 - c*Cval)/(c*d); answer = partfrac(f,x)</rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext>The basic partial fraction information is:<hint>alg_partial_fractions</hint> ! So, given ! \[ ! @f@=\frac{A}{@den1@} + \frac{B}{@den2@} + \frac{C}{@den2_squared@},\] ! then multiplying through by the denominator @den@ we have that ! \[ ! @numerat@ = @Aden2_squared@ + @Bden1_den2@+@Cden1@. ! \] ! ! Setting \(x = @mc@\) we see that \(A = @Aval@\) and letting \(x = @md@\) we find that \(C = @Cval@\). ! ! Putting \(x = 0\) we can also see that \(B = @Bval@\). Therefore ! ! \[ ! @f@=@answer@.\]</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></workedSolution><questionNote type="CasText"><castext>\[ ! @f@=@answer@.\]</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionNote></questionCasValues><questionparts><questionpart><name>ans1</name><inputType type="Meta"><selection>Algebraic Input</selection><default>Algebraic Input</default><values/></inputType><boxsize>20</boxsize><teachersAns type="CasString"><casString>answer</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>ans1</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><questionpart><name>con1</name><inputType type="Meta"><selection>Slider</selection><default>Algebraic Input</default><values/></inputType><boxsize>200</boxsize><teachersAns type="CasString"><casString>0</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>con1</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><PotentialResponseTree><prtname>PotResTree_Result</prtname><questionValue>1</questionValue><autoSimplify>true</autoSimplify><feedbackVariables></feedbackVariables><description type="Meta"><selection></selection><default></default><values/></description><PotentialResponses><PR id="0"><answerTest>PartFrac</answerTest><teachersAns>answer</teachersAns><studentAns>ans1</studentAns><testoptions>x</testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>1</rawMark><feedback></feedback><ansnote>ALG-RPF-TRUE</ansnote><nextPR>-1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback></feedback><ansnote>ALG-RPF-FALSE</ansnote><nextPR>1</nextPR></false><teacherNote></teacherNote></PR><PR id="1"><answerTest>AlgEquiv</answerTest><teachersAns>answer</teachersAns><studentAns>ans1</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback></feedback><ansnote>ALG-RPF-1-FALSE</ansnote><nextPR>2</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback></feedback><ansnote>ALG-RPF-2-FALSE</ansnote><nextPR>-1</nextPR></false><teacherNote></teacherNote></PR><PR id="2"><answerTest>Equal_Com_Ass</answerTest><teachersAns>f</teachersAns><studentAns>ans1</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback><p>This seems to be the same expression that you started with.</p></feedback><ansnote>NO-CHANGE</ansnote><nextPR>-1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback><p>Although your expression is algebraically equal to the correct answer, it is not in partial fractions form.</p></feedback><ansnote>NOT-PARTIAL</ansnote><nextPR>-1</nextPR></false><teacherNote></teacherNote></PR></PotentialResponses></PotentialResponseTree></PotentialResponseTrees><MetaData><dc:Publisher stackname="lastUserEditor" type="Meta"><selection></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>Diagnostic_ALG-RPF_2</selection><default></default><values/></dc:title><dc:description stackname="questionDescription" type="Meta"><selection>Expand a rational function with repeated factors in denominator as a sum of partial fractions.</selection><default></default><values/></dc:description><dc:publisher stackname="questionPublisher" type="Meta"><selection>http://130.88.73.28/stack-1-0/</selection><default>http://matsrv6.bham.ac.uk/stem</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-09-01 11:10:54</selection><default>2010-08-31 14:20:41</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>Published</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>Manchester, partial, fractions, diagnostic, A48I, ALG-RPF, A2</selection><default>Manchester, partial, fractions, diagnostic, A48I, ALG-RPF, A2</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>s.h...@bh...</default><casKey></casKey><casType></casType><selected>Nie...@ma...</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>G</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'>You may have made a common error.</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>false</selected></stackoption></ItemOptions><ItemTests><test><col><key>IE_ans1</key><value>answer</value></col><col><key>PRT_PotResTree_Result</key><value>ALG-RPF-TRUE</value></col><col><key>IE_con1</key><value></value></col></test><test><col><key>IE_ans1</key><value>7*x</value></col><col><key>PRT_PotResTree_Result</key><value>ALG-RPF-2-FALSE</value></col><col><key>IE_con1</key><value></value></col></test><test><col><key>IE_ans1</key><value>f</value></col><col><key>PRT_PotResTree_Result</key><value>NO-CHANGE</value></col><col><key>IE_con1</key><value></value></col></test></ItemTests></assessmentItem></mathQuiz> |
From: Simon H. <sim...@us...> - 2010-09-01 16:51:12
|
Update of /cvsroot/stack/stack-dev/lib/reporting In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv9386/lib/reporting Modified Files: Tag: STACK2_2 SkillsResources.php DiagnosticReport.php Log Message: Brutally hacked diagnostic report to use the canonical skills and resources. Index: DiagnosticReport.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/reporting/Attic/DiagnosticReport.php,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -C2 -d -r1.1.2.11 -r1.1.2.12 *** DiagnosticReport.php 1 Sep 2010 12:22:45 -0000 1.1.2.11 --- DiagnosticReport.php 1 Sep 2010 16:51:00 -0000 1.1.2.12 *************** *** 29,32 **** --- 29,34 ---- require_once $root.'/opaque/MoodleDisplayItem.php'; + require_once $root . '/lib/reporting/SkillsResources.php'; + class DiagnosticReport { *************** *** 43,46 **** --- 45,49 ---- public function __construct($student = NULL, $quiz = NULL) { + $this->logger = new Logger('DiagnosticReport'); $this->student = $student; $this->quiz = $quiz; *************** *** 48,53 **** //$this->answerNotes = $reporting->studentAnswerNotes($this->student, $this->quiz); $this->loadResources(); - - $this->logger = new Logger('DiagnosticReport'); } --- 51,54 ---- *************** *** 58,70 **** */ private function loadResources() { ! // firstly, skill (and sub-skill) codes ! $this->skill = array( ! 'NUM' => 'Number', ! 'NUM-REL' => 'Relative size', ! 'NUM-RTP' => 'Ration / Proportion', ! 'NUM-FRC' => 'Fractions', ! 'ART' => 'Arithmetic', ! 'ART-ADD' => 'Addition' ! ); // merge this into lang files? // then learning resource links --- 59,64 ---- */ private function loadResources() { ! $skillsResources = new SkillsResources(); ! $this->skill = $skillsResources->getSkills(); // then learning resource links *************** *** 72,76 **** $this->resources[] = array("Sesame Street Learning About Numbers 4", "http://www.youtube.com/watch?v=Qxm6c7U8gxc", ! "NUM-REL"); $this->resources[] = array("BBC - KS2 Bitesize: Maths - Fractions - activity", "http://www.bbc.co.uk/schools/ks2bitesize/maths/number/fractions/play.shtml", --- 66,70 ---- $this->resources[] = array("Sesame Street Learning About Numbers 4", "http://www.youtube.com/watch?v=Qxm6c7U8gxc", ! "NUM-ADD"); $this->resources[] = array("BBC - KS2 Bitesize: Maths - Fractions - activity", "http://www.bbc.co.uk/schools/ks2bitesize/maths/number/fractions/play.shtml", *************** *** 82,85 **** --- 76,86 ---- public function resourcesFor($subskills) { + $skillsResources = new SkillsResources(); + //$this->logger->debug(print_r($skillsResources->getResourcesForSkills(array('EQN-SIM')), 1)); + //$subskills = array('EQN-SIM'); + $resources = $skillsResources->getResourcesForSkills($subskills); + + return $resources; + /* foreach($subskills as $subskill) { foreach($this->resources as $resource) { *************** *** 91,95 **** // sort by frequency ! return $toReturn; } --- 92,96 ---- // sort by frequency ! return $toReturn;*/ } *************** *** 148,152 **** // assuming format aaa-bbb-[true|false] if(preg_match("/^([a-z]{3})-([a-z]{3})-(true|false)/xi", $change, $m)) { ! $this->logger->debug("M:".print_r($m,1)); if($m[3] == 'TRUE') $value = 1; elseif($m[3] == 'FALSE') $value = -1; --- 149,153 ---- // assuming format aaa-bbb-[true|false] if(preg_match("/^([a-z]{3})-([a-z]{3})-(true|false)/xi", $change, $m)) { ! //$this->logger->debug("M:".print_r($m,1)); if($m[3] == 'TRUE') $value = 1; elseif($m[3] == 'FALSE') $value = -1; *************** *** 214,219 **** //$out .= print_r($recommendations, 1); $out .= "<ul>"; ! foreach($recommendations as $recommendation) { ! $out .= "<li><a href='".$recommendation[1]."'>".$recommendation[0]."</a></li>"; } $out .= "</ul>"; --- 215,220 ---- //$out .= print_r($recommendations, 1); $out .= "<ul>"; ! foreach($recommendations[0] as $recommendation) { ! $out .= "<li><a href='".$recommendation['URL']."'>".$recommendation['title']."</a></li>"; } $out .= "</ul>"; Index: SkillsResources.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/reporting/Attic/SkillsResources.php,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** SkillsResources.php 1 Sep 2010 16:19:28 -0000 1.1.2.4 --- SkillsResources.php 1 Sep 2010 16:51:00 -0000 1.1.2.5 *************** *** 310,313 **** --- 310,314 ---- $db -> connect(); + // Ought to go via StackDBItem, really! $sql = "SELECT questionID, questionName FROM stackquestion, question_keyword, keywords, question_lines WHERE (keyword LIKE ".$db->dbSafeString($keyword)." ) AND *************** *** 331,335 **** $db = new StackDBADOdb(); $db -> connect(); ! $sql = "SELECT stackquestion.questionID, stackquestion.questionName, display_cache.xhtml FROM question_keyword, keywords, display_cache, display_cache_sequence, question_lines, stackquestion WHERE (keyword LIKE ".$db->dbSafeString($keyword)." ) AND --- 332,336 ---- $db = new StackDBADOdb(); $db -> connect(); ! // Ought to go via StackDBItem, really! $sql = "SELECT stackquestion.questionID, stackquestion.questionName, display_cache.xhtml FROM question_keyword, keywords, display_cache, display_cache_sequence, question_lines, stackquestion WHERE (keyword LIKE ".$db->dbSafeString($keyword)." ) AND *************** *** 572,575 **** --- 573,586 ---- } + public function getSkills() { + return $this->skills; + } + // return a (ranked?) list of resources for the passed skills + public function getResourcesForSkills($skills) { + foreach($skills as $skill) { + $return[] = $this->resourceMap[$skill]; + } + return $return; + } } \ No newline at end of file |
From: Chris S. <san...@us...> - 2010-09-01 16:19:36
|
Update of /cvsroot/stack/stack-dev/lib/reporting In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv6015/lib/reporting Modified Files: Tag: STACK2_2 SkillsResources.php Log Message: Index: SkillsResources.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/reporting/Attic/SkillsResources.php,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** SkillsResources.php 1 Sep 2010 16:13:25 -0000 1.1.2.3 --- SkillsResources.php 1 Sep 2010 16:19:28 -0000 1.1.2.4 *************** *** 358,362 **** $db -> connect(); ! $sql = "SELECT stackquestion.questionID,stackquestion.questionName, display_cache.xhtml FROM question_keyword, keywords, display_cache, display_cache_sequence, question_lines, stackquestion WHERE (stackquestion.questionName = ".$db->dbSafeString($qname).") AND (stackquestion.line = question_lines.id) AND --- 358,362 ---- $db -> connect(); ! $sql = "SELECT stackquestion.questionID,stackquestion.questionName, display_cache.xhtml FROM display_cache, display_cache_sequence, question_lines, stackquestion WHERE (stackquestion.questionName = ".$db->dbSafeString($qname).") AND (stackquestion.line = question_lines.id) AND *************** *** 559,563 **** $quiz=''; foreach ($test as $qname){ ! //$question = $this->getQuestionStem($qname); $quiz.= "<h2><b>($question[0]) {$question[1]}</b>:</h2>"; --- 559,563 ---- $quiz=''; foreach ($test as $qname){ ! $question = $this->getQuestionStem($qname); $quiz.= "<h2><b>($question[0]) {$question[1]}</b>:</h2>"; |
From: Chris S. <san...@us...> - 2010-09-01 16:13:37
|
Update of /cvsroot/stack/stack-dev/lib/reporting In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv5395/lib/reporting Modified Files: Tag: STACK2_2 SkillsResources.php Log Message: Index: SkillsResources.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/reporting/Attic/SkillsResources.php,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** SkillsResources.php 1 Sep 2010 16:08:40 -0000 1.1.2.2 --- SkillsResources.php 1 Sep 2010 16:13:25 -0000 1.1.2.3 *************** *** 559,563 **** $quiz=''; foreach ($test as $qname){ ! $question = $this->getQuestionStem($qname); $quiz.= "<h2><b>($question[0]) {$question[1]}</b>:</h2>"; --- 559,563 ---- $quiz=''; foreach ($test as $qname){ ! //$question = $this->getQuestionStem($qname); $quiz.= "<h2><b>($question[0]) {$question[1]}</b>:</h2>"; |
From: Chris S. <san...@us...> - 2010-09-01 16:08:48
|
Update of /cvsroot/stack/stack-dev/lib/reporting In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv4743/lib/reporting Modified Files: Tag: STACK2_2 SkillsResources.php Log Message: Index: SkillsResources.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/reporting/Attic/SkillsResources.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** SkillsResources.php 1 Sep 2010 15:19:56 -0000 1.1.2.1 --- SkillsResources.php 1 Sep 2010 16:08:40 -0000 1.1.2.2 *************** *** 359,363 **** $sql = "SELECT stackquestion.questionID,stackquestion.questionName, display_cache.xhtml FROM question_keyword, keywords, display_cache, display_cache_sequence, question_lines, stackquestion WHERE ! (stackquestion.questionName = $qname) AND (stackquestion.line = question_lines.id) AND (stackquestion.questionID = question_lines.latestVersion) AND --- 359,363 ---- $sql = "SELECT stackquestion.questionID,stackquestion.questionName, display_cache.xhtml FROM question_keyword, keywords, display_cache, display_cache_sequence, question_lines, stackquestion WHERE ! (stackquestion.questionName = ".$db->dbSafeString($qname).") AND (stackquestion.line = question_lines.id) AND (stackquestion.questionID = question_lines.latestVersion) AND *************** *** 554,558 **** $skillsTable.="</ol></ol>\n\n\n"; ! return $skillsTable; } --- 554,572 ---- $skillsTable.="</ol></ol>\n\n\n"; ! ! // Generate the text of the quiz. ! ! $quiz=''; ! foreach ($test as $qname){ ! $question = $this->getQuestionStem($qname); ! ! $quiz.= "<h2><b>($question[0]) {$question[1]}</b>:</h2>"; ! ! $quiz.= "<p>".$question[2]."</p>"; ! $quiz.= "<p><hr /></p>"; ! } ! ! $skillsTable .= $quiz; ! return $skillsTable; } |
From: Chris S. <san...@us...> - 2010-09-01 16:03:51
|
Update of /cvsroot/stack/diag In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv4031 Modified Files: index.php Log Message: Index: index.php =================================================================== RCS file: /cvsroot/stack/diag/index.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** index.php 1 Sep 2010 16:03:25 -0000 1.11 --- index.php 1 Sep 2010 16:03:43 -0000 1.12 *************** *** 4,8 **** $STACK_LOC='../stack-dev'; ! //$STACK_LOC='../stem'; require_once($STACK_LOC.'/config.php'); --- 4,8 ---- $STACK_LOC='../stack-dev'; ! $STACK_LOC='../stem'; require_once($STACK_LOC.'/config.php'); |
From: Chris S. <san...@us...> - 2010-09-01 16:03:38
|
Update of /cvsroot/stack/diag In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv4011 Modified Files: index.php Log Message: Index: index.php =================================================================== RCS file: /cvsroot/stack/diag/index.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** index.php 1 Sep 2010 13:19:32 -0000 1.10 --- index.php 1 Sep 2010 16:03:25 -0000 1.11 *************** *** 4,8 **** $STACK_LOC='../stack-dev'; ! $STACK_LOC='../stem'; require_once($STACK_LOC.'/config.php'); --- 4,8 ---- $STACK_LOC='../stack-dev'; ! //$STACK_LOC='../stem'; require_once($STACK_LOC.'/config.php'); *************** *** 13,17 **** require_once $root.'/lib/database/StackDBADOdb.php'; require_once $root.'/lib/database/StackDBKeywords.php'; ! require_once('SkillsResources.php'); $skills = new SkillsResources($STACK_LOC); --- 13,17 ---- require_once $root.'/lib/database/StackDBADOdb.php'; require_once $root.'/lib/database/StackDBKeywords.php'; ! require_once($root.'/lib/reporting/SkillsResources.php'); $skills = new SkillsResources($STACK_LOC); *************** *** 47,50 **** --- 47,53 ---- $action = $_GET['q']; } + if (array_key_exists('t',$_GET)) { + $testLevel = $_GET['t']; + } switch(true) { *************** *** 55,59 **** echo "<p>This page gives an inventory of questions associated with the STEM project <a href=\"http://stack.bham.ac.uk/wiki/index.php/Diagnostic_tests\">Stimulating Techniques in Entry-level Mathematics (STEM) with the STACK computer aided assessment (CAA) system</a>.</p>"; ! echo "<ul><li>Generate the <a href='index.php?q=wiki'>wiki page</a> code or <a href='index.php?q=LaTeX'>LaTeX</a> (view source).</li><li>See a list of all deployed <a href='index.php?q=stem'>question stems</a>. Useful for putting questions into quizzes.</ul><hr />"; echo $skills->generateSkillsTable(); --- 58,64 ---- echo "<p>This page gives an inventory of questions associated with the STEM project <a href=\"http://stack.bham.ac.uk/wiki/index.php/Diagnostic_tests\">Stimulating Techniques in Entry-level Mathematics (STEM) with the STACK computer aided assessment (CAA) system</a>.</p>"; ! echo "<ul><li>Generate the <a href='index.php?q=wiki'>wiki page</a> code or <a href='index.php?q=LaTeX'>LaTeX</a> (view source).</li><li>See a list of all deployed <a href='index.php?q=stem'>question stems</a>. Useful for putting questions into quizzes.</ul>"; ! echo "The three tests are: <ol><li><a href='index.php?q=test&t=1'>Foundation</a></li><li><a href='index.php?q=test&t=2'>AS maths</a> or A-level C,D,E</li><li><a href='index.php?q=test&t=3'>A-level grade A or B</a></li></ol>"; ! echo "<hr />"; echo $skills->generateSkillsTable(); *************** *** 97,104 **** echo "Return to the <a href='index.php'>main page</a>.<p><hr /></p>"; ! $test = array('DIAGNOSTIC_background','Diagnostic_ALG-FEQ_2'); echo $skills->generateTestedSkillsPage($test); echo '</body></html>'; break; --- 102,126 ---- echo "Return to the <a href='index.php'>main page</a>.<p><hr /></p>"; ! $test = array(); ! switch(true) { ! case ($testLevel === '1'): ! // Foundation level test ! $test = array('Diagnostic_background','Diagnostic_NUM-REL_3','Diagnostic_NUM-REL_4','Diagnostic_NUM-RTP_3','Diagnostic_WRP_1','Diagnostic_GRP_1','Diagnostic_EQN-LIN_3','Diagnostic_ART-SUB_1','Diagnostic_NUM-REL_1','Diagnostic_NUM-REL_2','Diagnostic_NUM-RTP_2','Diagnostic_EST-RND_2','Diagnostic_EQN-LIN_2','Diagnostic_ALG-FEQ_2','Diagnostic_EQN-QUD_1','Diagnostic_GEO-CRC_1','Diagnostic_LOG_1'); ! break; ! ! case ($testLevel === '2'): ! // AS-level ! $test = array('Diagnostic_background','Diagnostic_WRP_1','Diagnostic_GRP_1','Diagnostic_NUM-REL_2','Diagnostic_NUM-RTP_2','Diagnostic_EST-RND_2','Diagnostic_SEQ-ART_1','Diagnostic_EQN-LIN_2','Diagnostic_ALG-FEQ_2','Diagnostic_FNC-CMP_1','Diagnostic_FNC-INV_1','Diagnostic_EQN-QUD_1','Diagnostic_GEO-ANM_1','Diagnostic_GEO-CRC_1','Diagnostic_LGE-LLG_1','Diagnostic_DIF-MXN_1','Diagnostic_DIF-EXP_1','Diagnostic_INT-TRG_1','Diagnostic_LOG_1'); ! break; ! ! case ($testLevel === '3'): ! // A-level test ! $test = array('Diagnostic_background','Diagnostic_EST-RND_2','Diagnostic_SEQ-ASM_1','Diagnostic_WRP_1','Diagnostic_GEO-EQL_1','Diagnostic_GEO-TFN_1','Diagnostic_GRP_1','Diagnostic_ALG-RPF_1','Diagnostic_FNC-INV_1','Diagnostic_LGE-LLG_1','Diagnostic_EQN-LIN_2','Diagnostic_DIF-MXN_1','Diagnostic_DIF-PRD_1','Diagnostic_DIF-POL_1','Diagnostic_INT-AUC_1','Diagnostic_INT-SUB_1','Diagnostic_INT-PRT_2','Diagnostic_EQN-SIM_1','Diagnostic_LOG_1'); ! break; ! } echo $skills->generateTestedSkillsPage($test); + echo '</body></html>'; break; |
From: Chris S. <san...@us...> - 2010-09-01 15:22:06
|
Update of /cvsroot/stack/diag In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv28415 Removed Files: SkillsResources.php Log Message: --- SkillsResources.php DELETED --- |
From: Chris S. <san...@us...> - 2010-09-01 15:20:05
|
Update of /cvsroot/stack/stack-dev/lib/reporting In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv27852/lib/reporting Added Files: Tag: STACK2_2 SkillsResources.php Log Message: --- NEW FILE: SkillsResources.php --- <?php /** * * Welcome to STACK. A system for teaching and assessment using a * computer algebra kernel. * * This file is licensed under the GPL License. * * A copy of the license is in your STACK distribution called * license.txt. If you are missing this file you can obtain * it from: * http://www.stack.bham.ac.uk/license.txt * * @author Chris Sangwin (C.J...@bh...) * * @package stackReport */ class SkillsResources { private $stackurl; private $skills; private $skillTags; private $skillMajor; private $resources; private $resourceMap; public function __construct($url) { $this->stackurl = $url; $this->loadSkills(); $this->loadResources(); } private function loadSkills() { $skills = array(); $skills['LOG'] = 'Logic'; $skills['FOR'] = 'Using conventional forms of notation'; $skills['NUM'] = 'Number'; $skills['NUM-REL'] = 'Relative size'; $skills['NUM-RTP'] = 'Ratio / Proportion'; $skills['NUM-FRC'] = 'Fractions'; $skills['NUM-DEC'] = 'Decimals'; $skills['NUM-IND'] = 'Indices'; $skills['NUM-NEG'] = 'Negative Numbers'; $skills['ART'] = 'Arithmetic Operations'; $skills['ART-ADD'] = 'Addition'; $skills['ART-SUB'] = 'Subtraction'; $skills['ART-MUL'] = 'Multiplication'; $skills['ART-DIV'] = 'Division'; $skills['ART-RUL'] = 'Rules'; $skills['ALG'] = 'Algebra'; $skills['ALG-GNO'] = 'Generalised number'; $skills['ALG-VAR'] = 'Variable'; $skills['ALG-FEQ'] = 'Forming Equations'; $skills['ALG-TRN'] = 'Transposition'; $skills['ALG-UNC'] = 'Unclosed Forms'; $skills['ALG-GAT'] = 'Gathering of like terms'; $skills['ALG-SMP'] = 'Simplification'; $skills['ALG-EXB'] = 'Expand Brackets'; $skills['ALG-FAC'] = 'Factorisation'; $skills['ALG-RSD'] = 'Rationalisation of Surds'; $skills['ALG-BEX'] = 'Binomial Expansion'; $skills['ALG-SPF'] = 'Simple Partial Fractions'; $skills['ALG-RPF'] = 'Partial Fractions involving a repeated term'; $skills['ALG-QPF'] = 'Partial Fractions involving a quadratic term'; $skills['ALG-IPF'] = 'Improper Partial Fractions'; $skills['EST'] = 'Estimation'; $skills['EST-EST'] = 'Estimating'; $skills['EST-RND'] = 'Rounding'; $skills['EQN'] = 'Equations'; $skills['EQN-LIN'] = 'Solve Linear Equations'; $skills['EQN-SIM'] = 'Solve Simultaneous Equations'; $skills['EQN-QUD'] = 'Solve Quadratic Equations'; $skills['EQN-INQ'] = 'Solve Inequations'; $skills['WRP'] = 'Analysis of Word Problems'; $skills['FNC'] = 'Functions'; $skills['FNC-EVL'] = 'Evaluate a function'; $skills['FNC-CMP'] = 'Composite Functions'; $skills['FNC-INV'] = 'Inverse Functions'; $skills['FNC-MOD'] = 'Modulus Functions'; $skills['FNC-HYP'] = 'Hyperbolic Functions'; $skills['GEO'] = 'Geometry'; $skills['GEO-CRD'] = 'Coordinates'; $skills['GEO-DST'] = 'Distances'; $skills['GEO-GRD'] = 'Gradients'; $skills['GEO-EQL'] = 'Equations of lines'; $skills['GEO-ANM'] = 'Angular Measure'; $skills['GEO-TRG'] = 'Right-angle Trig'; $skills['GEO-TFN'] = 'Trigonometric Functions'; $skills['GEO-CRC'] = 'Circles'; $skills['GEO-TID'] = 'Trigonometric Identities'; $skills['GRP'] = 'Interpreting Graphs'; $skills['DIG'] = 'Analysis of Diagrams'; $skills['SEQ'] = 'Sequences and Series'; $skills['SEQ-TER'] = 'Terms in Series'; $skills['SEQ-ART'] = 'Arithmetic Series'; $skills['SEQ-ASM'] = 'Partial Sums of arithmetic Series'; $skills['SEQ-GEO'] = 'Geometric Series'; $skills['SEQ-SGM'] = 'Partial Sums of Geometric Series'; $skills['SEQ-SNF'] = 'Sum to Infinity of Geometric Series'; $skills['SEQ-BIS'] = 'Binomial Series'; $skills['LGE'] = 'Logarithms and Exponentials'; $skills['LGE-EXP'] = 'Exponential Function'; $skills['LGE-LWE'] = 'Laws of Exponentials'; $skills['LGE-LOG'] = 'The Logarithmic Function'; $skills['LGE-LLG'] = 'Laws of Logarithms'; $skills['DIF'] = 'Differentiation'; $skills['DIF-CON'] = 'Concept of Differentiation'; $skills['DIF-TAN'] = 'Gradient of Tangent'; $skills['DIF-MON'] = 'Derivative of monomial'; $skills['DIF-POL'] = 'Derivative of Polynomial'; $skills['DIF-MXN'] = 'Maxima and Minima'; $skills['DIF-EXP'] = 'Derivative of Exponential'; $skills['DIF-LOG'] = 'Derivative of Logarithm'; $skills['DIF-TAB'] = 'Table of Derivatives'; $skills['DIF-PRD'] = 'Product Rule'; $skills['DIF-QUT'] = 'Quotient Rule'; $skills['DIF-CHN'] = 'Chain Rule'; $skills['DIF-TRG'] = 'Derivatives of Trig Functions'; $skills['DIF-IMP'] = 'Implicit Differentiation'; $skills['DIF-PRM'] = 'Parametric Differentiation'; $skills['INT'] = 'Integration'; $skills['INT-CON'] = 'Concept and constant of integration'; $skills['INT-DEF'] = 'Definite Integrals'; $skills['INT-MON'] = 'Integrals of monomials'; $skills['INT-POL'] = 'Integrals of polynomials and sums'; $skills['INT-TRG'] = 'Integrals of trig functions'; $skills['INT-EXP'] = 'Integrals of exponential functions'; $skills['INT-XM1'] = 'Integrals of 1/x'; $skills['INT-AUC'] = 'Area under curve'; $skills['INT-ABC'] = 'Area between curves'; $skills['INT-PRT'] = 'Integration by parts'; $skills['INT-SUB'] = 'Integration by substitution'; $skills['INT-VSR'] = 'Volume of Solid of Revolution'; $skills['VEC'] = 'Vectors'; $skills['VEC-ADD'] = 'Vector Addition'; $skills['VEC-SUB'] = 'Vector Subtraction'; $skills['VEC-VXS'] = 'Vector Multiplied by Scalar'; $skills['VEC-PNT'] = 'Vector from point to point'; $skills['VEC-MAG'] = 'Magnitude of Vector'; $skills['VEC-UNT'] = 'Unit Vector'; $skills['VEC-EQL'] = 'Vector Equation of Line'; $skills['VEC-SCP'] = 'Scalar Product'; $skillTags = array_keys($skills); $skillMajor = array(); foreach ($skillTags as $skill) { if (strstr($skill, '-') !== false) { $skillMajor[]=$skill; } } $this->skills = $skills; $this->skillMajor = $skillMajor; $this->skillTags = $skillTags; } // end loadSkills() private function loadResources() { // title // url // skills (as comma separated list) // type, e.g. pdf, video, etc. // $resources[] = $this->constructResource('','','',''); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: The Chain Rule','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/8_5.pdf','DIF-CHN','pdf'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: The Chain Rule','','DIF-CHN','pdf'); $resources[] = $this->constructResource('Simultaneous equations','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-simult-2009-1.pdf','EQN-SIM','pdf'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Simultaneous equations','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/2_13.pdf','EQN-SIM','pdf'); $resources[] = $this->constructResource('Factoring simple expressions','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-factorsimple-2009-1.pdf','ALG-FAC','pdf'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Factoring simple expressions','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/2_5.pdf','ALG-FAC','pdf'); $resources[] = $this->constructResource('Decimals','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-decimals-2009-1.pdf','NUM-DEC','pdf'); $resources[] = $this->constructResource('Introduction to differentiation','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-introtodiff-2009-1.pdf','DIF-CON','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Introduction to differentiation','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/8_1.pdf','DIF-CON','PDF'); $resources[] = $this->constructResource('Expanding or removing brackets','http://www.mathcentre.ac.uk/resources/Algebra%20leaflets/mc-expandbrack-2009-1.pdf','ALG-EXB','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: The exponential constant e','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/3_4.pdf','LGE-EXP','PDF'); $resources[] = $this->constructResource('The exponential constant e','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-expconstant-2009-1.pdf','LGE-EXP','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: The logarithm function','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/3_7.pdf','LGE-LOG','PDF'); $resources[] = $this->constructResource('Factorising quadratics','http://www.mathcentre.ac.uk/resources/Algebra%20leaflets/mc-factorisingquadratics-2009-1.pdf','ALG-FAC','PDF'); $resources[] = $this->constructResource('Fractions','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-fractions-2009-1.pdf','NUM-FRC','PDF'); $resources[] = $this->constructResource('Addition and subtraction of fractions','http://www.mathcentre.ac.uk/resources/leaflets/mathcentre/business/mc-bus-addsub-2009-1.pdf','NUM-FRC','PDF'); $resources[] = $this->constructResource('Multiplication and division of fractions','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-mult-and-div-2009-1.pdf','NUM-FRC','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: The hyperbolic functions','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/3_5.pdf','FNC-HYP','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: The hyperbolic identities','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/3_6.pdf','FNC-HYP','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Integration as summation','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/8_12.pdf','INT-CON','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Integration as the reverse of differentiation','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/8_6.pdf','INT-CON','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Integration by parts','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/8_10.pdf','INT-PRT','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Integration by substitution','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/8_11.pdf','INT-SUB','PDF'); $resources[] = $this->constructResource('The equation of a straight line','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-slope-2009-1.pdf','GEO-EQL','PDF'); $resources[] = $this->constructResource('Logarithms','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-logarithms-2009-1.pdf','LGE-LOG','PDF'); $resources[] = $this->constructResource('The laws of logarithms','http://www.mathcentre.ac.uk/resources/Algebra%20leaflets/mc-logs2-2009-1.pdf','LGE-LLG','PDF'); $resources[] = $this->constructResource('Sigma notation','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-sigma-2009-1.pdf','SEQ','PDF'); $resources[] = $this->constructResource('The modulus of a number','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/1_5.pdf','FNC-MOD','PDF'); $resources[] = $this->constructResource('Approaching Numeracy as an Adult','http://www.mathcentre.ac.uk/resources/uploaded/mccp-samuels-refno1.pdf','ART','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Partial Fractions 1','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/2_23.pdf','ALG-RPF,ALG-QPF,ALG-SPF','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Partial Fractions 2','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/2_24.pdf','ALG-RPF,ALG-QPF','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Partial Fractions 3','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/2_25.pdf','ALG-IPF','PDF'); $resources[] = $this->constructResource('Percentages','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-percentage-2009-1.pdf','NUM','PDF'); $resources[] = $this->constructResource('Indices or Powers','http://www.mathcentre.ac.uk/resources/Algebra%20leaflets/mc-indices1-2009-1.pdf','NUM-IND','PDF'); $resources[] = $this->constructResource('Negative and fractional powers','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-negfracpower-2009-1.pdf','NUM-IND','PDF'); $resources[] = $this->constructResource('Laws of indices','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-lawsindices-2009-1.pdf','NUM-IND','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Product and quotient rules','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/8_4.pdf','DIF-PRD,DIF-QUT','PDF'); $resources[] = $this->constructResource('Pythagoras theorem','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/4_5.pdf','GEO','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Degrees and radians','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/4_1.pdf','GEO-ANM','PDF'); $resources[] = $this->constructResource('Ratios','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-ratios-2009-1.pdf','NUM-RTP','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Addition and subtraction','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-ratios-2009-1.pdf','ART-ADD,ART-SUB','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Multiplication and division','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/2_9.pdf','ART-MUL,ART-DIV','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Evaluating definite integrals','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/8_9.pdf','INT-DEF','PDF'); $resources[] = $this->constructResource('What is a function?','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-function-2009-1.pdf','FNC','PDF'); $resources[] = $this->constructResource('x-y plots','http://www.mathcentre.ac.uk/resources/mc-healthsciences/mc-xyplots-2009-1.pdf','FNC','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Inequalities','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/2_16.pdf','EQN-INQ','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Graphical solution of inequalities','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/2_18.pdf','EQN-INQ','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Quadratic equations 1','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/2_14.pdf','EQN-QUD','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Quadratic equations 2','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/2_15.pdf','EQN-QUD','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Rearranging formulas 1','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/2_10.pdf','ALG-TRN,EQN-LIN','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Rearranging formulas 2','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/2_11.pdf','ALG-TRN','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: What is a surd?','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/2_27.pdf','ALG-RSD','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Scientific notation','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/1_3.pdf','FOR,NUM-DEC,NUM-IND','PDF'); $resources[] = $this->constructResource('Symbols','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-symbols-2009-1.pdf','FOR','PDF'); $resources[] = $this->constructResource('Rearranging formulas 1','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-formulas1-2009-1.pdf','ALG-TRN','PDF'); $resources[] = $this->constructResource('Rearranging formulas 2','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-formulas2-2009-1.pdf','ALG-TRN','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Graphs of the trig functions','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/4_3.pdf','GEO-TFN','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Trigonometrical Identities','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/4_4.pdf','GEO-TID','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Evaluating definite integrals','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/8_9.pdf','INT-DEF','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Linearity rules of integration','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/8_8.pdf','INT-POL','PDF'); $resources[] = $this->constructResource('Engineering Maths First Aid Kit. Quick Reference Leaflet: Table of Integrals','http://www.mathcentre.ac.uk/resources/Engineering%20maths%20first%20aid%20kit/latexsource%20and%20diagrams/8_7.pdf','INT','PDF'); $resources[] = $this->constructResource('Table of derivatives','http://www.mathcentre.ac.uk/resources/uploaded/mc-bus-tableofderiv-2009-1.pdf','DIF','PDF'); $resources[] = $this->constructResource('Teach Yourself Workbook: The Chain Rule','http://www.mathcentre.ac.uk/resources/uploaded/mc-ty-chain-2009-1.pdf','DIF-CHN','pdf'); $resources[] = $this->constructResource('mathtutor: Video tutorial: The Chain Rule','http://www.mathcentre.ac.uk/video/405','DIF-CHN','video'); $resources[] = $this->constructResource('mathtutor: Video tutorial: The Product Rule','http://www.mathcentre.ac.uk/video/404','DIF-PRD','video'); $resources[] = $this->constructResource('mathtutor: Video tutorial: The Quotient Rule','http://www.mathcentre.ac.uk/video/403','DIF-QUT','video'); $resources[] = $this->constructResource('mathtutor: Video tutorial: The standard functions','http://www.mathcentre.ac.uk/video/402','DIF','video'); $resources[] = $this->constructResource('mathtutor: Video tutorial: The derivatives of further functions','http://www.mathcentre.ac.uk/video/409','DIF','video'); $resources[] = $this->constructResource('mathtutor: Video tutorial: Parametric Differentiation','http://www.mathcentre.ac.uk/video/406','DIF-PRM','video'); $resources[] = $this->constructResource('mathtutor: Video tutorial: Implicit Differentiation','http://www.mathcentre.ac.uk/video/408','DIF-IMP','video'); $resources[] = $this->constructResource('mathtutor: Video tutorial: Equation of the tangent line','http://www.mathcentre.ac.uk/video/410','DIF-TAN','video'); $resources[] = $this->constructResource('mathtutor: Video tutorial: The area under a curve','http://www.mathcentre.ac.uk/video/412','INT-AUC','video'); $resources[] = $this->constructResource('mathtutor: Video tutorial: The anti-derivative','http://www.mathcentre.ac.uk/video/413','INT-CON','video'); $resources[] = $this->constructResource('mathtutor: Video tutorial: Mathematical language','http://www.mathcentre.ac.uk/video/294','FOR','video'); $resourceMap = array(); foreach ($resources as $res) { foreach ($res['skill'] as $tskill) { $resourceMap[$tskill][] = array('title'=>$res['title'],'URL'=>$res['URL'],'type'=>$res['type']); } } $this->resources=$resources; $this->resourceMap=$resourceMap; } // end loadResources() private function constructResource($title,$URL,$skills,$type) { $res['title'] = $title; $res['URL'] = $URL; $skills=explode(',',$skills); foreach ($skills as $skill) { $res['skill'][] = trim(strtoupper($skill)); } $res['type'] = strtoupper($type); return $res; } private function typeToIcon($type) { if ('PDF'==$type) { $icon = 'page_white_acrobat.png'; } else if ('VIDEO'==$type) { $icon = 'page_white_camera.png'; } else { $icon = 'page_white_go.png'; } return $icon; } private function getDiagnosticQuestions($keyword) { $db = new StackDBADOdb(); $db -> connect(); $sql = "SELECT questionID, questionName FROM stackquestion, question_keyword, keywords, question_lines WHERE (keyword LIKE ".$db->dbSafeString($keyword)." ) AND (question_keyword.kwid = keywords.id) AND (question_keyword.qid = stackquestion.questionID) AND (stackquestion.line = question_lines.id) AND (stackquestion.questionID = question_lines.latestVersion) ORDER BY stackquestion.questionID"; $query = $db->query($sql); $result=array(); foreach($query as $row) { $result[] = array($row[0],$row[1]); } return $result; } private function getDiagnosticStems($keyword) { $db = new StackDBADOdb(); $db -> connect(); $sql = "SELECT stackquestion.questionID, stackquestion.questionName, display_cache.xhtml FROM question_keyword, keywords, display_cache, display_cache_sequence, question_lines, stackquestion WHERE (keyword LIKE ".$db->dbSafeString($keyword)." ) AND (question_keyword.kwid = keywords.id) AND (stackquestion.line = question_lines.id) AND (stackquestion.questionID = question_keyword.qid) AND (stackquestion.questionID = question_lines.latestVersion) AND (stackquestion.questionID = display_cache.qID) AND (display_cache_sequence.nextNode = display_cache.id) AND (display_cache_sequence.event = 0)"; $query = $db->query($sql); $result=array(); foreach($query as $row) { $result[$row[0]] = array($row[1],$row[2]); } return $result; } private function getQuestionStem($qname) { $db = new StackDBADOdb(); $db -> connect(); $sql = "SELECT stackquestion.questionID,stackquestion.questionName, display_cache.xhtml FROM question_keyword, keywords, display_cache, display_cache_sequence, question_lines, stackquestion WHERE (stackquestion.questionName = $qname) AND (stackquestion.line = question_lines.id) AND (stackquestion.questionID = question_lines.latestVersion) AND (stackquestion.questionID = display_cache.qID) AND (display_cache_sequence.nextNode = display_cache.id) AND (display_cache_sequence.event = 0)"; $query = $db->query($sql); $result=array(); foreach($query as $row) { $result = array($row[0],$row[1],$row[2]); } return $result; } private function getSkillsResources($qid){ $kwdb = new StackDBKeywords(); $kwdb->connect(); $keywords = $kwdb->getQuestionsKeywords($qid); $skills = array(); if(!empty($keywords)) { asort($keywords); foreach($keywords as $keyword) { if (in_array($keyword,$this->skillTags)) { $skills[]=$keyword; } } } return $skills; } public function generateSkillsTable(){ $skillsTable="<ol><ol>\n"; foreach ($this->skills as $skill => $name) { $res_links=''; if (array_key_exists($skill,$this->resourceMap)) { foreach($this->resourceMap[$skill] as $res) { $rtitle = $res['title']; $rurl = $res['URL']; $icon = $this->typeToIcon($res['type']); $res_links .= '<a target="_blank" href="'.$rurl.'"><img border=0 alt="'.$rtitle.'" src="'.$icon.'" /></a>'; } } $questions = $this->getDiagnosticQuestions($skill); $qno = count($questions); $links = ''; if (0==$qno) { $col = '#FF3300'; } else { $col = '#000000'; foreach($questions as $question) { $qid = $question[0]; $qname = $question[1]; $links .= ' <a target="_blank" href="'.$this->stackurl.'/lib/ui/questionTest.php?id='.$qid.'"><img border=0 src="'.$this->stackurl.'/pix/eye.png" title="'.$qname.'" alt="'.$qname.'" /></a>'."\n "; } } if (strstr($skill, '-') !== false) { $skillsTable .= " <li><font color='$col'>$name ($skill)</font> $qno $res_links $links</li>\n"; } else { $skillsTable .= "</ol>\n <li><b><font color='$col'>$name ($skill)</font></b> $qno $res_links $links</li>\n<ol>\n"; } } $skillsTable.="</ol></ol>\n\n\n"; return $skillsTable; } public function generateQuiz($quizlist){ $questions = $this->getDiagnosticStems('diagnostic'); $kwdb = new StackDBKeywords(); $kwdb->connect(); $quiz=''; foreach ($questions as $qid => $question) { $quiz.= "<font size=+2><b>($qid) {$question[0]}</b>:</font> <font color=orange>"; $keywords = $kwdb->getQuestionsKeywords($qid); if(!empty($keywords)) { asort($keywords); $firstKeyword = true; foreach($keywords as $keyword) { if(!$firstKeyword) { $quiz.= ', '; } else $firstKeyword = false; $quiz.= $keyword; } } $quiz.= "</font>"; $quiz.= "<p>".$question[1]."</p>"; $quiz.= "<p><hr /></p>"; } return $quiz; } public function generateWikiPage() { $wiki=''; foreach ($this->skills as $skill => $name) { if (strstr($skill, '-') !== false) { $wiki.= "## $name ($skill)\n"; } else { $wiki.= "# $name ($skill)\n"; } } return $wiki; } public function generateLaTeX() { $tot = 0; $toplevelonly = TRUE; $LaTeX="\begin{enumerate}\n"; foreach ($this->skills as $skill => $name) { if (strstr($skill, '-') !== false) { $tot ++; $toplevelonly = TRUE; $LaTeX.= " \item $name ($skill)\n"; } else { if ($toplevelonly) { $tot ++; } $toplevelonly = FALSE; $LaTeX.= "\end{enumerate}\n \item $name ($skill)\n \begin{enumerate}\n"; } } $LaTeX.=" \end{enumerate}\n\end{enumerate}"; return $LaTeX.$tot; } public function generateTestedSkillsPage($test) { $skills_tested=array(); $skillsTable='<h2>Test questions</h2>'; $skillsTable.='<ol>'; foreach ($test as $qname){ $qid = getQuestionID($qname); $qskills = $this->getSkillsResources($qid); $link = ' <a target="_blank" href="'.$this->stackurl.'/lib/ui/questionTest.php?id='.$qid.'"><img border=0 src="'.$this->stackurl.'/pix/eye.png" title="'.$qname.'" alt="'.$qname.'" /></a>'."\n "; $sk = ''; if (empty($qskills)){ $sk = 'NONE! '; } else { foreach($qskills as $qskill){ $skills_tested[$qskill]++; $sk .= $qskill.' '; } } $skillsTable.= '<li>'.$qname.' ('.$qid.') '.$sk.' '.$link.' </li>'; } $skillsTable.='</ol>'; $skillsTable.='<h2>Skills tested</h2>'; $skillsTable.="<ol><ol>\n"; foreach ($this->skills as $skill => $name) { if (array_key_exists($skill,$skills_tested)) { $col = '#000000'; $qnum = $skills_tested[$skill]; } else { $col = '#FF3300'; $qnum = ''; } if (strstr($skill, '-') !== false) { $skillsTable .= " <li><font color='$col'>$name ($skill) $qnum </font></li>\n"; } else { $skillsTable .= "</ol>\n <li><b><font color='$col'>$name ($skill)</b> $qnum </font></li>\n<ol>\n"; } } $skillsTable.="</ol></ol>\n\n\n"; return $skillsTable; } } |
From: Chris S. <san...@us...> - 2010-09-01 15:05:59
|
Update of /cvsroot/stack/diag In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25063 Modified Files: SkillsResources.php Log Message: Index: SkillsResources.php =================================================================== RCS file: /cvsroot/stack/diag/SkillsResources.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SkillsResources.php 1 Sep 2010 13:19:32 -0000 1.6 --- SkillsResources.php 1 Sep 2010 15:05:50 -0000 1.7 *************** *** 79,86 **** $skills['EST-RND'] = 'Rounding'; - $skills['GRP'] = 'Interpreting Graphs'; - $skills['DIG'] = 'Analysis of Diagrams'; - $skills['WRP'] = 'Analysis of Word Problems'; - $skills['EQN'] = 'Equations'; $skills['EQN-LIN'] = 'Solve Linear Equations'; --- 79,82 ---- *************** *** 89,92 **** --- 85,90 ---- $skills['EQN-INQ'] = 'Solve Inequations'; + $skills['WRP'] = 'Analysis of Word Problems'; + $skills['FNC'] = 'Functions'; $skills['FNC-EVL'] = 'Evaluate a function'; *************** *** 107,110 **** --- 105,111 ---- $skills['GEO-TID'] = 'Trigonometric Identities'; + $skills['GRP'] = 'Interpreting Graphs'; + $skills['DIG'] = 'Analysis of Diagrams'; + $skills['SEQ'] = 'Sequences and Series'; $skills['SEQ-TER'] = 'Terms in Series'; *************** *** 138,151 **** $skills['DIF-PRM'] = 'Parametric Differentiation'; - $skills['VEC'] = 'Vectors'; - $skills['VEC-ADD'] = 'Vector Addition'; - $skills['VEC-SUB'] = 'Vector Subtraction'; - $skills['VEC-VXS'] = 'Vector Multiplied by Scalar'; - $skills['VEC-PNT'] = 'Vector from point to point'; - $skills['VEC-MAG'] = 'Magnitude of Vector'; - $skills['VEC-UNT'] = 'Unit Vector'; - $skills['VEC-EQL'] = 'Vector Equation of Line'; - $skills['VEC-SCP'] = 'Scalar Product'; - $skills['INT'] = 'Integration'; $skills['INT-CON'] = 'Concept and constant of integration'; --- 139,142 ---- *************** *** 162,165 **** --- 153,167 ---- $skills['INT-VSR'] = 'Volume of Solid of Revolution'; + $skills['VEC'] = 'Vectors'; + $skills['VEC-ADD'] = 'Vector Addition'; + $skills['VEC-SUB'] = 'Vector Subtraction'; + $skills['VEC-VXS'] = 'Vector Multiplied by Scalar'; + $skills['VEC-PNT'] = 'Vector from point to point'; + $skills['VEC-MAG'] = 'Magnitude of Vector'; + $skills['VEC-UNT'] = 'Unit Vector'; + $skills['VEC-EQL'] = 'Vector Equation of Line'; + $skills['VEC-SCP'] = 'Scalar Product'; + + $skillTags = array_keys($skills); *************** *** 351,354 **** --- 353,379 ---- + private function getQuestionStem($qname) { + + $db = new StackDBADOdb(); + $db -> connect(); + + $sql = "SELECT stackquestion.questionID,stackquestion.questionName, display_cache.xhtml FROM question_keyword, keywords, display_cache, display_cache_sequence, question_lines, stackquestion WHERE + (stackquestion.questionName = $qname) AND + (stackquestion.line = question_lines.id) AND + (stackquestion.questionID = question_lines.latestVersion) AND + (stackquestion.questionID = display_cache.qID) AND + (display_cache_sequence.nextNode = display_cache.id) AND + (display_cache_sequence.event = 0)"; + + $query = $db->query($sql); + + $result=array(); + foreach($query as $row) + { + $result = array($row[0],$row[1],$row[2]); + } + return $result; + } + private function getSkillsResources($qid){ |
From: Chris S. <san...@us...> - 2010-09-01 13:19:41
|
Update of /cvsroot/stack/diag In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv7613 Modified Files: index.php SkillsResources.php Log Message: Index: SkillsResources.php =================================================================== RCS file: /cvsroot/stack/diag/SkillsResources.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SkillsResources.php 1 Sep 2010 11:56:34 -0000 1.5 --- SkillsResources.php 1 Sep 2010 13:19:32 -0000 1.6 *************** *** 534,536 **** ! } \ No newline at end of file --- 534,536 ---- ! } \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/stack/diag/index.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** index.php 1 Sep 2010 11:56:34 -0000 1.9 --- index.php 1 Sep 2010 13:19:32 -0000 1.10 *************** *** 4,8 **** $STACK_LOC='../stack-dev'; ! //$STACK_LOC='../stem'; require_once($STACK_LOC.'/config.php'); --- 4,8 ---- $STACK_LOC='../stack-dev'; ! $STACK_LOC='../stem'; require_once($STACK_LOC.'/config.php'); *************** *** 97,101 **** echo "Return to the <a href='index.php'>main page</a>.<p><hr /></p>"; ! $test = array('Diagnostic_DIF-POL_1','Diagnostic_ALG-FEQ_2'); echo $skills->generateTestedSkillsPage($test); --- 97,101 ---- echo "Return to the <a href='index.php'>main page</a>.<p><hr /></p>"; ! $test = array('DIAGNOSTIC_background','Diagnostic_ALG-FEQ_2'); echo $skills->generateTestedSkillsPage($test); |
From: Simon H. <sim...@us...> - 2010-09-01 12:22:53
|
Update of /cvsroot/stack/stack-dev/opaque In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv2423/opaque Modified Files: Tag: STACK2_2 MoodleDisplayItem.php Log Message: Fixes and tweaks for diagnostic reporting. Fix for non-UTF-8 chars in CASText Index: MoodleDisplayItem.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/MoodleDisplayItem.php,v retrieving revision 1.12.2.4 retrieving revision 1.12.2.5 diff -C2 -d -r1.12.2.4 -r1.12.2.5 *** MoodleDisplayItem.php 24 Aug 2010 14:05:09 -0000 1.12.2.4 --- MoodleDisplayItem.php 1 Sep 2010 12:22:45 -0000 1.12.2.5 *************** *** 169,172 **** --- 169,174 ---- // Extract and remove action from posted. $event = MoodleDisplayItem::mapStackEvent($posted); + unset($posted['stackaction']); + unset($posted['event']); // Either return xhtml for current state or invoke process to use cache. *************** *** 203,209 **** public static function mapStackEvent($posted) { $action = $posted['stackaction']; - unset($posted['stackaction']); $moodle_event = $posted['event']; - unset($posted['event']); if(8 == $moodle_event) $action = 'Finish';// submission hack if(3 == $moodle_event) $action = 'Grade';// review hack --- 205,209 ---- |
From: Simon H. <sim...@us...> - 2010-09-01 12:22:53
|
Update of /cvsroot/stack/stack-dev/lib/XML In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv2423/lib/XML Modified Files: Tag: STACK2_2 ExportStackTwoItem.php Log Message: Fixes and tweaks for diagnostic reporting. Fix for non-UTF-8 chars in CASText Index: ExportStackTwoItem.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/XML/ExportStackTwoItem.php,v retrieving revision 1.11 retrieving revision 1.11.10.1 diff -C2 -d -r1.11 -r1.11.10.1 *** ExportStackTwoItem.php 27 Aug 2009 16:23:00 -0000 1.11 --- ExportStackTwoItem.php 1 Sep 2010 12:22:44 -0000 1.11.10.1 *************** *** 208,212 **** { $node = $this->dom->createElement($title); ! $nodeText = $this->dom->createTextNode($text); $node->appendChild($nodeText); return $node; --- 208,212 ---- { $node = $this->dom->createElement($title); ! $nodeText = $this->dom->createTextNode(utf8_encode($text)); $node->appendChild($nodeText); return $node; |
From: Simon H. <sim...@us...> - 2010-09-01 12:22:53
|
Update of /cvsroot/stack/stack-dev/lib/reporting In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv2423/lib/reporting Modified Files: Tag: STACK2_2 DiagnosticReport.php Log Message: Fixes and tweaks for diagnostic reporting. Fix for non-UTF-8 chars in CASText Index: DiagnosticReport.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/reporting/Attic/DiagnosticReport.php,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -C2 -d -r1.1.2.10 -r1.1.2.11 *** DiagnosticReport.php 25 Aug 2010 17:10:11 -0000 1.1.2.10 --- DiagnosticReport.php 1 Sep 2010 12:22:45 -0000 1.1.2.11 *************** *** 134,156 **** if(!empty($m)) { $changes = explode(',', $m[1]); ! $this->logger->debug("CHANGES:".print_r($changes,1)); foreach($changes as $change) { // each skill mark $change = strtoupper($change); //$out .= $change.'<br/>'; ! // assuming format aaa-bbb=n if(preg_match("|^([a-z]{3})-([a-z]{3})[:=](-?\d+)|xi", $change, $m)) { $profile[$m[1]][$m[1].'-'.$m[2]] += $m[3]; } ! /* ! // assuming format aaa-bbb=true|false ! if(preg_match("|^([a-z]{3})-([a-z]{3})[:=]([true|false])|xi", $change, $m)) { ! if($m[3] == 'true') $value = 1; ! elseif($m[3] == 'false') $value = -11; $profile[$m[1]][$m[1].'-'.$m[2]] += $value; } ! */ } } --- 134,157 ---- if(!empty($m)) { $changes = explode(',', $m[1]); ! //$this->logger->debug("CHANGES:".print_r($changes,1)); foreach($changes as $change) { // each skill mark $change = strtoupper($change); //$out .= $change.'<br/>'; ! /* // assuming format aaa-bbb=n if(preg_match("|^([a-z]{3})-([a-z]{3})[:=](-?\d+)|xi", $change, $m)) { $profile[$m[1]][$m[1].'-'.$m[2]] += $m[3]; } + */ ! // assuming format aaa-bbb-[true|false] ! if(preg_match("/^([a-z]{3})-([a-z]{3})-(true|false)/xi", $change, $m)) { ! $this->logger->debug("M:".print_r($m,1)); ! if($m[3] == 'TRUE') $value = 1; ! elseif($m[3] == 'FALSE') $value = -1; $profile[$m[1]][$m[1].'-'.$m[2]] += $value; } ! } } *************** *** 294,301 **** $event = MoodleDisplayItem::mapStackEvent($post); unset($post['event']); - unset($post['stackaction']); $transition = $cache->nextTransition($state, $post, $event); ! //$oldstate = $state; $state = $cache->nextNode($transition); //$this->logger->debug("post: ".print_r($post,1)." with event: $event from state: $oldstate goes to state $state"); --- 295,302 ---- $event = MoodleDisplayItem::mapStackEvent($post); unset($post['event']); + unset($post['stackaction']); $transition = $cache->nextTransition($state, $post, $event); ! $state = $cache->nextNode($transition); //$this->logger->debug("post: ".print_r($post,1)." with event: $event from state: $oldstate goes to state $state"); |
From: Chris S. <san...@us...> - 2010-09-01 11:56:42
|
Update of /cvsroot/stack/diag In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv32269 Modified Files: SkillsResources.php index.php Log Message: Index: SkillsResources.php =================================================================== RCS file: /cvsroot/stack/diag/SkillsResources.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SkillsResources.php 1 Sep 2010 11:54:22 -0000 1.4 --- SkillsResources.php 1 Sep 2010 11:56:34 -0000 1.5 *************** *** 308,312 **** $db -> connect(); ! $sql = "SELECT questionID,questionName FROM stackquestion,question_keyword, keywords, question_lines WHERE (keyword LIKE ".$db->dbSafeString($keyword)." ) AND (question_keyword.kwid = keywords.id) AND --- 308,312 ---- $db -> connect(); ! $sql = "SELECT questionID, questionName FROM stackquestion, question_keyword, keywords, question_lines WHERE (keyword LIKE ".$db->dbSafeString($keyword)." ) AND (question_keyword.kwid = keywords.id) AND *************** *** 459,462 **** --- 459,482 ---- } + public function generateLaTeX() { + + $tot = 0; + $toplevelonly = TRUE; + $LaTeX="\begin{enumerate}\n"; + foreach ($this->skills as $skill => $name) { + if (strstr($skill, '-') !== false) { + $tot ++; + $toplevelonly = TRUE; + $LaTeX.= " \item $name ($skill)\n"; + } else { + if ($toplevelonly) { $tot ++; } + $toplevelonly = FALSE; + $LaTeX.= "\end{enumerate}\n \item $name ($skill)\n \begin{enumerate}\n"; + } + } + $LaTeX.=" \end{enumerate}\n\end{enumerate}"; + return $LaTeX.$tot; + } + public function generateTestedSkillsPage($test) { *************** *** 513,515 **** } ! } \ No newline at end of file --- 533,536 ---- } ! ! } \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/stack/diag/index.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** index.php 1 Sep 2010 11:54:22 -0000 1.8 --- index.php 1 Sep 2010 11:56:34 -0000 1.9 *************** *** 55,59 **** echo "<p>This page gives an inventory of questions associated with the STEM project <a href=\"http://stack.bham.ac.uk/wiki/index.php/Diagnostic_tests\">Stimulating Techniques in Entry-level Mathematics (STEM) with the STACK computer aided assessment (CAA) system</a>.</p>"; ! echo "<ul><li>Generate the <a href='index.php?q=wiki'>wiki page</a> code (view source).</li><li>See a list of all deployed <a href='index.php?q=stem'>question stems</a>. Useful for putting questions into quizzes.</ul><hr />"; echo $skills->generateSkillsTable(); --- 55,59 ---- echo "<p>This page gives an inventory of questions associated with the STEM project <a href=\"http://stack.bham.ac.uk/wiki/index.php/Diagnostic_tests\">Stimulating Techniques in Entry-level Mathematics (STEM) with the STACK computer aided assessment (CAA) system</a>.</p>"; ! echo "<ul><li>Generate the <a href='index.php?q=wiki'>wiki page</a> code or <a href='index.php?q=LaTeX'>LaTeX</a> (view source).</li><li>See a list of all deployed <a href='index.php?q=stem'>question stems</a>. Useful for putting questions into quizzes.</ul><hr />"; echo $skills->generateSkillsTable(); *************** *** 66,69 **** --- 66,73 ---- break; + case ($action === 'LaTeX'): + echo $skills->generateLaTeX(); + break; + case ($action === 'stem'): |
From: Chris S. <san...@us...> - 2010-09-01 11:54:30
|
Update of /cvsroot/stack/diag In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv31939 Modified Files: index.php SkillsResources.php Log Message: Index: SkillsResources.php =================================================================== RCS file: /cvsroot/stack/diag/SkillsResources.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SkillsResources.php 24 Aug 2010 15:41:00 -0000 1.3 --- SkillsResources.php 1 Sep 2010 11:54:22 -0000 1.4 *************** *** 350,353 **** --- 350,372 ---- } + + private function getSkillsResources($qid){ + + $kwdb = new StackDBKeywords(); + $kwdb->connect(); + + $keywords = $kwdb->getQuestionsKeywords($qid); + $skills = array(); + if(!empty($keywords)) { + asort($keywords); + foreach($keywords as $keyword) { + if (in_array($keyword,$this->skillTags)) { + $skills[]=$keyword; + } + } + } + + return $skills; + } public function generateSkillsTable(){ *************** *** 387,391 **** $skillsTable .= " <li><font color='$col'>$name ($skill)</font> $qno $res_links $links</li>\n"; } else { ! $skillsTable .= "</ol>\n <li><b>$name ($skill)</b> $qno $res_links $links</li>\n<ol>\n"; } } --- 406,410 ---- $skillsTable .= " <li><font color='$col'>$name ($skill)</font> $qno $res_links $links</li>\n"; } else { ! $skillsTable .= "</ol>\n <li><b><font color='$col'>$name ($skill)</font></b> $qno $res_links $links</li>\n<ol>\n"; } } *************** *** 427,431 **** } ! public function generateWikipage() { $wiki=''; --- 446,450 ---- } ! public function generateWikiPage() { $wiki=''; *************** *** 440,443 **** } ! } \ No newline at end of file --- 459,515 ---- } + public function generateTestedSkillsPage($test) { ! $skills_tested=array(); ! ! $skillsTable='<h2>Test questions</h2>'; ! $skillsTable.='<ol>'; ! ! foreach ($test as $qname){ ! ! $qid = getQuestionID($qname); ! $qskills = $this->getSkillsResources($qid); ! ! $link = ' <a target="_blank" href="'.$this->stackurl.'/lib/ui/questionTest.php?id='.$qid.'"><img border=0 src="'.$this->stackurl.'/pix/eye.png" title="'.$qname.'" alt="'.$qname.'" /></a>'."\n "; ! ! $sk = ''; ! if (empty($qskills)){ ! $sk = 'NONE! '; ! } else { ! foreach($qskills as $qskill){ ! $skills_tested[$qskill]++; ! $sk .= $qskill.' '; ! } ! } ! $skillsTable.= '<li>'.$qname.' ('.$qid.') '.$sk.' '.$link.' </li>'; ! ! } ! $skillsTable.='</ol>'; ! ! $skillsTable.='<h2>Skills tested</h2>'; ! ! $skillsTable.="<ol><ol>\n"; ! foreach ($this->skills as $skill => $name) { ! ! ! if (array_key_exists($skill,$skills_tested)) { ! $col = '#000000'; ! $qnum = $skills_tested[$skill]; ! } else { ! $col = '#FF3300'; ! $qnum = ''; ! } ! ! if (strstr($skill, '-') !== false) { ! $skillsTable .= " <li><font color='$col'>$name ($skill) $qnum </font></li>\n"; ! } else { ! $skillsTable .= "</ol>\n <li><b><font color='$col'>$name ($skill)</b> $qnum </font></li>\n<ol>\n"; ! } ! } ! ! $skillsTable.="</ol></ol>\n\n\n"; ! return $skillsTable; ! ! } ! ! } \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/stack/diag/index.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** index.php 24 Aug 2010 13:20:10 -0000 1.7 --- index.php 1 Sep 2010 11:54:22 -0000 1.8 *************** *** 4,8 **** $STACK_LOC='../stack-dev'; ! $STACK_LOC='../stem'; require_once($STACK_LOC.'/config.php'); --- 4,8 ---- $STACK_LOC='../stack-dev'; ! //$STACK_LOC='../stem'; require_once($STACK_LOC.'/config.php'); *************** *** 17,20 **** --- 17,45 ---- $skills = new SkillsResources($STACK_LOC); + + /************************************************/ + + function getQuestionID($name) { + + $db = new StackDBADOdb(); + $db -> connect(); + + $sql = "SELECT questionID FROM stackquestion, question_lines WHERE + (questionName = ".$db->dbSafeString($name).") AND + (stackquestion.line = question_lines.id) AND + (stackquestion.questionID = question_lines.latestVersion) + ORDER BY questionID"; + $query = $db->query($sql); + + $result=-1; + foreach($query as $row) + { + $result = $row[0]; + } + return $result; + } + + + /************************************************/ $action = ''; *************** *** 38,42 **** case ($action === 'wiki'): ! echo $skills->generateWikipage(); break; --- 63,67 ---- case ($action === 'wiki'): ! echo $skills->generateWikiPage(); break; *************** *** 57,60 **** --- 82,103 ---- break; + case ($action === 'test'): + + include_once $root.'/lib/ui/frontend.php'; + echo html_head('STACK'); + echo '<body>'; + echo "<style type=\"text/css\" media=\"all\">@import \"$STACK_LOC/styles.css\";</style>"; + + echo "<h1>Stimulating Techniques in Entry-level Mathematics (STEM) with the STACK computer aided assessment (CAA) system</h1>"; + echo "<p>This page gives one deployed version of each question with the keyword 'diagnostic'.</p>"; + echo "Return to the <a href='index.php'>main page</a>.<p><hr /></p>"; + + $test = array('Diagnostic_DIF-POL_1','Diagnostic_ALG-FEQ_2'); + + echo $skills->generateTestedSkillsPage($test); + + echo '</body></html>'; + break; + /* Otherwise */ |
From: Chris S. <san...@us...> - 2010-09-01 11:50:07
|
Update of /cvsroot/stack/stack-dev/sample_questions/diagnostictests In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv31389 Added Files: Tag: STACK2_2 FormulaSheet.tex Log Message: --- NEW FILE: FormulaSheet.tex --- \documentclass{article} \usepackage{amsmath,amssymb,latexsym,a4wide,times} \usepackage{epsfig} \usepackage{graphicx} \parindent=0pt \parskip=2mm \columnsep=1cm \newcommand{\R}{{\mathbb R}} \newcommand{\N}{{\mathbb N}} \newcommand{\Z}{{\mathbb Z}} \newcommand{\Q}{{\mathbb Q}} \newcommand{\C}{{\mathbb C}} \renewcommand{\d}{\mathrm{d}} \pagestyle{empty} \begin{document} \begin{center} {\Large\bf Facts and formulae} \end{center} Indices: \[ a^ma^n = a^{m+n},\quad \frac{a^m}{a^n} = a^{m-n},\quad (a^m)^n = a^{mn}\] \[ a^0 = 1,\quad a^{-m} = \frac{1}{a^m},\quad a^{\frac{1}{n}} = \sqrt[n]{a},\quad a^{\frac{m}{n}} = \left(\sqrt[n]{a}\right)^m.\] Logarithms: for any $b>0$, $b \neq 1$: $\log_b(a) = c$, means $a = b^c$. \[\log_b(a) + \log_b(b) = \log_b(ab),\quad \log_b(a) - \log_b(b) = \log_b\left(\frac{a}{b}\right),\quad n\log_b(a) = \log_b\left(a^n\right)\] \[\log_b(1) = 0,\quad \log_b(b) = 1,\quad \log_a(x) = \frac{\log_b(x)}{\log_b(a)}\] Natural logarithms use base $e\approx 2.718$, and are denoted $\log_e$ or alternatively $\ln$. Standard Trigonometric Values \[ \sin(45^\circ)={1\over \sqrt{2}}, \qquad \cos(45^\circ) = {1\over \sqrt{2}},\qquad \tan( 45^\circ)=1 \] \[ \sin (30^\circ)={1\over 2}, \qquad \cos (30^\circ)={\sqrt{3}\over 2},\qquad \tan (30^\circ)={1\over \sqrt{3}}\] \[ \sin (60^\circ)={\sqrt{3}\over 2}, \qquad \cos (60^\circ)={1\over 2},\qquad \tan (60^\circ)={ \sqrt{3}} \] Standard Trigonometric Identities \[\sin(a\pm b)\ = \ \sin(a)\cos(b)\ \pm\ \cos(a)\sin(b)\] \[\cos(a\ \pm\ b)\ = \ \cos(a)\cos(b)\ \mp \sin(a)\sin(b)\] \[\tan (a\ \pm\ b)\ = \ {\tan (a)\ \pm\ \tan (b)\over1\ \mp\ \tan (a)\tan (b)}\] \[2\sin(a)\cos(b)\ = \ \sin(a+b)\ +\ \sin(a-b)\] \[2\cos(a)\cos(b)\ = \ \cos(a-b)\ +\ \cos(a+b)\] \[2\sin(a)\sin(b) \ = \ \cos(a-b)\ -\ \cos(a+b)\] \[\sin^2(a)+\cos^2(a)\ = \ 1\] \[1+{\rm cot}^2(a)\ = \ {\rm cosec}^2(a),\quad \tan^2(a) +1 \ = \ \sec^2(a)\] \[\cos(2a)\ = \ \cos^2(a)-\sin^2(a)\ = \ 2\cos^2(a)-1\ = \ 1-2\sin^2(a)\] \[\sin(2a)\ = \ 2\sin(a)\cos(a)\] \[\sin^2(a) \ = \ {1-\cos (2a)\over 2}, \qquad \cos^2(a)\ = \ {1+\cos(2a)\over 2}\] Hyperbolic Functions \[\cosh(x) = \frac{e^x+e^{-x}}{2}, \qquad \sinh(x)=\frac{e^x-e^{-x}}{2}\] \[\tanh(x) = \frac{\sinh(x)}{\cosh(x)} = \frac{{e^x-e^{-x}}}{e^x+e^{-x}}\] \[{\rm sech}(x) ={1\over \cosh(x)}={2\over {\rm e}^x+{\rm e}^{-x}}, \qquad {\rm cosech}(x)= {1\over \sinh(x)}={2\over {\rm e}^x-{\rm e}^{-x}}\] \[{\rm coth}(x) ={\cosh(x)\over \sinh(x)} = {1\over {\rm tanh}(x)} ={{\rm e}^x+{\rm e}^{-x}\over {\rm e}^x-{\rm e}^{-x}}\] Hyperbolic Identities \[{\rm e}^x=\cosh(x)+\sinh(x), \quad {\rm e}^{-x}=\cosh(x)-\sinh(x)\] \[\cosh^2(x) -\sinh^2(x) = 1$$ $$1-{\rm tanh}^2(x)={\rm sech}^2(x)\] \[{\rm coth}^2(x)-1={\rm cosech}^2(x)$$ $$\sinh(x\pm y)=\sinh(x)\ \cosh(y)\ \pm\ \cosh(x)\ \sinh(y)\] \[\cosh(x\pm y)=\cosh(x)\ \cosh(y)\ \pm\ \sinh(x)\ \sinh(y)\] \[\sinh(2x)=2\,\sinh(x)\cosh(x)\] \[\cosh(2x)=\cosh^2(x)+\sinh^2(x)\] \[\cosh^2(x)={\cosh(2x)+1\over 2}\] \[\sinh^2(x)={\cosh(2x)-1\over 2}\] Inverse Hyperbolic Functions \[\cosh^{-1}(x)=\ln\left(x+\sqrt{x^2-1}\right) \quad \mbox{ for } x\geq 1\] \[ \sinh^{-1}(x)=\ln\left(x+\sqrt{x^2+1}\right)\] \[\tanh^{-1}(x) = \frac{1}{2}\ln\left({1+x\over 1-x}\right) \quad \mbox{ for } -1< x < 1\] Calculus rules The Product Rule: \[\frac{\mathrm{d}}{\mathrm{d}{x}} \big(f(x)g(x)\big) = f(x) \cdot \frac{\mathrm{d} g(x)}{\mathrm{d}{x}} + g(x)\cdot \frac{\mathrm{d} f(x)}{\mathrm{d}{x}}.\] The Quotient Rule: \[\frac{d}{dx}\left(\frac{f(x)}{g(x)}\right)=\frac{g(x)\cdot\frac{df(x)}{dx}\ \ - \ \ f(x)\cdot \frac{dg(x)}{dx}}{g(x)^2}. \] The Chain Rule \[\frac{df(g(x))}{dx} = \frac{dg(x)}{dx}\cdot\frac{df(u)}{du}.\] Integration by Substitution: \[\int f(u){{\rm d}u\over {\rm d}x}{\rm d}x=\int f(u){\rm d}u \quad\hbox{and}\quad \int_a^bf(u){{\rm d}u\over {\rm d}x}\,{\rm d}x = \int_{u(a)}^{u(b)}f(u){\rm d}u.\] Integration by Parts: \[\int_a^b u{{\rm d}v\over {\rm d}x}{\rm d}x=\left[uv\right]_a^b- \int_a^b{{\rm d}u\over {\rm d}x}v\,{\rm d}x.\] \begin{center} \begin{tabular}{ll} $f(x)$ & $f'(x)$\\ $k$, constant & $0$ \\ $x^n$, any constant $n$ & $nx^{n-1}$\\ $e^x$ & $e^x$\\ $\ln(x)=\log_{\rm e}(x)$ & $\frac{1}{x}$ \\ $\sin(x)$ & $\cos(x)$ \\ $\cos(x)$ & $-\sin(x)$ \\ $\tan(x) = \frac{\sin(x)}{\cos(x)}$ & $\sec^2(x)$ \\ $\mbox{cosec}(x)=\frac{1}{\sin(x)}$ & $-\mbox{cosec}(x)\cot(x)$ \\ $\sec(x)=\frac{1}{\cos(x)}$ & $\sec(x)\tan(x)$ \\ $\cot(x)=\frac{\cos(x)}{\sin(x)}$ & $-\mbox{cosec}^2(x)$ \\ $\cosh(x)$ & $\sinh(x)$ \\ $\sinh(x)$ & $\cosh(x)$ \\ $\tanh(x)$ & $\mbox{sech}^2(x)$ \\ $\mbox{sech}(x)$ & $-\mbox{sech}sech(x)\tanh(x)$ \\ $\mbox{cosech}(x)$ & $-\mbox{cosech}(x)\coth(x)$ \\ $coth(x)$ & $-\mbox{cosech}^2(x)$ \\ \end{tabular} \end{center} \[\frac{d}{dx}\left(\sin^{-1}(x)\right) = \frac{1}{\sqrt{1-x^2}},\quad \frac{d}{dx}\left(\cos^{-1}(x)\right) = \frac{-1}{\sqrt{1-x^2}},\quad \frac{d}{dx}\left(\tan^{-1}(x)\right) = \frac{1}{1+x^2} \] \[\frac{d}{dx}\left(\cosh^{-1}(x)\right) = \frac{1}{\sqrt{x^2-1}},\quad \frac{d}{dx}\left(\sinh^{-1}(x)\right) = \frac{1}{\sqrt{x^2+1}},\quad \frac{d}{dx}\left(\tanh^{-1}(x)\right) = \frac{1}{1-x^2}\] \begin{center} \begin{tabular}{lll} $f(x)$ & $\int f(x)\ dx$\\ $e^x$ & $e^x+c$ & \\ $\cos(x)$ & $\sin(x)+c$ & \\ $\sin(x)$ & $-\cos(x)+c$ & \\ $\tan(x)$ & $\ln(\sec(x))+c$ & $-\frac{\pi}{2} < x < \frac{\pi}{2}$\\ $\sec x$ & $\ln (\sec(x)+\tan(x))+c$ & $-{\pi\over 2}< x < {\pi\over 2}$\\ cosec$\, x$ & $\ln ($cosec$(x)-\cot(x))+c$ & $0 < x < \pi$\\ cot$\,x$ & $\ln(\sin(x))+c$ & $0< x< \pi$ \\ $\cosh(x)$ & $\sinh(x)+c$ & \\ $\sinh(x)$ & $\cosh(x) + c$ & \\ $\tanh(x)$ & $\ln(\cosh(x))+c$ & \\ coth$(x)$ & $\ln(\sinh(x))+c $ & $x>0$\\ ${1\over x^2+a^2}$ & ${1\over a}\tan^{-1}{x\over a}+c$ & $a>0$\\ [2pt] ${1\over x^2-a^2}$ & ${1\over 2a}\ln{x-a\over x+a}+c$ & $|x|>a>0$\\ [2pt] ${1\over a^2-x^2}$ & ${1\over 2a}\ln{a+x\over a-x}+c$ & $|x|<a$\\ [3pt] ${1\over \sqrt{x^2+a^2}}$ & $\sinh^{-1}\left(\frac{x}{a}\right) + c$ & $a>0$ \\ ${1\over \sqrt{x^2-a^2}}$ & $\cosh^{-1}\left(\frac{x}{a}\right) + c$ & $x\geq a > 0$ \\ ${1\over \sqrt{x^2+k}}$ & $\ln (x+\sqrt{x^2+k})+c$ & \\ ${1\over \sqrt{a^2-x^2}}$ & $\sin^{-1}\left(\frac{x}{a}\right)+c$ & $-a\leq x\leq a$ \end{tabular} \end{center} \vfill {\scriptsize C J Sangwin, \verb$C.J...@bh...$, \today. This formula sheet is released under Creative Commons Attribution-Share Alike.\\ \includegraphics[width=1.5cm]{88x31.png}} \end{document} |
From: Simon H. <sim...@us...> - 2010-08-31 15:07:13
|
Update of /cvsroot/stack/stack-dev/lib/database In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv31600/lib/database Modified Files: Tag: STACK2_2 StackDBADOdb.php StackDBCache.php StackDB.php Log Message: Fail safely if cache state insert is not successful. Index: StackDBCache.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/StackDBCache.php,v retrieving revision 1.18.2.10 retrieving revision 1.18.2.11 diff -C2 -d -r1.18.2.10 -r1.18.2.11 *** StackDBCache.php 20 Aug 2010 17:27:02 -0000 1.18.2.10 --- StackDBCache.php 31 Aug 2010 15:07:05 -0000 1.18.2.11 *************** *** 50,57 **** // add a transition using the new state id ! $transition = $this->addTransition($lastNode, $stateID, $post, $event); ! // add attempt_meta information ! if($userEvent) $this->addMeta($stateID, $state); } --- 50,59 ---- // add a transition using the new state id ! if($stateID !== NULL) { // state added successfully: go ahead and reference it! ! $transition = $this->addTransition($lastNode, $stateID, $post, $event); ! // add attempt_meta information ! if($userEvent) $this->addMeta($stateID, $state); ! } } *************** *** 59,63 **** $this->query("UNLOCK TABLES"); ! return $transition; // either the new or recent prior one } --- 61,65 ---- $this->query("UNLOCK TABLES"); ! return $transition; // either the new or recent prior one (or NULL on failure) } *************** *** 78,88 **** ", NOW())"; ! $this->query($sql); ! // NOTE: if this fails it will mess the transition table because of 'last index' method below. ! $this->logger->debug("SQL debug: ".$sql); ! // would be nice to be able to obtain the index for the last insert (like mysql_insert_id) without this extra call but would require extending the StackDB interface ! $this->query("SELECT id FROM display_cache ORDER BY id DESC LIMIT 1"); // safe for multi-threading? if($this->noRows()<=0) { // no rows in display_cache? --- 80,92 ---- ", NOW())"; ! //$this->logger->debug("SQL:".$sql); ! $result = $this->query($sql); ! if(empty($result)) { // insert failed! ! $this->logger->critical("Failed to store a question state!"); ! return NULL; // don't add a transition! ! } // would be nice to be able to obtain the index for the last insert (like mysql_insert_id) without this extra call but would require extending the StackDB interface ! $this->query("SELECT id FROM display_cache ORDER BY id DESC LIMIT 1"); // safe for multi-threading if higher-level lock maintained if($this->noRows()<=0) { // no rows in display_cache? Index: StackDBADOdb.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/StackDBADOdb.php,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** StackDBADOdb.php 3 Feb 2010 11:22:29 -0000 1.8 --- StackDBADOdb.php 31 Aug 2010 15:07:05 -0000 1.8.2.1 *************** *** 325,330 **** } ! public function insert_id() { ! return Insert_ID(); // PO_Insert_ID() is a more portable but untested alternative. } --- 325,330 ---- } ! public function last_insert_id() { ! return $this->conn->Insert_ID(); // PO_Insert_ID() is a more portable but untested alternative. } Index: StackDB.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/StackDB.php,v retrieving revision 1.5 retrieving revision 1.5.10.1 diff -C2 -d -r1.5 -r1.5.10.1 *** StackDB.php 27 Aug 2009 16:23:00 -0000 1.5 --- StackDB.php 31 Aug 2010 15:07:05 -0000 1.5.10.1 *************** *** 78,81 **** --- 78,83 ---- public function allResults($field = NULL); + + public function last_insert_id(); } |
Update of /cvsroot/stack/stack-dev/sample_questions/diagnostictests In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv26591 Added Files: Tag: STACK2_2 DiagnosticTests.xml ReadMe.txt Removed Files: Tag: STACK2_2 diagnostic-proof-Wason.xml diagnostic-proof-studentprofessor.xml Log Message: --- diagnostic-proof-Wason.xml DELETED --- --- NEW FILE: DiagnosticTests.xml --- <?xml version="1.0" encoding="UTF-8"?> <mathQuiz version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><assessmentItem version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><questionCasValues><questionStem type="CasText"><castext>Express \[@f@\] as a sum of a linear function and a rational function with a linear numerator and denominator @den@. #ans1# <IEfeedback>ans1</IEfeedback> <PRTfeedback>Result</PRTfeedback></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals>aval = rand(8) + 2; bval = 2*rand(2)-1; cval = rand(8)+2; mag_d = rand(4)+2; sign_d = 2*rand(2)-1; dval = mag_d*sign_d; gval = rand(8) + 2; mag_h = rand(4)+2; sign_h = 2*rand(2)-1; hval = mag_h*sign_h; mval = rand(8) + 2; mag_n = rand(4)+2; sign_n = 2*rand(2)-1; nval = mag_n*sign_n; den = aval * x^2 + bval * x + cval; num = expand(den * (gval*x + hval)) + mval*x + nval; f = num/den; p = g*x+h; q = m*x+n; denq = expand(den*q); answer = partfrac(f,x)</rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext>We note that the numerator @num@ is cubic and that the denominator @den@ is quadratic. Dividing @num@ by @den@ we obtain a quotient with a linear numerator of the form @p@ and a linear term of the form @q@, that is \[@f@=\frac{@p@}{@den@}+@q@\mbox{.}\] Multiplying through by @den@ \[@num@ = (@den@)(@q@)+@p@\mbox{.}\] Expanding out the brackets we find \[@num@ = @denq@+@p@\mbox{.}\] [...1477 lines suppressed...] <p>How confident are you (as a %)? #con1# <IEfeedback>con1</IEfeedback></p></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals>p = (rand(7) + 1) * 12; n = p * 5/12; m = p * 7/12; r = p / 12</rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext><p>We first work out the total number of parts that are to be shared out. We know the ratio is \(5:7\), so the total number of parts is \(5+7=12\).</p> So we divide @p@ by 12 to get @r@, which is the value of each part.</p><p> To work out how much \(A\) gets we multiply @r@ by \(5\). </p><p> So \(A\) gets &pound; @n@.</p></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></workedSolution><questionNote type="CasText"><castext>@p@ split in the ratio \(5:7\) between \(A\) and \(B\) means \(A\) gets &pound; @n@.</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionNote></questionCasValues><questionparts><questionpart><name>ans1</name><inputType type="Meta"><selection>Algebraic Input</selection><default>Algebraic Input</default><values/></inputType><boxsize>20</boxsize><teachersAns type="CasString"><casString>n</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>ans1</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><questionpart><name>con1</name><inputType type="Meta"><selection>Slider</selection><default>Algebraic Input</default><values/></inputType><boxsize>200</boxsize><teachersAns type="CasString"><casString>0</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>con1</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><PotentialResponseTree><prtname>PotResTree_1</prtname><questionValue>1</questionValue><autoSimplify>true</autoSimplify><feedbackVariables></feedbackVariables><description type="Meta"><selection></selection><default></default><values/></description><PotentialResponses><PR id="0"><answerTest>AlgEquiv</answerTest><teachersAns>n</teachersAns><studentAns>ans1</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>1</rawMark><feedback></feedback><ansnote>NUM-RTP-TRUE</ansnote><nextPR>-1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback></feedback><ansnote>NUM-RTP-FALSE</ansnote><nextPR>1</nextPR></false><teacherNote></teacherNote></PR><PR id="1"><answerTest>AlgEquiv</answerTest><teachersAns>m</teachersAns><studentAns>ans1</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback>It seems you have worked out B's share instead.</feedback><ansnote>WRONG_SHARE</ansnote><nextPR>-1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback></feedback><ansnote>NUM-RTP-1-FALSE</ansnote><nextPR>-1</nextPR></false><teacherNote></teacherNote></PR></PotentialResponses></PotentialResponseTree></PotentialResponseTrees><MetaData><dc:Publisher stackname="lastUserEditor" type="Meta"><selection></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>Diagnostic_NUM-RTP_2</selection><default></default><values/></dc:title><dc:description stackname="questionDescription" type="Meta"><selection>Money split between two people in a given ratio. </selection><default></default><values/></dc:description><dc:publisher stackname="questionPublisher" type="Meta"><selection>http://matsrv6.bham.ac.uk/stem</selection><default>http://matsrv6.bham.ac.uk/stem</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-08-20 12:55:11</selection><default>2010-07-28 11:29:40</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>foundation, diagnostic, coventry, NUM-RTP, c5, B</selection><default>foundation, diagnostic, coventry, NUM-RTP, c5, B</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>s.h...@bh...</default><casKey></casKey><casType></casType><selected>s.h...@bh...</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>G</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>false</selected></stackoption></ItemOptions><ItemTests><test><col><key>IE_ans1</key><value>n</value></col><col><key>PRT_PotResTree_1</key><value>NUM-RTP-TRUE</value></col><col><key>IE_con1</key><value></value></col></test><test><col><key>IE_ans1</key><value>m</value></col><col><key>PRT_PotResTree_1</key><value>WRONG_SHARE</value></col><col><key>IE_con1</key><value></value></col></test><test><col><key>IE_ans1</key><value>61</value></col><col><key>PRT_PotResTree_1</key><value>NUM-RTP-1-FALSE</value></col><col><key>IE_con1</key><value></value></col></test></ItemTests></assessmentItem><assessmentItem version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><questionCasValues><questionStem type="CasText"><castext><p>Given that \(p=@log_x@\) and \(q=@log_y@\) give \(@log_xmy@\) as a function of \(p\) and \(q\).</p> #ans1# <p><IEfeedback>ans1</IEfeedback> </p> <p><PRTfeedback>Result</PRTfeedback></p> <p>How confident are you (as a %)? #con1# <IEfeedback>con1</IEfeedback></p></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals>m = rand(4)+2; xm = x^m; xmy = xm * y; mp_plus_q = m * p + q; log_x = log(x); log_y = log(y); log_xm = log(xm); log_xmy = log(xmy); mlog_x = m*log_x; mlog_x_plus_log_y = mlog_x + log_y</rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext>Below are the basic rules of logarithms. <hint>alg_logarithms</hint> </p>Given \(p=@log_x@\) and \(q=@log_y@\) then, \[@log_xmy@ = \ln \left(@xm@\right)+@log_y@ = @mlog_x_plus_log_y@ = @mp_plus_q@.\]</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></workedSolution><questionNote type="CasText"><castext>\[@log_xmy@=@mp_plus_q@.\]</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionNote></questionCasValues><questionparts><questionpart><name>ans1</name><inputType type="Meta"><selection>Algebraic Input</selection><default>Algebraic Input</default><values/></inputType><boxsize>20</boxsize><teachersAns type="CasString"><casString>mp_plus_q</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>ans1</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><questionpart><name>con1</name><inputType type="Meta"><selection>Slider</selection><default>Algebraic Input</default><values/></inputType><boxsize>200</boxsize><teachersAns type="CasString"><casString>0</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>con1</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><PotentialResponseTree><prtname>PotResTree_Result</prtname><questionValue>1</questionValue><autoSimplify>true</autoSimplify><feedbackVariables></feedbackVariables><description type="Meta"><selection></selection><default></default><values/></description><PotentialResponses><PR id="0"><answerTest>Equal_Com_Ass</answerTest><teachersAns>mp_plus_q</teachersAns><studentAns>ans1</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>1</rawMark><feedback></feedback><ansnote>LGE-LLG-TRUE</ansnote><nextPR>-1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback></feedback><ansnote>LGE-LLG-FALSE</ansnote><nextPR>1</nextPR></false><teacherNote></teacherNote></PR><PR id="1"><answerTest>AlgEquiv</answerTest><teachersAns>p^m+q</teachersAns><studentAns>ans1</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback>You seem to have that \(\ln\left(x^{@m@}\right)=\left(\ln \left( x \right) \right)^{@m@}\). This is only true given \(x=1\), in which case \[\ln \left(x\right) = \ln \left(@xm@\right) = \left(\ln \left( x \right) \right)^{@m@} = \ln \left(1\right) = 0.\] In general \[\ln \left(@xm@\right) = @mlog_x@.\]</feedback><ansnote>POWER</ansnote><nextPR>-1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback></feedback><ansnote>LGE-LLG-1-FALSE</ansnote><nextPR>2</nextPR></false><teacherNote></teacherNote></PR><PR id="2"><answerTest>AlgEquiv</answerTest><teachersAns>m*p*q</teachersAns><studentAns>ans1</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback>You seem to have that \(\ln\left(xmy\right)\) is \(\ln \left( xm \right)\) multiplied by \(\ln \left( x \right)\). In general \[\ln\left(xmy\right)=\ln \left( xm \right)+\ln \left( x \right).\]</feedback><ansnote>NO_ADDITION</ansnote><nextPR>-1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback></feedback><ansnote>LGE-LLG-2-FALSE</ansnote><nextPR>-1</nextPR></false><teacherNote></teacherNote></PR></PotentialResponses></PotentialResponseTree></PotentialResponseTrees><MetaData><dc:Publisher stackname="lastUserEditor" type="Meta"><selection></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>Diagnostic_LGE-LLG_1</selection><default></default><values/></dc:title><dc:description stackname="questionDescription" type="Meta"><selection>Apply laws of logarithms to an expression.</selection><default></default><values/></dc:description><dc:publisher stackname="questionPublisher" type="Meta"><selection>http://130.88.73.28/stack-1-0/</selection><default>http://matsrv6.bham.ac.uk/stem</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-08-19 16:38:34</selection><default>2010-07-23 19:54:10</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>Published</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>Manchester, function, A48F, LGE-LLG, diagnostic, B</selection><default>Manchester, function, A48F, LGE-LLG, diagnostic, B</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>s.h...@bh...</default><casKey></casKey><casType></casType><selected>Nie...@ma...</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>G</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>false</selected></stackoption></ItemOptions><ItemTests><test><col><key>IE_ans1</key><value>mp_plus_q</value></col><col><key>PRT_PotResTree_Result</key><value>LGE-LLG-TRUE</value></col><col><key>IE_con1</key><value></value></col></test><test><col><key>IE_ans1</key><value>p^m+q</value></col><col><key>PRT_PotResTree_Result</key><value>POWER</value></col><col><key>IE_con1</key><value></value></col></test><test><col><key>IE_ans1</key><value>m*p*q</value></col><col><key>PRT_PotResTree_Result</key><value>NO_ADDITION</value></col><col><key>IE_con1</key><value></value></col></test></ItemTests></assessmentItem></mathQuiz> --- diagnostic-proof-studentprofessor.xml DELETED --- --- NEW FILE: ReadMe.txt --- Stimulating Techniques in Entry-level Mathematics with the STACK CAA system In April 2010 the National HE STEM Programme (http://www.stemprogramme.com) funded a mini-project stimulating Techniques in Entry-level Mathematics (STEM) with the STACK computer aided assessment (CAA) system}. The aims of this project are to take existing diagnostic tests in core mathematics and develop similar automatic tests for the STACK computer aided assessment system. The outcome of these tests will be a user profile which links outcomes to existing online learning materials. See http://web.mat.bham.ac.uk/C.J.Sangwin/projects/2010STEM/ The questions in this folder are the results of this project. These questions files are released under Creative Commons Attribution-Share Alike. http://creativecommons.org/licenses/by-sa/2.0/uk/ |
From: Simon H. <sim...@us...> - 2010-08-26 15:13:43
|
Update of /cvsroot/stack/stack-dev/lib/items In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv12450/lib/items Modified Files: Tag: STACK2_2 CasTextType.php Log Message: Now encodes non-UTF-8 chars, e.g. £. Index: CasTextType.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/items/CasTextType.php,v retrieving revision 1.25.10.1 retrieving revision 1.25.10.2 diff -C2 -d -r1.25.10.1 -r1.25.10.2 *** CasTextType.php 4 Aug 2010 20:17:00 -0000 1.25.10.1 --- CasTextType.php 26 Aug 2010 15:13:32 -0000 1.25.10.2 *************** *** 426,430 **** $selection = $dom->createElement("castext"); ! $selectionText = $dom->createTextNode($this->casText); $selection->appendChild($selectionText); --- 426,430 ---- $selection = $dom->createElement("castext"); ! $selectionText = $dom->createTextNode(utf8_encode($this->casText)); $selection->appendChild($selectionText); |
From: Chris S. <san...@us...> - 2010-08-26 13:19:33
|
Update of /cvsroot/stack/stack-dev/lib/ui In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv1437/lib/ui Modified Files: Tag: STACK2_2 questionBank.php Log Message: Index: questionBank.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/ui/questionBank.php,v retrieving revision 1.6.10.4 retrieving revision 1.6.10.5 diff -C2 -d -r1.6.10.4 -r1.6.10.5 *** questionBank.php 6 Aug 2010 14:45:56 -0000 1.6.10.4 --- questionBank.php 26 Aug 2010 13:19:25 -0000 1.6.10.5 *************** *** 33,36 **** --- 33,37 ---- $question_bank_filter['description'] = ''; $question_bank_filter['keywords'] = array(); + $question_bank_filter['invertKeywords']= FALSE; $question_bank_filter['case_sense'] = FALSE; $question_bank_filter['any'] = 'Any'; *************** *** 154,158 **** // sort tags (lowercase keywords) asort($tags); ! echo "<th>".get_string('stackQuestion_questionKeywordFilter', 'stack').":</th> <td colspan='3'><a href='index.php?untagged=*'>".get_string('stackQuestion_questionKeywordReset', 'stack')."</a>, "; $firstTag = true; --- 155,159 ---- // sort tags (lowercase keywords) asort($tags); ! echo "<th>".get_string('stackQuestion_questionKeywordFilter', 'stack').":</th> <td colspan='3'><a href='index.php?untagged=*'>".get_string('stackQuestion_questionKeywordReset', 'stack')."</a>, "; $firstTag = true; *************** *** 165,170 **** } echo "</td>"; } - echo '</tr>'; } --- 166,177 ---- } echo "</td>"; + echo '</tr>'; + + if ($filter['invertKeywords']) { + echo "<th>".get_string('stackQuestion_questionKeywordInvertFilter', 'stack').":</th> <td><input type='checkbox' name='bank_filter[invertKeywords]' value='TRUE' checked='TRUE'/></th></tr>"; + } else { + echo "<th>".get_string('stackQuestion_questionKeywordInvertFilter', 'stack').":</th> <td><input type='checkbox' name='bank_filter[invertKeywords]' value='TRUE' /></th></tr>"; + } } } *************** *** 183,186 **** --- 190,194 ---- $filter_des = $filter['description']; $filter_kw = $filter['keywords']; + $filter_kw_I = $filter['invertKeywords']; $q_name = $question['questionName']; $q_des = $question['questionDescription']; *************** *** 253,273 **** $filter_needed = TRUE; ! if ('Any' == $filter['any']) { ! // Any of the keywords ! foreach ($q_kw as $kw) { ! if (array_key_exists($kw,$filter_kw)) { ! $dispQ = TRUE; } ! } ! } else { ! // All the keywords ! $dispQ = TRUE; ! foreach ($filter_kw as $kw=>$val) { ! if (false===in_array($kw,$q_kw)) { ! $dispQ = FALSE; } } - } } --- 261,291 ---- $filter_needed = TRUE; ! if ('Any' == $filter['any']) { ! $dispQK = FALSE; ! // Any of the keywords ! foreach ($q_kw as $kw) { ! if (array_key_exists($kw,$filter_kw)) { ! $dispQK = TRUE; ! } } ! } else { ! // All the keywords ! $dispQK = TRUE; ! foreach ($filter_kw as $kw=>$val) { ! if (false===in_array($kw,$q_kw)) { ! $dispQK = FALSE; ! } } } + // Inverts based soley on whether we "invert keywords" + if ($filter_kw_I) { + $dispQK = !$dispQK; + } + if ('Any' == $filter['any']) { + if ($dispQ OR $dispQK) {$dispQ=TRUE;} else {$dispQ=FALSE;} + } else { + if ($dispQ AND $dispQK) {$dispQ=TRUE;} else {$dispQ=FALSE;} + } } |
From: Chris S. <san...@us...> - 2010-08-26 13:19:26
|
Update of /cvsroot/stack/stack-dev/lang/en In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv1424/lang/en Modified Files: Tag: STACK2_2 stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lang/en/stack.php,v retrieving revision 1.153.2.26 retrieving revision 1.153.2.27 diff -C2 -d -r1.153.2.26 -r1.153.2.27 *** stack.php 11 Aug 2010 16:06:51 -0000 1.153.2.26 --- stack.php 26 Aug 2010 13:19:17 -0000 1.153.2.27 *************** *** 50,53 **** --- 50,54 ---- $string['stackQuestion_questionKeywordFilter'] = 'Keyword filter'; $string['stackQuestion_questionKeywordReset'] = '[reset]'; + $string['stackQuestion_questionKeywordInvertFilter'] = 'Invert keywords'; $string['stackQuestion_questionBody'] = 'Body'; $string['stackQuestion_questionUserLastEdited'] = 'User'; |