From: Chris S. <san...@us...> - 2005-09-04 21:26:27
|
Update of /cvsroot/stack/stack-1-0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3193 Modified Files: editquiz.php editsubject.php editzone.php import.php index.php question_bank.php quiz.php Log Message: Index: editzone.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/editzone.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** editzone.php 4 Sep 2005 19:24:57 -0000 1.1 --- editzone.php 4 Sep 2005 21:26:18 -0000 1.2 *************** *** 92,95 **** --- 92,96 ---- /////////////////////////////////////////////////////////////// + echo "<h1>Zone page</h1>"; // Print the form listing the subjects. Index: editsubject.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/editsubject.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** editsubject.php 4 Sep 2005 19:24:57 -0000 1.1 --- editsubject.php 4 Sep 2005 21:26:18 -0000 1.2 *************** *** 37,43 **** require_once("{$stack_root}/scripts/stackFrontend.php"); - require_once("{$stack_root}/html/trypopupform.html"); - require_once("{$stack_root}/html/helpform.php"); - require_once("{$stack_root}/html/subjectjava.html"); /////////////////////////////////////////////////////////////// --- 37,40 ---- *************** *** 53,56 **** --- 50,55 ---- include('html/pagehead.php'); stack_user_ensureadmin($user); + require_once("{$stack_root}/html/helpform.php"); + require_once("{$stack_root}/html/subjectjava.html"); //////////////////////////////////////////////// *************** *** 129,132 **** --- 128,132 ---- //////////////////////////////////////////////// + echo "<h1>Subject page</h1>"; // (3.1) Display any errors. Index: import.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/import.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** import.php 30 Aug 2005 14:39:21 -0000 1.9 --- import.php 4 Sep 2005 21:26:18 -0000 1.10 *************** *** 36,43 **** require_once("{$stack_root}/scripts/stackAuthor.php"); ! ! require_once("{$stack_root}/html/trypopupform.html"); ! require_once("{$stack_root}/html/helpform.php"); ! require_once("{$stack_root}/html/quizjava.html"); $default_action = 'import'; --- 36,40 ---- require_once("{$stack_root}/scripts/stackAuthor.php"); ! require_once("{$stack_root}/scripts/stackFrontend.php"); $default_action = 'import'; *************** *** 49,58 **** include('html/pagehead.php'); ! ! if (!stack_user_is_admin($user) or !stack_is_logged_in($user)) { //Only allow import where logged in user is admin ! stack_display_editquiz_error_not_admin($user); ! include('html/pagefoot.php'); ! die(); ! } $upload_successful = FALSE; --- 46,50 ---- include('html/pagehead.php'); ! stack_user_ensureadmin($user); $upload_successful = FALSE; *************** *** 281,285 **** //For each valid question we must also add the question to the database stack_db_quiz_add_question($quiz['quizid'],$qu['questionID'],$key); //For each question, add link from quiz to question ! //explicitly state question order } echo "</tr>\n"; --- 273,277 ---- //For each valid question we must also add the question to the database stack_db_quiz_add_question($quiz['quizid'],$qu['questionID'],$key); //For each question, add link from quiz to question ! //explicitly state question order } echo "</tr>\n"; Index: quiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/quiz.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** quiz.php 4 Sep 2005 19:24:57 -0000 1.32 --- quiz.php 4 Sep 2005 21:26:18 -0000 1.33 *************** *** 19,23 **** include($stack_root.'/frontend_general/process_input.php'); - ///////////////////////////////////////////////////////////// // (1) For a quiz, the admin user should behave like a guest. --- 19,22 ---- *************** *** 46,50 **** if (array_key_exists('subject',$_SESSION)) { $subject = $_SESSION['subject']; ! } // $focus means "one question at a time"; --- 45,53 ---- if (array_key_exists('subject',$_SESSION)) { $subject = $_SESSION['subject']; ! $subjectID = $subject['subjectID']; ! } else if (array_key_exists('subjectID',$_POST)) { ! $subjectID = $_POST['subjectID']; ! $subject = stack_db_subject_get($subjectID,FALSE); ! } // $focus means "one question at a time"; *************** *** 178,182 **** if ('continue_quiz' == $action or 'review' == $action) { ! $userinfo = stack_db_quiz_quizattempt_getlast($quizid,$user['id']); if (is_array($userinfo)) { --- 181,185 ---- if ('continue_quiz' == $action or 'review' == $action) { ! $userinfo = stack_db_quiz_quizattempt_getlast($subjectID,$quizid,$user['id']); if (is_array($userinfo)) { *************** *** 223,227 **** // Record the information in the DB if ( '0' != $user['id']) { ! stack_db_quiz_quizattempt_store($quiz['quizid'],$user['id'],$seed); } --- 226,230 ---- // Record the information in the DB if ( '0' != $user['id']) { ! stack_db_quiz_quizattempt_store($subjectID,$quiz['quizid'],$user['id'],$seed); } Index: index.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/index.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** index.php 4 Sep 2005 19:24:57 -0000 1.28 --- index.php 4 Sep 2005 21:26:18 -0000 1.29 *************** *** 163,167 **** echo $subject['subjectHTMLHead']; $quiz_store = stack_db_subject_quiz_list_student($subjectID); ! stack_quiz_student_select($quiz_store, $user); echo $subject['subjectHTMLFoot']; } --- 163,167 ---- echo $subject['subjectHTMLHead']; $quiz_store = stack_db_subject_quiz_list_student($subjectID); ! stack_quiz_student_select($subjectID,$quiz_store, $user); echo $subject['subjectHTMLFoot']; } Index: question_bank.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/question_bank.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** question_bank.php 30 Aug 2005 12:20:29 -0000 1.14 --- question_bank.php 4 Sep 2005 21:26:18 -0000 1.15 *************** *** 183,186 **** --- 183,187 ---- include('html/pagehead.php'); + echo "<h1>Question page</h1>"; switch ($action) { Index: editquiz.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/editquiz.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** editquiz.php 4 Sep 2005 19:24:57 -0000 1.21 --- editquiz.php 4 Sep 2005 21:26:18 -0000 1.22 *************** *** 39,46 **** require_once("{$stack_root}/scripts/stackFrontend.php"); - require_once("{$stack_root}/html/trypopupform.html"); - require_once("{$stack_root}/html/helpform.php"); - require_once("{$stack_root}/html/quizjava.html"); - /////////////////////////////////////////////////////////////// // (1) Process Input - this sets $action, $user and $username --- 39,42 ---- *************** *** 55,58 **** --- 51,57 ---- include('html/pagehead.php'); stack_user_ensureadmin($user); + require_once("{$stack_root}/html/trypopupform.html"); + require_once("{$stack_root}/html/helpform.php"); + require_once("{$stack_root}/html/quizjava.html"); // Work out the correct value for any filter to be applied to the question *************** *** 151,154 **** --- 150,154 ---- //////////////////////////////////////////////// + echo "<h1>Quiz page</h1>"; // (3.1) Display any errors. *************** *** 171,176 **** } case 'quiz_report': ! $quizid = nsf($_POST, 'quizid'); ! stack_quiz_report($quizid); break; case 'quiz_edit': --- 171,177 ---- } case 'quiz_report': ! $quizid = nsf($_POST, 'quizid'); ! $subjectID = nsf($_POST, 'subjectID'); ! stack_quiz_report($quizid,$subjectID); break; case 'quiz_edit': |