Update of /cvsroot/stack/stack-1-0
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10568
Modified Files:
Tag: frontend_dev
question_bank.php
Added Files:
Tag: frontend_dev
qb_display.php
Log Message:
Started to try and move all display code into one file for question bank.
--- NEW FILE: qb_display.php ---
<?php
function print_question_bank_screen($admin, $question_bank_filter) {
global $stack_root;
$options = '';
include("{$stack_root}/html/qselectform.php");
if (!$admin) {
stack_db_listquestions('edit',$question_bank_filter);
} else {
stack_db_listquestions('try',$question_bank_filter);
}
echo "<p><a href=\"javascript:SelectQs('export_xml_list');\">Export selected as XML</a> ";
echo "<p><a href=\"javascript:SelectQs('edit_metadata');\">Edit metadata</a> ";
}
function print_edit_screen($question, $errors) {
global $stack_root;
include_once("{$stack_root}/scripts/stackAuthor.php");
include("{$stack_root}/html/qselectform.php");
stack_question_edit_form($question,$errors);
echo "<p><a href=\"javascript:HelpPopup('all','stackQuestion');\">Help with question fields.</a>\n
<a href=\"javascript:HelpPopup('all','stackOptions');\">Help with options.</a>\n
<a href=\"javascript:HelpPopup('all','stackAnswerTest');\">Help with answer tests.</a>\n
<a href=\"javascript:HelpPopup('all','stackQuestionPotResp');\">Help with potential responses.</a></p>";
}
?>
Index: question_bank.php
===================================================================
RCS file: /cvsroot/stack/stack-1-0/question_bank.php,v
retrieving revision 1.3.2.10
retrieving revision 1.3.2.11
diff -C2 -d -r1.3.2.10 -r1.3.2.11
*** question_bank.php 15 Jun 2005 17:30:43 -0000 1.3.2.10
--- question_bank.php 15 Jun 2005 17:40:04 -0000 1.3.2.11
***************
*** 36,39 ****
--- 36,40 ----
include('html/inputtool.html');
include('question_bank_util.php');
+ include('qb_display.php');
$question = '';
***************
*** 185,234 ****
// Deal with actions connected with previewing questions
include('qb_preview.php');
- ////////////////////////////////////////////////
- // (4) Go somewhere next.
- ////////////////////////////////////////////////
-
- // include javascript and form (all pages)
-
-
-
- // (4.1) Starting
-
-
-
if ('questionbank_screen'==$action)
{
session_unregister('question');
session_unregister('questionInst');
!
! $options = '';
! include("{$stack_root}/html/qselectform.php");
!
! if (!$admin) {
! stack_db_listquestions('edit',$question_bank_filter);
!
! } else {
! stack_db_listquestions('try',$question_bank_filter);
! }
!
! echo "<p><a href=\"javascript:SelectQs('export_xml_list');\">Export selected as XML</a> ";
! echo "<p><a href=\"javascript:SelectQs('edit_metadata');\">Edit metadata</a> ";
!
}
//(4.2) Edit questions
if ('edit' == $action) {
! // Edit the $question
! include_once("{$stack_root}/scripts/stackAuthor.php");
! include("{$stack_root}/html/qselectform.php");
! stack_question_edit_form($question,$errors);
!
! echo "<p><a href=\"javascript:HelpPopup('all','stackQuestion');\">Help with question fields.</a>\n
! <a href=\"javascript:HelpPopup('all','stackOptions');\">Help with options.</a>\n
! <a href=\"javascript:HelpPopup('all','stackAnswerTest');\">Help with answer tests.</a>\n
! <a href=\"javascript:HelpPopup('all','stackQuestionPotResp');\">Help with potential responses.</a></p>";
!
}
--- 186,205 ----
// Deal with actions connected with previewing questions
include('qb_preview.php');
+
if ('questionbank_screen'==$action)
{
session_unregister('question');
session_unregister('questionInst');
!
! print_question_bank_screen($admin, $question_bank_filter);
}
//(4.2) Edit questions
if ('edit' == $action) {
! print_edit_screen($question, $errors);
}
+
+
|