Update of /cvsroot/stack/stack-1-0
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13332
Modified Files:
Tag: frontend_dev
editquiz.php question_bank.php
Log Message:
Index: editquiz.php
===================================================================
RCS file: /cvsroot/stack/stack-1-0/editquiz.php,v
retrieving revision 1.10.2.4
retrieving revision 1.10.2.5
diff -C2 -d -r1.10.2.4 -r1.10.2.5
*** editquiz.php 14 Jun 2005 17:54:52 -0000 1.10.2.4
--- editquiz.php 16 Jun 2005 04:11:38 -0000 1.10.2.5
***************
*** 53,58 ****
// action = quiz_edit_addqs Add questions to the quiz.
// action = filter Re-display the list of questions, filtered.
-
-
// show_array($_POST);
--- 53,56 ----
***************
*** 73,82 ****
}
! if ('filter' == $action) {
if (array_key_exists('quizID',$_POST)){
! $quizID = $_POST['quizID'];
! $filter = $_POST['filter'];
! $action = 'quiz_edit_addqs';
}
}
--- 71,86 ----
}
! $question_bank_filter = '';
! if (array_key_exists('bank_filter',$_SESSION)) {
! $question_bank_filter = $_SESSION['bank_filter'];
! }
!
! if ('filter' == $action) {
if (array_key_exists('quizID',$_POST)){
! $quizID = $_POST['quizID'];
! $question_bank_filter = $_POST['bank_filter'];
! $action = 'quiz_edit_addqs';
! $_SESSION['bank_filter'] = $question_bank_filter;
}
}
***************
*** 179,185 ****
echo "<a href=\"javascript:takeaction('filter',{$quizID});\">Filter</a> ";
! echo "<input type='text' name='filter' value='$filter' />";
! stack_db_listquestions_quiz($filter);
echo '<input type="hidden" name="action" value="quiz_edit" />';
--- 183,190 ----
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" />';
Index: question_bank.php
===================================================================
RCS file: /cvsroot/stack/stack-1-0/question_bank.php,v
retrieving revision 1.3.2.12
retrieving revision 1.3.2.13
diff -C2 -d -r1.3.2.12 -r1.3.2.13
*** question_bank.php 15 Jun 2005 20:07:09 -0000 1.3.2.12
--- question_bank.php 16 Jun 2005 04:11:38 -0000 1.3.2.13
***************
*** 124,151 ****
if (array_key_exists('bank_filter',$_POST)) {
$question_bank_filter = $_POST['bank_filter'];
! } else {
! $question_bank_filter = '';
}
! // (2.4) Uploaded file.
if ('upload_xml_file' == $action) {
include('upload_questions.php');
$action = 'questionbank_screen';
}
! // End (2.4)
! // (2.5) Export a whole list of questions.
include('qb_export.php');
!
!
! // (2.6) Filter questions in the question bank, based upon a regular expression.
!
!
! // (2.7) action = edit_metadata
! include('qb_metadata.php');
//////////////////////////////////////////////////
--- 124,151 ----
+ // (2.2) Work out the correct value for any filter to be applied to the
+ // question bank.
+ $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;
}
! // (2.3) Uploaded file.
if ('upload_xml_file' == $action) {
include('upload_questions.php');
$action = 'questionbank_screen';
}
! // End (2.3)
! // (2.4) Export a whole list of questions.
include('qb_export.php');
! // (2.5) action = edit_metadata
! include('qb_metadata.php');
//////////////////////////////////////////////////
|