You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(486) |
Jul
(201) |
Aug
(194) |
Sep
(87) |
Oct
(72) |
Nov
(72) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(6) |
Feb
(41) |
Mar
(22) |
Apr
(4) |
May
(12) |
Jun
|
Jul
|
Aug
(42) |
Sep
(21) |
Oct
(14) |
Nov
(10) |
Dec
|
2007 |
Jan
(14) |
Feb
(34) |
Mar
(61) |
Apr
(54) |
May
(140) |
Jun
(184) |
Jul
(164) |
Aug
(130) |
Sep
(241) |
Oct
(175) |
Nov
(148) |
Dec
(96) |
2008 |
Jan
(5) |
Feb
(38) |
Mar
(30) |
Apr
(46) |
May
(25) |
Jun
(22) |
Jul
(5) |
Aug
(17) |
Sep
(2) |
Oct
(100) |
Nov
(83) |
Dec
(33) |
2009 |
Jan
(127) |
Feb
(43) |
Mar
(86) |
Apr
(34) |
May
(50) |
Jun
(168) |
Jul
(48) |
Aug
(66) |
Sep
(38) |
Oct
(75) |
Nov
(113) |
Dec
(72) |
2010 |
Jan
(123) |
Feb
(68) |
Mar
(26) |
Apr
(11) |
May
(39) |
Jun
(131) |
Jul
(56) |
Aug
(79) |
Sep
(69) |
Oct
(17) |
Nov
(166) |
Dec
(32) |
2011 |
Jan
(21) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
(1) |
Nov
(8) |
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Chris S. <san...@us...> - 2005-06-27 08:26:51
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28391/scripts Modified Files: stackUtility.php Log Message: Hints added Index: stackUtility.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackUtility.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** stackUtility.php 20 Jun 2005 15:42:55 -0000 1.23 --- stackUtility.php 27 Jun 2005 08:26:40 -0000 1.24 *************** *** 696,699 **** --- 696,700 ---- */ function stack_castext_to_display($strin, &$locals, $display,&$errs) { + global $stack_web_url; // (1) Looks for the name of each $local as such a dummy string *************** *** 739,750 **** } // (2) Take out everything between <html> stuff </html> ! $html =''; if (substr('<html>',$strin)) { // We have something to do. preg_match_all('|<html>(.*)</html>|U',$strin,$html_match); - $html_no=0; foreach ($html_match[1] as $val) { $html_no++; --- 740,768 ---- } + + // (1.5) Convert <hint> stuff </hint> tags to text. + + $html =''; + if (substr('<hint>',$strin)) { // We have something to do. + + preg_match_all('|<hint>(.*)</hint>|U',$strin,$html_match); + + foreach ($html_match[1] as $val) { + $sr = '<hint>'.$val.'</hint>'; + $rep = '<html><a href="javascript:HelpPopup(\''.$val.'\',\'fact\');"><img align="middle" border="0" alt="Question value" src="'.$stack_web_url.'/pics/help.gif" /></a></html>'; + $strin = str_replace($sr,$rep,$strin); + } + + } + + // (2) Take out everything between <html> stuff </html> ! $html =''; ! $html_no = 0; if (substr('<html>',$strin)) { // We have something to do. preg_match_all('|<html>(.*)</html>|U',$strin,$html_match); foreach ($html_match[1] as $val) { $html_no++; |
From: pkiddie <pk...@us...> - 2005-06-23 10:43:28
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17272 Modified Files: stackstd.php.dist Log Message: Index: stackstd.php.dist =================================================================== RCS file: /cvsroot/stack/stack-1-0/stackstd.php.dist,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** stackstd.php.dist 23 Jun 2005 10:11:46 -0000 1.15 --- stackstd.php.dist 23 Jun 2005 10:43:15 -0000 1.16 *************** *** 86,89 **** --- 86,90 ---- if ('win' == $stack_os) { $stack_latex['command'] = "tth -r -L"; + //$stack_latex['command'] = '"c:\Program Files\Maxima-5.9.1\bin\tth.exe" -r -L'; } else { $stack_latex['command'] = "/usr/local/bin/tth -r -L"; |
From: Chris S. <san...@us...> - 2005-06-23 10:19:26
|
Update of /cvsroot/stack/stack-1-0/scripts/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5144/scripts/install Modified Files: stackInstall.php Log Message: Index: stackInstall.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/install/stackInstall.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** stackInstall.php 7 Jun 2005 09:35:15 -0000 1.10 --- stackInstall.php 23 Jun 2005 10:19:16 -0000 1.11 *************** *** 301,305 **** else { echo "\n\n Success with database setup!</br />\n\n"; ! echo "Please proceed to the <a href='stackTest.php'>next stage</a></br />\n\n"; } --- 301,305 ---- else { echo "\n\n Success with database setup!</br />\n\n"; ! echo "Please proceed to the <a href='stacktest.php'>next stage</a></br />\n\n"; } |
From: Chris S. <san...@us...> - 2005-06-23 10:12:15
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv965 Modified Files: stackstd.php.dist Log Message: Index: stackstd.php.dist =================================================================== RCS file: /cvsroot/stack/stack-1-0/stackstd.php.dist,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** stackstd.php.dist 23 Jun 2005 08:05:42 -0000 1.14 --- stackstd.php.dist 23 Jun 2005 10:11:46 -0000 1.15 *************** *** 186,190 **** // Set the default language. ! $stackOptions['Language']['default'] = $stack_defaultlang if ('unix' == $stack_os) { --- 186,190 ---- // Set the default language. ! $stackOptions['Language']['default'] = $stack_defaultlang; if ('unix' == $stack_os) { |
From: Chris S. <san...@us...> - 2005-06-23 08:05:50
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32646 Modified Files: stackstd.php.dist Log Message: Index: stackstd.php.dist =================================================================== RCS file: /cvsroot/stack/stack-1-0/stackstd.php.dist,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** stackstd.php.dist 12 Jun 2005 09:48:38 -0000 1.13 --- stackstd.php.dist 23 Jun 2005 08:05:42 -0000 1.14 *************** *** 63,66 **** --- 63,74 ---- $stack_web_url = 'http://'.$stack_host.'/'.$stack_basepath.'/'; + /***************************************************/ + /* Integration with VLE or stand alone? */ + /***************************************************/ + + /* Output complete webpages, for stand-alone use? */ + $stack_stand_alone = TRUE; + $stack_adminpswd = ''; + $stack_defaultlang = 'en'; // Use the two letter country codes. /***************************************************/ *************** *** 153,164 **** /***************************************************/ - /* Integration with VLE or stand alone? */ - /***************************************************/ - - /* Output complete webpages, for stand-alone use? */ - $stack_stand_alone = TRUE; - $stack_adminpswd = ''; - - /***************************************************/ /* CAS-pool socket configuration (CAS Pool usage) */ /***************************************************/ --- 161,164 ---- *************** *** 185,188 **** --- 185,191 ---- require_once("{$stack_root}/scripts/CASpool/stackProcess.php"); + // Set the default language. + $stackOptions['Language']['default'] = $stack_defaultlang + if ('unix' == $stack_os) { require_once("{$stack_root}/scripts/stackUnix.php"); |
From: Chris S. <san...@us...> - 2005-06-23 08:03:30
|
Update of /cvsroot/stack/stack-1-0/frontend_general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31743/frontend_general Modified Files: process_input.php Log Message: Index: process_input.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/frontend_general/process_input.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** process_input.php 20 Jun 2005 15:42:58 -0000 1.2 --- process_input.php 23 Jun 2005 08:03:21 -0000 1.3 *************** *** 84,86 **** --- 84,89 ---- $username = stack_user_get_name($user); + + $options = stack_options_set(NULL); + ?> |
From: Chris S. <san...@us...> - 2005-06-22 13:14:51
|
Update of /cvsroot/stack/stack-1-0/pics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27877/pics Modified Files: index.php Log Message: Index: index.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/pics/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 1 Apr 2005 19:42:45 -0000 1.3 --- index.php 22 Jun 2005 13:14:36 -0000 1.4 *************** *** 84,88 **** \subsection*{And here is one we made earlier....}'; ! if (function_exists(stack_latex_to_html)) { echo '<h1>About the STACK logo</h1>'; echo stack_latex_to_html($st); --- 84,88 ---- \subsection*{And here is one we made earlier....}'; ! if (function_exists('stack_latex_to_html')) { echo '<h1>About the STACK logo</h1>'; echo stack_latex_to_html($st); |
From: Chris S. <san...@us...> - 2005-06-22 13:14:46
|
Update of /cvsroot/stack/stack-1-0/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27877/html Modified Files: admin-menu.txt index-menu.txt student-menu.txt Log Message: Index: index-menu.txt =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/index-menu.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index-menu.txt 20 Jun 2005 15:42:53 -0000 1.3 --- index-menu.txt 22 Jun 2005 13:14:35 -0000 1.4 *************** *** 2,22 **** // level // text // link // target // ! .Login|index.php?action=loginscreen ! .Register|index.php?action=registration_screen ! .About STACK|documentation.php?action=about_general ! ..Question bank|question_bank.php ! ...New question|question_bank.php?action=edit_new ! ...Author doc|documentation.php?action=author_gettingstarted ! ...Syntax|documentation.php?action=author_commonsyntax ! ...Options|documentation.php?action=author_options ! ...Answer tests|documentation.php?action=author_answertest ! ...FAQ|documentation.php?action=author_faq ! ...Maxima|documentation.php?action=author_maxima ! ...CAS functions|documentation.php?action=functions ! ..CAS online|chat.php ! ..Install|documentation.php?action=about_install ! ..Develop|documentation.php?action=about_develop ! ..Forum|http://mantis.york.ac.uk/moodle/course/view.php?id=21|_blank ! ..Sourceforge|http://sourceforge.net/projects/stack|_blank ! ..Contact|mailto:ch...@sa... ! . <img src="pics/logo.png" width='120' alt="STACK logo" />|documentation.php?action=logo --- 2,22 ---- // level // text // link // target // ! .menu_Login|index.php?action=loginscreen ! .menu_Register|index.php?action=registration_screen ! .menu_About|documentation.php?action=about_general ! ..menu_QB|question_bank.php ! ...menu_NewQ|question_bank.php?action=edit_new ! ...menu_Author|documentation.php?action=author_gettingstarted ! ...menu_Syntax|documentation.php?action=author_commonsyntax ! ...menu_Options|documentation.php?action=author_options ! ...menu_AnswerT|documentation.php?action=author_answertest ! ...menu_FAQ|documentation.php?action=author_faq ! ...menu_Maxima|documentation.php?action=author_maxima ! ...menu_CAS_Fn|documentation.php?action=functions ! ..menu_CAS_OL|chat.php ! ..menu_Install|documentation.php?action=about_install ! ..menu_Develop|documentation.php?action=about_develop ! ..menu_Forum|http://mantis.york.ac.uk/moodle/course/view.php?id=21|_blank ! ..menu_Sourceforge|http://sourceforge.net/projects/stack|_blank ! ..menu_Contact|mailto:ch...@sa... ! .menu_logo|documentation.php?action=logo Index: student-menu.txt =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/student-menu.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** student-menu.txt 20 Jun 2005 15:42:53 -0000 1.3 --- student-menu.txt 22 Jun 2005 13:14:35 -0000 1.4 *************** *** 2,21 **** // level // text // link // target // ! .Select Quiz|index.php?action=choose_quiz ! .Update user info|index.php?action=update_info ! .Logout|index.php?action=logout ! .Help |documentation.php?action=student_overview ! ..Practice Mode|documentation.php?action=student_practicemode ! ..Assessment Mode|documentation.php?action=student_assessmentmode ! ..Answer Input|documentation.php?action=student_input ! ..Stack's output|documentation.php?action=student_understandingoutput ! ..Forbidden Answers|documentation.php?action=student_forbidden ! .About STACK |documentation.php?action=about_general ! ..Question Bank Demo|question_bank.php ! ..CAS online Demo|chat.php ! ..Install|documentation.php?action=about_install ! ..Develop|documentation.php?action=about_develop ! ..STACK Forum|http://mantis.york.ac.uk/moodle/mod/forum/index.php?id=21|_blank ! ..STACK at Sourceforge|http://sourceforge.net/projects/stack|_blank ! ..Contact|mailto:ch...@sa... ! . <img src="pics/logo.png" width='120' alt="STACK logo" />|documentation.php?action=logo --- 2,17 ---- // level // text // link // target // ! .menu_SelectQ|index.php?action=choose_quiz ! .menu_Update|index.php?action=update_info ! .menu_Logout|index.php?action=logout ! .menu_Help|documentation.php?action=student_overview ! ..menu_Practice|documentation.php?action=student_practicemode ! ..menu_Assessment|documentation.php?action=student_assessmentmode ! ..menu_Answer_In|documentation.php?action=student_input ! ..menu_Display|documentation.php?action=student_understandingoutput ! ..menu_Forbidden|documentation.php?action=student_forbidden ! .menu_About|documentation.php?action=about_general ! ..menu_Forum|http://mantis.york.ac.uk/moodle/course/view.php?id=21|_blank ! ..menu_Sourceforge|http://sourceforge.net/projects/stack|_blank ! ..menu_Contact|mailto:ch...@sa... ! .menu_logo|documentation.php?action=logo Index: admin-menu.txt =================================================================== RCS file: /cvsroot/stack/stack-1-0/html/admin-menu.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin-menu.txt 20 Jun 2005 15:42:53 -0000 1.9 --- admin-menu.txt 22 Jun 2005 13:14:35 -0000 1.10 *************** *** 2,29 **** // level // text // link // target // ! .Questions|question_bank.php?action=questionbank_screen ! ..New|question_bank.php?action=edit_new ! ..Import|question_bank.php?action=import ! .Quizzes|editquiz.php?action=quiz_choose ! ..New|editquiz.php?action=quiz_new ! .Reporting|analysis.php ! .Logout|index.php?action=logout ! .Help|documentation.php ! ..Author doc|documentation.php?action=author_gettingstarted ! ..Syntax|documentation.php?action=author_commonsyntax ! ..Question fields|documentation.php?action=author_questionfields ! ..Options|documentation.php?action=author_options ! ..Answer tests|documentation.php?action=author_answertest ! ..Potential responses|documentation.php?action=author_potresp ! ..FAQ|documentation.php?action=author_faq ! ..Maxima|documentation.php?action=author_maxima ! ..CAS functions|documentation.php?action=functions ! .About STACK |documentation.php?action=about_general ! ..Install|documentation.php?action=about_install ! ..Develop|documentation.php?action=about_develop ! ..CAS online|chat.php ! ..MathML Demo|chat_mathml.php ! ..Sourceforge|http://sourceforge.net/projects/stack|_blank ! ..STACK Forum|http://mantis.york.ac.uk/moodle/mod/forum/index.php?id=21|_blank ! ..Contact|mailto:ch...@sa... ! . <img src="pics/logo.png" width='120' alt="STACK logo" />|documentation.php?action=logo --- 2,29 ---- // level // text // link // target // ! .menu_QB|question_bank.php?action=questionbank_screen ! ..menu_New|question_bank.php?action=edit_new ! ..menu_Import|question_bank.php?action=import ! .menu_Quizzes|editquiz.php?action=quiz_choose ! ..menu_New|editquiz.php?action=quiz_new ! .menu_Reporting|analysis.php ! .menu_Logout|index.php?action=logout ! .menu_Help|documentation.php ! ..menu_Author|documentation.php?action=author_gettingstarted ! ..menu_Syntax|documentation.php?action=author_commonsyntax ! ..menu_Qfields|documentation.php?action=author_questionfields ! ..menu_Options|documentation.php?action=author_options ! ..menu_AnswerT|documentation.php?action=author_answertest ! ..menu_PR|documentation.php?action=author_potresp ! ..menu_FAQ|documentation.php?action=author_faq ! ..menu_Maxima|documentation.php?action=author_maxima ! ..menu_CAS_Fn|documentation.php?action=functions ! .menu_About|documentation.php?action=about_general ! ..menu_Install|documentation.php?action=about_install ! ..menu_Develop|documentation.php?action=about_develop ! ..menu_CAS_OL|chat.php ! ..menu_CAS_OLML|chat.php ! ..menu_Forum|http://mantis.york.ac.uk/moodle/course/view.php?id=21|_blank ! ..menu_Sourceforge|http://sourceforge.net/projects/stack|_blank ! ..menu_Contact|mailto:ch...@sa... ! .menu_logo|documentation.php?action=logo |
From: Chris S. <san...@us...> - 2005-06-22 13:14:46
|
Update of /cvsroot/stack/stack-1-0/other In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27877/other Modified Files: ListMenu.php Log Message: Index: ListMenu.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/ListMenu.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ListMenu.php 27 Mar 2005 17:53:31 -0000 1.2 --- ListMenu.php 22 Jun 2005 13:14:36 -0000 1.3 *************** *** 276,280 **** $anchor='<a href="'.$menu[$CurrNodeIndex]['link'].'"'; $anchor.=$menu[$CurrNodeIndex]['target'].$class.'>'; ! $anchor.=$menu[$CurrNodeIndex]['text'].'</a>'; $CurrLevel=$menu[$CurrNodeIndex]['level']; --- 276,282 ---- $anchor='<a href="'.$menu[$CurrNodeIndex]['link'].'"'; $anchor.=$menu[$CurrNodeIndex]['target'].$class.'>'; ! // CJS 22 June 2005. Translations for STACK ! $trans = get_string($menu[$CurrNodeIndex]['text'],'stack'); ! $anchor.= $trans.'</a>'; $CurrLevel=$menu[$CurrNodeIndex]['level']; |
From: Chris S. <san...@us...> - 2005-06-22 13:14:46
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27877/lang/en Modified Files: stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/stack.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** stack.php 21 Jun 2005 15:43:17 -0000 1.4 --- stack.php 22 Jun 2005 13:14:35 -0000 1.5 *************** *** 211,214 **** --- 211,261 ---- $string['stackOptions_ShowSol'] = 'Show solution'; + //////////////////////////////////// + // ListMenu strings. + //////////////////////////////////// + + // Front page + $string['menu_Login'] = 'Login'; + $string['menu_Register'] = 'Register'; + $string['menu_About'] = 'About STACK'; + $string['menu_QB'] = 'Question bank'; + $string['menu_NewQ'] = 'New question'; + $string['menu_Author'] = 'Author doc'; + $string['menu_Syntax'] = 'Syntax'; + $string['menu_Options'] = 'Options'; + $string['menu_AnswerT'] = 'Answer tests'; + $string['menu_FAQ'] = 'FAQ'; + $string['menu_Maxima'] = 'Maxima'; + $string['menu_CAS_Fn'] = 'CAS functions'; + $string['menu_CAS_OL'] = 'CAS online'; + $string['menu_Install'] = 'Install'; + $string['menu_Develop'] = 'Develop'; + $string['menu_Forum'] = 'Forum'; + $string['menu_Sourceforge'] = 'Sourceforge'; + $string['menu_Contact'] = 'Contact'; + $string['menu_logo'] = "<img src='pics/logo.png' width='120' alt='STACK logo' />"; + + // New entries on student page + + $string['menu_SelectQ'] = 'Select Quiz'; + $string['menu_Update'] = 'Update user info'; + $string['menu_Logout'] = 'Logout'; + $string['menu_Help'] = 'Help'; + $string['menu_Practice'] = 'Practice Mode'; + $string['menu_Assessment'] = 'Assessment Mode'; + $string['menu_Answer_In'] = 'Answer Input'; + $string['menu_Display'] = "Stack's output"; + $string['menu_Forbidden'] = 'Forbidden Answers'; + + // New entries on teacher's page + + $string['menu_QB'] = 'Questions'; + $string['menu_New'] = 'New'; + $string['menu_Import'] = 'Import'; + $string['menu_Quizzes'] = 'Quizzes'; + $string['menu_Reporting'] = 'Reporting'; + $string['menu_Qfields'] = 'Question fields'; + $string['menu_PR'] = 'Potential responses'; + //////////////////////////////////// |
From: Chris S. <san...@us...> - 2005-06-22 12:30:51
|
Update of /cvsroot/stack/stack-1-0/lang/nl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7469/lang/nl Modified Files: stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/nl/stack.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** stack.php 20 Jun 2005 15:42:58 -0000 1.2 --- stack.php 22 Jun 2005 12:30:41 -0000 1.3 *************** *** 1 **** ! <?php $string['TrySTACKQuiz'] = 'Probeer een STACK quiz'; $string['STACKHomePage'] = 'STACK startpagina'; $string['Home'] = 'Start'; $string['ClickHereTryQuiz'] = 'Klik hier om een nieuwe quiz te proberen.'; $string['ChooseQuiz'] = 'Kies een quiz'; $string['Focus'] = 'Focus'; $string['FocusExplain'] = 'Klik hier om per keer 1 vraag te zien.'; $string['UnFocus'] = 'Geen focus'; $string['UnFocusExplain'] = 'Klik hier om alle vragen in de quiz te zien.'; $string['Score'] = 'Score'; $string['Mark'] = 'Kijk na'; $string['MarkThisQ'] = 'Kijk na'; $string['MarkQ'] = 'Nakijken vraag '; $string['MarkExplain'] = 'Klik hier om de antwoorden na te kijken.'; $string['Validate'] = 'Valideer'; $string['ValidateExplain'] = 'Klik hier om controleren of uw antwoorden geen syntaxfouten bevat en het systeem ze verwerkt op de manier die u bedoelde.'; $string['ValidateExplain2'] = '(Merk op dat uw antwoorden opgeslagen worden als u valideert.)'; $string['Solutions'] = 'Oplossingen'; $string['SolutionsExplain'] = 'Klik hier om de hele quiz na te kijken en alle oplossingen te tonen.'; $string['SolutionsExplain2'] = '(Nieuwe pogingen worden niet meer toegestaan)'; $string['NewVersion'] = 'Nieuwe versie'; $string['NewVersionExplain'] = 'Klik hier om een nieuwe versie van deze quiz te proberen.'; $string['MarkSummary'] = 'Score Samenvatting'; $string['Question'] = 'Vraag'; $string['Value'] = 'Waarde'; // Aantal scores per vraag $string['Total'] = 'Totaal'; $string['Help'] = 'Help'; $string['End'] = 'Einde'; $string['ThisSTACKVer'] = 'Dit is STACK versie'; $string['ThisPageTook'] = 'Deze pagina werd in'; $string['seconds'] = 'seconden gemaakt'; $string['STACKlogo'] = 'STACK logo'; $string['QValidRequiredField'] = 'Dit is een verplicht veld, maar kent geen waarde.'; $string['QValidDefaultValue'] = 'Een standaardwaarde is toegekend.'; $string['QValidquestionnotar'] = '$question variabele bestaat niet!'; $string['QValidMaximaName'] = 'is een Maxima functie.'; $string['QInstCASError'] = 'CAS FOUT bij het uitvoeren!'; $string['CASError'] = 'CAS FOUT!'; $string['QMarkBailOut'] = 'WAARSCHUWING! STACK sluit af, aangezien de volgende prn meer dan eens bezocht is:'; $string['QTestTeacherInfo'] = 'Informatie voor de docent'; $string['QTestQuestionNote'] = 'Opmerkingen bij de vraag'; $string['Seed'] = 'Seed'; $string['QTestTeacherAns'] = "Antwoord van de docent"; $string['YourLastAns'] = 'Uw laatste antwoord was:'; $string['YouHaveNotAns'] = 'Waarschuwing: u heeft nog niet beantwoord.'; $string['InvalidAns'] = 'Dit is een ongeldig antwoord.'; $string['AttemptNoPenalty'] = 'Deze poging wordt zonder strafpunten genegeerd.'; $string['YourMarkFor'] = 'Uw score voor deze poging is'; $string['WithPenaltiesAnd'] = 'Met strafpunten, en vorige pogingen, geeft dit de score {$a[\'mark\']} uit {$a[\'QuVal\']}'; $string['YourMarkIs'] = 'Uw score is{$a[\'mark\']}, uit {$a[\'QuVal\']}.'; $string['InvalidNoMark'] = 'Uw antwoord is ongeldig, daarom is er geen score of strafpunt voor deze poging.'; $string['InvalidPreviousMark'] = 'Vorige pogingen geven een score van {$a[\'mark\']} uit {$a[\'QuVal\']}'; $string['InputTool'] = 'Formule editor'; $string['SyntaxHint'] = 'Syntax hint'; $string['TeacherAnsIs'] = 'Het antwoord van de docent is'; $string['ThisCanDisplay'] = 'Dit kan ingevoerd worden als'; $string['WorkedSolution'] = 'Oplosssing'; $string['NoSolution'] = '[Geen oplossing beschikbaar]'; $string['YourAttemptsWere'] = 'Uw pogingen voor deze vraag waren als volgt.'; $string['Answer'] = 'Antwoord'; $string['NoAttemptsAtQ'] = 'Uw heeft deze vraag nog niet geprobeerd.'; $string['ShowAt_RawAns'] = 'Ruwe antwoord'; $string['ShowAt_Action'] = 'Actie'; $string['ShowAt_Valid'] = 'Geldig ?'; $string['ShowAt_Ans'] = 'Antwoord'; $string['ShowAt_RawMark'] = 'Ruwe score'; $string['ShowAt_Penalty'] = 'Strafpunten'; $string['ShowAt_FeedBack'] = 'Feedback'; $string['ShowAt_AnswerNote'] = 'Opmerkingen bij het antwoord'; $string['SeriousForbid'] = 'De tekst <tt><font color=\'orange\'></font></tt> is niet toegestaan!<br />'; $string['MissingRightBracket'] = 'Het antwoord mist een rechter haakje.'; $string['MissingLeftBracket'] = 'Het antwoord mist een linker haakje.'; $string['IllegalSpaces'] = 'Het antwoord heeft witruimte tussen termen in uw expressie. Controleer het antwoord.'; $string['MissingStars'] = 'Het antwoord mist *\'en.<br /> Bedoelde u eigenlijk '; $string['BadAmps'] = 'Het antwoord mag geen @\'en bevatten. '; $string['BadAbsFun'] = 'Het antwoord mag geen |\'en bevatten. Voor absoluutstrepen kunt u de <tt>abs()</tt> CAS functie gebruiken.'; $string['UnknownFun'] = 'De tekst <tt><font color=\'orange\'>{$a[\'key\']}</font></tt> komt niet voor in de lijst met toegestane functies. Wellicht bent u vermenigvuldigingstekens, of haakjes vergeten. Bij problemen en vragen kunt u contact opnemen met de beheerder.'; $string['NotSupported'] = 'De tekst <tt><font color=\'orange\'>{$a[\'key\']}</font></tt> is een geldig CAS commando, maar wordt niet door STACK ondersteund. Wellicht is er een alternatief. Bij problemen en vragen kunt u contact opnemen met de beheerder.'; $string['EmptyCASString'] = 'Het antwoord is een lege <tt>casstring</tt>, hetgeen niet toegestaan is.'; $string['ErrorCASString'] = 'De tekst <font color=\'orange\'><tt>@{$a[\'key\']}@</tt></font> genereerde de volgende fout(en)'; $string['OddAmpCASString'] = 'Het antwoord bevat een oneven aantal @en, hetgeen niet toegestaan is.'; $string['IncorrectPassword'] = 'Incorrect wachtwoord!'; $string['IncorrectAdminPsd'] = 'Incorrect Admin wachtwoord'; $string['UnknownUserName'] = 'Gebruikersnaam bestaat niet!'; $string['MisMatchPassword'] = 'De twee wachtwoorden zijn niet hetzelfde!'; $string['OldPasswordUnch'] = 'Uw oude wachtwoord is niet veranderd.'; $string['USR_Username'] = 'Gebruikersnaam'; $string['USR_NewPassword'] = 'Nieuwe wachtwoord'; $string['USR_ConfirmPsswd'] = '(bevestig)'; $string['USR_FirstName'] = 'Voornaam'; $string['USR_LastName'] = 'Achternaam'; $string['USR_Email'] = 'Email'; $string['USR_OptionalInformation'] = 'Optionele Informatie'; $string['USR_Phone'] = 'Telefoon'; $string['USR_StudentID'] = 'Studentnummer'; $string['USR_Address'] = 'Adres'; $string['USR_Department'] = 'Faculteit'; $string['USR_Institution'] = 'Instelling'; $string[''] = ''; $string[''] = ''; $string[''] = ''; $string[''] = ''; $string[''] = ''; //get_string('ThisSTACKVer','stack','') ?> \ No newline at end of file --- 1,237 ---- ! <?php ! ! //////////////////////////////////////// ! // NEDERLANDS ! //////////////////////////////////////// ! ! $string['TrySTACKQuiz'] = 'Probeer een STACK quiz'; ! $string['STACKHomePage'] = 'STACK startpagina'; ! $string['Home'] = 'Start'; ! $string['ClickHereTryQuiz'] = 'Klik hier om een nieuwe quiz te proberen.'; ! $string['ChooseQuiz'] = 'Kies een quiz'; ! $string['Focus'] = 'Focus'; ! $string['FocusExplain'] = 'Klik hier om per keer 1 vraag te zien.'; ! $string['UnFocus'] = 'Geen focus'; ! $string['UnFocusExplain'] = 'Klik hier om alle vragen in de quiz te zien.'; ! $string['Score'] = 'Score'; ! $string['Mark'] = 'Kijk na'; ! $string['MarkThisQ'] = 'Kijk na'; ! $string['MarkQ'] = 'Nakijken vraag '; ! $string['MarkExplain'] = 'Klik hier om de antwoorden na te kijken.'; ! $string['Validate'] = 'Valideer'; ! $string['ValidateExplain'] = 'Klik hier om controleren of uw antwoorden geen syntaxfouten bevat en het systeem ze verwerkt op de manier die u bedoelde.'; ! $string['ValidateExplain2'] = '(Merk op dat uw antwoorden opgeslagen worden als u valideert.)'; ! $string['Solutions'] = 'Oplossingen'; ! $string['SolutionsExplain'] = 'Klik hier om de hele quiz na te kijken en alle oplossingen te tonen.'; ! $string['SolutionsExplain2'] = '(Nieuwe pogingen worden niet meer toegestaan)'; ! $string['NewVersion'] = 'Nieuwe versie'; ! $string['NewVersionExplain'] = 'Klik hier om een nieuwe versie van deze quiz te proberen.'; ! $string['MarkSummary'] = 'Score Samenvatting'; ! $string['Question'] = 'Vraag'; ! $string['Value'] = 'Waarde'; // Aantal scores per vraag ! $string['Total'] = 'Totaal'; ! $string['Help'] = 'Help'; ! $string['End'] = 'Einde'; ! $string['ThisSTACKVer'] = 'Dit is STACK versie'; ! $string['ThisPageTook'] = 'Deze pagina werd in'; ! $string['seconds'] = 'seconden gemaakt'; ! $string['STACKlogo'] = 'STACK logo'; ! $string['QValidRequiredField'] = 'Dit is een verplicht veld, maar kent geen waarde.'; ! $string['QValidDefaultValue'] = 'Een standaardwaarde is toegekend.'; ! $string['QValidquestionnotar'] = '$question variabele bestaat niet!'; ! $string['QValidMaximaName'] = 'is een Maxima functie.'; ! $string['QInstCASError'] = 'CAS FOUT bij het uitvoeren!'; ! $string['CASError'] = 'CAS FOUT!'; ! $string['QMarkBailOut'] = 'WAARSCHUWING! STACK sluit af, aangezien de volgende prn meer dan eens bezocht is:'; ! $string['QTestTeacherInfo'] = 'Informatie voor de docent'; ! $string['QTestQuestionNote'] = 'Opmerkingen bij de vraag'; ! $string['Seed'] = 'Seed'; ! $string['QTestTeacherAns'] = "Antwoord van de docent"; ! $string['YourLastAns'] = 'Uw laatste antwoord was:'; ! $string['YouHaveNotAns'] = 'Waarschuwing: u heeft nog niet beantwoord.'; ! $string['InvalidAns'] = 'Dit is een ongeldig antwoord.'; ! $string['AttemptNoPenalty'] = 'Deze poging wordt zonder strafpunten genegeerd.'; ! $string['YourMarkFor'] = 'Uw score voor deze poging is'; ! $string['WithPenaltiesAnd'] = 'Met strafpunten, en vorige pogingen, geeft dit de score {$a[\'mark\']} uit {$a[\'QuVal\']}'; ! $string['YourMarkIs'] = 'Uw score is{$a[\'mark\']}, uit {$a[\'QuVal\']}.'; ! $string['InvalidNoMark'] = 'Uw antwoord is ongeldig, daarom is er geen score of strafpunt voor deze poging.'; ! $string['InvalidPreviousMark'] = 'Vorige pogingen geven een score van {$a[\'mark\']} uit {$a[\'QuVal\']}'; ! $string['InputTool'] = 'Formule editor'; ! $string['SyntaxHint'] = 'Syntax hint'; ! $string['TeacherAnsIs'] = 'Het antwoord van de docent is'; ! $string['ThisCanDisplay'] = 'Dit kan ingevoerd worden als'; ! $string['WorkedSolution'] = 'Oplosssing'; ! $string['NoSolution'] = '[Geen oplossing beschikbaar]'; ! $string['YourAttemptsWere'] = 'Uw pogingen voor deze vraag waren als volgt.'; ! $string['Answer'] = 'Antwoord'; ! $string['NoAttemptsAtQ'] = 'Uw heeft deze vraag nog niet geprobeerd.'; ! $string['ShowAt_RawAns'] = 'Ruwe antwoord'; ! $string['ShowAt_Action'] = 'Actie'; ! $string['ShowAt_Valid'] = 'Geldig ?'; ! $string['ShowAt_Ans'] = 'Antwoord'; ! $string['ShowAt_RawMark'] = 'Ruwe score'; ! $string['ShowAt_Penalty'] = 'Strafpunten'; ! $string['ShowAt_FeedBack'] = 'Feedback'; ! $string['ShowAt_AnswerNote'] = 'Opmerkingen bij het antwoord'; ! $string['SeriousForbid'] = 'De tekst <tt><font color=\'orange\'></font></tt> is niet toegestaan!<br />'; ! $string['MissingRightBracket'] = 'Het antwoord mist een rechter haakje.'; ! $string['MissingLeftBracket'] = 'Het antwoord mist een linker haakje.'; ! $string['IllegalSpaces'] = 'Het antwoord heeft witruimte tussen termen in uw expressie. Controleer het antwoord.'; ! $string['MissingStars'] = 'Het antwoord mist *\'en.<br /> Bedoelde u eigenlijk '; ! $string['BadAmps'] = 'Het antwoord mag geen @\'en bevatten. '; ! $string['BadAbsFun'] = 'Het antwoord mag geen |\'en bevatten. Voor absoluutstrepen kunt u de <tt>abs()</tt> CAS functie gebruiken.'; ! $string['UnknownFun'] = 'De tekst <tt><font color=\'orange\'>{$a[\'key\']}</font></tt> komt niet voor in de lijst met toegestane functies. Wellicht bent u vermenigvuldigingstekens, of haakjes vergeten. Bij problemen en vragen kunt u contact opnemen met de beheerder.'; ! $string['NotSupported'] = 'De tekst <tt><font color=\'orange\'>{$a[\'key\']}</font></tt> is een geldig CAS commando, maar wordt niet door STACK ondersteund. Wellicht is er een alternatief. Bij problemen en vragen kunt u contact opnemen met de beheerder.'; ! $string['EmptyCASString'] = 'Het antwoord is een lege <tt>casstring</tt>, hetgeen niet toegestaan is.'; ! $string['ErrorCASString'] = 'De tekst <font color=\'orange\'><tt>@{$a[\'key\']}@</tt></font> genereerde de volgende fout(en)'; ! $string['OddAmpCASString'] = 'Het antwoord bevat een oneven aantal @en, hetgeen niet toegestaan is.'; ! $string['IncorrectPassword'] = 'Incorrect wachtwoord!'; ! $string['IncorrectAdminPsd'] = 'Incorrect Admin wachtwoord'; ! $string['UnknownUserName'] = 'Gebruikersnaam bestaat niet!'; ! $string['MisMatchPassword'] = 'De twee wachtwoorden zijn niet hetzelfde!'; ! $string['OldPasswordUnch'] = 'Uw oude wachtwoord is niet veranderd.'; ! $string['USR_Username'] = 'Gebruikersnaam'; ! $string['USR_NewPassword'] = 'Nieuwe wachtwoord'; ! $string['USR_ConfirmPsswd'] = '(bevestig)'; ! $string['USR_FirstName'] = 'Voornaam'; ! $string['USR_LastName'] = 'Achternaam'; ! $string['USR_Email'] = 'Email'; ! $string['USR_OptionalInformation'] = 'Optionele Informatie'; ! $string['USR_Phone'] = 'Telefoon'; ! $string['USR_StudentID'] = 'Studentnummer'; ! $string['USR_Address'] = 'Adres'; ! $string['USR_Department'] = 'Faculteit'; ! $string['USR_Institution'] = 'Instelling'; ! ! //////////////////////////////////////// ! // STACK data structures ! //////////////////////////////////////// ! ! // The $stackQuestion data structure ! ! $string['stackQuestion_questionVarsRaw'] = 'Vraag variabelen'; ! $string['stackQuestion_questionVars'] = '(Interne) Vraag variabelen'; ! $string['stackQuestion_questionStem'] = 'Vraag stam'; ! $string['stackQuestion_questionAns'] = "Antwoord van de docent"; ! $string['stackQuestion_questionAnsKey'] = "Antwoord van de Student opslaan in"; // De naam van de variabele waarin het antwoord van de student wordt gezet. ! $string['stackQuestion_questionAnsVarsRaw'] = 'Feedback variabelen'; ! $string['stackQuestion_questionAnsVars'] = '(Interne) Feedback variabelen'; ! $string['stackQuestion_questionPotResp'] = 'Mogelijke antwoorden'; ! $string['stackQuestion_questionSol'] = 'Uitgewerkte oplossing'; ! $string['stackQuestion_questionOptions'] = 'Opties'; ! $string['stackQuestion_questionNote'] = 'Vraag opmerking'; ! $string['stackQuestion_questionID'] = 'Unieke vraag ID'; ! $string['stackQuestion_questionGUID'] = 'Globaal unieke vraag ID'; ! $string['stackQuestion_questionName'] = 'Naam'; ! $string['stackQuestion_questionDescription'] = 'Beschrijving'; ! $string['stackQuestion_questionKeywords'] = 'Trefwoorden'; ! $string['stackQuestion_questionBody'] = 'Hoofdtekst'; ! $string['stackQuestion_questionUserLastEdited'] = 'Laatst bewerkt door'; ! $string['stackQuestion_questionDateLastEdited'] = 'Laatst bewerkt op'; ! ! // De $stackQuestionInst data structuur: instanties van de vragen ! ! $string['stackQuestion_questionInstAttempts'] = 'Pogingen voor deze vraag'; ! $string['stackQuestion_questionSeedInst'] = 'Willekeurig getal'; ! $string['stackQuestion_questionAnsTestOptInst'] = 'Nakijkmethode opties'; ! ! // Mogelijke antwoorden ! ! $string['stackQuestion_PR_SAns'] = 'Expressie 1: SAns (Student antwoord)'; ! $string['stackQuestion_PR_TAns'] = 'Expressie 2: TAns (Docent antwoord)'; ! $string['stackQuestion_PR_AnsTest'] = 'Nakijkmethode'; ! $string['stackQuestion_PR_AnsTestOpt'] = 'Nakijkmethode opties'; ! $string['stackQuestion_PR_RawMarkMod'] = 'Hoe de score bewerken?'; ! $string['stackQuestion_PR_RawMark'] = 'Score bewerken met'; ! $string['stackQuestion_PR_Penalty'] = 'Strafpunten'; ! $string['stackQuestion_PR_FeedBack'] = 'Feedback'; ! $string['stackQuestion_PR_AnswerNote'] = 'Antwoord opmerking'; ! $string['stackQuestion_PR_ApLat'] = 'Wat daarna doen?'; ! ! //////////////////////////////////// ! // Opties ! //////////////////////////////////// ! ! $string['stackOptions_InsertStars'] = "Voeg *en in waar dat nodig is"; ! $string['stackOptions_InformalSyntax'] = 'Sta informele invoer toe'; ! $string['stackOptions_AllowInputTool'] = 'Invoer editor'; ! $string['stackOptions_SyntaxHint'] = 'Syntax Hint'; ! $string['stackOptions_Display'] = 'Uitvoer'; ! $string['stackOptions_Language'] = 'Taal'; ! $string['stackOptions_QuVal'] = 'Vraag waarde'; ! $string['stackOptions_MarkModMethod'] = 'Cijfer methode'; ! $string['stackOptions_Penalty'] = 'Strafpunten'; ! $string['stackOptions_Forbid'] = 'Verboden woorden'; ! $string['stackOptions_Allow'] = 'Toegestane woorden'; ! $string['stackOptions_AnsTest'] = 'Nakijkmethode'; ! $string['stackOptions_AnsTestOpt'] = 'Nakijkmethode opties'; ! $string['stackOptions_TeacherEmail'] = "Email docent"; ! $string['stackOptions_FeedBackGenericCorrect'] = 'Feedback: goed'; ! $string['stackOptions_FeedBackGenericCorrect_def'] = "<font color='green'>Het antwoord is goed, goed gedaan.</font>"; ! $string['stackOptions_FeedBackGenericIncorrect'] = 'Feedback: niet goed'; ! $string['stackOptions_FeedBackGenericIncorrect_def'] = "<font color='red'>Het antwoord is niet goed.</font>"; ! $string['stackOptions_FeedBackGenericPCorrect'] = 'Feedback: gedeeltelijk goed'; ! $string['stackOptions_FeedBackGenericPCorrect_def'] = "<font color='orange'>Het antwoord is gedeeltelijk goed.</font>"; ! $string['stackOptions_ShowSol'] = 'Laat oplossing zien'; ! ! ! //////////////////////////////////// ! // Vragenbank. ! //////////////////////////////////// ! ! $string['qp_notadmin'] = "<p><font color='red'>Waarschuwing!</font> Je bent niet de beheerder en daarom worden wijzigingen niet opgeslagen.</p>"; ! ! ! //////////////////////////////////// ! // Communicatie met CAS ! //////////////////////////////////// ! ! $string['NEWLINE'] = ' <html><br /></html>'; ! ! //////////////////////////////////// ! // Specifiek voor antwoorden ! //////////////////////////////////// ! ! $string['ATAlgEquiv_SA_notmatrix'] = 'Het antwoord zou een matrix moeten zijn, maar is dat niet.'; ! $string['ATAlgEquiv_SA_notlist'] = 'Het antwoord zou een lijst moeten zijn, maar is dat niet. Een lijst voer je in door een reeks door komma gescheiden symbolen binnen rechte haken te zetten.'; ! $string['ATAlgEquiv_SA_notset'] = 'Het antwoord zou een verzameling moeten zijn, maar is dat niet. Een verzameling voer je indoor komma gescheiden symbolen binnen accolades te zetten.'; ! ! $string['ATList_wronglen'] = 'De lijst zou {$a[0]} elementen moeten bevatten, maar het zijn er {$a[1]}. '; ! $string['ATList_wrongentries'] = 'De waardes hieronder in het rood zijn niet correct. {$a[0]} '; ! ! $string['ATMatrix_wrongsz'] = 'De matrix zou {$a[0]} bij {$a[1]} groot moeten zijn, maar is {$a[2]} bij {$a[3]}.'; ! $string['ATMatrix_wrongentries'] = 'De waardes hieronder in het rood zijn niet correct. {$a[0]}'; ! ! $string['ATSet_wrongsz'] = 'De verzameling moet {$a[0]} verschillende elementen bevatten, het zijn er echter {$a[1]}.'; ! $string['ATSet_wrongentries'] = 'De volgende waardes zijn niet goed, ook al kunnen ze er anders uit zien dan hoe je ze invoerde. {$a[0]} '; ! ! $string['irred_Q_factored'] = 'De term {$a[0]} zou niet ontbonden moeten zijn, maar dat is niet het geval.'; ! $string['irred_Q_commonint'] = 'Je moet een gemeenschappelijke gehele factor buiten de haakjes halen. '; // needs a space at the end. ! $string['irred_Q_optional_fac'] = 'Je kunt nog wat meer doen, aangezien {$a[0]} nog verder ontbonden kan worden. In dit geval hoeft het niet. '; ! ! $string['FacForm_UnPick_morework'] = 'Je kunt de term {$a[0]} wat meer uitwerken. '; ! $string['FacForm_UnPick_intfac'] = $string['irred_Q_commonint']; ! ! $string['ATFacForm_error_list'] = 'Het antwoord kon niet verwerkt worden. Neem contact op met de beheerder'; ! $string['ATFacForm_error_degreeSA'] = 'Het systeem kon de graad van je antwoord niet bepalen.'; ! $string['ATFacForm_error_float'] = 'Je moet geen kommagetallen gebruiken. Gebruik alleen gehele getallen, breuken etc.'; ! $string['ATFacForm_isfactored'] = 'Het antwoord is ontbonden in factoren, goed gedaan. '; // needs a space at the end. ! $string['ATFacForm_notfactored'] = 'Het antwoord is niet ontbonden in factoren. '; // needs a space at the end. ! $string['ATFacForm_notalgequiv'] = 'Het antwoord is niet algebraisch gelijk aan het juiste antwoord. Je hebt iets fout gedaan.. '; // needs a space at the end. ! ! $string['ATInt_error_list'] = $string['ATFacForm_error_list']; ! $string['ATInt_const_int'] = 'Je moet nog een integratieconstante toevoegen. Dit moet een willekeurige constante zijn, niet een getal.'; ! $string['ATInt_const'] = 'Je moet nog een integratieconstante toevoegen, verder is het goed. Goed gedaan.'; ! $string['ATInt_diff'] = 'Je hebt nu gedifferentieerd!!'; ! $string['ATInt_generic'] = 'De afgeleide van je antwoord zou gelijk moeten zijn aan de functie die je moest integreren, namelijk: {$a[0]} De afgeleide van je antwoord ten opzichte van {$a[1]} is echter: {$a[2]} dus je moet iets fout hebben gedaan!'; ! ! $string['ATDiff_error_list'] = $string['ATFacForm_error_list']; ! $string['ATDiff_int'] = 'Je hebt nu geintegreerd!'; ! ! $string[''] = ''; ! $string[''] = ''; ! $string[''] = ''; ! $string[''] = ''; ! ! //get_string('ThisSTACKVer','stack','') ! ?> |
From: Chris S. <san...@us...> - 2005-06-21 18:02:15
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10117/lang/en Modified Files: stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/stack.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** stack.php 21 Jun 2005 14:52:25 -0000 1.3 --- stack.php 21 Jun 2005 15:43:17 -0000 1.4 *************** *** 150,153 **** --- 150,156 ---- $string['stackQuestion_questionDateLastEdited'] = 'Last edited on'; + // Used in the question bank order select form to indicate no selection. + $string['stackQuestion_NONE'] = '[NONE]'; + // The $stackQuestionInst data structure: instantiated questions |
From: Chris S. <san...@us...> - 2005-06-21 18:02:15
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10117/scripts Modified Files: stackDatabase.php Log Message: Index: stackDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackDatabase.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** stackDatabase.php 21 Jun 2005 14:52:26 -0000 1.19 --- stackDatabase.php 21 Jun 2005 15:43:17 -0000 1.20 *************** *** 115,120 **** } ! $question_order = 'ORDER BY questionName, questionKeywords, questionID '; ! // Build the query to the database. $query = 'SELECT --- 115,120 ---- } ! $question_order = stack_db_question_filter_quearyfrag($filter); ! // Build the query to the database. $query = 'SELECT *************** *** 210,214 **** global $_PHP_SELF; ! $question_order = 'ORDER BY questionName, questionKeywords, questionID '; $query = 'SELECT questionID, questionName, questionKeywords FROM stackQuestion '.$question_order; $result = stack_db_query($query); --- 210,214 ---- global $_PHP_SELF; ! $question_order = stack_db_question_filter_quearyfrag($filter); $query = 'SELECT questionID, questionName, questionKeywords FROM stackQuestion '.$question_order; $result = stack_db_query($query); *************** *** 259,271 **** } /** * The HTML necessary for the top of the question bank table, to include the filter interactions. * * @return void */ function stack_db_question_filter_tablehead($action,$filter,$quizid=0) { ! echo "<thead>\n<tr>\n"; if ('edit'==$action) { echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th>Last edit</th>'; --- 259,324 ---- } + /** + * Write the MySQL queary fragment to order the questions in a more flexible way + * + * @param array $filter The question bank filter array. + * @return string $queryfrag + */ + function stack_db_question_filter_quearyfrag($filter) { + + // 'ORDER BY questionName, questionKeywords, questionID '; + $queryfrag = ' ORDER BY questionID'; + + // First level + if ('NONE' != $filter['order1']) { + $queryfrag = ' ORDER BY '.$filter['order1']; + + // Second level + if ('NONE' != $filter['order2'] and $filter['order1'] != $filter['order2']) { + $queryfrag .= ', '.$filter['order2']; + + // Third level + if ('NONE' != $filter['order3'] and + $filter['order1'] != $filter['order3'] and + $filter['order2'] != $filter['order3']) { + $queryfrag .= ', '.$filter['order3']; + } + } + } + return $queryfrag; + } /** * The HTML necessary for the top of the question bank table, to include the filter interactions. * + * @param string $action The required action when the form is submitted. eg edit, edit_metadata, try, add_quiz + * @param array $filter The question bank filter array. + * @param int $quizid The ID number of the quiz, if any, to add these questions to. * @return void */ function stack_db_question_filter_tablehead($action,$filter,$quizid=0) { ! echo "<thead>\n"; ! ! // Print the interactions for ordering the output of the queary. ! echo "<tr><th></th><th colspan='2'>Order output by:</th> </tr>\n"; ! ! $fields1 = array('questionName', 'questionKeywords', 'questionID','questionDescription','questionDateLastEdited','NONE'); ! $fields2 = array('order1','order2','order3'); ! $fields3 = array('1st','2nd','3rd'); ! ! foreach ($fields2 as $no => $fn){ ! echo "<tr><th>{$fields3[$no]} </th>\n"; ! echo '<th colspan="2"><select name="bank_filter['.$fn.']">'; ! foreach ($fields1 as $key) { ! if ($key == $filter[$fn]) { ! echo "\n <option value='$key' selected>".get_string('stackQuestion_'.$key,'stack')."</option>"; ! } else { ! echo "\n <option value='$key'>".get_string('stackQuestion_'.$key,'stack')."</option>"; ! } ! } ! echo "\n</select></th>\n</tr>\n"; ! } ! if ('edit'==$action) { echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th>Last edit</th>'; *************** *** 287,293 **** echo '<th><input type="text" name="bank_filter[kw]" value="'.$filter['kw'].'" /></th>'; if ($filter['case_sense']) { ! echo "<th>Case sensitive <input type='checkbox' name='bank_filter[case_sense]' value='TRUE' checked='TRUE' /></th>"; } else { ! echo "<th>Case sensitive <input type='checkbox' name='bank_filter[case_sense]' value='TRUE' /></th>"; } echo "</tr></thead>\n"; --- 340,346 ---- echo '<th><input type="text" name="bank_filter[kw]" value="'.$filter['kw'].'" /></th>'; if ($filter['case_sense']) { ! echo "<th colspan='2'>Case sensitive <input type='checkbox' name='bank_filter[case_sense]' value='TRUE' checked='TRUE' /></th>"; } else { ! echo "<th colspan='2'>Case sensitive <input type='checkbox' name='bank_filter[case_sense]' value='TRUE' /></th>"; } echo "</tr></thead>\n"; |
From: Chris S. <san...@us...> - 2005-06-21 17:37:40
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17304 Modified Files: editquiz.php Log Message: Index: editquiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/editquiz.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** editquiz.php 20 Jun 2005 15:42:52 -0000 1.11 --- editquiz.php 21 Jun 2005 14:52:23 -0000 1.12 *************** *** 149,153 **** break; case 'quiz_edit_addqs': ! stack_display_editquiz_add_questions($PostTo, $quizid, $question_bank_filter); break; case 'quiz_xml'; --- 149,153 ---- break; case 'quiz_edit_addqs': ! stack_db_listquestions_quiz($question_bank_filter,$quizid); break; case 'quiz_xml'; |
From: Chris S. <san...@us...> - 2005-06-21 17:37:39
|
Update of /cvsroot/stack/stack-1-0/frontend_general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17304/frontend_general Modified Files: editquiz_display.php frontend_util.php Log Message: Index: frontend_util.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/frontend_general/frontend_util.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** frontend_util.php 20 Jun 2005 15:42:58 -0000 1.2 --- frontend_util.php 21 Jun 2005 14:52:24 -0000 1.3 *************** *** 118,129 **** */ function stack_get_questionbank_filter() { ! $question_bank_filter = ''; if (array_key_exists('bank_filter',$_SESSION)) { $question_bank_filter = $_SESSION['bank_filter']; } if (array_key_exists('bank_filter',$_POST)) { $question_bank_filter = $_POST['bank_filter']; ! $_SESSION['bank_filter'] = $question_bank_filter; } return $question_bank_filter; } --- 118,140 ---- */ function stack_get_questionbank_filter() { ! ! // Ensure all fields exist and are set. ! $question_bank_filter['name'] = ''; ! $question_bank_filter['kw'] = ''; ! $question_bank_filter['case_sense'] = FALSE; ! ! if (array_key_exists('bank_filter',$_SESSION)) { $question_bank_filter = $_SESSION['bank_filter']; } + if (array_key_exists('bank_filter',$_POST)) { $question_bank_filter = $_POST['bank_filter']; ! if (!array_key_exists('case_sense',$question_bank_filter)) { ! $question_bank_filter['case_sense'] = FALSE; ! } } + + $_SESSION['bank_filter'] = $question_bank_filter; return $question_bank_filter; } Index: editquiz_display.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/frontend_general/editquiz_display.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** editquiz_display.php 20 Jun 2005 15:42:58 -0000 1.2 --- editquiz_display.php 21 Jun 2005 14:52:24 -0000 1.3 *************** *** 77,102 **** /* - * Displays the page for adding questions to a quiz - * @param string $PostTo The page that the info from the form should be posted to - * @param int $quizid The id of the quiz to add the questions to - * @param array $question_bank_filter The question bank filter to apply - * @return void - */ - function stack_display_editquiz_add_questions($PostTo, $quizid, $question_bank_filter) { - echo "<p>\n<form name='quizform' action='$PostTo' method='POST'> - <input type='hidden' name='quizid' value='$quizid'>"; - - echo "<a href=\"javascript:takeaction('filter',{$quizid});\">Filter</a> "; - echo "Name = <input type='text' name='bank_filter[name]' value='{$question_bank_filter['name']}' />"; - echo " Keyword = <input type='text' name='bank_filter[kw]' value='{$question_bank_filter['kw']}' />"; - - stack_db_listquestions_quiz($question_bank_filter); - - echo '<input type="hidden" name="action" value="quiz_edit" />'; - echo "<input type=\"submit\" value=\"Add\" />\n</form>\n"; - - } - - /* * Displays the page for editting a quiz * @param array $quiz The quiz to edit --- 77,80 ---- |
From: Chris S. <san...@us...> - 2005-06-21 17:37:39
|
Update of /cvsroot/stack/stack-1-0/scripts/maxima In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17304/scripts/maxima Modified Files: stackmaxima.mac stacktex.lisp Log Message: Index: stackmaxima.mac =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/maxima/stackmaxima.mac,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** stackmaxima.mac 20 Jun 2005 15:42:54 -0000 1.14 --- stackmaxima.mac 21 Jun 2005 14:52:25 -0000 1.15 *************** *** 50,53 **** --- 50,54 ---- e:exp(1); pi:%pi; + ALIAS(ln,log); /* ********************************** */ Index: stacktex.lisp =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/maxima/stacktex.lisp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** stacktex.lisp 13 Mar 2005 15:03:17 -0000 1.1 --- stacktex.lisp 21 Jun 2005 14:52:25 -0000 1.2 *************** *** 66,67 **** --- 66,107 ---- (defprop $texcolor tex-texcolor tex) + + ;; Changed log to ln, and other things + + (mapc #'tex-setup + '( + (%acos "\\cos^{-1} ") ; CJS, changed! + (%asin "\\sin^{-1} ") ; CJS, changed! + (%atan "\\tan^{-1} ") ; CJS, changed! + ; Latex's arg(x) is ... ? + (%cos "\\cos ") + (%cosh "\\cosh ") + (%cot "\\cot ") + (%coth "\\coth ") + (%csc "\\csc ") + ; Latex's "deg" is ... ? + (%determinant "\\det ") + (%dim "\\dim ") + (%exp "\\exp ") + (%gcd "\\gcd ") + ; Latex's "hom" is ... ? + (%inf "\\inf ") ; many will prefer "\\infty". Hmmm. + ; Latex's "ker" is ... ? + ; Latex's "lg" is ... ? + ; lim is handled by tex-limit. + ; Latex's "liminf" ... ? + ; Latex's "limsup" ... ? + (%ln "\\ln ") + (%log "\\ln ") ; CJS, changed! + (%max "\\max ") + (%min "\\min ") + ; Latex's "Pr" ... ? + (%sec "\\sec ") + (%sin "\\sin ") + (%sinh "\\sinh ") + ; Latex's "sup" ... ? + (%tan "\\tan ") + (%tanh "\\tanh ") + ;; (%erf "{\\rm erf}") this would tend to set erf(x) as erf x. Unusual + ;(%laplace "{\\cal L}") + )) ;; etc |
From: Chris S. <san...@us...> - 2005-06-21 17:37:38
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17304/lang/en Modified Files: stack.php Log Message: Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/lang/en/stack.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** stack.php 20 Jun 2005 15:58:20 -0000 1.2 --- stack.php 21 Jun 2005 14:52:25 -0000 1.3 *************** *** 159,166 **** --- 159,170 ---- $string['stackQuestion_PR_SAns'] = 'Expression 1: SAns'; + $string['stackQuestion_PR_SAns2'] = 'SAns'; $string['stackQuestion_PR_TAns'] = 'Expression 2: TAns'; + $string['stackQuestion_PR_TAns2'] = 'TAns'; $string['stackQuestion_PR_AnsTest'] = 'Answer test'; $string['stackQuestion_PR_AnsTestOpt'] = 'Answer test options'; + $string['stackQuestion_PR_AnsTestOpts'] = 'Test ops'; $string['stackQuestion_PR_RawMarkMod'] = 'Mark modifier operation'; + $string['stackQuestion_PR_RawMarkMod2'] = 'Mod'; $string['stackQuestion_PR_RawMark'] = 'Mark modifier'; $string['stackQuestion_PR_Penalty'] = 'Penalty'; *************** *** 168,171 **** --- 172,176 ---- $string['stackQuestion_PR_AnswerNote'] = 'Answer note'; $string['stackQuestion_PR_ApLat'] = 'Apply later tests'; + $string['stackQuestion_PR_ApLat2'] = 'Next'; //////////////////////////////////// *************** *** 173,176 **** --- 178,189 ---- //////////////////////////////////// + // Editing and catagories. + $string['stackOptions_edit_value'] = 'Value'; // As in the value of an option. + $string['stackOptions_edit_default'] = 'Default'; // As in the default value of an option. + $string['stackOptions_edit_inmeth'] = 'Input methods'; + $string['stackOptions_edit_resppro'] = 'Response Processing'; + $string['stackOptions_edit_out'] = 'Output'; + + $string['stackOptions_InsertStars'] = "Insert *s where needed"; $string['stackOptions_InformalSyntax'] = 'Allow informal syntax'; |
From: Chris S. <san...@us...> - 2005-06-21 17:37:38
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17304/scripts Modified Files: stackAuthor.php stackDatabase.php stackQuestion.php Log Message: Index: stackDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackDatabase.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** stackDatabase.php 21 Jun 2005 09:11:10 -0000 1.18 --- stackDatabase.php 21 Jun 2005 14:52:26 -0000 1.19 *************** *** 109,130 **** global $_PHP_SELF; - // Sort out how we are going to filter questions. - if ('' === $filter) { - $filter['kw'] = ''; - $filter['name'] = ''; - } if ('try' == $action) { ! $filter['kw'] = 'demo'; ! $filter['name'] = ''; } ! $filter_name = $filter['name']; ! $filter_kw = $filter['kw']; ! // Build the query to the database. $query = 'SELECT ! questionID, questionName, questionDescription, questionKeywords, DATE_FORMAT(questionDateLastEdited,"%k:%i, %d/%m/%y"), questionGUID ! FROM stackQuestion ORDER BY questionName, questionKeywords, questionID '; $result = stack_db_query($query); --- 109,124 ---- global $_PHP_SELF; // Sort out how we are going to filter questions. if ('try' == $action) { ! $filter['kw'] = 'demo'; ! $filter['name'] = ''; } ! $question_order = 'ORDER BY questionName, questionKeywords, questionID '; ! // Build the query to the database. $query = 'SELECT ! questionID, questionName, questionDescription, questionKeywords, DATE_FORMAT(questionDateLastEdited,"%k:%i, %d/%m/%y") ! FROM stackQuestion '.$question_order; $result = stack_db_query($query); *************** *** 132,155 **** if(0 != mysql_num_rows($result)) { ! echo "<form name='stackquestionsform' action='{$_PHP_SELF}' method='POST'>\n"; echo "<input type='hidden' name='action' value='edit' />"; ! echo '<table><thead><tr>'; ! if ('edit'==$action) { ! echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th>Last edit</th>'; ! } else { ! echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th></th><th></th>'; ! } ! if ('edit' == $action) { ! // Only allow the 'edit' to filter questions. ! echo "</tr>\n"; ! if ('edit_metadata' == $action) { ! echo "<th><a href=\"javascript:SelectQs('edit_metadata');\">Filter</a></th>"; ! } else { ! echo "<th><a href=\"javascript:SelectQs('questionbank_screen');\">Filter</a></th>"; ! } ! echo "<th></th><th><input type='text' name='bank_filter[name]' value='$filter_name' /> ! </th> <th> <input type='text' name='bank_filter[kw]' value='$filter_kw' /> ! </th> </tr></thead><tbody>"; ! } for ($i = 0; $i < mysql_num_rows($result); $i++) { $row = mysql_fetch_row($result); --- 126,138 ---- if(0 != mysql_num_rows($result)) { ! echo "<h2>Question bank</h2><form name='stackquestionsform' action='{$_PHP_SELF}' method='POST'>\n"; echo "<input type='hidden' name='action' value='edit' />"; ! echo '<table>'; ! ! // Print the head of the table, with the filter information. ! stack_db_question_filter_tablehead($action,$filter); ! ! echo '<tbody>'; ! for ($i = 0; $i < mysql_num_rows($result); $i++) { $row = mysql_fetch_row($result); *************** *** 163,171 **** // Decide how to filter questions ! $dispQ = stack_db_question_filter($qname,$qkeywords,$filter_name,$filter_kw); if (FALSE !== $dispQ) { - $guid = $row[5]; - // Display each row of the table if ('edit_metadata' != $action) { --- 146,152 ---- // Decide how to filter questions ! $dispQ = stack_db_question_filter($qname,$qkeywords,$filter['name'],$filter['kw'],$filter['case_sense']); if (FALSE !== $dispQ) { // Display each row of the table if ('edit_metadata' != $action) { *************** *** 225,284 **** * @return void */ ! function stack_db_listquestions_quiz($filter='') { // List all the questions in the database ! ! // Sort out how we are going to filter questions. ! if ('' === $filter) { ! $filter['kw'] = ''; ! $filter['name'] = ''; ! } ! $filter_name = $filter['name']; ! $filter_kw = $filter['kw']; ! $query = 'SELECT ! questionID, questionName, questionKeywords ! FROM stackQuestion ORDER BY questionName, questionKeywords, questionID '; ! $result = stack_db_query($query); ! if(0 != mysql_num_rows($result)) { ! ! echo '<table><thead><tr>'; ! echo "<tr><th>Add</th><th>Question no.</th><th>Name</th> <th>Keyword</th></tr>\n"; ! echo "\n</thead><tbody>\n"; ! for ($i = 0; $i < mysql_num_rows($result); $i++) { ! $row = mysql_fetch_row($result); ! $name = stripslashes($row[1]); ! $qkw = stripslashes($row[2]); ! $dispQ = stack_db_question_filter($name,$qkw,$filter_name,$filter_kw); ! if (FALSE !== $dispQ) { ! $qID = $row[0]; ! $qname = ''; ! if ('' != $name) { ! $name = "<a href=\"javascript:EditPopup('$qID');\">{$name}</a>"; ! } - echo "<tr><td><input type=\"checkbox\" name=\"questionsToAdd[$qID][add]\" value=\"ticked\" /></td>\n"; - echo "<td>$qID</td><td>$name</td><td>$qkw</td> </tr>\n"; ! } // End preg_match to display each line. ! } ! ! echo "</tbody></table>\n"; ! } ! else ! { echo "<p>You currently have no questions in your database.</p>"; } } /** * Decides whether to display a question based upon the name, keywords and filter. * --- 206,300 ---- * @return void */ ! function stack_db_listquestions_quiz($filter,$quizID) { // List all the questions in the database ! global $_PHP_SELF; ! $question_order = 'ORDER BY questionName, questionKeywords, questionID '; ! $query = 'SELECT questionID, questionName, questionKeywords FROM stackQuestion '.$question_order; ! $result = stack_db_query($query); ! if(0 != mysql_num_rows($result)) { ! ! echo "<h2>Add questions to a quiz</h2>\n<p>\n<form name='quizform' action='{$_PHP_SELF}' method='POST'> ! <input type='hidden' name='quizid' value='$quizID'>"; ! echo '<table>'; ! // Print the head of the table, with the filter information. ! stack_db_question_filter_tablehead('add_quiz',$filter,$quizID); ! echo "<tbody>\n"; ! for ($i = 0; $i < mysql_num_rows($result); $i++) { ! $row = mysql_fetch_row($result); ! $name = stripslashes($row[1]); ! $qkw = stripslashes($row[2]); ! $dispQ = stack_db_question_filter($name,$qkw,$filter['name'],$filter['kw'],$filter['case_sense']); ! if (FALSE !== $dispQ) { ! $qID = $row[0]; + $qname = ''; + if ('' != $name) { + $name = "<a href=\"javascript:EditPopup('$qID');\">{$name}</a>"; + } ! echo "<tr><td><input type=\"checkbox\" name=\"questionsToAdd[$qID][add]\" value=\"ticked\" /></td>\n"; ! echo "<td>$qID</td><td>$name</td><td>$qkw</td> </tr>\n"; ! } // End preg_match to display each line. ! ! } ! ! echo "</tbody></table>\n"; ! ! echo '<input type="hidden" name="action" value="quiz_edit" />'; ! echo "<input type=\"submit\" value=\"Add\" />\n</form>\n"; ! ! } else { echo "<p>You currently have no questions in your database.</p>"; } + } /** + * The HTML necessary for the top of the question bank table, to include the filter interactions. + * + * @return void + */ + function stack_db_question_filter_tablehead($action,$filter,$quizid=0) { + + echo "<thead>\n<tr>\n"; + if ('edit'==$action) { + echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th>Last edit</th>'; + } else { + echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th></th><th></th>'; + } + if ('edit' == $action or 'edit_metadata' == $action or 'add_quiz'==$action) { + // Only allow the 'edit' to filter questions. + echo "</tr>\n<th>"; + if ('edit_metadata' == $action) { + echo "<a href=\"javascript:SelectQs('edit_metadata');\">Filter</a>"; + } else if ('add_quiz' == $action) { + echo "<a href=\"javascript:takeaction('filter',{$quizid});\">Filter</a>"; + } else { + echo "<a href=\"javascript:SelectQs('questionbank_screen');\">Filter</a>"; + } + echo '</th><th></th>'; + echo '<th><input type="text" name="bank_filter[name]" value="'.$filter['name'].'" /></th>'; + echo '<th><input type="text" name="bank_filter[kw]" value="'.$filter['kw'].'" /></th>'; + if ($filter['case_sense']) { + echo "<th>Case sensitive <input type='checkbox' name='bank_filter[case_sense]' value='TRUE' checked='TRUE' /></th>"; + } else { + echo "<th>Case sensitive <input type='checkbox' name='bank_filter[case_sense]' value='TRUE' /></th>"; + } + echo "</tr></thead>\n"; + } + + } + + /** * Decides whether to display a question based upon the name, keywords and filter. * *************** *** 289,295 **** * @return $dispQ boolean */ ! function stack_db_question_filter($name,$kw,$filter_name,$filter_kw) { $dispQ = TRUE; if ('' != $filter_kw) { --- 305,325 ---- * @return $dispQ boolean */ ! function stack_db_question_filter($name,$kw,$filter_name,$filter_kw,$filter_case=FALSE) { $dispQ = TRUE; + + // This will need to wait for PHP 5 :-( + // if ($filter_case) { + // $foo = 'strpos'; + // } else { + // $foo = 'stripos'; + // } + + if (!$filter_case) { + $name = strtolower($name); + $kw = strtolower($kw); + $filter_name = strtolower($filter_name); + $filter_kw = strtolower($filter_kw); + } if ('' != $filter_kw) { Index: stackAuthor.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackAuthor.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** stackAuthor.php 20 Jun 2005 15:42:55 -0000 1.24 --- stackAuthor.php 21 Jun 2005 14:52:25 -0000 1.25 *************** *** 74,80 **** echo "<table cellpadding='4'><tr> ! <td> <b>Option</b> </td> ! <td> <b>Value</b> </td> ! <td> <b>Default</b> </td></tr>"; foreach( $options_list as $k => $opt) { --- 74,80 ---- echo "<table cellpadding='4'><tr> ! <td> <b>".get_string('stackQuestion_questionOptions','stack')."</b> </td> ! <td> <b>".get_string('stackOptions_edit_value','stack')."</b> </td> ! <td> <b>".get_string('stackOptions_edit_default','stack')."</b> </td></tr>"; foreach( $options_list as $k => $opt) { *************** *** 320,324 **** echo "<p><a href=\"javascript:EditQ('edit')\">Edit question</a> \n"; if (''==$errors) { ! echo "<a href=\"javascript:EditQ('preveiw')\">Try question</a> \n"; echo "<a href=\"javascript:EditQ('export_xml')\">Export as XML</a> \n"; if ('admin'==$user['username']) { --- 320,324 ---- echo "<p><a href=\"javascript:EditQ('edit')\">Edit question</a> \n"; if (''==$errors) { ! echo "<a href=\"javascript:EditQ('preview')\">Try question</a> \n"; echo "<a href=\"javascript:EditQ('export_xml')\">Export as XML</a> \n"; if ('admin'==$user['username']) { *************** *** 330,334 **** } ! $options_headings = array('Input methods','','','','Response Processing','','','','','','Output',''); $options_list = array('InsertStars','InformalSyntax','AllowInputTool','SyntaxHint','Forbid','Allow','MarkModMethod','FeedBackGenericCorrect','FeedBackGenericPCorrect','FeedBackGenericIncorrect','Display','ShowSol'); --- 330,334 ---- } ! $options_headings = array(get_string('stackOptions_edit_inmeth','stack'),'','','',get_string('stackOptions_edit_resppro','stack'),'','','','','',get_string('stackOptions_edit_out','stack'),''); $options_list = array('InsertStars','InformalSyntax','AllowInputTool','SyntaxHint','Forbid','Allow','MarkModMethod','FeedBackGenericCorrect','FeedBackGenericPCorrect','FeedBackGenericIncorrect','Display','ShowSol'); *************** *** 418,425 **** echo "<tr>\n <td>No.</td>\n <td></td>\n ! <td><a href=\"javascript:HelpPopup('SAns','stackQuestionPotResp');\">SAns</a></td>\n ! <td><a href=\"javascript:HelpPopup('TAns','stackQuestionPotResp');\">TAns</a></td>\n ! <td><a href=\"javascript:HelpPopup('AnsTest','stackOptions');\">AnswerTest</a></td>\n ! <td><a href=\"javascript:HelpPopup('AnsTestOpt','stackOptions');\">AT opts</a></td> <td>Del</td>\n </tr>\n"; --- 418,425 ---- echo "<tr>\n <td>No.</td>\n <td></td>\n ! <td><a href=\"javascript:HelpPopup('SAns','stackQuestionPotResp');\">".get_string('stackQuestion_PR_SAns2','stack')."</a></td>\n ! <td><a href=\"javascript:HelpPopup('TAns','stackQuestionPotResp');\">".get_string('stackQuestion_PR_TAns2','stack')."</a></td>\n ! <td><a href=\"javascript:HelpPopup('AnsTest','stackOptions');\">".get_string('stackQuestion_PR_AnsTest','stack')."</a></td>\n ! <td><a href=\"javascript:HelpPopup('AnsTestOpt','stackOptions');\">".get_string('stackQuestion_PR_AnsTestOpts','stack')."</a></td> <td>Del</td>\n </tr>\n"; *************** *** 462,470 **** echo "<tr align=top><td>If...</td>\n ! <td><a href=\"javascript:HelpPopup('RawMarkMod','stackQuestionPotResp');\">Mark</a></td>\n ! <td><a href=\"javascript:HelpPopup('RawMark','stackQuestionPotResp');\">Value</a></td>\n ! <td><a href=\"javascript:HelpPopup('Penalty','stackQuestionPotResp');\">Penalty</a></td>\n ! <td colspan='2'><a href=\"javascript:HelpPopup('FeedBack','stackQuestionPotResp');\">Feedback</a></td>\n ! <td><a href=\"javascript:HelpPopup('ApLat','stackQuestionPotResp');\">Next</a></td>\n"; echo "<td></td></tr>\n"; --- 462,470 ---- echo "<tr align=top><td>If...</td>\n ! <td><a href=\"javascript:HelpPopup('RawMarkMod','stackQuestionPotResp');\">".get_string('stackQuestion_PR_RawMarkMod2','stack')."</a></td>\n ! <td><a href=\"javascript:HelpPopup('RawMark','stackQuestionPotResp');\">".get_string('Score','stack')."</a></td>\n ! <td><a href=\"javascript:HelpPopup('Penalty','stackQuestionPotResp');\">".get_string('stackQuestion_PR_Penalty','stack')."</a></td>\n ! <td colspan='2'><a href=\"javascript:HelpPopup('FeedBack','stackQuestionPotResp');\">".get_string('stackQuestion_PR_FeedBack','stack')."</a></td>\n ! <td><a href=\"javascript:HelpPopup('ApLat','stackQuestionPotResp');\">".get_string('stackQuestion_PR_ApLat2','stack')."</a></td>\n"; echo "<td></td></tr>\n"; *************** *** 489,493 **** echo "<tr><td></td> <td></td><td align ='right' colspan='2'><a href=\"javascript:HelpPopup('AnswerNote','stackQuestionPotResp');\">AnswerNote</a></td>"; $strin = $potresp['true']['AnswerNote']; ! stack_question_edit_input_textfield($bname,$strin,'AnswerNote',55,3); echo "</tr>"; --- 489,493 ---- echo "<tr><td></td> <td></td><td align ='right' colspan='2'><a href=\"javascript:HelpPopup('AnswerNote','stackQuestionPotResp');\">AnswerNote</a></td>"; $strin = $potresp['true']['AnswerNote']; ! stack_question_edit_input_textfield($bname,$strin,get_string('stackQuestion_PR_AnswerNote','stack'),55,3); echo "</tr>"; *************** *** 714,718 **** } ! $options_headings = array('Input methods','','','','Response Processing','','','','','','','','','','Output','',''); $options_list = array('InsertStars','InformalSyntax','AllowInputTool','SyntaxHint','AnsTest','AnsTestOpt','QuVal','Penalty','Forbid','Allow','MarkModMethod','FeedBackGenericCorrect','FeedBackGenericPCorrect','FeedBackGenericIncorrect','Display','ShowSol','Language'); $fieldname = 'quiz[quizOptions]'; --- 714,718 ---- } ! $options_headings = array(get_string('stackOptions_edit_inmeth','stack'),'','','',get_string('stackOptions_edit_resppro','stack'),'','','','','','','','','',get_string('stackOptions_edit_out','stack'),'',''); $options_list = array('InsertStars','InformalSyntax','AllowInputTool','SyntaxHint','AnsTest','AnsTestOpt','QuVal','Penalty','Forbid','Allow','MarkModMethod','FeedBackGenericCorrect','FeedBackGenericPCorrect','FeedBackGenericIncorrect','Display','ShowSol','Language'); $fieldname = 'quiz[quizOptions]'; Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** stackQuestion.php 20 Jun 2005 15:42:55 -0000 1.20 --- stackQuestion.php 21 Jun 2005 14:52:26 -0000 1.21 *************** *** 12,15 **** --- 12,240 ---- + //****************************************************** + //** Options + // + // descript = The string which is displayed on screen + // type = string, free string value + // = html, HTML text + // = email, email address (validates) + // = url, URL (validates) + // = list, + // = number, + // values = possible values, for a list this is an array. + // default = default value. There must be one! + //****************************************************** + + + // "Insert *s where needed"; + $stackOptions['InsertStars']['type'] = 'list'; + $stackOptions['InsertStars']['values'] = array('TRUE','FALSE'); + $stackOptions['InsertStars']['default'] = 'FALSE'; + + // 'Allow informal syntax'; + $stackOptions['InformalSyntax']['type'] = 'list'; + $stackOptions['InformalSyntax']['values'] = array('TRUE','FALSE'); + $stackOptions['InformalSyntax']['default'] = 'TRUE'; + + // 'Input tools'; + $stackOptions['AllowInputTool']['type'] = 'list'; + $stackOptions['AllowInputTool']['values'] = array('Form box','Form box + JOME'); + $stackOptions['AllowInputTool']['default'] = 'Form box + JOME'; + + // 'Syntax Hint'; + $stackOptions['SyntaxHint']['type'] = 'string'; + $stackOptions['SyntaxHint']['values'] = ''; + $stackOptions['SyntaxHint']['default'] = ''; + + // 'Display'; + $stackOptions['Display']['type'] = 'list'; + $stackOptions['Display']['values'] = array('String','LaTeX','MathML','LaTeX Source'); + $stackOptions['Display']['default'] = 'LaTeX'; + + // 'Language'; + $stackOptions['Language']['type'] = 'list'; + $stackOptions['Language']['values'] = array('en','es','nl'); + $stackOptions['Language']['default'] = 'en'; + + // 'Question value'; + $stackOptions['QuVal']['type'] = 'number'; + $stackOptions['QuVal']['values'] = ''; + $stackOptions['QuVal']['default'] = '1'; + + // 'Mark modification method'; + $stackOptions['MarkModMethod']['type'] = 'list'; + $stackOptions['MarkModMethod']['values'] = array('Penalty','Last Answer'); + $stackOptions['MarkModMethod']['default'] = 'Penalty'; + + // 'Question penalty'; + $stackOptions['Penalty']['type'] = 'number'; + $stackOptions['Penalty']['values'] = ''; + $stackOptions['Penalty']['default'] = '0.1'; + + // 'Forbidden words'; + $stackOptions['Forbid']['type'] = 'string'; + $stackOptions['Forbid']['values'] = ''; + $stackOptions['Forbid']['default'] = ''; + + // 'Allowed words'; + $stackOptions['Allow']['type'] = 'string'; + $stackOptions['Allow']['values'] = ''; + $stackOptions['Allow']['default'] = ''; + + // 'Answer test'; + $stackOptions['AnsTest']['type'] = 'list'; + $stackOptions['AnsTest']['values'] = ''; // This is automatically defined below, after the answer tests. + $stackOptions['AnsTest']['default'] = 'AlgEquiv'; + + // 'Answer test options'; + $stackOptions['AnsTestOpt']['type'] = 'string'; + $stackOptions['AnsTestOpt']['values'] = ''; + $stackOptions['AnsTestOpt']['default'] = ''; + + // "Teacher's email"; + $stackOptions['TeacherEmail']['type'] = 'string'; + $stackOptions['TeacherEmail']['values'] = ''; + $stackOptions['TeacherEmail']['default'] = ''; + + // 'Feedback: correct'; + $stackOptions['FeedBackGenericCorrect']['type'] = 'html'; + $stackOptions['FeedBackGenericCorrect']['values'] = ''; + $stackOptions['FeedBackGenericCorrect']['default'] = get_string('stackOptions_FeedBackGenericCorrect_def','stack',''); + + // 'Feedback: incorrect'; + $stackOptions['FeedBackGenericIncorrect']['type'] = 'html'; + $stackOptions['FeedBackGenericIncorrect']['values'] = ''; + $stackOptions['FeedBackGenericIncorrect']['default'] = get_string('stackOptions_FeedBackGenericIncorrect_def','stack',''); + + // 'Feedback: partially correct'; + $stackOptions['FeedBackGenericPCorrect']['type'] = 'html'; + $stackOptions['FeedBackGenericPCorrect']['values'] = ''; + $stackOptions['FeedBackGenericPCorrect']['default'] = get_string('stackOptions_FeedBackGenericPCorrect_def','stack',''); + + + // 'Show solution'; + $stackOptions['ShowSol']['type']='list'; + $stackOptions['ShowSol']['values']=array('Always','Never','On request','After correct answer'); + $stackOptions['ShowSol']['default']='On request'; + + /** + * Validates options, removing any blank or default values. + * This should also eventually validate the value of each option. + * + * @param array The options array + * @return void + */ + function stack_options_validate(&$options) { + global $stackOptions; + + // Do we have an array of options? + if (is_array($options)) { + + foreach ($stackOptions as $opt => $fields) { + if (array_key_exists($opt,$options)) { + // Option is set in the $options + if (''==trim($options[$opt]) or 'default'==trim($options[$opt])) { + // But, the option has no value, or is specified 'default' + unset($options[$opt]); // Get rid of this from the question. + } + } + } // end foreach + // Do we have anything left? + if (NULL == array_keys($options)) { + $options=NULL; + } + } + + } + + + /** + * Sets the cascading options, first taking the defaults, then using the subject + * quiz, and finally question values. + * + * @param array &$question The STACK question, required + * @param array &$quiz_options The STACK quiz options array *NOT* the whole quiz, optional + * @param array &$subject The STACK subject options array *NOT* the whole quiz, optional + * @return array The list of options + */ + function stack_options_set($question,$quiz_options=NULL,$subject=NULL) { + global $stackOptions; + + $options = array(); + + //(0) Set the default options. + foreach ($stackOptions as $opnam => $fields) { + $options[$opnam] = $fields['default']; + } + + //(1) Now look in the $question. + if (is_array($question)) { + if (array_key_exists('questionOptions',$question)) { + $qOpt = $question['questionOptions']; + + // Do we have any set options? + if (is_array($qOpt)){ + foreach ($stackOptions as $opt => $fields) { + if (array_key_exists($opt,$qOpt)) { + // Actually take the option which is set, and use it! + $options[$opt] = $qOpt[$opt]; + } + } // end foreach + } + } + } + + //(2) Now look in the $quiz_options + if (is_array($quiz_options)) { + foreach ($stackOptions as $opt => $fields) { + if (array_key_exists($opt,$quiz_options)) { + // Actually take the option which is set, and use it! + $options[$opt] = $quiz_options[$opt]; + } + } // end foreach + } + + return($options); + } + + /** + * Build an array of forbidden strings + * + * @param array $options The STACK option settings + * @return array The list of forbidden words + */ + function stack_options_forbidden($options) { + // Build an array of forbidden strings. + // The fields 'Forbid' and 'Allow' should be in the $options, + // Even if empty strings. + + if (''!= trim($options['Forbid']) ) { // There is at least one forbidden word + $forb = explode(',',$options['Forbid']); + $forb = array_unique(array_map('trim',$forb)); + } else { + $forb = ''; + } + + if (''!= trim($options['Allow']) ) { // There is at least one allowed word + $allow = explode(',',$options['Allow']); + $allow = array_unique(array_map('trim',$allow)); + } else { + $allow = ''; + } + + if (is_array($forb)) { // There are some forbidden words + if (is_array($allow)) {// There are some allowed words + $forbid = array_diff($forb,$allow); // Take out the allowed ones. + } else { + $forbid = $forb; + } + } else { + $forbid = ''; + } // No forbidden words + + return($forbid); + } + + //////////////////////////////////////////////////////////////////////// // $stackQuestion *************** *** 300,303 **** --- 525,536 ---- $stackAnswerTest['True']['imp'] = 'php'; + // Build a list of AnswerTests. + // and add these to the options. + $ats = ''; + foreach( $stackAnswerTest as $field => $q_field) + { $ats[] = $field; } + + $stackOptions['AnsTest']['values'] = $ats; + //****************************************************** *************** *** 642,873 **** - //****************************************************** - //** Options - // - // descript = The string which is displayed on screen - // type = string, free string value - // = html, HTML text - // = email, email address (validates) - // = url, URL (validates) - // = list, - // = number, - // values = possible values, for a list this is an array. - // default = default value. There must be one! - //****************************************************** - - - // "Insert *s where needed"; - $stackOptions['InsertStars']['type'] = 'list'; - $stackOptions['InsertStars']['values'] = array('TRUE','FALSE'); - $stackOptions['InsertStars']['default'] = 'FALSE'; - - // 'Allow informal syntax'; - $stackOptions['InformalSyntax']['type'] = 'list'; - $stackOptions['InformalSyntax']['values'] = array('TRUE','FALSE'); - $stackOptions['InformalSyntax']['default'] = 'TRUE'; - - // 'Input tools'; - $stackOptions['AllowInputTool']['type'] = 'list'; - $stackOptions['AllowInputTool']['values'] = array('Form box','Form box + JOME'); - $stackOptions['AllowInputTool']['default'] = 'Form box + JOME'; - - // 'Syntax Hint'; - $stackOptions['SyntaxHint']['type'] = 'string'; - $stackOptions['SyntaxHint']['values'] = ''; - $stackOptions['SyntaxHint']['default'] = ''; - - // 'Display'; - $stackOptions['Display']['type'] = 'list'; - $stackOptions['Display']['values'] = array('String','LaTeX','MathML','LaTeX Source'); - $stackOptions['Display']['default'] = 'LaTeX'; - - // 'Language'; - $stackOptions['Language']['type'] = 'list'; - $stackOptions['Language']['values'] = array('en','es','nl'); - $stackOptions['Language']['default'] = 'en'; - - // 'Question value'; - $stackOptions['QuVal']['type'] = 'number'; - $stackOptions['QuVal']['values'] = ''; - $stackOptions['QuVal']['default'] = '1'; - - // 'Mark modification method'; - $stackOptions['MarkModMethod']['type'] = 'list'; - $stackOptions['MarkModMethod']['values'] = array('Penalty','Last Answer'); - $stackOptions['MarkModMethod']['default'] = 'Penalty'; - - // 'Question penalty'; - $stackOptions['Penalty']['type'] = 'number'; - $stackOptions['Penalty']['values'] = ''; - $stackOptions['Penalty']['default'] = '0.1'; - - // 'Forbidden words'; - $stackOptions['Forbid']['type'] = 'string'; - $stackOptions['Forbid']['values'] = ''; - $stackOptions['Forbid']['default'] = ''; - - // 'Allowed words'; - $stackOptions['Allow']['type'] = 'string'; - $stackOptions['Allow']['values'] = ''; - $stackOptions['Allow']['default'] = ''; - - // Build a list of AnswerTests. - $ats = ''; - foreach( $stackAnswerTest as $field => $q_field) - { $ats[] = $field; } - - // 'Answer test'; - $stackOptions['AnsTest']['type'] = 'list'; - $stackOptions['AnsTest']['values'] = $ats; - $stackOptions['AnsTest']['default'] = 'AlgEquiv'; - - // 'Answer test options'; - $stackOptions['AnsTestOpt']['type'] = 'string'; - $stackOptions['AnsTestOpt']['values'] = ''; - $stackOptions['AnsTestOpt']['default'] = ''; - - // "Teacher's email"; - $stackOptions['TeacherEmail']['type'] = 'string'; - $stackOptions['TeacherEmail']['values'] = ''; - $stackOptions['TeacherEmail']['default'] = ''; - - // 'Feedback: correct'; - $stackOptions['FeedBackGenericCorrect']['type'] = 'html'; - $stackOptions['FeedBackGenericCorrect']['values'] = ''; - $stackOptions['FeedBackGenericCorrect']['default'] = get_string('stackOptions_FeedBackGenericCorrect_def','stack',''); - - // 'Feedback: incorrect'; - $stackOptions['FeedBackGenericIncorrect']['type'] = 'html'; - $stackOptions['FeedBackGenericIncorrect']['values'] = ''; - $stackOptions['FeedBackGenericIncorrect']['default'] = get_string('stackOptions_FeedBackGenericIncorrect_def','stack',''); - - // 'Feedback: partially correct'; - $stackOptions['FeedBackGenericPCorrect']['type'] = 'html'; - $stackOptions['FeedBackGenericPCorrect']['values'] = ''; - $stackOptions['FeedBackGenericPCorrect']['default'] = get_string('stackOptions_FeedBackGenericPCorrect_def','stack',''); - - - // 'Show solution'; - $stackOptions['ShowSol']['type']='list'; - $stackOptions['ShowSol']['values']=array('Always','Never','On request','After correct answer'); - $stackOptions['ShowSol']['default']='On request'; - - /** - * Validates options, removing any blank or default values. - * This should also eventually validate the value of each option. - * - * @param array The options array - * @return void - */ - function stack_options_validate(&$options) { - global $stackOptions; - - // Do we have an array of options? - if (is_array($options)) { - - foreach ($stackOptions as $opt => $fields) { - if (array_key_exists($opt,$options)) { - // Option is set in the $options - if (''==trim($options[$opt]) or 'default'==trim($options[$opt])) { - // But, the option has no value, or is specified 'default' - unset($options[$opt]); // Get rid of this from the question. - } - } - } // end foreach - // Do we have anything left? - if (NULL == array_keys($options)) { - $options=NULL; - } - } - - } - - - /** - * Sets the cascading options, first taking the defaults, then using the subject - * quiz, and finally question values. - * - * @param array &$question The STACK question, required - * @param array &$quiz_options The STACK quiz options array *NOT* the whole quiz, optional - * @param array &$subject The STACK subject options array *NOT* the whole quiz, optional - * @return array The list of options - */ - function stack_options_set($question,$quiz_options=NULL,$subject=NULL) { - global $stackOptions; - - $options = array(); - - //(0) Set the default options. - foreach ($stackOptions as $opnam => $fields) { - $options[$opnam] = $fields['default']; - } - - //(1) Now look in the $question. - if (is_array($question)) { - if (array_key_exists('questionOptions',$question)) { - $qOpt = $question['questionOptions']; - - // Do we have any set options? - if (is_array($qOpt)){ - foreach ($stackOptions as $opt => $fields) { - if (array_key_exists($opt,$qOpt)) { - // Actually take the option which is set, and use it! - $options[$opt] = $qOpt[$opt]; - } - } // end foreach - } - } - } - - //(2) Now look in the $quiz_options - if (is_array($quiz_options)) { - foreach ($stackOptions as $opt => $fields) { - if (array_key_exists($opt,$quiz_options)) { - // Actually take the option which is set, and use it! - $options[$opt] = $quiz_options[$opt]; - } - } // end foreach - } - - return($options); - } - - /** - * Build an array of forbidden strings - * - * @param array $options The STACK option settings - * @return array The list of forbidden words - */ - function stack_options_forbidden($options) { - // Build an array of forbidden strings. - // The fields 'Forbid' and 'Allow' should be in the $options, - // Even if empty strings. - - if (''!= trim($options['Forbid']) ) { // There is at least one forbidden word - $forb = explode(',',$options['Forbid']); - $forb = array_unique(array_map('trim',$forb)); - } else { - $forb = ''; - } - - if (''!= trim($options['Allow']) ) { // There is at least one allowed word - $allow = explode(',',$options['Allow']); - $allow = array_unique(array_map('trim',$allow)); - } else { - $allow = ''; - } - - if (is_array($forb)) { // There are some forbidden words - if (is_array($allow)) {// There are some allowed words - $forbid = array_diff($forb,$allow); // Take out the allowed ones. - } else { - $forbid = $forb; - } - } else { - $forbid = ''; - } // No forbidden words - - return($forbid); - } --- 875,878 ---- |
From: Chris S. <san...@us...> - 2005-06-21 17:37:38
|
Update of /cvsroot/stack/stack-1-0/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17304/doc Modified Files: author_gettingstarted.php Log Message: Index: author_gettingstarted.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/doc/author_gettingstarted.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** author_gettingstarted.php 20 Jun 2005 15:42:55 -0000 1.2 --- author_gettingstarted.php 21 Jun 2005 14:52:23 -0000 1.3 *************** *** 142,146 **** Only core LaTeX is supported, and experienced users may feel a little disappointed that not all the more complex environments, ! (such as \begin{eqnarray}) work. If you do not know how to use LaTeX, some simple examples are given in the <a href="#FAQ">FAQ</a>. </p> --- 142,146 ---- Only core LaTeX is supported, and experienced users may feel a little disappointed that not all the more complex environments, ! work. If you do not know how to use LaTeX, some simple examples are given in the <a href="#FAQ">FAQ</a>. </p> |
From: Chris S. <san...@us...> - 2005-06-21 17:07:02
|
Update of /cvsroot/stack/stack-1-0/frontend_general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10117/frontend_general Modified Files: frontend_util.php Log Message: Index: frontend_util.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/frontend_general/frontend_util.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** frontend_util.php 21 Jun 2005 14:52:24 -0000 1.3 --- frontend_util.php 21 Jun 2005 15:43:16 -0000 1.4 *************** *** 123,126 **** --- 123,129 ---- $question_bank_filter['kw'] = ''; $question_bank_filter['case_sense'] = FALSE; + $question_bank_filter['order1'] = 'questionName'; + $question_bank_filter['order2'] = 'questionKeywords'; + $question_bank_filter['order3'] = 'questionID'; |
From: Chris S. <san...@us...> - 2005-06-21 16:36:51
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27319/scripts Modified Files: stackDatabase.php Log Message: Index: stackDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackDatabase.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** stackDatabase.php 21 Jun 2005 15:43:17 -0000 1.20 --- stackDatabase.php 21 Jun 2005 16:36:43 -0000 1.21 *************** *** 301,324 **** echo "<thead>\n"; ! // Print the interactions for ordering the output of the queary. ! echo "<tr><th></th><th colspan='2'>Order output by:</th> </tr>\n"; ! ! $fields1 = array('questionName', 'questionKeywords', 'questionID','questionDescription','questionDateLastEdited','NONE'); ! $fields2 = array('order1','order2','order3'); ! $fields3 = array('1st','2nd','3rd'); ! foreach ($fields2 as $no => $fn){ ! echo "<tr><th>{$fields3[$no]} </th>\n"; ! echo '<th colspan="2"><select name="bank_filter['.$fn.']">'; ! foreach ($fields1 as $key) { ! if ($key == $filter[$fn]) { ! echo "\n <option value='$key' selected>".get_string('stackQuestion_'.$key,'stack')."</option>"; ! } else { ! echo "\n <option value='$key'>".get_string('stackQuestion_'.$key,'stack')."</option>"; ! } ! } ! echo "\n</select></th>\n</tr>\n"; ! } if ('edit'==$action) { echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th>Last edit</th>'; --- 301,328 ---- echo "<thead>\n"; ! if ('edit' == $action or 'edit_metadata' == $action or 'add_quiz'==$action) { ! // Only allow the 'edit' to filter questions. ! // Print the interactions for ordering the output of the queary. ! echo "<tr><th></th><th colspan='2'>Order output by:</th> </tr>\n"; ! ! $fields1 = array('questionName', 'questionKeywords', 'questionID','questionDescription','questionDateLastEdited','NONE'); ! $fields2 = array('order1','order2','order3'); ! $fields3 = array('1st','2nd','3rd'); + foreach ($fields2 as $no => $fn){ + echo "<tr><th>{$fields3[$no]} </th>\n"; + echo '<th colspan="2"><select name="bank_filter['.$fn.']">'; + foreach ($fields1 as $key) { + if ($key == $filter[$fn]) { + echo "\n <option value='$key' selected>".get_string('stackQuestion_'.$key,'stack')."</option>"; + } else { + echo "\n <option value='$key'>".get_string('stackQuestion_'.$key,'stack')."</option>"; + } + } + echo "\n</select></th>\n</tr>\n"; + } + + echo "<tr>\n"; if ('edit'==$action) { echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th>Last edit</th>'; *************** *** 326,332 **** echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th></th><th></th>'; } ! if ('edit' == $action or 'edit_metadata' == $action or 'add_quiz'==$action) { ! // Only allow the 'edit' to filter questions. ! echo "</tr>\n<th>"; if ('edit_metadata' == $action) { echo "<a href=\"javascript:SelectQs('edit_metadata');\">Filter</a>"; --- 330,336 ---- echo '<th></th><th>ID</th><th>Name</th> <th>Key words</th> <th></th><th></th><th></th>'; } ! echo "</tr>\n"; ! ! echo "\n<tr>\n<th>"; if ('edit_metadata' == $action) { echo "<a href=\"javascript:SelectQs('edit_metadata');\">Filter</a>"; *************** *** 344,350 **** echo "<th colspan='2'>Case sensitive <input type='checkbox' name='bank_filter[case_sense]' value='TRUE' /></th>"; } ! echo "</tr></thead>\n"; } ! } --- 348,354 ---- echo "<th colspan='2'>Case sensitive <input type='checkbox' name='bank_filter[case_sense]' value='TRUE' /></th>"; } ! echo "</tr>\n"; } ! echo "</thead>\n"; } |
From: Chris S. <san...@us...> - 2005-06-21 09:11:21
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5737/scripts Modified Files: stackDatabase.php Log Message: Index: stackDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackDatabase.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** stackDatabase.php 20 Jun 2005 15:42:55 -0000 1.17 --- stackDatabase.php 21 Jun 2005 09:11:10 -0000 1.18 *************** *** 126,130 **** $query = 'SELECT questionID, questionName, questionDescription, questionKeywords, DATE_FORMAT(questionDateLastEdited,"%k:%i, %d/%m/%y"), questionGUID ! FROM stackQuestion ORDER BY questionKeywords, questionName, questionID '; $result = stack_db_query($query); --- 126,130 ---- $query = 'SELECT questionID, questionName, questionDescription, questionKeywords, DATE_FORMAT(questionDateLastEdited,"%k:%i, %d/%m/%y"), questionGUID ! FROM stackQuestion ORDER BY questionName, questionKeywords, questionID '; $result = stack_db_query($query); *************** *** 238,242 **** $query = 'SELECT questionID, questionName, questionKeywords ! FROM stackQuestion ORDER BY questionKeywords, questionName, questionID '; $result = stack_db_query($query); --- 238,242 ---- $query = 'SELECT questionID, questionName, questionKeywords ! FROM stackQuestion ORDER BY questionName, questionKeywords, questionID '; $result = stack_db_query($query); |
From: Chris S. <san...@us...> - 2005-06-20 15:58:29
|
Update of /cvsroot/stack/stack-1-0/lang/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28039/lang/en Added Files: stack.php Log Message: --- NEW FILE: stack.php --- <?php // Strings associated with quizzes. $string['TrySTACKQuiz'] = 'Try a STACK quiz'; $string['STACKHomePage'] = 'STACK home page'; $string['Home'] = 'Home'; $string['ClickHereTryQuiz'] = 'Click here to try a new quiz.'; $string['ChooseQuiz'] = 'Choose quiz'; $string['Focus'] = 'Focus'; $string['FocusExplain'] = 'Click here to see one question at a time.'; $string['UnFocus'] = 'Unfocus'; $string['UnFocusExplain'] = 'Click here to see all questions in the quiz.'; $string['Score'] = 'Mark'; // Mark for a question. $string['Mark'] = 'Mark'; // Mark as an action request. $string['MarkThisQ'] = 'Mark this question'; // Mark as an action request. $string['MarkQ'] = 'Mark Q.'; // Mark as an action request. $string['MarkExplain'] = 'Click here to mark your answers.'; $string['Validate'] = 'Validate'; $string['ValidateExplain'] = 'Click here to check that your answers have no syntax errors and that the system interprets them in the way that you intended.'; $string['ValidateExplain2'] = '(Note, your answers will be stored when you validate.)'; $string['Solutions'] = 'Solutions'; $string['SolutionsExplain'] = 'Click here to mark the whole quiz and show all the solutions.'; $string['SolutionsExplain2'] = '(No further attempts will be permitted)'; $string['NewVersion'] = 'New version'; $string['NewVersionExplain'] = 'Click here to try a new version of this quiz.'; $string['MarkSummary'] = 'Mark Summary'; $string['Question'] = 'Question'; $string['Value'] = 'Value'; // Number of marks available for a question $string['Total'] = 'Total'; $string['Help'] = 'Help'; $string['End'] = 'End'; $string['Quiz_error_q'] = '<font color=\"red\">There were errors in the question.</font><br />Please contact your system administrator about questionID {$a[0]}.<br />'; // Stack page footer. $string['ThisSTACKVer'] = 'This is STACK version'; $string['ThisPageTook'] = 'This page took approximatly'; $string['seconds'] = 'seconds'; $string['STACKlogo'] = 'STACK logo'; $string['QValidRequiredField'] = 'This is a required field, but has no value.'; $string['QValidDefaultValue'] = 'A default value has been assigned for you.'; $string['QValidquestionnotar'] = '$question variable does not exist!'; $string['QValidMaximaName'] = 'is a Maxima function name.'; $string['QValidSummaryTable0'] = 'The item is invalid, and the following field(s) contain errors.'; $string['QValidSummaryTable1'] = 'One or more of the <b>{$a}</b> contained error(s), as follows.'; $string['QValidSummaryTable2'] = 'The variable \'$a\':'; $string['QValidSummaryTable3'] = 'Potential response \'$a\''; $string['QInstCASError'] = 'The CAS generated errors when creating a question version.'; $string['CASError'] = 'CAS ERROR!'; $string['CASError_ans'] = 'The CAS did not process your answer.'; $string['QMarkBailOut'] = 'There is an error in the marking procedure, please contact your administrator. (A potential response was visited more than once.)'; // Teacher's view to try questions. $string['QTestTeacherInfo'] = 'Information for the teacher'; $string['QTestQuestionNote'] = 'Question note'; $string['Seed'] = 'Seed'; $string['QTestTeacherAns'] = "Teacher's answer"; // $string['YourLastAns'] = 'Your last answer was interpreted as:'; $string['YouHaveNotAns'] = 'Warning: you have not answered this.'; $string['InvalidAns'] = 'This is an invalid answer.'; $string['AttemptNoPenalty'] = 'This attempt has been ignored with no penalty.'; $string['YourMarkFor'] = 'Your mark for this attempt is'; $string['WithPenaltiesAnd'] = 'With penalties, and previous attempts, this gives {$a[\'mark\']} out of {$a[\'QuVal\']}'; $string['YourMarkIs'] = 'Your mark is {$a[\'mark\']}, out of {$a[\'QuVal\']}.'; $string['InvalidNoMark'] = 'Your answer is invalid, so there is no mark or penalty for this attempt.'; $string['InvalidPreviousMark'] = 'Previous attempts give a mark of {$a[\'mark\']} out of {$a[\'QuVal\']}'; $string['InputTool'] = 'Input tool'; $string['SyntaxHint'] = 'Syntax hint'; $string['TeacherAnsIs'] = 'The teacher\'s answer is'; $string['ThisCanDisplay'] = 'This can be displayed as'; $string['WorkedSolution'] = 'Worked solution'; $string['NoSolution'] = '[No solution available]'; $string['YourAttemptsWere'] = 'Your attempts at this question were as follows.'; $string['Answer'] = 'Answer'; $string['NoAttemptsAtQ'] = 'You have made no attempts at this question.'; $string['ShowAt_RawAns'] = 'Raw answer'; $string['ShowAt_Action'] = 'Action'; $string['ShowAt_Valid'] = 'Valid ?'; $string['ShowAt_Ans'] = 'Answer'; $string['ShowAt_RawMark'] = 'Raw mark'; $string['ShowAt_Penalty'] = 'Penalty'; $string['ShowAt_FeedBack'] = 'Feedback'; $string['ShowAt_AnswerNote'] = 'Answer Note'; $string['SeriousForbid'] = 'The string <tt><font color=\'orange\'></font></tt> is forbidden!<br />'; $string['MissingRightBracket'] = 'You have a missing right bracket.'; $string['MissingLeftBracket'] = 'You have a missing left bracket.'; $string['IllegalSpaces'] = 'You have space between terms in your expression. Please check again carefully.'; $string['MissingStars'] = 'You seem to be missing *\'s.<br /> Perhaps you meant to type '; $string['BadAmps'] = 'You should not have any @\'s. '; $string['BadAbsFun'] = 'You should not have any |\'s. You may need to use the <tt>abs()</tt> CAS function instead.'; $string['UnknownFun'] = 'The string <tt><font color=\'orange\'>{$a[\'key\']}</font></tt> does not occur in the list of permitted functions. It could be that you have missed off some multiplication signs, or brackets. If you are in doubt about this, please contact the administrator.'; $string['NotSupported'] = 'The string <tt><font color=\'orange\'>{$a[\'key\']}</font></tt> is a legitimate CAS command, but does is not supported in this implementation of STACK. There may be an alternative. If you are in doubt about this, please contact the administrator.'; // Validating the CASText $string['EmptyCASString'] = 'You have included a CAS string which is empty. This is not permitted.'; // This occurs when validating CASText For example, a user might type "Factor @ @." $string['ErrorCASString'] = 'The string <font color=\'orange\'><tt>@{$a[\'key\']}@</tt></font> generated the following error(s)'; $string['OddAmpCASString'] = 'You have an odd number of @s, which is not permitted.'; $string['IncorrectPassword'] = 'Incorrect password!'; $string['IncorrectAdminPsd'] = 'Incorrect Admin password'; $string['UnknownUserName'] = 'Username does not exist!'; $string['MisMatchPassword'] = 'Your two passwords did not match!'; $string['OldPasswordUnch'] = 'Your old password (if any) is unchanged.'; $string['USR_Username'] = 'Username'; $string['USR_NewPassword'] = 'New password'; $string['USR_ConfirmPsswd'] = '(confirm)'; $string['USR_FirstName'] = 'First name'; $string['USR_LastName'] = 'Last name'; $string['USR_Email'] = 'Email'; $string['USR_OptionalInformation'] = 'Optional Information'; $string['USR_Phone'] = 'Phone'; $string['USR_StudentID'] = 'Student ID'; $string['USR_Address'] = 'Address'; $string['USR_Department'] = 'Department'; $string['USR_Institution'] = 'Instituion'; //////////////////////////////////////// // STACK data structures //////////////////////////////////////// // The $stackQuestion data structure $string['stackQuestion_questionVarsRaw'] = 'Question variables'; $string['stackQuestion_questionVars'] = '(Internal) Question variables'; $string['stackQuestion_questionStem'] = 'Question stem'; $string['stackQuestion_questionAns'] = "Teacher's answer"; $string['stackQuestion_questionAnsKey'] = "Student's answer key"; // The name of the variable to which the student's answer is assigned. $string['stackQuestion_questionAnsVarsRaw'] = 'Feedback variables'; $string['stackQuestion_questionAnsVars'] = '(Internal) Feedback variables'; $string['stackQuestion_questionPotResp'] = 'Potential responses'; $string['stackQuestion_questionSol'] = 'Worked solution'; $string['stackQuestion_questionOptions'] = 'Options'; $string['stackQuestion_questionNote'] = 'Question note'; $string['stackQuestion_questionID'] = 'Unique question ID'; $string['stackQuestion_questionGUID'] = 'Globally unique question ID'; $string['stackQuestion_questionName'] = 'Name'; $string['stackQuestion_questionDescription'] = 'Description'; $string['stackQuestion_questionKeywords'] = 'Keywords'; $string['stackQuestion_questionBody'] = 'Body'; $string['stackQuestion_questionUserLastEdited'] = 'Last edited by'; $string['stackQuestion_questionDateLastEdited'] = 'Last edited on'; // The $stackQuestionInst data structure: instantiated questions $string['stackQuestion_questionInstAttempts'] = 'Attempts at this question'; $string['stackQuestion_questionSeedInst'] = 'Random seed'; $string['stackQuestion_questionAnsTestOptInst'] = 'AnswerTest options'; // Potential Responses $string['stackQuestion_PR_SAns'] = 'Expression 1: SAns'; $string['stackQuestion_PR_TAns'] = 'Expression 2: TAns'; $string['stackQuestion_PR_AnsTest'] = 'Answer test'; $string['stackQuestion_PR_AnsTestOpt'] = 'Answer test options'; $string['stackQuestion_PR_RawMarkMod'] = 'Mark modifier operation'; $string['stackQuestion_PR_RawMark'] = 'Mark modifier'; $string['stackQuestion_PR_Penalty'] = 'Penalty'; $string['stackQuestion_PR_FeedBack'] = 'Feedback'; $string['stackQuestion_PR_AnswerNote'] = 'Answer note'; $string['stackQuestion_PR_ApLat'] = 'Apply later tests'; //////////////////////////////////// // Options //////////////////////////////////// $string['stackOptions_InsertStars'] = "Insert *s where needed"; $string['stackOptions_InformalSyntax'] = 'Allow informal syntax'; $string['stackOptions_AllowInputTool'] = 'Input tools'; $string['stackOptions_SyntaxHint'] = 'Syntax Hint'; $string['stackOptions_Display'] = 'Display'; $string['stackOptions_Language'] = 'Language'; $string['stackOptions_QuVal'] = 'Question value'; $string['stackOptions_MarkModMethod'] = 'Mark modification method'; $string['stackOptions_Penalty'] = 'Question penalty'; $string['stackOptions_Forbid'] = 'Forbidden words'; $string['stackOptions_Allow'] = 'Allowed words'; $string['stackOptions_AnsTest'] = 'Answer test'; $string['stackOptions_AnsTestOpt'] = 'Answer test options'; $string['stackOptions_TeacherEmail'] = "Teacher's email"; $string['stackOptions_FeedBackGenericCorrect'] = 'Feedback: correct'; $string['stackOptions_FeedBackGenericCorrect_def'] = "<font color='green'>Correct answer, well done.</font>"; $string['stackOptions_FeedBackGenericIncorrect'] = 'Feedback: incorrect'; $string['stackOptions_FeedBackGenericIncorrect_def'] = "<font color='red'>Incorrect answer.</font>"; $string['stackOptions_FeedBackGenericPCorrect'] = 'Feedback: partially correct'; $string['stackOptions_FeedBackGenericPCorrect_def'] = "<font color='orange'>Your answer is partially correct.</font>"; $string['stackOptions_ShowSol'] = 'Show solution'; //////////////////////////////////// // Question bank. //////////////////////////////////// $string['qp_notadmin'] = "<p><font color='red'>Warning!</font> You are not the admin user and any changes will not be stored in the database.</p>"; //////////////////////////////////// // Interactions with the CAS //////////////////////////////////// $string['NEWLINE'] = ' <html><br /></html>'; //////////////////////////////////// // Answer test specific strings //////////////////////////////////// $string['ATAlgEquiv_SA_notmatrix'] = 'Your answer should be a matrix, but is not.'; $string['ATAlgEquiv_SA_notlist'] = 'Your answer should be a list, but is not. Note that the syntax to enter a list is to enclose the comma separated values with square brackets.'; $string['ATAlgEquiv_SA_notset'] = 'Your answer should be a set, but is not. Note that the syntax to enter a set is to enclose the comma separated values with curly brackets.'; $string['ATList_wronglen'] = 'Your list should have {$a[0]} elements, but it is actually has {$a[1]}. '; $string['ATList_wrongentries'] = 'The entries in red below are those which are incorrect. {$a[0]} '; $string['ATMatrix_wrongsz'] = 'Your matrix should be {$a[0]} by {$a[1]}, but it is actually {$a[2]} by {$a[3]}.'; $string['ATMatrix_wrongentries'] = 'The entries in red below are those which are incorrect. {$a[0]}'; $string['ATSet_wrongsz'] = 'Your set should have {$a[0]} different elements, but it is actually has {$a[1]}.'; $string['ATSet_wrongentries'] = 'The following entries are incorrect, although they may appear in a simplified form from that which you actually entered. {$a[0]} '; $string['irred_Q_factored'] = 'The term {$a[0]} should be unfactored, but is not.'; $string['irred_Q_commonint'] = 'You need to take out a common integer factor. '; // needs a space at the end. $string['irred_Q_optional_fac'] = 'You could do more work, since {$a[0]} can be further factored. However, you don\'t need to. '; $string['FacForm_UnPick_morework'] = 'You could still do some more work on the term {$a[0]}. '; $string['FacForm_UnPick_intfac'] = $string['irred_Q_commonint']; $string['ATFacForm_error_list'] = 'The answer test failed. Please contact your systems administrator'; $string['ATFacForm_error_degreeSA'] = 'The CAS could not establish the algebraic degree of your answer.'; $string['ATFacForm_error_float'] = 'You should not use any floating point (decimal) numbers. Please use only integers, fractions etc.'; $string['ATFacForm_isfactored'] = 'Your answer is factored, well done. '; // needs a space at the end. $string['ATFacForm_notfactored'] = 'Your answer is not factored. '; // needs a space at the end. $string['ATFacForm_notalgequiv'] = 'Note that your answer is not algebarically equivalent to the correct answer. You must have done something wrong. '; // needs a space at the end. $string['ATInt_error_list'] = $string['ATFacForm_error_list']; $string['ATInt_const_int'] = 'You need to add a constant of integration. This should be an arbitrary constant, not a number.'; $string['ATInt_const'] = 'You need to add a constant of integration, otherwise this appears to be correct. Well done.'; $string['ATInt_diff'] = 'It looks like you have differentiated instead!'; $string['ATInt_generic'] = 'The derivative of your answer should be equal to the function that you were asked to integrate, which was: {$a[0]} In fact, the derivative of your answer, with respect to {$a[1]} is: {$a[2]} so you must have done something wrong!'; $string['ATDiff_error_list'] = $string['ATFacForm_error_list']; $string['ATDiff_int'] = 'It looks like you have integrated instead!'; $string[''] = ''; $string[''] = ''; $string[''] = ''; $string[''] = ''; //get_string('ThisSTACKVer','stack','') ?> |
From: Chris S. <san...@us...> - 2005-06-20 15:45:34
|
Update of /cvsroot/stack/stack-1-0/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21989/doc Added Files: en_doc.php stackcvs.png Log Message: Major changes to the font end. Attempt 2. --- NEW FILE: stackcvs.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: en_doc.php --- <?php /** * Describes the data structure stackQuestion * * @package documentation * @subpackage Stack */ $stackQuestion['questionVarsRaw']['doc']="This field is a string which contains a list of assignments of the form <br /> <tt> key = value </tt><br /> where each <tt>key</tt> is the name of a variable local to the question, and <tt>value</tt> is an expression in Maxima's language. When a question is instantiated, this list is passed to the CAS, and evaluated in order. The value obtained for each <tt>key</tt> will be stored and used later, for example in the question marking routines. The keys need not be unique, although only the last value will be available for use later. <p><b>Maxima's assignments <tt>a:3</tt></b><br /> Computer algebra systems each use a different syntax to denote the assignment of a value to a variable. For example, Maple and Derive use <tt>:=</tt>. Mathematica uses <tt>=</tt> or <tt>:=</tt>, depending on when the assignment is to take place. Maxima uses the form <tt>key:value</tt>, which is unusual and not intuitive. Maxima reserves <tt>:=</tt> to denote <em>function</em> definition, eg <tt>f(x):=x^2</tt>. Hence, in STACK we add an abstraction layer to enforce a syntax where every expression must be of the form <tt> key = value </tt>.</p> <p>Examples are included in the authoring guide.</p> <p><b>Notes</b> <ul> <li>Items are separated by either a newline or ;</li> <li>If you type a string not in the form <tt> key = value</tt>, a variable name such as <tt>dumvar3</tt> will be assigned automatically to keep track of the command in the list of question variables.</li> <li>These raw values are internalized as a PHP array, in this case stored in <tt>questionVars</tt>. Hence, the field may change when you edit the question.</li> <li>If a student uses a variable which has been assigned a value, the value will be used instead during the marking procedure. Hence, if you ask the student for an expression such as <tt>x^2-n</tt> in a question, it would be better not to use <tt>n</tt> here in case a student literally types this expression. </ul></p>"; $stackQuestion['questionVars']['doc']="This field is an array which holds the actual parsed values of the text given in the field <tt>questionVarsRaw</tt>. Internally in PHP this is stored as a numbered array, each entry of which is of the form <tt>array('key' => \$var_name, 'value' => \$value)</tt>."; $stackQuestion['questionStem']['doc']="This is the string, ie the question, which the student actually sees. This is of the nominal data type <tt>castext</tt>, so that it may depend on the <tt>questionVars</tt>. The student will of course see the instantiated versions."; $stackQuestion['questionAns']['doc']="Each question must have a non-empty answer, whether or not this is actually used by the various marking schemes. This answer must be a CAS specific string, ie. it is assumed to be of type <tt>casstring</tt>. If you want the answer to be a string, use quotes, for example <tt>\"hello world\"</tt>"; $stackQuestion['questionAnsKey']['doc']="If there are any <tt>questionPotResp</tt> in the question, which is to say a list of potential responses. This field will be used. When generating feedback to a question, based upon the student's answer, we have to refer to the student's answer using a variable name. This field allows such a local variable name to be set. All fields of the <tt>questionPotResp</tt> and the <tt>questionAnsVars</tt> may refer to this. The <tt>questionSol</tt>, that is the worked solution, may <em>not</em> refer to the student's answer. This field is required, and a default value is assigned to a blank question. This will only appear when potential responses are added."; $stackQuestion['questionAnsVarsRaw']['doc']="This field is treated in exactly the same way as the <tt>questionVarsRaw</tt> field above. When a student has responded to a question, this list of variables will be processed. They may depend on <ol> <li> The <tt>questionVarsInst</tt>, that is to say the instantiated question variables.</li> <li> The <tt>questionAnsKey</tt>, so that feedback may be given in terms of the student's answer.</li> </ol>"; $stackQuestion['questionAnsVars']['doc']="See <tt>questionVars</tt>."; $stackQuestion['questionPotResp']['doc']="This is an array of <em> potential responses</em>, each of type <tt>stackQuestionPotResp</tt>. See the specific documentation about this."; $stackQuestion['questionSol']['doc']="This castext is only displayed when the student asks to see the worked solution to a question. Note: the Worked solution may not depend on the <tt>questionAnsVars</tt> field"; $stackQuestion['questionOptions']['doc']="These are the options for the question. Only some will be set specifically at the question level, and these will be stored in this array. See the specific documentation on each option."; $stackQuestion['questionNote']['doc']="This allows a teacher to leave an intelligent \"note to self\" about which instances of variables a student has been given. The whole list of variables can be inspected, but some will only be intermediates. This is useful for giving the student a hint, or for analysis of incorrect answers."; $stackQuestion['questionID']['doc']="This is a unique system identifer for the question, in the database."; $stackQuestion['questionGUID']['doc']="This is a globally unique identifer for the question."; $stackQuestion['questionName']['doc']="The name of the question."; $stackQuestion['questionDescription']['doc']="The description the question."; $stackQuestion['questionKeywords']['doc']="Keywords, for searching over banks of questions. Note that any question with the keyword 'demo' will appear as a demo question for guest users and students to try and edit."; $stackQuestion['questionBody']['doc']="This field stores the serialized body of the question in the database."; $stackQuestion['questionUserLastEdited']['doc']="Shows who edited the question last."; $stackQuestion['questionDateLastEdited']['doc']="An automatic time stamp showing when the question was last edited."; // three extra fields! $stackQuestionInst['questionInstAttempts']['doc'] = "This holds the student's attempts at this question, in an array of <font color=\"orange\"><tt>stackQuestionAttempt</tt></font>."; $stackQuestionInst['questionSeedInst']['doc'] = "This holds a random number used to generate the questionInst. This is a combination of clock time and user number"; $stackQuestionInst['questionAnsTestOptInst']['doc'] = "If the AnswerTest is of type 'cas', then any non-empty AnsTestOpt needs to be instantiated. This field stores the result of this, making it available to the response processing part"; //////////////////////////////////// // Potential Responses //////////////////////////////////// $stackQuestionPotResp['SAns']['doc']="This is a CAS expression which we consider nominally to be the response of the student. The default value of this is the field <tt><font color=\"orange\">questionAnsKey</font></tt>. The AnswerTest will be applied with this against the value in <tt><font color=\"orange\">TAns</font></tt>."; $stackQuestionPotResp['TAns']['doc']="This is a CAS expression which we consider nominally to be the response of the teacher. Of course, it could be the answer or a common mistake. The default value of this is the field <tt>questionAns</tt>. The AnswerTest will be applied with this against the value in <tt><font color=\"orange\">SAns</font></tt>."; $stackQuestionPotResp['AnsTest']['doc']="The AnswerTest to be applied to this response."; $stackQuestionPotResp['AnsTestOpt']['doc']="The AnswerTest Options, for this AnswerTest."; $stackQuestionPotResp['RawMarkMod']['doc']="The way in which the <tt><font color=\"orange\">RawMark</font></tt> for this branch of the potential response is used to affect the RawMark for the attempt as a whole. It must be one of the values, =, +, - or =AT. The latter assigns the mark to be that returned by the AnswerTest, in the case where partial credit is returned."; $stackQuestionPotResp['RawMark']['doc']="The mark applied for this attempt, should be between 0 and 1, although does not need to be."; $stackQuestionPotResp['Penalty']['doc']="The penalty applied for this attempt, if this branch is activated. The last such modified penalty is used. If nothing is set, then the normal penalty scheme for the question as a whole is used. This value should be either (i) between 0 and 1, (although does not need to be), or (ii) the string '' or 'default'. Basically this is a way to make sure a specific penalty is set, regardless of the mark. Useful for removing a penalty in the case of a common and silly slip."; $stackQuestionPotResp['FeedBack']['doc']="This castext is only generated if this branch of the distracter is activated. The context in which this is evaluated is as follows: <ol> <li> <tt>questionVarsInst</tt> </li> <li> <tt>questionAnsInst</tt>, using the name given by <tt>questionAnsKey</tt> </li> <li> <tt>questionAnsVarsInst</tt> </li> </ol> This castext is then concatenated to form the FeedBack for this attempt."; $stackQuestionPotResp['AnswerNote']['doc']="This string is added to the AnswerNote for the attempt at this question."; $stackQuestionPotResp['ApLat']['doc']="This literally asks \"Apply which later test?\". It must be the number of an existing potential response. This will allow branching and the construction of tree like flow charts for the execution of feedback or partial credit. There are two provisos: <ul><li> No potential response is executed more than once. If this happens, the marking scheme bails out and takes no further action. This is to prevent loops.</li> <li> If the value of this field does not correspond to a legitimate Potential response, then the marking scheme bails out and takes no further action.</li></ul> This latter can be used to advantage by assigning the field a value of -1 to indicate the end of the process. <p> The default blank potential responses do not jump, but finish the process."; //////////////////////////////////// // Options //////////////////////////////////// // descript = The string which is displayed on screen // type = string, free string value // = html, HTML text // = email, email address (validates) // = url, URL (validates) // = list, // = number, // values = possible values, for a list this is an array. // default = default value. There must be one! $stackOptions['InsertStars']['doc']="If set to TRUE, the system will automatically insert *'s into a student's answer, (actually any casstring) when it is validated. So, for example <tt>2(1-4x)</tt> will be changed to <tt>2*(1-4*x)</tt>."; $stackOptions['InformalSyntax']['doc']="If set to TRUE, the system will automatically insert *'s into a student's answer, (actually any casstring) and it will not throw an error. Note however, that this is actually very hard to define robustly, since <tt> x(x+1) </tt> means apply the function <tt>x</tt> to the argument </tt>(x+1)</tt>, whereas <tt>sin(x)</tt> would be fine. How does one distinguish between the two? The system currently assumes a single letter is a variable, and otherwise this is a function to be applied. So <tt> tx(x-1) </tt> will not mean <tt> t*x*(x-1)</tt>"; $stackOptions['AllowInputTool']['doc']="The default is just to have a form box for the student's entry. If set to 'Form box + JOME, the system will allow the use of the JOME mathematical input tool, to help student enter their answers. There are a variety of such tools, and others could easily be substituted, although it is likely an implementation needs only one. Furthermore, there will need to be javascript in the page, and so on. Hence, the file <tt>inputtool.inc</tt> and the function <tt>stack_question_inst_try_formfrag</tt> allow this to be integrated into the system. More than one input tool per implementation is not supported."; $stackOptions['SyntaxHint']['doc']="A syntax hint allows the teacher to give the student a pro-forma in the input box. This can include '?' characters (which the CAS treats as the special variable <tt>qmchar</tt>). The syntax hint will appear in the answer box, whenever this is left blank by the student. For example, rather than having to type <pre>matrix([1,2],[3,4])</pre> the teacher may want to provide an answer box which already contains the string <pre>matrix([?,?],[?,?])</pre> instead. The student then need only to edit this, to replace ?'s with their values. This helps reduce syntax error problems with more difficult syntax issues. The ? may also be used to give partial credit. Of course it could also be used for general expressions such as <pre>x^2+?*x+1</pre> "; $stackOptions['Display']['doc']="This determines how strings are displayed by the system. The <tt>String</tt> representation is exactly the CAS string. LaTeX uses the CAS's tex() function, and then passes the result through TTH. MathML is not implemented in all CAS systems. The \"LaTeX Source\" option generates LaTeX code, but does not process it. This can be cut and pasted into other LaTeX documents."; $stackOptions['Language']['doc']="This determines the language used for STACK."; $stackOptions['QuVal']['doc']="This is the number of marks available for the question."; $stackOptions['MarkModMethod']['doc']="This allows the teacher to specify how different marks for repeated attempts at this question are treated. The mark modification method is a function which applies to the list of raw marks, and returns a mark for this attempt. There are two mark modification methods. <ul> <li><b>Penalty</b><br /> This is the default method, which has been tried for many years using the AiM system. For each incorrect attempt, which is valid and the student asks to be marked, a penalty is accumulated. The AttemptMark is the AccumulatedPenalty for that attempt, subtracted from the RawMark. The mark for this attempt is the maximum AttemptMark. Thus a mark cannot 'go down'. This prevents a student for being penalized for continuing to try to gain credit. </li> <li><b>Last Answer</b><br /> This is the RawMark for this attempt, and disregards all penalties and previous answers. Note, this is different from setting the penalty to be zero, and using the penalty scheme above. With this method if a student leaves an incorrect answer in place they will not be given credit for any previous correct attempt. </li> </ul>"; $stackOptions['Penalty']['doc']="This is the penalty applied to each different incorrect attempt, which is valid, and which the student has asked to be marked. This is subtracted from the basic question value of 1, and so must lie within the range 0 to 1, to make any sense."; $stackOptions['Forbid']['doc']="This is a comma separated list of text strings which are forbidden in a student's answer. If one of these strings is present then the student's attempt will be considered invalid, and no penalties will be given. The Forbid option works in a slightly different way from other options. The \"default\" values are <em>added</em> to the options entered at the question level, not over-written. So to forbid <tt>diff</tt> for a whole quiz, just set it at the quiz level. And so on. To allow a word forbidden at a higher level, use Allow."; $stackOptions['Allow']['doc']="See Forbid above."; $stackOptions['AnsTest']['doc']="This determines which answer test will be applied to the pair consisting of the student's and teacher's answers. See the specific documentation."; $stackOptions['AnsTestOpt']['doc']="This allows an option to be passed to the <tt>AnswerTest</tt>. Not all <tt>AnswerTest</tt>'s require one. See the specific documentation. This option is considered to be a CASString, and so if non-empty must be a valid CASString."; $stackOptions['TeacherEmail']['doc']="This is the email address that appears on the page for students to email help"; $stackOptions['FeedBackGenericCorrect']['doc']="This is the string displayed to the student when their answer gets full marks, in addition to anything from the response processing tree or answer tests."; $stackOptions['FeedBackGenericIncorrect']['doc']="This is the string displayed to the student when their answer gets full marks, in addition to anything from the response processing tree or answer tests."; $stackOptions['FeedBackGenericPCorrect']['doc']="This is the string displayed to the student when their answer gets full marks, in addition to anything from the response processing tree or answer tests."; $stackOptions['ShowSol']['doc']="This determines when any worked solution is available."; //////////////////////////////////// // Answer tests //////////////////////////////////// $stackAnswerTest['AlgEquiv']['doc']="This is full algebraic simplification, as far as is possible within the computer algebra system. This is a basic test, available to all CAS systems, and is the default test. In essence we take <tt>StudentAnswer-TeacherAnswer</tt> and shake it around in as many ways as possible. If the result is zero we return true."; $stackAnswerTest['CASEqual']['doc']="This is test if the CAS returns TRUE when asked to evaluate <tt>StudentAnswer=TeacherAnswer</tt> as a Boolean. There is no explicit simplification here (unlike AlgEquiv) and so this is very much at the mercy of the CAS system being used."; $stackAnswerTest['Num_tol_relative']['doc']="This is test checks to see if the difference between the teacher's answer (ta) and student's answer (sa) is within a tolerance of the answer. The default tolerance is 5%, but this can be changed with the answer test option. Literally this test is passed if <center> <tt>abs(sa-ta) <= tol * abs(ta)</tt> </center> and false otherwise."; $stackAnswerTest['Num_tol_absolute']['doc']="This is test checks to see if the difference between the teacher's answer (ta) and student's answer (sa) is within a tolerance of the answer. The default tolerance is 0.05, but this can be changed with the answer test option. Literally this test is passed if <center> abs(sa-ta) <= tol</center> and false otherwise."; $stackAnswerTest['String']['doc']="This is a string match, ignoring leading and trailing white space which are stripped from all answers, using PHP's <tt>trim()</tt> function."; $stackAnswerTest['StringSloppy']['doc']="This function first converts both inputs to lower case, then removes all white space from the string and finally performs a strict string comparison."; $stackAnswerTest['RegExp']['doc']="A regular expression match, with the expression passed via the AnsTestOpt option. This regular expression match is performed with PHP's <a href=\"http://uk2.php.net/manual/en/function.ereg.php\"><tt>ereg()</tt></a> function. <p>For example, if you want to test if a string looks like a floating point number then use the regular expression <pre>[0-9]*\.[0-9]*</pre></p>"; $stackAnswerTest['FacForm']['doc']="This test essentially checks (i) that <tt>SAns</tt> is algebraically equivalent to <tt>TAns</tt>, and (ii) that <tt>SAns</tt> is \"factored\". The answer test expects the first argument to be the student's answer, the second to the teachers answer and the AnswerTest options to be the variable. If the answer is incorrect, quite detailed feedback is provided. See the AnswerTest <tt>SA_factored</tt> for more details."; $stackAnswerTest['SA_factored']['doc']="This test checks to see if the expression in <tt>SAns</tt> is considered to be \"factored\". It shares code as the AnswerTest <tt>FacForm</tt>, so that the two tests should agree. However it provides no feedback and any <tt>TAns</tt> is ignored. It still needs the variable as an AnswerTest option. <p> This test is similar but slightly different from the command <tt>factorp(ex)</tt>, which is defined as part of the STACK code, not the Maxima distribution. This test is somewhat at the mercy of what the CAS is able to factor, and exactly what it factors. Hence these two tests which are more careful. First, we have that (3-x) is considered to be a factored expression, even though in Maxima, <tt>factor(3-x)=-(x-3)</tt>. Secondly, a linear term in variable, with a coefficient in of the variable 1, is always considered to be factored. This covers cases such as 3(x-1/3). There are other cases, which can be spotted in the test suite by looking for Answer Notes \"<em>correct by default</em>\".</p>"; $stackAnswerTest['SA_expanded']['doc']="This test checks to see if the expression in <tt>SAns</tt> is considered to be expanded. <p> This test is implemented with the command <tt>expandp(SA)</tt>, which is defined as part of the STACK code, not the Maxima distribution. Literally in Maxima, is <tt>expand(SA)=SA</tt>?"; $stackAnswerTest['Diff']['doc']="This test is a general differentiation test. The first argument is the student's answer. The answer test options needs to be the variable."; $stackAnswerTest['Int']['doc']="This test is a general integration test. The first argument is the student's answer. The second answer should be the teachers answer, for use when this answer test is used as a stand alone test. The answer test options needs to be the variable."; $stackAnswerTest['SA_True']['doc']="This gives access to the CAS's Boolean functions. This sends the expression in SA to the CAS, and ignores TA. If the result of the evaluation is the string 'true' (case insensitive, ignoring white space) the result of the test is TRUE, otherwise FALSE."; $stackAnswerTest['True']['doc']="This is a catch-all AnswerTest which always evaluates to true. This is useful when providing feedback at the end of a list of potential responses."; ?> |
From: Chris S. <san...@us...> - 2005-06-20 15:43:38
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20897/scripts Modified Files: moodlelib.php stackAuthor.php stackDatabase.php stackQuestion.php stackQuiz.php stackUser.php stackUtility.php stackWin.php stackXML.php Removed Files: en.php nl.php Log Message: Major changes to the font end. Attempt 1. Index: stackDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackDatabase.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** stackDatabase.php 10 Jun 2005 18:40:25 -0000 1.16 --- stackDatabase.php 20 Jun 2005 15:42:55 -0000 1.17 *************** *** 109,116 **** global $_PHP_SELF; if ('try' == $action) { ! $filter = 'demo'; } ! $query = 'SELECT questionID, questionName, questionDescription, questionKeywords, DATE_FORMAT(questionDateLastEdited,"%k:%i, %d/%m/%y"), questionGUID --- 109,127 ---- global $_PHP_SELF; + + // Sort out how we are going to filter questions. + if ('' === $filter) { + $filter['kw'] = ''; + $filter['name'] = ''; + } if ('try' == $action) { ! $filter['kw'] = 'demo'; ! $filter['name'] = ''; } ! ! $filter_name = $filter['name']; ! $filter_kw = $filter['kw']; ! ! // Build the query to the database. $query = 'SELECT questionID, questionName, questionDescription, questionKeywords, DATE_FORMAT(questionDateLastEdited,"%k:%i, %d/%m/%y"), questionGUID *************** *** 135,142 **** echo "<th><a href=\"javascript:SelectQs('edit_metadata');\">Filter</a></th>"; } else { ! echo "<th><a href=\"javascript:SelectQs('startover');\">Filter</a></th>"; } ! echo "<th></th><th></th> <th> <input type='text' name='bank_filter' value='$filter' /> ! </th></tr></thead><tbody>"; } for ($i = 0; $i < mysql_num_rows($result); $i++) { --- 146,154 ---- echo "<th><a href=\"javascript:SelectQs('edit_metadata');\">Filter</a></th>"; } else { ! echo "<th><a href=\"javascript:SelectQs('questionbank_screen');\">Filter</a></th>"; } ! echo "<th></th><th><input type='text' name='bank_filter[name]' value='$filter_name' /> ! </th> <th> <input type='text' name='bank_filter[kw]' value='$filter_kw' /> ! </th> </tr></thead><tbody>"; } for ($i = 0; $i < mysql_num_rows($result); $i++) { *************** *** 144,160 **** $qkeywords = stripslashes($row[3]); ! $dispQ = TRUE; ! if ('' != $filter) { ! $dispQ = strpos($qkeywords,$filter); } if (FALSE !== $dispQ) { - if ('' == $row[1]) { - $qname = ''; - } - else - { - $qname = stripslashes($row[1]); - } $guid = $row[5]; --- 156,169 ---- $qkeywords = stripslashes($row[3]); ! if ('' == $row[1]) { ! $qname = ''; ! } else { ! $qname = stripslashes($row[1]); } + + // Decide how to filter questions + $dispQ = stack_db_question_filter($qname,$qkeywords,$filter_name,$filter_kw); if (FALSE !== $dispQ) { $guid = $row[5]; *************** *** 167,174 **** echo('<td>' . $qkeywords . '</td>'); echo "\n<td nowrap='nowrap'><a href=\"javascript:SelectQ('$row[0]','edit_from_db');\">edit</a> ! <a href=\"javascript:SelectQ('$row[0]','try_from_db');\">try</a> <a href=\"javascript:SelectQ('$row[0]','export_xml_db');\">xml</a>"; if ('edit'==$action) { ! echo "\n<a href=\"javascript:SelectQ('$row[0]','delete_from_db');\"><font color=\"red\">del</font></a>"; } echo "\n</td>"; --- 176,183 ---- echo('<td>' . $qkeywords . '</td>'); echo "\n<td nowrap='nowrap'><a href=\"javascript:SelectQ('$row[0]','edit_from_db');\">edit</a> ! <a href=\"javascript:SelectQ('$row[0]','preview_from_db');\">try</a> <a href=\"javascript:SelectQ('$row[0]','export_xml_db');\">xml</a>"; if ('edit'==$action) { ! echo "\n<a href=\"javascript:SelectQ('$row[0]','delete');\"><font color=\"red\">del</font></a>"; } echo "\n</td>"; *************** *** 219,222 **** --- 228,239 ---- { // List all the questions in the database + // Sort out how we are going to filter questions. + if ('' === $filter) { + $filter['kw'] = ''; + $filter['name'] = ''; + } + $filter_name = $filter['name']; + $filter_kw = $filter['kw']; + $query = 'SELECT questionID, questionName, questionKeywords *************** *** 228,232 **** echo '<table><thead><tr>'; ! echo "<tr><th>Add</th><th>Question no.</th><th>Name</th> <th>Key words</th></tr>\n"; echo "\n</thead><tbody>\n"; --- 245,249 ---- echo '<table><thead><tr>'; ! echo "<tr><th>Add</th><th>Question no.</th><th>Name</th> <th>Keyword</th></tr>\n"; echo "\n</thead><tbody>\n"; *************** *** 234,242 **** $row = mysql_fetch_row($result); $qkw = stripslashes($row[2]); ! $dispQ = TRUE; ! if ('' != $filter) { ! $dispQ = strpos($qkw,$filter); ! } if (FALSE !== $dispQ) { --- 251,257 ---- $row = mysql_fetch_row($result); + $name = stripslashes($row[1]); $qkw = stripslashes($row[2]); ! $dispQ = stack_db_question_filter($name,$qkw,$filter_name,$filter_kw); if (FALSE !== $dispQ) { *************** *** 244,255 **** $qname = ''; ! if ('' != $row[1]) { ! $qname = stripslashes($row[1]); ! $qname = "<a href=\"javascript:EditPopup('$qID');\">{$qname}</a>"; } echo "<tr><td><input type=\"checkbox\" name=\"questionsToAdd[$qID][add]\" value=\"ticked\" /></td>\n"; ! echo "<td>$qID</td><td>$qname</td><td>$qkw</td> </tr>\n"; } // End preg_match to display each line. --- 259,269 ---- $qname = ''; ! if ('' != $name) { ! $name = "<a href=\"javascript:EditPopup('$qID');\">{$name}</a>"; } echo "<tr><td><input type=\"checkbox\" name=\"questionsToAdd[$qID][add]\" value=\"ticked\" /></td>\n"; ! echo "<td>$qID</td><td>$name</td><td>$qkw</td> </tr>\n"; } // End preg_match to display each line. *************** *** 265,268 **** --- 279,310 ---- } + + /** + * Decides whether to display a question based upon the name, keywords and filter. + * + * @param $name string Question name. + * @param $kw string Question keywords. + * @param $filter_name string Filter to be applied to the name. + * @param $filter_kw string Filter to be applied to the name. + * @return $dispQ boolean + */ + function stack_db_question_filter($name,$kw,$filter_name,$filter_kw) { + + $dispQ = TRUE; + + if ('' != $filter_kw) { + if ('' != $filter_name) { + $dispQ = max(strpos($kw,$filter_kw),strpos($name,$filter_name)); + } else { + $dispQ = strpos($kw,$filter_kw); + } + } else if ('' != $filter_name) { + $dispQ = strpos($name,$filter_name); + } + + return($dispQ); + } + + /** * Add or edit a question in the database. *************** *** 991,1003 **** * Confirms a quiz still exists in the database. * ! * @param int $quizID The quizID of the quuiz. * @return boolean */ ! function stack_db_confirm_quiz_exists($quizID) { $exists = FALSE; ! if ('' != $quizID ) { ! $query = 'SELECT quizName FROM stackQuiz WHERE quizID='.$quizID; $result= stack_db_query($query); --- 1033,1045 ---- * Confirms a quiz still exists in the database. * ! * @param int $quizid The quizid of the quuiz. * @return boolean */ ! function stack_db_confirm_quiz_exists($quizid) { $exists = FALSE; ! if ('' != $quizid ) { ! $query = 'SELECT quizName FROM stackQuiz WHERE quizid='.$quizid; $result= stack_db_query($query); *************** *** 1013,1023 **** * Deletes a quiz from the database. * ! * @param int $quizID The quizID of the quuiz. * @return void */ ! function stack_db_quiz_delete($quizID) { ! if ('' != $quizID ) { ! $query = "DELETE FROM stackQuiz WHERE quizID = '$quizID'"; $result= stack_db_query($query); } --- 1055,1065 ---- * Deletes a quiz from the database. * ! * @param int $quizid The quizid of the quuiz. * @return void */ ! function stack_db_quiz_delete($quizid) { ! if ('' != $quizid ) { ! $query = "DELETE FROM stackQuiz WHERE quizid = '$quizid'"; $result= stack_db_query($query); } *************** *** 1025,1044 **** /** ! * Get details of the quiz from the database. If no $quizID is supplied, then all quizzes * are listed instead. * ! * @param int $quizID The quizID number of the quiz needed. * @param boolean $allqs If set to TRUE, then all questions are returned, including hidden ones! * @return array $quiz_list Full information about the quizzes. */ ! function stack_db_quiz_get($quizID='',$allqs=TRUE) { global $stackQuiz; $quiz_list = NULL; $quiz_fields = array_keys($stackQuiz); ! if ('' == $quizID) { $query = "SELECT * FROM stackQuiz"; } else { ! $query = "SELECT * FROM stackQuiz WHERE quizID = '$quizID'"; } $result = stack_db_query($query); --- 1067,1086 ---- /** ! * Get details of the quiz from the database. If no $quizid is supplied, then all quizzes * are listed instead. * ! * @param int $quizid The quizid number of the quiz needed. * @param boolean $allqs If set to TRUE, then all questions are returned, including hidden ones! * @return array $quiz_list Full information about the quizzes. */ ! function stack_db_quiz_get($quizid='',$allqs=TRUE) { global $stackQuiz; $quiz_list = NULL; $quiz_fields = array_keys($stackQuiz); ! if ('' == $quizid) { $query = "SELECT * FROM stackQuiz"; } else { ! $query = "SELECT * FROM stackQuiz WHERE quizid = '$quizid'"; } $result = stack_db_query($query); *************** *** 1059,1065 **** // Obtain all questions in the quizzes. if ($allqs) { ! $query = "SELECT questionID, qord FROM quiz_question WHERE quizID = {$quiz['quizID']} ORDER BY qord"; } else { ! $query = "SELECT questionID, qord FROM quiz_question WHERE quizID = {$quiz['quizID']} AND qord >= 0 ORDER BY qord"; } $questions_result = stack_db_query($query); --- 1101,1107 ---- // Obtain all questions in the quizzes. if ($allqs) { ! $query = "SELECT questionID, qord FROM quiz_question WHERE quizid = {$quiz['quizid']} ORDER BY qord"; } else { ! $query = "SELECT questionID, qord FROM quiz_question WHERE quizid = {$quiz['quizid']} AND qord >= 0 ORDER BY qord"; } $questions_result = stack_db_query($query); *************** *** 1083,1087 **** } ! if ('' == $quizID) { return $quiz_list; } else { --- 1125,1129 ---- } ! if ('' == $quizid) { return $quiz_list; } else { *************** *** 1092,1100 **** /** * Update details of the quiz in the database. ! * If the quizID is blank, or the $quizID is not in the database a new * quiz is created. * * @param array $quiz The quiz. ! * @return int $quizID The quizID of the quiz in question. */ function stack_db_quiz_update($quiz) { --- 1134,1142 ---- /** * Update details of the quiz in the database. ! * If the quizid is blank, or the $quizid is not in the database a new * quiz is created. * * @param array $quiz The quiz. ! * @return int $quizid The quizid of the quiz in question. */ function stack_db_quiz_update($quiz) { *************** *** 1103,1115 **** $quiz_fields = array_keys($stackQuiz); ! $quizID = ''; ! if (array_key_exists('quizID',$quiz)) { ! $quizID = trim($quiz['quizID']); } $new_quiz = FALSE; ! if ('' == $quizID) { $new_quiz = TRUE; ! } else if(!stack_db_confirm_quiz_exists($quizID)) { $new_quiz = TRUE; } --- 1145,1157 ---- $quiz_fields = array_keys($stackQuiz); ! $quizid = ''; ! if (array_key_exists('quizid',$quiz)) { ! $quizid = trim($quiz['quizid']); } $new_quiz = FALSE; ! if ('' == $quizid) { $new_quiz = TRUE; ! } else if(!stack_db_confirm_quiz_exists($quizid)) { $new_quiz = TRUE; } *************** *** 1136,1143 **** $result = stack_db_query($query); ! // GET the last quizID $result= stack_db_query('SELECT LAST_INSERT_ID() FROM stackQuiz'); $row = mysql_fetch_row($result); ! $quizID = $row[0]; } else { --- 1178,1185 ---- $result = stack_db_query($query); ! // GET the last quizid $result= stack_db_query('SELECT LAST_INSERT_ID() FROM stackQuiz'); $row = mysql_fetch_row($result); ! $quizid = $row[0]; } else { *************** *** 1157,1166 **** $qu = substr($qu,1,strlen($qu)-1); ! $query = "UPDATE stackQuiz SET $qu WHERE quizID = '$quizID'"; $result = stack_db_query($query); } ! return $quizID; } --- 1199,1208 ---- $qu = substr($qu,1,strlen($qu)-1); ! $query = "UPDATE stackQuiz SET $qu WHERE quizid = '$quizid'"; $result = stack_db_query($query); } ! return $quizid; } *************** *** 1169,1179 **** * Add a questionID to a quiz * ! * @param int $quizID The quizID number of the quiz needed. * @param int $questionID The questionID of the question! * @return void */ ! function stack_db_quiz_add_question($quizID,$questionID) { ! $query = "INSERT INTO quiz_question (quizID, questionID) VALUES ('$quizID','$questionID')"; $result = stack_db_query($query); } --- 1211,1221 ---- * Add a questionID to a quiz * ! * @param int $quizid The quizid number of the quiz needed. * @param int $questionID The questionID of the question! * @return void */ ! function stack_db_quiz_add_question($quizid,$questionID) { ! $query = "INSERT INTO quiz_question (quizid, questionID) VALUES ('$quizid','$questionID')"; $result = stack_db_query($query); } *************** *** 1182,1193 **** * Drop a questionID from a quiz * ! * @param int $quizID The quizID number of the quiz needed. * @param int $questionID The questionID of the question! * @return int $result The number of table rows dropped. */ ! function stack_db_quiz_drop_question($quizID,$questionID) { ! if ('' != $quizID and '' != $questionID) { ! $query = "DELETE FROM quiz_question WHERE quizID = '$quizID' and questionID= '$questionID'"; $result = stack_db_query($query); } --- 1224,1235 ---- * Drop a questionID from a quiz * ! * @param int $quizid The quizid number of the quiz needed. * @param int $questionID The questionID of the question! * @return int $result The number of table rows dropped. */ ! function stack_db_quiz_drop_question($quizid,$questionID) { ! if ('' != $quizid and '' != $questionID) { ! $query = "DELETE FROM quiz_question WHERE quizid = '$quizid' and questionID= '$questionID'"; $result = stack_db_query($query); } *************** *** 1199,1214 **** * Reorder a questionID within a quiz * ! * @param int $quizID The quizID number of the quiz needed. * @param int $questionID The questionID of the question! * @param int $order * @return int $result The number of table rows dropped. */ ! function stack_db_quiz_reorder_question($quizID,$questionID,$order='NULL') { ! if ('' != $quizID and '' != $questionID) { if ('NULL' === $order) { ! $query = "UPDATE quiz_question SET qord=NULL WHERE quizID='$quizID' AND questionID='$questionID'"; } else { ! $query = "UPDATE quiz_question SET qord='$order' WHERE quizID='$quizID' AND questionID='$questionID'"; } $result = stack_db_query($query); --- 1241,1256 ---- * Reorder a questionID within a quiz * ! * @param int $quizid The quizid number of the quiz needed. * @param int $questionID The questionID of the question! * @param int $order * @return int $result The number of table rows dropped. */ ! function stack_db_quiz_reorder_question($quizid,$questionID,$order='NULL') { ! if ('' != $quizid and '' != $questionID) { if ('NULL' === $order) { ! $query = "UPDATE quiz_question SET qord=NULL WHERE quizid='$quizid' AND questionID='$questionID'"; } else { ! $query = "UPDATE quiz_question SET qord='$order' WHERE quizid='$quizid' AND questionID='$questionID'"; } $result = stack_db_query($query); *************** *** 1222,1233 **** * are listed instead. * ! * @param int $quizID The $quizID number. * @param int $userID The $userID number. * @param int $seed The $seed used to generate the questions. * @return void */ ! function stack_db_quiz_quizattempt_store($quizID,$userID,$seed) { ! $query = "INSERT INTO quizAttempts (quizID, userID, Seed ) VALUES ('$quizID','$userID','$seed')"; $result = stack_db_query($query); } --- 1264,1275 ---- * are listed instead. * ! * @param int $quizid The $quizid number. * @param int $userID The $userID number. * @param int $seed The $seed used to generate the questions. * @return void */ ! function stack_db_quiz_quizattempt_store($quizid,$userID,$seed) { ! $query = "INSERT INTO quizAttempts (quizid, userID, Seed ) VALUES ('$quizid','$userID','$seed')"; $result = stack_db_query($query); } *************** *** 1236,1240 **** * Record details of the mark for the last attempt. * ! * @param int $quizID The $quizID number. * @param int $userID The $userID number. * @param int $seed The $seed used to generate the questions. --- 1278,1282 ---- * Record details of the mark for the last attempt. * ! * @param int $quizid The $quizid number. * @param int $userID The $userID number. * @param int $seed The $seed used to generate the questions. *************** *** 1243,1249 **** * @return void */ ! function stack_db_quiz_quizattempt_updatemark($quizID,$userID,$seed,$maxmark,$mark) { ! $query = "UPDATE quizAttempts SET MaxMark='$maxmark', Mark='$mark' WHERE quizID='$quizID' AND userID='$userID' AND Seed='$seed';"; $result = stack_db_query($query); } --- 1285,1291 ---- * @return void */ ! function stack_db_quiz_quizattempt_updatemark($quizid,$userID,$seed,$maxmark,$mark) { ! $query = "UPDATE quizAttempts SET MaxMark='$maxmark', Mark='$mark' WHERE quizid='$quizid' AND userID='$userID' AND Seed='$seed';"; $result = stack_db_query($query); } *************** *** 1252,1263 **** * Record the fact the student has seen the solutions. * ! * @param int $quizID The $quizID number. * @param int $userID The $userID number. * @param int $seed The $seed used to generate the questions. * @return void */ ! function stack_db_quiz_quizattempt_seensol($quizID,$userID,$seed) { ! $query = "UPDATE quizAttempts SET SolRequest = '1' WHERE quizID='$quizID' AND userID='$userID' AND Seed='$seed';"; $result = stack_db_query($query); } --- 1294,1305 ---- * Record the fact the student has seen the solutions. * ! * @param int $quizid The $quizid number. * @param int $userID The $userID number. * @param int $seed The $seed used to generate the questions. * @return void */ ! function stack_db_quiz_quizattempt_seensol($quizid,$userID,$seed) { ! $query = "UPDATE quizAttempts SET SolRequest = '1' WHERE quizid='$quizid' AND userID='$userID' AND Seed='$seed';"; $result = stack_db_query($query); } *************** *** 1266,1278 **** * Return the last attempt at a quiz. An array containing the seed and mark are returned. * ! * @param int $quizID The $quizID number. * @param int $userID The $userID number. * @return array $userinfo */ ! function stack_db_quiz_quizattempt_getlast($quizID,$userID) { $userinfo = NULL; ! $query = "SELECT Seed, Mark, MaxMark, SolRequest FROM quizAttempts WHERE quizID = '$quizID' and userID = '$userID'"; $result = stack_db_query($query); --- 1308,1320 ---- * Return the last attempt at a quiz. An array containing the seed and mark are returned. * ! * @param int $quizid The $quizid number. * @param int $userID The $userID number. * @return array $userinfo */ ! function stack_db_quiz_quizattempt_getlast($quizid,$userID) { $userinfo = NULL; ! $query = "SELECT Seed, Mark, MaxMark, SolRequest FROM quizAttempts WHERE quizid = '$quizid' and userID = '$userID'"; $result = stack_db_query($query); Index: stackAuthor.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackAuthor.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** stackAuthor.php 13 Jun 2005 11:51:30 -0000 1.23 --- stackAuthor.php 20 Jun 2005 15:42:55 -0000 1.24 *************** *** 192,202 **** // Buttons to go somewhere next if ($stack_stand_alone) { ! echo "<p><a href=\"javascript:EditQ('edit')\">Edit question</a> \n"; if (''==$errors) { ! echo "<a href=\"javascript:EditQ('try')\">Try this question</a> \n"; ! echo "<a href=\"javascript:EditQ('export_xml')\">Export XML</a> \n"; if ('admin'==$user['username']) { ! echo "<a href=\"javascript:EditQ('store_in_db')\">Store question</a>\n ! <a href=\"javascript:EditQ('store_new_db')\">Store as a new question</a>\n"; } } --- 192,202 ---- // Buttons to go somewhere next if ($stack_stand_alone) { ! echo "<a href=\"javascript:EditQ('edit')\">Edit question</a> \n"; if (''==$errors) { ! echo "<a href=\"javascript:EditQ('preview')\">Try question</a> \n"; ! echo "<a href=\"javascript:EditQ('export_xml')\">Export as XML</a> \n"; if ('admin'==$user['username']) { ! echo "<a href=\"javascript:EditQ('save')\">Store question</a>\n ! <a href=\"javascript:EditQ('save_as')\">Store as a new question </a>\n"; } } *************** *** 271,277 **** // Potential responses ! echo "<br /><a href=\"javascript:EditQ('edit')\">Add</a>\n"; echo '<input type="input" name="questionPotResp[add]" value="0" size="3" />'; ! echo " potential responses<a href=\"javascript:HelpPopup('all','stackQuestionPotResp');\"><img align=\"middle\" border=\"0\" height=\"17\" width=\"17\" src=\"pics/help.gif\" /></a> (distractors etc).<br />"; if (array_key_exists('questionPotResp',$question)) { --- 271,277 ---- // Potential responses ! echo "<br /><a href=\"javascript:EditQ('edit')\">Edit</a> and add \n"; echo '<input type="input" name="questionPotResp[add]" value="0" size="3" />'; ! echo " potential responses<a href=\"javascript:HelpPopup('all','author_potresp');\"><img align=\"middle\" border=\"0\" height=\"17\" width=\"17\" src=\"pics/help.gif\" /></a> (distractors etc).<br />"; if (array_key_exists('questionPotResp',$question)) { *************** *** 320,328 **** echo "<p><a href=\"javascript:EditQ('edit')\">Edit question</a> \n"; if (''==$errors) { ! echo "<a href=\"javascript:EditQ('try')\">Try this question</a> \n"; ! echo "<a href=\"javascript:EditQ('export_xml')\">Export XML</a> \n"; if ('admin'==$user['username']) { ! echo "<a href=\"javascript:EditQ('store_in_db')\">Store question</a>\n ! <a href=\"javascript:EditQ('store_new_db')\">Store as a new question</a>\n"; } } --- 320,328 ---- echo "<p><a href=\"javascript:EditQ('edit')\">Edit question</a> \n"; if (''==$errors) { ! echo "<a href=\"javascript:EditQ('preveiw')\">Try question</a> \n"; ! echo "<a href=\"javascript:EditQ('export_xml')\">Export as XML</a> \n"; if ('admin'==$user['username']) { ! echo "<a href=\"javascript:EditQ('save')\">Store question</a>\n ! <a href=\"javascript:EditQ('save_as')\">Store as a new question</a>\n"; } } *************** *** 660,664 **** $err = ''; echo "<tr><td><b>{$fields['descript']}</b></td>\n"; ! if ('quizID' == $key) { echo "<td><input type=\"hidden\" name=\"quiz[$key]\" value=\"{$quiz[$key]}\" alt=\"$key\" />{$quiz[$key]}</td><td>".$err.'</td></tr>'; } else if ('quizOptions' == $key){ --- 660,664 ---- $err = ''; echo "<tr><td><b>{$fields['descript']}</b></td>\n"; ! if ('quizid' == $key) { echo "<td><input type=\"hidden\" name=\"quiz[$key]\" value=\"{$quiz[$key]}\" alt=\"$key\" />{$quiz[$key]}</td><td>".$err.'</td></tr>'; } else if ('quizOptions' == $key){ *************** *** 740,748 **** function stack_quiz_edit(&$quiz,&$errors) { ! // (0) Establish the quizID ! if (array_key_exists('quizID',$quiz)) { ! $quizID = $quiz['quizID']; } else { ! $errors['quiz']['quizID'] = '<br />Could not find a quizID!'; return NULL; } --- 740,748 ---- function stack_quiz_edit(&$quiz,&$errors) { ! // (0) Establish the quizid ! if (array_key_exists('quizid',$quiz)) { ! $quizid = $quiz['quizid']; } else { ! $errors['quiz']['quizid'] = '<br />Could not find a quizid!'; return NULL; } *************** *** 759,763 **** $quID = $qu['questionID']; if (array_key_exists('drop',$qu)) { ! $nodropped = stack_db_quiz_drop_question($quiz['quizID'],$quID); unset($quiz['questions'][$key]); } --- 759,763 ---- $quID = $qu['questionID']; if (array_key_exists('drop',$qu)) { ! $nodropped = stack_db_quiz_drop_question($quiz['quizid'],$quID); unset($quiz['questions'][$key]); } *************** *** 806,812 **** } if ($ordered) { ! stack_db_quiz_reorder_question($quizID,$qu['questionID'],$qu['order']); } else { ! stack_db_quiz_reorder_question($quizID,$qu['questionID']); } } --- 806,812 ---- } if ($ordered) { ! stack_db_quiz_reorder_question($quizid,$qu['questionID'],$qu['order']); } else { ! stack_db_quiz_reorder_question($quizid,$qu['questionID']); } } *************** *** 828,832 **** if (stack_db_confirm_question_exists($quID)) { ! stack_db_quiz_add_question($quizID,$quID); $quiz['questions'][] = array('questionID'=>$quID); } else { --- 828,832 ---- if (stack_db_confirm_question_exists($quID)) { ! stack_db_quiz_add_question($quizid,$quID); $quiz['questions'][] = array('questionID'=>$quID); } else { Index: stackXML.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackXML.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** stackXML.php 1 Apr 2005 18:59:31 -0000 1.2 --- stackXML.php 20 Jun 2005 15:42:55 -0000 1.3 *************** *** 66,70 **** $xml .= $pad." <{$tag}_ord order=\"$key\">\n".stack_xml_create_question_frag($orderdata,$depth+6)."$pad </{$tag}_ord>\n"; } ! $xml .= $pad."</$tag>\n";; } else { // Just a regular open tag. --- 66,70 ---- $xml .= $pad." <{$tag}_ord order=\"$key\">\n".stack_xml_create_question_frag($orderdata,$depth+6)."$pad </{$tag}_ord>\n"; } ! $xml .= $pad."</$tag>\n"; } else { // Just a regular open tag. *************** *** 127,132 **** function stack_xml_write_quiz_file($quiz, $directory) { // takes a $stackQuestion array and writes it to an XML file in $directory ! ! $xml_file_name = 'stack_quiz.xml'; // create the file we will use for writing --- 127,133 ---- function stack_xml_write_quiz_file($quiz, $directory) { // takes a $stackQuestion array and writes it to an XML file in $directory ! ! ! $xml_file_name = 'stack_quiz_'.time().'.xml'; // create the file we will use for writing Index: stackQuiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuiz.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** stackQuiz.php 12 Jun 2005 09:48:37 -0000 1.1 --- stackQuiz.php 20 Jun 2005 15:42:55 -0000 1.2 *************** *** 8,13 **** */ ! $stackQuiz['quizID']['descript'] = 'Quiz ID number'; ! $stackQuiz['quizID']['mysql'] = 'INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY'; $stackQuiz['quizName']['descript'] = 'Quiz name'; --- 8,13 ---- */ ! $stackQuiz['quizid']['descript'] = 'Quiz ID number'; ! $stackQuiz['quizid']['mysql'] = 'INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY'; $stackQuiz['quizName']['descript'] = 'Quiz name'; *************** *** 26,28 **** --- 26,71 ---- $stackQuiz['quizMode']['mysql'] = 'TINYTEXT'; + /* + * Displays the student quiz selection screen + * @param array $quize_store The list of quizzes + * @param $user + * @return void + */ + function stack_quiz_student_select($quiz_store, $user) { + global $stack_root; + + require_once("{$stack_root}/html/quizjava.html"); + echo "<h1>Please choose a quiz to try</h1>"; + global $stackQuiz; + if (is_array($quiz_store)) { + echo "<p>\n<form name='quizform' action='quiz.php' method='POST'> + <input type='hidden' name='quizid' value='-1'> + <input type='hidden' name='action' value='continue_quiz'>"; + echo "\n<table cellpadding='2'>\n"; + echo "\n<tr><th>{$stackQuiz['quizName']['descript']}</th><th>{$stackQuiz['quizDescription']['descript']}</th><th>Last mark (%)</th></tr>"; + foreach ($quiz_store as $qs => $quiz) { + $qname = $quiz['quizName']; + $qID = $quiz['quizid']; + $mark = '-'; + if (is_array($user)) { + if (array_key_exists('id',$user)) { + $userinfo = stack_db_quiz_quizattempt_getlast($qID,$user['id']); + if (is_array($userinfo)) { + if (NULL != $userinfo['mark']) { + $mark = round(100*$userinfo['mark']/$userinfo['maxmark'],2); + } + } + } + } + + echo "<tr><td><a href=\"javascript:takeaction('continue_quiz','$qID');\">{$qname}</a></td>\n"; + echo "<td>".$quiz['quizDescription']."</td><td align='center'>$mark</td></tr>\n"; + } + echo "\n</table>\n</form>\n</p>"; + } else { + echo "<p>You have no quizzes available to try.</p>"; + } + } + + ?> Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** stackQuestion.php 10 Jun 2005 20:53:16 -0000 1.19 --- stackQuestion.php 20 Jun 2005 15:42:55 -0000 1.20 *************** *** 331,335 **** } } else { ! $errors[$qfield] = get_string('QValidRequiredField','stack','');; $question[$qfield] = ''; } --- 331,335 ---- } } else { ! $errors[$qfield] = get_string('QValidRequiredField','stack',''); $question[$qfield] = ''; } *************** *** 443,447 **** foreach ($cas_keywords as $cas_kw) { if (in_array($locvar['key'],$stack_cas[$cas_kw])) { ! $errors[$keyvals_name_raw][$locvar['key']] = $locvar['key']." ".get_string('QValidMaximaName','stack','');; } } --- 443,447 ---- foreach ($cas_keywords as $cas_kw) { if (in_array($locvar['key'],$stack_cas[$cas_kw])) { ! $errors[$keyvals_name_raw][$locvar['key']] = $locvar['key']." ".get_string('QValidMaximaName','stack',''); } } *************** *** 595,601 **** global $stackQuestion,$stackQuestionPotResp; $errstr = ''; - if (is_array($errors)) { ! $errstr = "<b>The item is invalid, and the following field(s) contain errors.</b><br />\n\n"; $errstr .= "<table border='1' cellpadding='2'>"; foreach ($errors as $qfield => $err) { --- 595,600 ---- global $stackQuestion,$stackQuestionPotResp; $errstr = ''; if (is_array($errors)) { ! $errstr = '<b>'.get_string('QValidSummaryTable0','stack')."</b><br />\n\n"; $errstr .= "<table border='1' cellpadding='2'>"; foreach ($errors as $qfield => $err) { *************** *** 603,607 **** if ('questionPotResp' == $qfield) { foreach($err as $varname => $varerr) { ! $errstr .= "\n<tr><td colspan='2'><b>Potential response '$varname' </b></td></tr>\n"; foreach ($varerr as $prf => $pre) { if (is_array($pre) ) { --- 602,606 ---- if ('questionPotResp' == $qfield) { foreach($err as $varname => $varerr) { ! $errstr .= "\n<tr><td colspan='2'><b>".get_string('QValidSummaryTable3','stack',$varname)." </b></td></tr>\n"; foreach ($varerr as $prf => $pre) { if (is_array($pre) ) { *************** *** 620,627 **** } ! if ('questionVarsRaw' == $qfield) { ! $errstr .= "\n<tr><td colspan='2'>One or more of the <b>".$stackQuestion[$qfield]['descript']."</b> contained error(s), as follows.</td></tr>"; foreach($err as $varname => $varerr) { ! $errstr .= "\n<tr><td>The variable '$varname': </td><td>".$varerr."</td></tr>\n"; } $errstr .= "<tr><td> </td><td> </td></tr>\n"; --- 619,627 ---- } ! if ('questionVarsRaw' == $qfield or 'questionAnsVarsRaw' == $qfield) { ! $a = get_string('stackQuestion_'.$qfield,'stack'); ! $errstr .= "\n<tr><td colspan='2'>".get_string('QValidSummaryTable1','stack',$a).'</td></tr>'; foreach($err as $varname => $varerr) { ! $errstr .= "\n<tr><td>".get_string('QValidSummaryTable2','stack',$varname)."</td><td>".$varerr."</td></tr>\n"; } $errstr .= "<tr><td> </td><td> </td></tr>\n"; *************** *** 629,633 **** } else { ! $errstr .= '<tr><td><b>'.$stackQuestion[$qfield]['descript'].":</b></td><td> ".$err."</td></tr>\n\n"; } --- 629,634 ---- } else { ! $fname = get_string('stackQuestion_'.$qfield,'stack'); ! $errstr .= '<tr><td><b>'.$fname.":</b></td><td> ".$err."</td></tr>\n\n"; } *************** *** 683,687 **** // 'Language'; $stackOptions['Language']['type'] = 'list'; ! $stackOptions['Language']['values'] = array('en','nl'); $stackOptions['Language']['default'] = 'en'; --- 684,688 ---- // 'Language'; $stackOptions['Language']['type'] = 'list'; ! $stackOptions['Language']['values'] = array('en','es','nl'); $stackOptions['Language']['default'] = 'en'; *************** *** 1014,1018 **** } - // Now put the implicit question variables back into the castext strings. --- 1015,1018 ---- *************** *** 1020,1029 **** $err_when_inst = "<br /><font color=\"red\">CAS ERROR when instantiated!</font> "; foreach($stackQuestion as $qfield => $val) { if ('castext' == $stackQuestion[$qfield]['type'] and array_key_exists($qfield,$question)) { $errct = ''; ! $questionInst["{$qfield}Inst"]= stack_castext_to_display($question["{$qfield}Inst"], $imp_locs_Inst, $options['Display'] , $errct); ! ! if (''!=$errct) { // We have some errors! $errors[$qfield]=$err_when_inst.$errct; } --- 1020,1030 ---- $err_when_inst = "<br /><font color=\"red\">CAS ERROR when instantiated!</font> "; + $displayed = $options['Display']; + foreach($stackQuestion as $qfield => $val) { if ('castext' == $stackQuestion[$qfield]['type'] and array_key_exists($qfield,$question)) { $errct = ''; ! $questionInst["{$qfield}Inst"] = stack_castext_to_display($question["{$qfield}Inst"], $imp_locs_Inst, $displayed , $errct); ! if ('' != $errct) { // We have some errors! $errors[$qfield]=$err_when_inst.$errct; } *************** *** 1740,1744 **** $RawAns = $this_attempt['RawAns']; - // (2) Pose the ``question" stack_question_inst_displayq($questionInst); --- 1741,1744 ---- *************** *** 1846,1850 **** echo $options['FeedBackGenericCorrect']; } else if (0==$this_attempt['RawMark']) { ! echo $options['FeedBackGenericIncorrect'];; } else { echo $options['FeedBackGenericPCorrect']; --- 1846,1850 ---- echo $options['FeedBackGenericCorrect']; } else if (0==$this_attempt['RawMark']) { ! echo $options['FeedBackGenericIncorrect']; } else { echo $options['FeedBackGenericPCorrect']; Index: stackUtility.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackUtility.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** stackUtility.php 12 Jun 2005 16:10:01 -0000 1.22 --- stackUtility.php 20 Jun 2005 15:42:55 -0000 1.23 *************** *** 14,17 **** --- 14,19 ---- } require_once("{$stack_root}/scripts/stackQuiz.php"); + require_once("{$stack_root}/scripts/stackUser.php"); + require_once("{$stack_root}/frontend_general/frontend_util.php"); /** *************** *** 26,30 **** /** ! * Synonym for the PHP function htmlspecialchars * * @param string $str The input string. --- 28,32 ---- /** ! * Synonym for the PHP function htmlspecialchars. See the Moodle function s(.) * * @param string $str The input string. *************** *** 108,112 **** * @return array Field [0] contains the string between the two characters, Field [1] contains the start position of -1 if it does not exist and Field [2] contains the end position of -1 if there was no match. */ ! function GrabBetween($strin,$leftc,$rightc,$start) { // Starting at $start, (a number) // Find the first occurance of $leftc, match with an occurance of --- 110,114 ---- * @return array Field [0] contains the string between the two characters, Field [1] contains the start position of -1 if it does not exist and Field [2] contains the end position of -1 if there was no match. */ ! function stack_util_grabbetween($strin,$leftc,$rightc,$start) { // Starting at $start, (a number) // Find the first occurance of $leftc, match with an occurance of *************** *** 159,162 **** --- 161,166 ---- return $ret; } + + // ********************************************************** *************** *** 355,359 **** } ! // (3) Check for missing *'s // hack: This needs some careful thought. // We can't simply check for adjcent letters. For example sin(x) is ok, xsin(x) is not! --- 359,414 ---- } ! // (3) We should only allow certain strings in student's answers. ! // These are kept in $stack_cas['studentAllow'], and are generated on the fly from ! // the CAS docs. ! ! if ($stack_cas['strict']) { ! // Match more then one occurance ! $pat = "|[\?_A-Za-z0-9]+|"; ! preg_match_all($pat,$strout,$out,PREG_PATTERN_ORDER); ! ! ! // Filter out some of these matches. ! $strin_keywords=''; ! foreach($out[0] as $key) { ! // Do we have only numbers, or only 2 characters? ! // These strings are fine. ! preg_match("|[0-9]+|",$key,$justnum); ! ! if (empty($justnum) and strlen($key)>2) { ! $strin_keywords[] = $key; ! } ! } ! ! // Students are only allowed certain strings. ! if ('t' != $seclevel) { ! // Make sure each one is really an allowed keyword ! if (is_array($strin_keywords)) { ! foreach ($strin_keywords as $strinkey) { ! ! if (!in_array(strtoupper($strinkey),$stack_cas['studentAllow'])) { ! // We are in trouble! ! $a = array('key' => stack_s($strinkey)); ! $ret.='<br />'.get_string('UnknownFun','stack',$a); ! } ! } ! } ! } else { // End of keyword checks for students ! // Make sure a teacher has not entered an unsupported function. ! if (is_array($strin_keywords)) { ! foreach ($strin_keywords as $strinkey) { ! ! if (in_array(strtoupper($strinkey),$stack_cas['teacherNotAllow'])) { ! // We are in trouble! ! $a = array('key' => stack_s($strinkey)); ! $ret.='<br />'.get_string('NotSupported','stack',$a); ! } ! } ! } ! ! } ! } ! ! // (4) Check for missing *'s // hack: This needs some careful thought. // We can't simply check for adjcent letters. For example sin(x) is ok, xsin(x) is not! *************** *** 411,464 **** } - // (5) We should only allow certain strings in student's answers. - // These are kept in $stack_cas['studentAllow'], and are generated on the fly from - // the CAS docs. - - if ($stack_cas['strict']) { - // Match more then one occurance - $pat = "|[\?_A-Za-z0-9]+|"; - preg_match_all($pat,$strout,$out,PREG_PATTERN_ORDER); - - - // Filter out some of these matches. - $strin_keywords=''; - foreach($out[0] as $key) { - // Do we have only numbers, or only 2 characters? - // These strings are fine. - preg_match("|[0-9]+|",$key,$justnum); - - if (empty($justnum) and strlen($key)>2) { - $strin_keywords[] = $key; - } - } - - // Students are only allowed certain strings. - if ('t' != $seclevel) { - // Make sure each one is really an allowed keyword - if (is_array($strin_keywords)) { - foreach ($strin_keywords as $strinkey) { - - if (!in_array(strtoupper($strinkey),$stack_cas['studentAllow'])) { - // We are in trouble! - $a = array('key' => stack_s($strinkey)); - $ret.='<br />'.get_string('UnknownFun','stack',$a); - } - } - } - } else { // End of keyword checks for students - // Make sure a teacher has not entered an unsupported function. - if (is_array($strin_keywords)) { - foreach ($strin_keywords as $strinkey) { - - if (in_array(strtoupper($strinkey),$stack_cas['teacherNotAllow'])) { - // We are in trouble! - $a = array('key' => stack_s($strinkey)); - $ret.='<br />'.get_string('NotSupported','stack',$a); - } - } - } - - } - } // Knock off first "<br />", (6 chars) --- 466,469 ---- *************** *** 925,931 **** echo "</font></em></p>"; - if ($stack_stand_alone) { // Then print a footer - echo "\n</body></html>"; - } } --- 930,933 ---- --- en.php DELETED --- Index: stackUser.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackUser.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** stackUser.php 8 Jun 2005 08:31:18 -0000 1.8 --- stackUser.php 20 Jun 2005 15:42:55 -0000 1.9 *************** *** 210,212 **** --- 210,214 ---- + + ?> Index: moodlelib.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/moodlelib.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** moodlelib.php 8 Jun 2005 08:41:29 -0000 1.2 --- moodlelib.php 20 Jun 2005 15:42:54 -0000 1.3 *************** *** 97,101 **** //In Moodle we should have a /lang/en/ dir etc. ! //$location = $stack_root.'/lang/'; // Get the current language --- 97,101 ---- //In Moodle we should have a /lang/en/ dir etc. ! $location = $stack_root.'/lang/'; // Get the current language *************** *** 107,112 **** } ! //$langfile = $location.$lang.'/'.$module.'.php'; ! $langfile = $stack_root.'/scripts/'.$lang.'.php'; if (file_exists($langfile)) { if ($result = get_string_from_file($identifier, $langfile, "\$resultstring")) { --- 107,111 ---- } ! $langfile = $location.$lang.'/'.$module.'.php'; if (file_exists($langfile)) { if ($result = get_string_from_file($identifier, $langfile, "\$resultstring")) { --- nl.php DELETED --- Index: stackWin.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackWin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** stackWin.php 12 Jun 2005 16:10:01 -0000 1.2 --- stackWin.php 20 Jun 2005 15:42:55 -0000 1.3 *************** *** 88,118 **** fwrite($pipes[0], $strin); fwrite($pipes[0], $stack_cas['closeCommand']."\n\n"); $ret = ''; // read output from stdout ! // $start_time = stack_microtime_float(); ! $continue = TRUE; while (!feof($pipes[1])) { $out = fgets($pipes[1], 1024); $ret .= $out; //echo $out; $now = stack_microtime_float(); ! if (($now-$start_time) > 0.3) { ! if ($continue) { ! $continue = FALSE; ! } ! // CTRL+C should be ASCII 3. ! //fwrite($pipes[0], chr(3)); ! fwrite($pipes[0], chr(27)."[13~"); ! fflush($pipes[0]); ! } } fclose($pipes[0]); - - //$end_time = stack_microtime_float(); - //$time_taken = $end_time - $start_time; - //echo "<br />Time taken: ".$time_taken; - fclose($pipes[1]); } else { --- 88,117 ---- fwrite($pipes[0], $strin); fwrite($pipes[0], $stack_cas['closeCommand']."\n\n"); + fflush($pipes[0]); $ret = ''; // read output from stdout ! $start_time = stack_microtime_float(); while (!feof($pipes[1])) { $out = fgets($pipes[1], 1024); + if ('' == $out) { + // PAUSE + usleep(1000); + } $ret .= $out; //echo $out; $now = stack_microtime_float(); ! // if (($now-$start_time) > 0.3) { ! // // CTRL+C should be ASCII 3. ! // //fwrite($pipes[0], chr(3)); ! // fwrite($pipes[0], chr(27)."[13~"); ! // fflush($pipes[0]); ! // } } fclose($pipes[0]); fclose($pipes[1]); + //$time_taken = $now-$start_time; + //echo "Start: $start_time<br >End: $now<br >Taken = $time_taken"; + } else { |