From: Chris S. <san...@us...> - 2005-06-20 12:25:48
|
Update of /cvsroot/stack/stack-1-0/frontend_general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13988/frontend_general Modified Files: Tag: frontend_dev edit_quiz_util.php editquiz_display.php frontend_util.php question_bank_util.php Log Message: Index: frontend_util.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/frontend_general/Attic/frontend_util.php,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** frontend_util.php 18 Jun 2005 21:01:01 -0000 1.1.2.5 --- frontend_util.php 20 Jun 2005 12:25:26 -0000 1.1.2.6 *************** *** 111,113 **** --- 111,131 ---- } + /* + * Gets the questionbank filter if this has been set. + * TO DO: This also sets $SESSION['bank_filter']. This should really + * be in a separate function. Also should have a $source parameter + * @return array question_bank_filter The Question Bank Filter + */ + 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; + } + ?> Index: editquiz_display.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/frontend_general/Attic/editquiz_display.php,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** editquiz_display.php 17 Jun 2005 16:25:27 -0000 1.1.2.4 --- editquiz_display.php 20 Jun 2005 12:25:26 -0000 1.1.2.5 *************** *** 32,39 **** global $stackQuiz; if (is_array($quiz_store)) { echo "<p>\n<form name='quizform' action='$PostTo' method='POST'> <input type='hidden' name='quizid' value='-1' /> <input type='hidden' name='action' value='quiz_choose' />"; ! echo "\n<table cellpadding='2'>\n"; echo "\n<tr><th></th><th>{$stackQuiz['quizName']['descript']}</th> --- 32,43 ---- global $stackQuiz; if (is_array($quiz_store)) { + echo "<p>\n<form name='tryform' action='quiz.php' method='POST'> + <input type='hidden' name='quizid' value='-1' /> + <input type='hidden' name='action' value='quiz_choose' /></form>"; + echo "<p>\n<form name='quizform' action='$PostTo' method='POST'> <input type='hidden' name='quizid' value='-1' /> <input type='hidden' name='action' value='quiz_choose' />"; ! echo "\n<table cellpadding='2'>\n"; echo "\n<tr><th></th><th>{$stackQuiz['quizName']['descript']}</th> *************** *** 46,54 **** } $qID = $quiz['quizid']; ! echo "<tr><td>{$qID}</td><td><a href=\"javascript:takeaction('quiz_edit','$qID');\">{$qname}</a></td>\n"; ! echo "<td>".$quiz['quizDescription']."</td>\n"; ! echo "<td><a href=\"javascript:takeaction('quiz_delete','$qID');\"><font color='red'>Delete Quiz</font></a></td></tr>\n"; } ! echo "\n</table>\n\n</p>"; } else { --- 50,60 ---- } $qID = $quiz['quizid']; ! echo "<tr><td>{$qID}</td><td>{$qname}</td><td>".$quiz['quizDescription']."</td>\n"; ! echo "<td><a href=\"javascript:takeaction('quiz_edit','$qID');\">edit</a></td>\n"; ! echo "<td><a href=\"javascript:tryquiz('continue_quiz','$qID');\">try</a></td>\n"; ! echo "<td><a href=\"javascript:takeaction('quiz_xml','$qID');\">xml</a></td>\n"; ! echo "<td><a href=\"javascript:takeaction('quiz_delete','$qID');\"><font color='red'>del</font></a></td></tr>\n"; } ! echo "\n</table>\n\n</p></form>"; } else { Index: question_bank_util.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/frontend_general/Attic/question_bank_util.php,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** question_bank_util.php 18 Jun 2005 09:54:12 -0000 1.1.2.4 --- question_bank_util.php 20 Jun 2005 12:25:26 -0000 1.1.2.5 *************** *** 118,139 **** /* - * Gets the questionbank filter if this has been set. - * TO DO: This also sets $SESSION['bank_filter']. This should really - * be in a separate function. Also should have a $source parameter - * @return array question_bank_filter The Question Bank Filter - */ - 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; - } - - /* * Gets the selected questions * @return array $quiz The questions selected --- 118,121 ---- Index: edit_quiz_util.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/frontend_general/Attic/edit_quiz_util.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** edit_quiz_util.php 20 Jun 2005 10:43:45 -0000 1.1.2.1 --- edit_quiz_util.php 20 Jun 2005 12:25:26 -0000 1.1.2.2 *************** *** 1,26 **** <?php - /** - * - * Welcome to STACK. A system for teaching and assessment using a - * computer algebra kernel. - * <br> - * This file is licensed under the GPL License. - * <br> - * A copy of the license is in your STACK distribution called - * license.txt. If you are missing this file you can obtain - * it from: - * http://www.stack.bham.ac.uk/license.txt - * <br> - * Copyright (c) 2005, Christopher James Sangwin - * - * @author Chris Sangwin C.J...@bh... - * @author Laura Naismith L.N...@bh... - * @author Juliette White jv...@jv... - * @package Stack - * - * This file contains utility functions used by edit_quiz.php - * TO DO: Some of these functions needs to be consolidated with the functions - * in the other utility files. - */ /* --- 1,3 ---- |