You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(173) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(9) |
Feb
(6) |
Mar
(7) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <cpj...@us...> - 2004-03-08 16:25:02
|
Update of /cvsroot/etest/etest/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15701/doc Modified Files: ChangeLog README Log Message: fixed up some docs -- craig Index: ChangeLog =================================================================== RCS file: /cvsroot/etest/etest/doc/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ChangeLog 27 Jan 2004 15:18:40 -0000 1.1 --- ChangeLog 8 Mar 2004 16:00:36 -0000 1.2 *************** *** 1,3 **** ! version 1.0 (01/27/2004): * This is the initial PHP only version * Changes from ASP version include the following: --- 1,3 ---- ! version beta1 (03/08/2004): * This is the initial PHP only version * Changes from ASP version include the following: Index: README =================================================================== RCS file: /cvsroot/etest/etest/doc/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 27 Jan 2004 16:23:30 -0000 1.2 --- README 8 Mar 2004 16:00:37 -0000 1.3 *************** *** 8,24 **** ! =========== | INSTALL | ! =========== Read the 'INSTALL' file for more detailed directions. ! ========== | RUN | ! ========== Point your browser to the etest root directory. ======================================================= --- 8,36 ---- + ======================================================= ! *********** | INSTALL | ! *********** Read the 'INSTALL' file for more detailed directions. ! ********** | RUN | ! ********** Point your browser to the etest root directory. ======================================================= + + ***************** + | KNOWN BUGS | + ***************** + + Beta1 + ----- + ** This is a BETA ONLY release!!! We know that and so should you + ** The student side is not yet complete, you can't take a test yet + ** The instructor side may some a few SQL query errors in them, they will + be fixed in the next beta release. |
From: <cpj...@us...> - 2004-03-08 16:12:46
|
Update of /cvsroot/etest/etest/instructor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12742/instructor Modified Files: inst_submit_test.php Log Message: changed table names to lowercase -- craig Index: inst_submit_test.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_submit_test.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** inst_submit_test.php 8 Mar 2004 15:47:28 -0000 1.6 --- inst_submit_test.php 8 Mar 2004 15:48:21 -0000 1.7 *************** *** 283,287 **** else { //Create new test code ! $sql = "SELECT * FROM ".$DB_prefix."_Test ORDER BY Test_Code"; $result = @mysql_query($sql) or die("Couldn't execute query."); --- 283,287 ---- else { //Create new test code ! $sql = "SELECT * FROM ".$DB_prefix."_test ORDER BY Test_Code"; $result = @mysql_query($sql) or die("Couldn't execute query."); |
From: <cpj...@us...> - 2004-03-08 16:11:55
|
Update of /cvsroot/etest/etest/instructor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12563/instructor Modified Files: inst_submit_test.php Log Message: changed table names to lowercase -- craig Index: inst_submit_test.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_submit_test.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** inst_submit_test.php 8 Mar 2004 15:32:45 -0000 1.5 --- inst_submit_test.php 8 Mar 2004 15:47:28 -0000 1.6 *************** *** 302,306 **** //Populate Test Table ! $sql = "INSERT INTO ".$DB_prefix."_Test (Test_Code,Test_Name,Test_Instructions,Course_Code,Section_Code) VALUES($_SESSION[new_test_num],'$_SESSION[test_name]','$test_instructions','$_SESSION[course_code]','$_SESSION[section_code]')"; mysql_query($sql) or die('Cannot insert new test. '.mysql_error()); --- 302,306 ---- //Populate Test Table ! $sql = "INSERT INTO ".$DB_prefix."_test (Test_Code,Test_Name,Test_Instructions,Course_Code,Section_Code) VALUES($_SESSION[new_test_num],'$_SESSION[test_name]','$test_instructions','$_SESSION[course_code]','$_SESSION[section_code]')"; mysql_query($sql) or die('Cannot insert new test. '.mysql_error()); *************** *** 311,315 **** $question_ask = $_SESSION[q_array][$x][1]; $question_answer = $_SESSION[q_array][$x][2]; ! $sql = "INSERT INTO ".$DB_prefix."_Question (Test_Code,Question_Number,Question_Type_Code,Question_Ask,Question_Answer) VALUES($_SESSION[new_test_num],$x,'$question_type','$question_ask','$question_answer')"; mysql_query($sql) or die('Cannot insert new question. '.mysql_error()); --- 311,315 ---- $question_ask = $_SESSION[q_array][$x][1]; $question_answer = $_SESSION[q_array][$x][2]; ! $sql = "INSERT INTO ".$DB_prefix."_question (Test_Code,Question_Number,Question_Type_Code,Question_Ask,Question_Answer) VALUES($_SESSION[new_test_num],$x,'$question_type','$question_ask','$question_answer')"; mysql_query($sql) or die('Cannot insert new question. '.mysql_error()); *************** *** 327,331 **** //View test instructions ! $sql = "SELECT Test_Name,Test_Instructions FROM ".$DB_prefix."_Test WHERE Test_Code=$_SESSION[new_test_num]"; $result = mysql_query($sql) or die('Cannot find test instructions. '.mysql_error()); ?> --- 327,331 ---- //View test instructions ! $sql = "SELECT Test_Name,Test_Instructions FROM ".$DB_prefix."_test WHERE Test_Code=$_SESSION[new_test_num]"; $result = mysql_query($sql) or die('Cannot find test instructions. '.mysql_error()); ?> *************** *** 341,345 **** <? //View the submitted test $sql = "SELECT Question_Number,Question_Type_Code,Question_Ask,Question_Answer ! FROM ".$DB_prefix."_Question WHERE Test_Code=$_SESSION[new_test_num] ORDER BY Question_Number"; --- 341,345 ---- <? //View the submitted test $sql = "SELECT Question_Number,Question_Type_Code,Question_Ask,Question_Answer ! FROM ".$DB_prefix."_question WHERE Test_Code=$_SESSION[new_test_num] ORDER BY Question_Number"; *************** *** 348,352 **** //Function looks at next question to determine question type function next_question($current_question) { ! $sql2 = "SELECT Question_Type_Code FROM ".$DB_prefix."_Question WHERE Test_Code=$_SESSION[new_test_num] AND Question_Number=($current_question + 1)"; $result2 = mysql_query($sql2) or die('Cannot find next question type. '.mysql_error()); --- 348,352 ---- //Function looks at next question to determine question type function next_question($current_question) { ! $sql2 = "SELECT Question_Type_Code FROM ".$DB_prefix."_question WHERE Test_Code=$_SESSION[new_test_num] AND Question_Number=($current_question + 1)"; $result2 = mysql_query($sql2) or die('Cannot find next question type. '.mysql_error()); |
From: <cpj...@us...> - 2004-03-08 16:09:15
|
Update of /cvsroot/etest/etest/instructor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12032/instructor Modified Files: inst_setup_test.php Log Message: changed table names to lowercase -- craig Index: inst_setup_test.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_setup_test.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** inst_setup_test.php 8 Mar 2004 15:42:56 -0000 1.9 --- inst_setup_test.php 8 Mar 2004 15:44:51 -0000 1.10 *************** *** 105,109 **** require('../includes/db_connect.php'); //returns file link identifier $db and selects proper database ! $sql = "SELECT ".$DB_prefix."_course.Course_Code,".$DB_prefix."_section_Code,Course_Name FROM ".$DB_prefix."_course INNER JOIN ".$DB_prefix."_section ON ".$DB_prefix."_course.Course_Code=".$DB_prefix."_section.Course_Code --- 105,109 ---- require('../includes/db_connect.php'); //returns file link identifier $db and selects proper database ! $sql = "SELECT ".$DB_prefix."_course.Course_Code,Section_Code,Course_Name FROM ".$DB_prefix."_course INNER JOIN ".$DB_prefix."_section ON ".$DB_prefix."_course.Course_Code=".$DB_prefix."_section.Course_Code |
From: <cpj...@us...> - 2004-03-08 16:07:25
|
Update of /cvsroot/etest/etest/instructor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11494/instructor Modified Files: inst_setup_test.php Log Message: changed table names to lowercase -- craig Index: inst_setup_test.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_setup_test.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** inst_setup_test.php 8 Mar 2004 15:37:54 -0000 1.8 --- inst_setup_test.php 8 Mar 2004 15:42:56 -0000 1.9 *************** *** 105,112 **** require('../includes/db_connect.php'); //returns file link identifier $db and selects proper database ! $sql = "SELECT ".$DB_prefix."_Course.Course_Code,".$DB_prefix."_Section_Code,Course_Name ! FROM ".$DB_prefix."_Course ! INNER JOIN ".$DB_prefix."_Section ON ".$DB_prefix."_Course.Course_Code=".$DB_prefix."_Section.Course_Code ! WHERE Inst_Code='$_SESSION[username]' ORDER BY ".$DB_prefix."_Course.Course_Code"; $result = @mysql_query($sql) or die("Couldn't execute query."); --- 105,112 ---- require('../includes/db_connect.php'); //returns file link identifier $db and selects proper database ! $sql = "SELECT ".$DB_prefix."_course.Course_Code,".$DB_prefix."_section_Code,Course_Name ! FROM ".$DB_prefix."_course ! INNER JOIN ".$DB_prefix."_section ON ".$DB_prefix."_course.Course_Code=".$DB_prefix."_section.Course_Code ! WHERE Inst_Code='$_SESSION[username]' ORDER BY ".$DB_prefix."_course.Course_Code"; $result = @mysql_query($sql) or die("Couldn't execute query."); |
From: <cpj...@us...> - 2004-03-08 16:02:19
|
Update of /cvsroot/etest/etest/instructor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10213/instructor Modified Files: inst_setup_test.php Log Message: updated querys to use DB_prefix -- craig Index: inst_setup_test.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_setup_test.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** inst_setup_test.php 8 Mar 2004 15:32:45 -0000 1.7 --- inst_setup_test.php 8 Mar 2004 15:37:54 -0000 1.8 *************** *** 105,112 **** require('../includes/db_connect.php'); //returns file link identifier $db and selects proper database ! $sql = "SELECT Course.Course_Code,Section_Code,Course_Name ! FROM ".$DB_prefix."_Course ! INNER JOIN ".$DB_prefix."_Section ON Course.Course_Code=Section.Course_Code ! WHERE Inst_Code='$_SESSION[username]' ORDER BY Course.Course_Code"; $result = @mysql_query($sql) or die("Couldn't execute query."); --- 105,112 ---- require('../includes/db_connect.php'); //returns file link identifier $db and selects proper database ! $sql = "SELECT ".$DB_prefix."_Course.Course_Code,".$DB_prefix."_Section_Code,Course_Name ! FROM ".$DB_prefix."_Course ! INNER JOIN ".$DB_prefix."_Section ON ".$DB_prefix."_Course.Course_Code=".$DB_prefix."_Section.Course_Code ! WHERE Inst_Code='$_SESSION[username]' ORDER BY ".$DB_prefix."_Course.Course_Code"; $result = @mysql_query($sql) or die("Couldn't execute query."); |
From: <cpj...@us...> - 2004-03-08 15:57:23
|
Update of /cvsroot/etest/etest/instructor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9227/instructor Modified Files: inst_home.php inst_setup_test.php inst_submit_test.php Log Message: updated querys to use DB_prefix -- craig Index: inst_home.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_home.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** inst_home.php 21 Dec 2003 03:56:42 -0000 1.8 --- inst_home.php 8 Mar 2004 15:32:45 -0000 1.9 *************** *** 52,56 **** $password = addslashes($_GET['password']); $password = md5($password); ! $query = "SELECT * FROM instructor WHERE inst_code = '$username' AND inst_password = '$password'"; $result = mysql_query($query, $db) or die('Cannot run login query ' . mysql_error()); --- 52,56 ---- $password = addslashes($_GET['password']); $password = md5($password); ! $query = "SELECT * FROM ".$DB_prefix."_instructor WHERE inst_code = '$username' AND inst_password = '$password'"; $result = mysql_query($query, $db) or die('Cannot run login query ' . mysql_error()); *************** *** 117,119 **** } require(INCLUDES_PATH."html_footer.php"); ! ?> \ No newline at end of file --- 117,119 ---- } require(INCLUDES_PATH."html_footer.php"); ! ?> Index: inst_setup_test.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_setup_test.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** inst_setup_test.php 11 Feb 2004 00:58:14 -0000 1.6 --- inst_setup_test.php 8 Mar 2004 15:32:45 -0000 1.7 *************** *** 105,111 **** require('../includes/db_connect.php'); //returns file link identifier $db and selects proper database ! $sql = "SELECT Course.Course_Code,Section_Code,Course_Name ! FROM Course ! INNER JOIN Section ON Course.Course_Code=Section.Course_Code WHERE Inst_Code='$_SESSION[username]' ORDER BY Course.Course_Code"; --- 105,111 ---- require('../includes/db_connect.php'); //returns file link identifier $db and selects proper database ! $sql = "SELECT Course.Course_Code,Section_Code,Course_Name ! FROM ".$DB_prefix."_Course ! INNER JOIN ".$DB_prefix."_Section ON Course.Course_Code=Section.Course_Code WHERE Inst_Code='$_SESSION[username]' ORDER BY Course.Course_Code"; *************** *** 348,350 **** } require(INCLUDES_PATH."html_footer.php"); ! ?> \ No newline at end of file --- 348,350 ---- } require(INCLUDES_PATH."html_footer.php"); ! ?> Index: inst_submit_test.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_submit_test.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** inst_submit_test.php 12 Feb 2004 05:00:34 -0000 1.4 --- inst_submit_test.php 8 Mar 2004 15:32:45 -0000 1.5 *************** *** 283,287 **** else { //Create new test code ! $sql = "SELECT * FROM Test ORDER BY Test_Code"; $result = @mysql_query($sql) or die("Couldn't execute query."); --- 283,287 ---- else { //Create new test code ! $sql = "SELECT * FROM ".$DB_prefix."_Test ORDER BY Test_Code"; $result = @mysql_query($sql) or die("Couldn't execute query."); *************** *** 302,306 **** //Populate Test Table ! $sql = "INSERT INTO Test (Test_Code,Test_Name,Test_Instructions,Course_Code,Section_Code) VALUES($_SESSION[new_test_num],'$_SESSION[test_name]','$test_instructions','$_SESSION[course_code]','$_SESSION[section_code]')"; mysql_query($sql) or die('Cannot insert new test. '.mysql_error()); --- 302,306 ---- //Populate Test Table ! $sql = "INSERT INTO ".$DB_prefix."_Test (Test_Code,Test_Name,Test_Instructions,Course_Code,Section_Code) VALUES($_SESSION[new_test_num],'$_SESSION[test_name]','$test_instructions','$_SESSION[course_code]','$_SESSION[section_code]')"; mysql_query($sql) or die('Cannot insert new test. '.mysql_error()); *************** *** 311,315 **** $question_ask = $_SESSION[q_array][$x][1]; $question_answer = $_SESSION[q_array][$x][2]; ! $sql = "INSERT INTO Question (Test_Code,Question_Number,Question_Type_Code,Question_Ask,Question_Answer) VALUES($_SESSION[new_test_num],$x,'$question_type','$question_ask','$question_answer')"; mysql_query($sql) or die('Cannot insert new question. '.mysql_error()); --- 311,315 ---- $question_ask = $_SESSION[q_array][$x][1]; $question_answer = $_SESSION[q_array][$x][2]; ! $sql = "INSERT INTO ".$DB_prefix."_Question (Test_Code,Question_Number,Question_Type_Code,Question_Ask,Question_Answer) VALUES($_SESSION[new_test_num],$x,'$question_type','$question_ask','$question_answer')"; mysql_query($sql) or die('Cannot insert new question. '.mysql_error()); *************** *** 327,331 **** //View test instructions ! $sql = "SELECT Test_Name,Test_Instructions FROM Test WHERE Test_Code=$_SESSION[new_test_num]"; $result = mysql_query($sql) or die('Cannot find test instructions. '.mysql_error()); ?> --- 327,331 ---- //View test instructions ! $sql = "SELECT Test_Name,Test_Instructions FROM ".$DB_prefix."_Test WHERE Test_Code=$_SESSION[new_test_num]"; $result = mysql_query($sql) or die('Cannot find test instructions. '.mysql_error()); ?> *************** *** 341,345 **** <? //View the submitted test $sql = "SELECT Question_Number,Question_Type_Code,Question_Ask,Question_Answer ! FROM Question WHERE Test_Code=$_SESSION[new_test_num] ORDER BY Question_Number"; --- 341,345 ---- <? //View the submitted test $sql = "SELECT Question_Number,Question_Type_Code,Question_Ask,Question_Answer ! FROM ".$DB_prefix."_Question WHERE Test_Code=$_SESSION[new_test_num] ORDER BY Question_Number"; *************** *** 348,352 **** //Function looks at next question to determine question type function next_question($current_question) { ! $sql2 = "SELECT Question_Type_Code FROM Question WHERE Test_Code=$_SESSION[new_test_num] AND Question_Number=($current_question + 1)"; $result2 = mysql_query($sql2) or die('Cannot find next question type. '.mysql_error()); --- 348,352 ---- //Function looks at next question to determine question type function next_question($current_question) { ! $sql2 = "SELECT Question_Type_Code FROM ".$DB_prefix."_Question WHERE Test_Code=$_SESSION[new_test_num] AND Question_Number=($current_question + 1)"; $result2 = mysql_query($sql2) or die('Cannot find next question type. '.mysql_error()); *************** *** 599,601 **** } require(INCLUDES_PATH."html_footer.php"); ! ?> \ No newline at end of file --- 599,601 ---- } require(INCLUDES_PATH."html_footer.php"); ! ?> |
From: <bra...@us...> - 2004-02-12 05:05:14
|
Update of /cvsroot/etest/etest/instructor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28869/instructor Modified Files: inst_choose_test_modifications.php inst_submit_test.php Log Message: Test wizard now displays submitted test. Index: inst_choose_test_modifications.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_choose_test_modifications.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** inst_choose_test_modifications.php 11 Feb 2004 01:00:08 -0000 1.1 --- inst_choose_test_modifications.php 12 Feb 2004 05:00:34 -0000 1.2 *************** *** 20,23 **** require('../includes/html_header.php'); ! echo "This page is currently under construction." ?> \ No newline at end of file --- 20,25 ---- require('../includes/html_header.php'); ! echo "<font color='red'><strong>This page is currently under construction.</strong></font>"; ! ! require(INCLUDES_PATH."html_footer.php"); ?> \ No newline at end of file Index: inst_submit_test.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_submit_test.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** inst_submit_test.php 11 Feb 2004 01:03:28 -0000 1.3 --- inst_submit_test.php 12 Feb 2004 05:00:34 -0000 1.4 *************** *** 22,26 **** //Check if test has already been submitted if ($_SESSION[submitted]) { ! echo "This test has already been submitted.<br>"; echo "<a href='inst_choose_test_modifications.php'>Click here to add, delete, or update questions.</a><br>"; echo "<a href='inst_home.php'>Click here to return to the home page.</a></p>"; --- 22,26 ---- //Check if test has already been submitted if ($_SESSION[submitted]) { ! echo "<font size='3' color='red'><strong>This test has already been submitted.</strong></font><br>"; echo "<a href='inst_choose_test_modifications.php'>Click here to add, delete, or update questions.</a><br>"; echo "<a href='inst_home.php'>Click here to return to the home page.</a></p>"; *************** *** 316,332 **** } ?> ! <font size='3'><div class='secheader'>Your test was successfully created.<br><br><br></div></font> <?php //Clear the test creation forms keeping necessary info $_SESSION[submitted] = true; ! //View the submitted test $sql = "SELECT Question_Number,Question_Type_Code,Question_Ask,Question_Answer FROM Question WHERE Test_Code=$_SESSION[new_test_num] ORDER BY Question_Number"; ! $result = mysql_query($sql) or die('Cannot insert new question'.mysql_error()); ! //Print the test function next_question($current_question) { $sql2 = "SELECT Question_Type_Code FROM Question --- 316,350 ---- } ?> ! <font size='3' color='#006666'><strong>Your test was successfully created.</strong></font> ! <br><br> ! <font size='3' color='#006666'><strong>What would you like to do?</strong></font><br> ! <a href='inst_choose_test_modifications.php'>Add, Edit, or Delete Test Questions</a><br> ! <a href='inst_home.php'>Return to Teacher Home Page</a> ! <br><br><br> <?php //Clear the test creation forms keeping necessary info $_SESSION[submitted] = true; ! //View test instructions ! $sql = "SELECT Test_Name,Test_Instructions FROM Test WHERE Test_Code=$_SESSION[new_test_num]"; ! $result = mysql_query($sql) or die('Cannot find test instructions. '.mysql_error()); ! ?> ! <h3><?php echo mysql_result($result,0,0); ?></h3> ! ! <div class='secheader'>Instructions</div> ! <table border='1' class='sectable' width='100%'> ! <tr> ! <td><?php echo mysql_result($result,0,1); ?></td> ! </tr> ! </table><br><br> ! ! <? //View the submitted test $sql = "SELECT Question_Number,Question_Type_Code,Question_Ask,Question_Answer FROM Question WHERE Test_Code=$_SESSION[new_test_num] ORDER BY Question_Number"; ! $result = mysql_query($sql) or die('Cannot insert new question. '.mysql_error()); ! //Function looks at next question to determine question type function next_question($current_question) { $sql2 = "SELECT Question_Type_Code FROM Question *************** *** 352,356 **** if ($first_mc) { ?> <div class='secheader'>Multiple Choice</div> ! <table border='1' class='sectable'> <th class='Q_td'></th> <th class='Q_td'>Question</th> --- 370,374 ---- if ($first_mc) { ?> <div class='secheader'>Multiple Choice</div> ! <table border='1' class='sectable' width='100%'> <th class='Q_td'></th> <th class='Q_td'>Question</th> *************** *** 411,415 **** if ($first_tf) { ?> <div class='secheader'>True/False</div> ! <table border='1' class='sectable'> <th class='Q_td'></th> <th class='Q_td'>Question</th> --- 429,433 ---- if ($first_tf) { ?> <div class='secheader'>True/False</div> ! <table border='1' class='sectable' width='100%'> <th class='Q_td'></th> <th class='Q_td'>Question</th> *************** *** 433,443 **** if ($query_row['Question_Type_Code'] == "MTF") { if ($first_mtf) { ! ?> <table border='1'> <?php $first_mtf = false; } ?> <tr> ! <td><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td><?php echo $query_row['Question_Type_Code']; ?></td> ! </tr> <?php $next_q_type = next_question($current_question); --- 451,490 ---- if ($query_row['Question_Type_Code'] == "MTF") { if ($first_mtf) { ! ?> <div class='secheader'>Modified True/False</div> ! <table border='1' class='sectable' width='100%'> ! <th class='Q_td'></th> ! <th class='Q_td'>Question</th> ! <th class='Q_td'>Keyword</th> ! <th class='Q_td'>Answer</th> ! <th class='Q_td'>Correction</th> <?php $first_mtf = false; } ?> <tr> ! <td class='Q_td'><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td class='Q_td'> ! <?php //Print Question ! $found_pos = strpos($query_row['Question_Ask'], "|"); ! echo "<div class='spacer_left'>".substr($query_row['Question_Ask'], 0, $found_pos)."</div>"; ! ?> </td> ! <td class='Q_td'> ! <?php //Print Keyword ! echo "<div class='spacer_left'>".substr($query_row['Question_Ask'], -1, strlen($query_row['Question_Ask']) - $found_pos)."</div>"; ! ?> </td> ! <td class='Q_td'> ! <?php //Print Answer ! $found_pos = strpos($query_row['Question_Answer'], "|"); ! ! if ($found_pos == "") { ! echo "<div class='spacer_left'>".$query_row['Question_Answer']."</div>"; //True ! ?> </td> ! <?php } ! else { ! echo "<div class='spacer_left'>".substr($query_row['Question_Answer'], 0, $found_pos)."</div>"; //False ! ?> </td> ! <td class='Q_td'> ! <?php echo "<div class='spacer_left'>".substr($query_row['Question_Answer'], -1, strlen($query_row['Question_Answer']) - $found_pos)."</div>"; ! ?> </td> ! <?php } ! ?> </tr> <?php $next_q_type = next_question($current_question); *************** *** 451,460 **** if ($query_row['Question_Type_Code'] == "MATCH") { if ($first_match) { ! ?> <table border='1'> <?php $first_match = false; } ?> <tr> ! <td><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td><?php echo $query_row['Question_Type_Code']; ?></td> </tr> <?php --- 498,522 ---- if ($query_row['Question_Type_Code'] == "MATCH") { if ($first_match) { ! ?> <div class='secheader'>Matching</div> ! <table border='1' class='sectable' width='100%'> ! <th class='Q_td'></th> ! <th class='Q_td'>Question</th> ! <th class='Q_td'>Possible Answers</th> ! <th class='Q_td'>Your Answer</th> <?php $first_match = false; } ?> <tr> ! <td class='Q_td'><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td class='Q_td'> ! <?php //Print Question ! $found_pos = strpos($query_row['Question_Ask'], "|"); ! echo "<div class='spacer_left'>".substr($query_row['Question_Ask'], 0, $found_pos)."</div>"; ! ?> </td> ! <td class='Q_td'> ! <?php echo "<div class='spacer_left'>".substr($query_row['Question_Ask'], -1, strlen($query_row['Question_Ask']) - $found_pos)."</div>"; ! ?> </td> ! <td class='Q_td'> ! <?php echo "<div class='spacer_left'>".substr($query_row['Question_Answer'], 0, $found_pos)."</div>"; ! ?> </td> </tr> <?php *************** *** 469,478 **** if ($query_row['Question_Type_Code'] == "COMP") { if ($first_comp) { ! ?> <table border='1'> <?php $first_comp = false; } ?> <tr> ! <td><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td><?php echo $query_row['Question_Type_Code']; ?></td> </tr> <?php --- 531,545 ---- if ($query_row['Question_Type_Code'] == "COMP") { if ($first_comp) { ! ?> <div class='secheader'>Completion</div> ! <table border='1' class='sectable' width='100%'> ! <th class='Q_td'></th> ! <th class='Q_td'>Statement</th> ! <th class='Q_td'>Completion</th> <?php $first_comp = false; } ?> <tr> ! <td class='Q_td'><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td class='Q_td'><div class='spacer_left'><?php echo $query_row['Question_Ask']; ?></div></td> ! <td class='Q_td'><div class='spacer_left'><?php echo $query_row['Question_Answer']; ?></div></td> </tr> <?php *************** *** 487,496 **** if ($query_row['Question_Type_Code'] == "SA") { if ($first_sa) { ! ?> <table border='1'> <?php $first_sa = false; } ?> <tr> ! <td><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td><?php echo $query_row['Question_Type_Code']; ?></td> </tr> <?php --- 554,568 ---- if ($query_row['Question_Type_Code'] == "SA") { if ($first_sa) { ! ?> <div class='secheader'>Short Answer</div> ! <table border='1' class='sectable' width='100%'> ! <th class='Q_td'></th> ! <th class='Q_td'>Question</th> ! <th class='Q_td'>Answer</th> <?php $first_sa = false; } ?> <tr> ! <td class='Q_td'><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td class='Q_td'><div class='spacer_left'><?php echo $query_row['Question_Ask']; ?></div></td> ! <td class='Q_td'><div class='spacer_left'><?php echo $query_row['Question_Answer']; ?></div></td> </tr> <?php *************** *** 505,519 **** if ($query_row['Question_Type_Code'] == "ESSAY") { if ($first_essay) { ! ?> <table border='1'> <?php $first_essay = false; } ?> <tr> ! <td><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td><?php echo $query_row['Question_Type_Code']; ?></td> </tr> <?php $next_q_type = next_question($current_question); if ($next_q_type != "ESSAY") { ! ?> </table> <?php $first_essay = true; } --- 577,596 ---- if ($query_row['Question_Type_Code'] == "ESSAY") { if ($first_essay) { ! ?> <div class='secheader'>Essay</div> ! <table border='1' class='sectable' width='100%'> ! <th class='Q_td'></th> ! <th class='Q_td'>Question</th> ! <th class='Q_td'>Answer</th> <?php $first_essay = false; } ?> <tr> ! <td class='Q_td'><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td class='Q_td'><div class='spacer_left'><?php echo $query_row['Question_Ask']; ?></div></td> ! <td width='35' class='Q_td'><div class='spacer_left'><?php echo $query_row['Question_Answer']; ?></div></td> </tr> <?php $next_q_type = next_question($current_question); if ($next_q_type != "ESSAY") { ! ?> </table><br> <?php $first_essay = true; } |
From: <bra...@us...> - 2004-02-11 01:07:11
|
Update of /cvsroot/etest/etest/instructor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11332/instructor Modified Files: inst_submit_test.php Log Message: Fixed bug in creating new test number Index: inst_submit_test.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_submit_test.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** inst_submit_test.php 11 Feb 2004 00:58:14 -0000 1.2 --- inst_submit_test.php 11 Feb 2004 01:03:28 -0000 1.3 *************** *** 283,287 **** else { //Create new test code ! $sql = "SELECT * FROM Test"; $result = @mysql_query($sql) or die("Couldn't execute query."); --- 283,287 ---- else { //Create new test code ! $sql = "SELECT * FROM Test ORDER BY Test_Code"; $result = @mysql_query($sql) or die("Couldn't execute query."); |
From: <bra...@us...> - 2004-02-11 01:03:56
|
Update of /cvsroot/etest/etest/instructor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10787/instructor Added Files: inst_choose_test_modifications.php Log Message: Test Modifications section --- NEW FILE: inst_choose_test_modifications.php --- <?php /* $ID$ eTest Student Testing - Package Copyright (c) 2003 eTest Released under the GNU General Public License */ require('../includes/configure.php'); if (!isset($_SESSION['username'])) { header("location: ../index.php"); exit; } $pagetitle = "Test Modification"; $stylesheet = "inst_basics.css"; $navbarname = "../inst_navbar/inst_navbar_print.inc"; require('../includes/html_header.php'); echo "This page is currently under construction." ?> |
From: <bra...@us...> - 2004-02-11 01:01:58
|
Update of /cvsroot/etest/etest/instructor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10268/instructor Modified Files: inst_basics.css inst_create_test.php inst_setup_test.php inst_submit_test.php Log Message: New process for test creation. 90% complete aside from viewing the test after submission. Index: inst_basics.css =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_basics.css,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** inst_basics.css 16 Dec 2003 22:55:32 -0000 1.4 --- inst_basics.css 11 Feb 2004 00:58:13 -0000 1.5 *************** *** 1,3 **** ! body { font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; font-size: 12px; background-color: #E0E0E0; } td { font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; font-size: 14px; } th { font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; } --- 1,10 ---- ! body { font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; font-size: 12px; background-color: #E0E0E0; ! scrollbar-face-color:#C1DAFF; ! scrollbar-shadow-color:#555454; ! scrollbar-highlight-color:#DADAF5; ! scrollbar-3dlight-color:#DADAF5; ! scrollbar-darkshadow-color:#555454; ! scrollbar-track-color:#555454; ! scrollbar-arrow-color:#555454; } td { font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; font-size: 14px; } th { font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; } *************** *** 18,20 **** .indent { padding: 0px 0px 0px 13px; } .Q_Quantity_Table { background-color:#D2D4D8; padding:5px 5px 5px 5px; border: solid 2px #425BA8; border-collapse:collapse; } ! .SecTable { background-color:#D2D4D8; padding:5px 5px 5px 5px; border: solid 2px #425BA8; border-collapse:collapse; } \ No newline at end of file --- 25,30 ---- .indent { padding: 0px 0px 0px 13px; } .Q_Quantity_Table { background-color:#D2D4D8; padding:5px 5px 5px 5px; border: solid 2px #425BA8; border-collapse:collapse; } ! .SecTable { background-color:#D2D4D8; padding:5px 5px 5px 5px; border: solid 2px #425BA8; border-collapse:collapse; } ! .Q_td { border-color:#425BA8; } ! .spacer_left { padding-left:10px; } ! .spacer_right { padding-right:10px; } \ No newline at end of file Index: inst_create_test.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_create_test.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** inst_create_test.php 21 Dec 2003 03:56:10 -0000 1.5 --- inst_create_test.php 11 Feb 2004 00:58:14 -0000 1.6 *************** *** 142,149 **** printf("<script>postErrorMsg();</script>"); ?> ! <form method='get' action='<?php echo $_SERVER['HTTP_REFERER']; ?>'> <input type="submit" value="Back" class="submitbutton"> ! </form ! ><?php } else { --- 142,149 ---- printf("<script>postErrorMsg();</script>"); ?> ! <form method='post' action='<?php echo $_SERVER['HTTP_REFERER']; ?>'> <input type="submit" value="Back" class="submitbutton"> ! </form> ! <?php } else { *************** *** 156,160 **** // Print test instructions ! printf("<form method='get' action='inst_submit_test.php'> <div class='secheader'>Test Instructions</div> <textarea cols='50' name='test_instructions'></textarea><br><br>"); --- 156,160 ---- // Print test instructions ! printf("<form method='post' action='inst_submit_test.php'> <div class='secheader'>Test Instructions</div> <textarea cols='50' name='test_instructions'></textarea><br><br>"); *************** *** 185,192 **** for ($x=0; $x < $_SESSION['num_multiple_choice_'.$_SESSION[mc]]; $x++, $_SESSION[question_count]++) { - printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf(" <td><input type='text' name='mc_question_%s_%s' class='longform'></td>", $_SESSION[mc], $_SESSION[question_count]); printf(" <td> <table border='0'> --- 185,192 ---- for ($x=0; $x < $_SESSION['num_multiple_choice_'.$_SESSION[mc]]; $x++, $_SESSION[question_count]++) { printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf(" <td><input type='text' name='mc_question_%s_%s' value='%s' class='longform'></td>", ! $_SESSION[mc], $_SESSION[question_count], $_SESSION['mc_question_'.$_SESSION[mc].'_'.$_SESSION[question_count]]); printf(" <td> <table border='0'> *************** *** 195,200 **** for ($choice_count=1; $choice_count < $_SESSION['num_mc_choices_'.$_SESSION[mc]] + 1; $choice_count++) { printf(" <td><b>%s.</b></td>", chr(64 + $choice_count)); ! printf(" <td><input type='text' name='mc_choice_%s_%s%s' class='medform'></td>", ! $_SESSION[mc], $_SESSION[question_count], chr(64 + $choice_count)); if (! (($choice_count) % 3)) { --- 195,200 ---- for ($choice_count=1; $choice_count < $_SESSION['num_mc_choices_'.$_SESSION[mc]] + 1; $choice_count++) { printf(" <td><b>%s.</b></td>", chr(64 + $choice_count)); ! printf(" <td><input type='text' name='mc_choice_%s_%s%s' value='%s' class='medform'></td>", ! $_SESSION[mc], $_SESSION[question_count], chr(64 + $choice_count), $_SESSION['mc_choice_'.$_SESSION[mc].'_'.$_SESSION[question_count].chr(64 + $choice_count)]); if (! (($choice_count) % 3)) { *************** *** 207,214 **** // display correct answer drop down list ! printf(" <td><center><select name='mc_answer_%s_%s' class='singleselect'>", $_SESSION[mc], $_SESSION[question_count] + 1); for ($answer_count=1; $answer_count < $_SESSION['num_mc_choices_'.$_SESSION[mc]] + 1; $answer_count++) { ! printf("<option value=%s>%s</option>", chr(64 + $answer_count), chr(64 + $answer_count)); } printf(" </select></center><td>"); --- 207,218 ---- // display correct answer drop down list ! printf(" <td><center><select name='mc_answer_%s_%s' class='singleselect'>", $_SESSION[mc], $_SESSION[question_count]); + if ($_SESSION['mc_answer_'.$_SESSION[mc].'_'.$_SESSION[question_count]] != "") { + printf("<option value='%s' selected>%s</option>", $_SESSION['mc_answer_'.$_SESSION[mc].'_'.$_SESSION[question_count]], + $_SESSION['mc_answer_'.$_SESSION[mc].'_'.$_SESSION[question_count]]); + } for ($answer_count=1; $answer_count < $_SESSION['num_mc_choices_'.$_SESSION[mc]] + 1; $answer_count++) { ! printf("<option value='%s'>%s</option>", chr(64 + $answer_count), chr(64 + $answer_count)); } printf(" </select></center><td>"); *************** *** 232,237 **** printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf(" <td><input type='text' name='tf_question_%s_%s' class='longform'></td>", $_SESSION[tf], $_SESSION[question_count]); printf(" <td><select name='tf_answer_%s_%s' class='singleselect'>", $_SESSION[tf], $_SESSION[question_count]); printf(" <option value='TRUE'>TRUE</option> <option value='FALSE'>FALSE</option></select></td>"); --- 236,247 ---- printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf(" <td><input type='text' name='tf_question_%s_%s' value='%s' class='longform'></td>", ! $_SESSION[tf], $_SESSION[question_count], $_SESSION['tf_question_'.$_SESSION[tf].'_'.$_SESSION[question_count]]); printf(" <td><select name='tf_answer_%s_%s' class='singleselect'>", $_SESSION[tf], $_SESSION[question_count]); + + if ($_SESSION['tf_answer_'.$_SESSION[tf].'_'.$_SESSION[question_count]] != "") { + printf("<option value='%s' selected>%s</option>", $_SESSION['tf_answer_'.$_SESSION[tf].'_'.$_SESSION[question_count]], + $_SESSION['tf_answer_'.$_SESSION[tf].'_'.$_SESSION[question_count]]); + } printf(" <option value='TRUE'>TRUE</option> <option value='FALSE'>FALSE</option></select></td>"); *************** *** 257,267 **** printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf(" <td><input type='text' name='mtf_question_%s_%s' class='longform'></td>", $_SESSION[mtf], $_SESSION[question_count]); ! printf(" <td><input type='text' name='mtf_keyword_%s_%s' class='medform'></td>", $_SESSION[mtf], $_SESSION[question_count]); printf(" <td><select name='mtf_answer_%s_%s' class='singleselect'>", $_SESSION[mtf], $_SESSION[question_count]); printf(" <option value='TRUE'>TRUE</option> <option value='FALSE'>FALSE</option></select></td> ! <td><center><input type='text' name='mtf_correction_%s_%s' class='medform'></center></td>", ! $_SESSION[mtf], $_SESSION[question_count]); printf(" </tr>"); --- 267,284 ---- printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf(" <td><input type='text' name='mtf_question_%s_%s' value='%s' class='longform'></td>", $_SESSION[mtf], $_SESSION[question_count], ! $_SESSION['mtf_question_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]); ! printf(" <td><input type='text' name='mtf_keyword_%s_%s' value='%s' class='medform'></td>", $_SESSION[mtf], $_SESSION[question_count], ! $_SESSION['mtf_keyword_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]); printf(" <td><select name='mtf_answer_%s_%s' class='singleselect'>", $_SESSION[mtf], $_SESSION[question_count]); + + if ($_SESSION['mtf_answer_'.$_SESSION[mtf].'_'.$_SESSION[question_count]] != "") { + printf("<option value='%s' selected>%s</option>", $_SESSION['mtf_answer_'.$_SESSION[mtf].'_'.$_SESSION[question_count]], + $_SESSION['mtf_answer_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]); + } printf(" <option value='TRUE'>TRUE</option> <option value='FALSE'>FALSE</option></select></td> ! <td><center><input type='text' name='mtf_correction_%s_%s' value='%s' class='medform'></center></td>", ! $_SESSION[mtf], $_SESSION[question_count], $_SESSION['mtf_correction_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]); printf(" </tr>"); *************** *** 285,298 **** printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf("<td><input type='text' name='match_list_%s_%s' class='medform'></td>", $_SESSION[match], $_SESSION[question_count]); printf("<td> <table border='0'> <tr> <td width='20'><b>%s.</b></td>", chr(65 + $x)); ! printf(" <td><input type='text' name='match_jumbled_%s_%s' class='medform'></td>", $_SESSION[match], $_SESSION[question_count]); printf(" </tr> </table> </td> <td><center><select name='match_answer_%s_%s' class='singleselect'>", $_SESSION[match], $_SESSION[question_count]); // Possible answer drop-down list for ($match_count=1; $match_count < $_SESSION['num_matching_'.$_SESSION[match]] + 1; $match_count++) { --- 302,322 ---- printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf("<td><input type='text' name='match_list_%s_%s' value='%s' class='medform'></td>", $_SESSION[match], $_SESSION[question_count], ! $_SESSION['match_list_'.$_SESSION[match].'_'.$_SESSION[question_count]]); printf("<td> <table border='0'> <tr> <td width='20'><b>%s.</b></td>", chr(65 + $x)); ! printf(" <td><input type='text' name='match_jumbled_%s_%s' value='%s' class='medform'></td>", $_SESSION[match], $_SESSION[question_count], ! $_SESSION['match_jumbled_'.$_SESSION[match].'_'.$_SESSION[question_count]]); printf(" </tr> </table> </td> <td><center><select name='match_answer_%s_%s' class='singleselect'>", $_SESSION[match], $_SESSION[question_count]); + + if ($_SESSION['match_answer_'.$_SESSION[match].'_'.$_SESSION[question_count]] != "") { + printf("<option value='%s' selected>%s</option>", $_SESSION['match_answer_'.$_SESSION[match].'_'.$_SESSION[question_count]], + $_SESSION['match_answer_'.$_SESSION[match].'_'.$_SESSION[question_count]]); + } // Possible answer drop-down list for ($match_count=1; $match_count < $_SESSION['num_matching_'.$_SESSION[match]] + 1; $match_count++) { *************** *** 319,325 **** printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf(" <td><input type='text' name='comp_question_%s_%s' class='longform'></td>", $_SESSION[comp], $_SESSION[question_count]); ! printf(" <td><input type='text' name='comp_answer_%s_%s' class='medform'></td> ! </tr>", $_SESSION[comp], $_SESSION[question_count]); } printf("</table>"); --- 343,350 ---- printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf(" <td><input type='text' name='comp_question_%s_%s' value='%s' class='longform'></td>", $_SESSION[comp], $_SESSION[question_count], ! $_SESSION['comp_question_'.$_SESSION[comp].'_'.$_SESSION[question_count]]); ! printf(" <td><input type='text' name='comp_answer_%s_%s' value='%s' class='medform'></td> ! </tr>", $_SESSION[comp], $_SESSION[question_count], $_SESSION['comp_answer_'.$_SESSION[comp].'_'.$_SESSION[question_count]]); } printf("</table>"); *************** *** 340,346 **** printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf(" <td><input type='text' name='sa_question_%s_%s' class='longform'></td>", $_SESSION[sa], $_SESSION[question_count]); ! printf(" <td><center><input type='text' name='sa_answer_%s_%s' class='medform'></center></td> ! </tr>", $_SESSION[sa], $_SESSION[question_count]); } printf("</table>"); --- 365,372 ---- printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf(" <td><input type='text' name='sa_question_%s_%s' value='%s' class='longform'></td>", $_SESSION[sa], $_SESSION[question_count], ! $_SESSION['sa_question_'.$_SESSION[sa].'_'.$_SESSION[question_count]]); ! printf(" <td><center><input type='text' name='sa_answer_%s_%s' value='%s' class='medform'></center></td> ! </tr>", $_SESSION[sa], $_SESSION[question_count], $_SESSION['sa_answer_'.$_SESSION[sa].'_'.$_SESSION[question_count]]); } printf("</table>"); *************** *** 361,367 **** printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf(" <td><input type='text' name='essay_question_%s_%s' class='longform'></td>", $_SESSION[essay], $_SESSION[question_count]); ! printf(" <td><textarea cols='50' name='essay_answer_%s_%s'></textarea></td> ! </tr>", $_SESSION[essay], $_SESSION[question_count]); } printf("</table>"); --- 387,394 ---- printf("<tr> <td>%s</td>", $_SESSION[question_count]); ! printf(" <td><input type='text' name='essay_question_%s_%s' value='%s' class='longform'></td>", $_SESSION[essay], $_SESSION[question_count], ! $_SESSION['essay_question_'.$_SESSION[essay].'_'.$_SESSION[question_count]]); ! printf(" <td><textarea cols='50' name='essay_answer_%s_%s'>%s</textarea></td> ! </tr>", $_SESSION[essay], $_SESSION[question_count], $_SESSION['essay_answer_'.$_SESSION[essay].'_'.$_SESSION[question_count]]); } printf("</table>"); Index: inst_setup_test.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_setup_test.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** inst_setup_test.php 21 Dec 2003 03:57:31 -0000 1.5 --- inst_setup_test.php 11 Feb 2004 00:58:14 -0000 1.6 *************** *** 19,22 **** --- 19,25 ---- $navbarname = "../inst_navbar/inst_navbar_print.inc"; require('../includes/html_header.php'); + + //Set test creation completed flag + $_SESSION[submitted] = false; ?> *************** *** 120,123 **** --- 123,129 ---- $course_name = mysql_result($result,$x,2); + $_SESSION[course_code] = $course_code; + $_SESSION[section_code] = $section_code; + if ($section_code <> "") { printf("<option value='%s-%s'>%s-%s %s</option>", $course_code, $section_code, Index: inst_submit_test.php =================================================================== RCS file: /cvsroot/etest/etest/instructor/inst_submit_test.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** inst_submit_test.php 21 Dec 2003 03:58:01 -0000 1.1 --- inst_submit_test.php 11 Feb 2004 00:58:14 -0000 1.2 *************** *** 14,308 **** exit; } ! $pagetitle = "Test Creation Wizard"; $stylesheet = "inst_basics.css"; $navbarname = "../inst_navbar/inst_navbar_print.inc"; require('../includes/html_header.php'); ! /* ! <% ! dim oConn ' Connection Object ! dim oRS ' Record Set Object ! dim question_counter ' counter to loop through each question type ! dim choices_counter ' choice counter for questions with multiple choices ! dim choices ' contains all multiple choice possible answers ! dim error_message ' contains the error message for the question ! dim return_previous ' flag to indicate if the database can be updated or not ! ! '---------------------------------------------------------------------------------------------- ! 'ERROR CHECK BEFORE SUBMITTING TO DATABASE ! '---------------------------------------------------------------------------------------------- ! question_counter = 1 ! return_previous = FALSE ! ! ' error check multiple choice ! FOR question_counter=1 to session("num_multiple_choice") ! IF trim(request("mc_question_" & question_counter)) = "" THEN ! error_message = "Question #" & question_counter & " QUESTION cannot be blank" ! call DisplayError() ! END IF ! ! FOR choices_counter=1 to session("num_mc_choices") ! choices = choices & trim(request("mc_choice_" & question_counter & chr(64 + choices_counter))) ! NEXT ! ! IF choices = "" THEN ! error_message = "Question #" & question_counter & " must have at least one CHOICE" ! call DisplayError() ! END IF ! NEXT ! ! ' error check true/false ! FOR question_counter=question_counter to (question_counter + session("num_true_false") - 1) ! IF trim(request("tf_question_" & question_counter)) = "" THEN ! error_message = "Question #" & question_counter & " QUESTION cannot be blank" ! call DisplayError() ! END IF ! NEXT ! ! ' error check modified true/false ! FOR question_counter=question_counter to (question_counter + session("num_m_true_false") - 1) ! IF trim(request("mtf_question_" & question_counter)) = "" THEN ! error_message = "Question #" & question_counter & " QUESTION cannot be blank" ! call DisplayError() ! END IF ! ! IF trim(request("mtf_keyword_" & question_counter)) = "" THEN ! error_message = "Question #" & question_counter & " KEYWORD cannot be blank" ! call DisplayError() ! END IF ! ! IF request("mtf_answer_" & question_counter) = "FALSE" AND trim(request("mtf_correction_" & question_counter)) = "" THEN ! error_message = "Question #" & question_counter & " CORRECTION cannot be blank if the ANSWER is FALSE" ! call DisplayError() ! END IF ! ! IF request("mtf_answer_" & question_counter) = "TRUE" AND trim(request("mtf_correction_" & question_counter)) <> "" THEN ! error_message = "Question #" & question_counter & " CORRECTION must be blank if the ANSWER is TRUE" ! call DisplayError() ! END IF ! NEXT ! ! ' error check matching ! FOR question_counter=question_counter to (question_counter + session("num_matching") - 1) ! IF trim(request("match_list_" & question_counter)) = "" THEN ! error_message = "Question #" & question_counter & " LIST cannot be blank" ! call DisplayError() ! END IF ! ! IF trim(request("match_jumbled_" & question_counter)) = "" THEN ! error_message = "Question #" & question_counter & " JUMBLED cannot be blank" ! call DisplayError() ! END IF ! NEXT ! ! ' error check completion ! FOR question_counter=question_counter to (question_counter + session("num_completion") - 1) ! IF trim(request("comp_question_" & question_counter)) = "" THEN ! error_message = "Question #" & question_counter & " STATEMENT cannot be blank" ! call DisplayError() ! END IF ! ! IF trim(request("comp_answer_" & question_counter)) = "" THEN ! error_message = "Question #" & question_counter & " COMPLETION cannot be blank" ! call DisplayError() ! END IF ! NEXT ! ! ' error check short answer ! FOR question_counter=question_counter to (question_counter + session("num_short_answer") - 1) ! IF trim(request("sa_question_" & question_counter)) = "" THEN ! error_message = "Question #" & question_counter & " QUESTION cannot be blank" ! call DisplayError() ! END IF ! ! IF trim(request("sa_answer_" & question_counter)) = "" THEN ! error_message = "Question #" & question_counter & " ANSWER/KEYWORDS cannot be blank" ! call DisplayError() ! END IF ! NEXT ! ! ' error check essay ! FOR question_counter=question_counter to (question_counter + session("num_essay") - 1) ! IF trim(request("essay_question_" & question_counter)) = "" THEN ! error_message = "Question #" & question_counter & " QUESTION cannot be blank" ! call DisplayError() ! END IF ! ! IF trim(request("essay_answer_" & question_counter)) = "" THEN ! error_message = "Question #" & question_counter & " ANSWER/KEYWORDS cannot be blank" ! call DisplayError() ! END IF ! NEXT ! ! sub DisplayError() ! Response.Write "<div id=warning><img src='../images/warning.gif'> " & error_message & "</div>" ! return_previous = TRUE ! end sub ! ! '---------------------------------------------------------------------------------------------- ! 'IF NO ERRORS, SUBMIT TO DATABASE ! '---------------------------------------------------------------------------------------------- ! IF return_previous = FALSE THEN ! Set oConn=Server.CreateObject("ADODB.connection") ! set oRS=Server.CreateObject("ADODB.recordset") ! oConn.Open "DSN=sd2db; UserID=Admin; pwd=netest" ! ! ' create new test code ! sqltext = "SELECT * FROM Test" ! oRS.Open sqltext, oConn, 2, 2 ! IF oRS.EOF THEN ! session("selected_test") = 1 ! ELSE ! oRS.movelast ! session("selected_test") = oRS("Test_Code") + 1 ! END IF ! ! IF request("test_instructions") = "" THEN ! test_instructions = "none" ! ELSE ! test_instructions = request("test_instructions") ! END IF ! ! ' Populate test table ! oRS.AddNew ! oRS.Fields("Test_Code") = session("selected_test") ! oRS.Fields("Test_Name") = session("test_name") ! oRS.Fields("Test_Instructions") = test_instructions ! oRS.Fields("Course_Code") = session("course") ! oRS.Fields("Section_Code") = session("section") ! oRS.Update ! oRS.Close ! ! ' Populate question table ! sqltext = "SELECT * FROM Question" ! oRS.Open sqltext, oConn, 2, 2 ! question_counter=1 ! ! ' Populate question table with multiple choice ! FOR question_counter=1 to session("num_multiple_choice") ! choices="" ! ! FOR choices_counter=1 to session("num_mc_choices") ! IF trim(request("mc_choice_" & question_counter & chr(64 + choices_counter))) <> "" THEN ! choices = choices & "|" & trim(request("mc_choice_" & question_counter & chr(64 + choices_counter))) ! END IF ! NEXT ! oRS.AddNew ! oRS.Fields("Test_Code") = session("selected_test") ! oRS.Fields("Question_Number") = question_counter ! oRS.Fields("Question_Type_Code") = "MC" ! oRS.Fields("Question_Ask") = trim(request("mc_question_" & question_counter)) & choices ! oRS.Fields("Question_Answer") = request("mc_answer_" & question_counter) ! oRS.Update ! NEXT ! ! ' Populate question table with true/false ! FOR question_counter=question_counter to (question_counter + session("num_true_false") - 1) ! oRS.AddNew ! oRS.Fields("Test_Code") = session("selected_test") ! oRS.Fields("Question_Number") = question_counter ! oRS.Fields("Question_Type_Code") = "TF" ! oRS.Fields("Question_Ask") = trim(request("tf_question_" & question_counter)) ! oRS.Fields("Question_Answer") = request("tf_answer_" & question_counter) ! oRS.Update ! NEXT ! ! ' Populate question table with modified true/false ! FOR question_counter=question_counter to (question_counter + session("num_m_true_false") - 1) ! oRS.AddNew ! oRS.Fields("Test_Code") = session("selected_test") ! oRS.Fields("Question_Number") = question_counter ! oRS.Fields("Question_Type_Code") = "MTF" ! oRS.Fields("Question_Ask") = trim(request("mtf_question_" & question_counter)) & "|" & _ ! trim(request("mtf_keyword_" & question_counter)) ! ! IF request("mtf_answer_" & question_counter) = "TRUE" THEN ! oRS.Fields("Question_Answer") = request("mtf_answer_" & question_counter) ! ELSE ! oRS.Fields("Question_Answer") = request("mtf_answer_" & question_counter) & "|" & _ ! trim(request("mtf_correction_" & question_counter)) ! END IF ! oRS.Update ! NEXT ! ! ' Populate question table with matching ! FOR question_counter=question_counter to (question_counter + session("num_matching") - 1) ! oRS.AddNew ! oRS.Fields("Test_Code") = session("selected_test") ! oRS.Fields("Question_Number") = question_counter ! oRS.Fields("Question_Type_Code") = "MATCH" ! oRS.Fields("Question_Ask") = trim(request("match_list_" & question_counter)) & "|" & _ ! trim(request("match_jumbled_" & question_counter)) ! oRS.Fields("Question_Answer") = request("match_answer_" & question_counter) ! oRS.Update ! NEXT ! ! ' Populate question table with completion ! FOR question_counter=question_counter to (question_counter + session("num_completion") - 1) ! oRS.AddNew ! oRS.Fields("Test_Code") = session("selected_test") ! oRS.Fields("Question_Number") = question_counter ! oRS.Fields("Question_Type_Code") = "COMP" ! oRS.Fields("Question_Ask") = trim(request("comp_question_" & question_counter)) ! oRS.Fields("Question_Answer") = trim(request("comp_answer_" & question_counter)) ! oRS.Update ! NEXT ! ! ' Populate question table with short answer ! FOR question_counter=question_counter to (question_counter + session("num_short_answer") - 1) ! oRS.AddNew ! oRS.Fields("Test_Code") = session("selected_test") ! oRS.Fields("Question_Number") = question_counter ! oRS.Fields("Question_Type_Code") = "SA" ! oRS.Fields("Question_Ask") = trim(request("sa_question_" & question_counter)) ! oRS.Fields("Question_Answer") = trim(request("sa_answer_" & question_counter)) ! oRS.Update ! NEXT ! ! ' Populate question table with essay ! FOR question_counter=question_counter to (question_counter + session("num_essay") - 1) ! oRS.AddNew ! oRS.Fields("Test_Code") = session("selected_test") ! oRS.Fields("Question_Number") = question_counter ! oRS.Fields("Question_Type_Code") = "ESSAY" ! oRS.Fields("Question_Ask") = trim(request("essay_question_" & question_counter)) ! oRS.Fields("Question_Answer") = trim(request("essay_answer_" & question_counter)) ! oRS.Update ! NEXT ! ! oRS.Close ! ! Session("submitted") = TRUE ! session("print_header") = TRUE ! session("multi_visit") = FALSE ! '-------------------------------- ! 'VERIFY THAT TEST IS OKAY ! '-------------------------------- ! %> ! <!-- #include file="inst_view_test.asp" --> ! <% ! if question_counter > 1 then ! response.write "</table>" ! end if ! %> ! <br><hr><br> ! <table border='0'><tr><td><img src="../images/question.gif"></td><td><font color='#003333'><b>Finished?</b></font></td><td><a href='inst_home.asp'>Return to teacher home page.</a></td></tr> ! <tr><td><img src="../images/question.gif"></td><td><font color='#003333'><b>Test contains errors?</b></font></td><td><a href="inst_choose_test_modifications.asp">Add, Edit, or Delete Questions</a></td></tr></table> ! <% ! ELSE ! Response.Write "<br><div id=warning><u>Your test contained errors. " ! Response.Write "Hit the back button on your browser to make corrections.</u></div>" ! END IF ! %> ! </td></tr> ! <tr><td></td><td colspan='2'><br><br><hr size='2' color='#000000'> ! <font size='1'>Powered by Netest</font> ! </td></tr></table> ! </body> ! </html> */ require(INCLUDES_PATH."html_footer.php"); ?> \ No newline at end of file --- 14,524 ---- exit; } ! $pagetitle = "Test Creation Wizard"; $stylesheet = "inst_basics.css"; $navbarname = "../inst_navbar/inst_navbar_print.inc"; require('../includes/html_header.php'); + + //Check if test has already been submitted + if ($_SESSION[submitted]) { + echo "This test has already been submitted.<br>"; + echo "<a href='inst_choose_test_modifications.php'>Click here to add, delete, or update questions.</a><br>"; + echo "<a href='inst_home.php'>Click here to return to the home page.</a></p>"; + require(INCLUDES_PATH."html_footer.php"); + exit; + } + + //------------------------------------------ + //ERROR CHECK BEFORE SUBMITTING TO DATABASE. + //BUILD ARRAY OF CORRECT QUESTIONS; IF TEST + //IS GOOD SUBMIT TO DB FROM ARRAY + //------------------------------------------ + $_SESSION[question_count] = 1; + $_SESSION[mc] = 1; + $_SESSION[tf] = 1; + $_SESSION[mtf] = 1; + $_SESSION[match] = 1; + $_SESSION[comp] = 1; + $_SESSION[sa] = 1; + $_SESSION[essay] = 1; + + function error_check($qtype) { + // Error check multiple choice + if ($qtype == "Multiple Choice") { + for ($i=0; $i < $_SESSION['num_multiple_choice_'.$_SESSION[mc]]; $i++, $_SESSION[question_count]++) { + $_SESSION['mc_question_'.$_SESSION[mc].'_'.$_SESSION[question_count]] = $_POST['mc_question_'.$_SESSION[mc].'_'.$_SESSION[question_count]]; + $_SESSION['mc_answer_'.$_SESSION[mc].'_'.$_SESSION[question_count]] = $_POST['mc_answer_'.$_SESSION[mc].'_'.$_SESSION[question_count]]; + + // MC Question + if (trim($_POST['mc_question_'.$_SESSION[mc].'_'.$_SESSION[question_count]]) == "") { + printf("Question #%s: You must enter a QUESTION<br>", $_SESSION[question_count]); + $_SESSION['error_found'] = true; + } + else { + $_SESSION[q_array][$_SESSION[question_count]][0] = "MC"; + } + + // loop thru choices building a choice array; if there are no choices display error message + $choices = ""; + + for ($choice=1; $choice < $_SESSION['num_mc_choices_'.$_SESSION[mc]] + 1; $choice++) { + $_SESSION['mc_choice_'.$_SESSION[mc].'_'.$_SESSION[question_count].chr(64 + $choice)] = $_POST['mc_choice_'.$_SESSION[mc].'_'.$_SESSION[question_count].chr(64 + $choice)]; + + if ($_SESSION['mc_choice_'.$_SESSION[mc].'_'.$_SESSION[question_count].chr(64 + $choice)] != "") { + $choices .= "|".trim($_POST['mc_choice_'.$_SESSION[mc].'_'.$_SESSION[question_count].chr(64 + $choice)]); + } + } + + if ($choices == "") { + printf("Question #%s: You must enter at least one CHOICE<br>", $_SESSION[question_count]); + $_SESSION['error_found'] = true; + } + else { + $_SESSION[q_array][$_SESSION[question_count]][1] = trim($_POST['mc_question_'.$_SESSION[mc].'_'.$_SESSION[question_count]]).$choices; + } + + //MC answer + $_SESSION[q_array][$_SESSION[question_count]][2] = $_POST['mc_answer_'.$_SESSION[mc].'_'.$_SESSION[question_count]]; + } + $_SESSION[mc]++; + } + + // Error check True/False + if ($qtype == "True/False") { + for ($i=0; $i < $_SESSION['num_true_false_'.$_SESSION[tf]]; $i++, $_SESSION[question_count]++) { + $_SESSION['tf_question_'.$_SESSION[tf].'_'.$_SESSION[question_count]] = $_POST['tf_question_'.$_SESSION[tf].'_'.$_SESSION[question_count]]; + $_SESSION['tf_answer_'.$_SESSION[tf].'_'.$_SESSION[question_count]] = $_POST['tf_answer_'.$_SESSION[tf].'_'.$_SESSION[question_count]]; + + // TF Question + if (trim($_POST['tf_question_'.$_SESSION[tf].'_'.$_SESSION[question_count]]) == "") { + printf("Question #%s: You must enter a QUESTION<br>", $_SESSION[question_count]); + $_SESSION['error_found'] = true; + } + else { + $_SESSION[q_array][$_SESSION[question_count]][0] = "TF"; + $_SESSION[q_array][$_SESSION[question_count]][1] = trim($_POST['tf_question_'.$_SESSION[tf].'_'.$_SESSION[question_count]]); + } + + // TF Answer + $_SESSION[q_array][$_SESSION[question_count]][2] = $_POST['tf_answer_'.$_SESSION[tf].'_'.$_SESSION[question_count]]; + } + $_SESSION[tf]++; + } + + // Error check Modified True/False + if ($qtype == "Modified True/False") { + for ($i=0; $i < $_SESSION['num_m_true_false_'.$_SESSION[mtf]]; $i++, $_SESSION[question_count]++) { + $_SESSION['mtf_question_'.$_SESSION[mtf].'_'.$_SESSION[question_count]] = $_POST['mtf_question_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]; + $_SESSION['mtf_keyword_'.$_SESSION[mtf].'_'.$_SESSION[question_count]] = $_POST['mtf_keyword_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]; + $_SESSION['mtf_answer_'.$_SESSION[mtf].'_'.$_SESSION[question_count]] = $_POST['mtf_answer_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]; + $_SESSION['mtf_correction_'.$_SESSION[mtf].'_'.$_SESSION[question_count]] = $_POST['mtf_correction_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]; ! if (trim($_POST['mtf_question_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]) == "") { ! printf("Question #%s: You must enter a QUESTION<br>", $_SESSION[question_count]); ! $_SESSION['error_found'] = true; ! } ! ! if (trim($_POST['mtf_keyword_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]) == "") { ! printf("Question #%s: You must enter a KEYWORD<br>", $_SESSION[question_count]); ! $_SESSION['error_found'] = true; ! } ! else { ! $_SESSION[q_array][$_SESSION[question_count]][0] = "MTF"; ! $_SESSION[q_array][$_SESSION[question_count]][1] = trim($_POST['mtf_question_'.$_SESSION[mtf].'_'.$_SESSION[question_count]])."|".trim($_POST['mtf_keyword_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]); ! } ! ! if (($_POST['mtf_answer_'.$_SESSION[mtf].'_'.$_SESSION[question_count]] == "FALSE") And (trim($_POST['mtf_correction_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]) == "")) { ! printf("Question #%s: You must enter a CORRECTION if the ANSWER is False<br>", $_SESSION[question_count]); ! $_SESSION['error_found'] = true; ! } ! else { ! $_SESSION[q_array][$_SESSION[question_count]][2] = $_POST['mtf_answer_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]."|".trim($_POST['mtf_correction_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]); ! } ! ! if (($_POST['mtf_answer_'.$_SESSION[mtf].'_'.$_SESSION[question_count]] == "TRUE") And (trim($_POST['mtf_correction_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]) != "")) { ! printf("Question #%s: You cannot enter a CORRECTION if the ANSWER is True<br>", $_SESSION[question_count]); ! $_SESSION['error_found'] = true; ! } ! else { ! if ($_POST['mtf_answer_'.$_SESSION[mtf].'_'.$_SESSION[question_count]] == "TRUE") { ! $_SESSION[q_array][$_SESSION[question_count]][2] = $_POST['mtf_answer_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]; ! } ! else { ! $_SESSION[q_array][$_SESSION[question_count]][2] = $_POST['mtf_answer_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]."|".trim($_POST['mtf_correction_'.$_SESSION[mtf].'_'.$_SESSION[question_count]]); ! } ! } ! } ! $_SESSION[mtf]++; ! } ! ! // Error check Matching ! if ($qtype == "Matching") { ! for ($i=0; $i < $_SESSION['num_matching_'.$_SESSION[match]]; $i++, $_SESSION[question_count]++) { ! $_SESSION['match_list_'.$_SESSION[match].'_'.$_SESSION[question_count]] = $_POST['match_list_'.$_SESSION[match].'_'.$_SESSION[question_count]]; ! $_SESSION['match_jumbled_'.$_SESSION[match].'_'.$_SESSION[question_count]] = $_POST['match_jumbled_'.$_SESSION[match].'_'.$_SESSION[question_count]]; ! $_SESSION['match_answer_'.$_SESSION[match].'_'.$_SESSION[question_count]] = $_POST['match_answer_'.$_SESSION[match].'_'.$_SESSION[question_count]]; ! ! if (trim($_POST['match_list_'.$_SESSION[match].'_'.$_SESSION[question_count]]) == "") { ! printf("Question #%s: You must enter a QUESTION<br>", $_SESSION[question_count]); ! $_SESSION['error_found'] = true; ! } ! ! if (trim($_POST['match_jumbled_'.$_SESSION[match].'_'.$_SESSION[question_count]]) == "") { ! printf("Question #%s: You must enter a POSSIBLE ANSWER<br>", $_SESSION[question_count]); ! $_SESSION['error_found'] = true; ! } ! else { ! $_SESSION[q_array][$_SESSION[question_count]][0] = "MATCH"; ! $_SESSION[q_array][$_SESSION[question_count]][1] = trim($_POST['match_list_'.$_SESSION[match].'_'.$_SESSION[question_count]])."|".trim($_POST['match_jumbled_'.$_SESSION[match].'_'.$_SESSION[question_count]]); ! } ! ! $_SESSION[q_array][$_SESSION[question_count]][2] = $_POST['match_answer_'.$_SESSION[match].'_'.$_SESSION[question_count]]; ! } ! $_SESSION[match]++; ! } ! ! // Error check Completion ! if ($qtype == "Completion") { ! for ($i=0; $i < $_SESSION['num_completion_'.$_SESSION[comp]]; $i++, $_SESSION[question_count]++) { ! $_SESSION['comp_question_'.$_SESSION[comp].'_'.$_SESSION[question_count]] = $_POST['comp_question_'.$_SESSION[comp].'_'.$_SESSION[question_count]]; ! $_SESSION['comp_answer_'.$_SESSION[comp].'_'.$_SESSION[question_count]] = $_POST['comp_answer_'.$_SESSION[comp].'_'.$_SESSION[question_count]]; ! ! if (trim($_POST['comp_question_'.$_SESSION[comp].'_'.$_SESSION[question_count]]) == "") { ! printf("Question #%s: You must enter a STATEMENT<br>", $_SESSION[question_count]); ! $_SESSION['error_found'] = true; ! } ! else { ! $_SESSION[q_array][$_SESSION[question_count]][0] = "COMP"; ! $_SESSION[q_array][$_SESSION[question_count]][1] = trim($_POST['comp_question_'.$_SESSION[comp].'_'.$_SESSION[question_count]]); ! } ! ! if (trim($_POST['comp_answer_'.$_SESSION[comp].'_'.$_SESSION[question_count]]) == "") { ! printf("Question #%s: You must enter a COMPLETION<br>", $_SESSION[question_count]); ! $_SESSION['error_found'] = true; ! } ! else { ! $_SESSION[q_array][$_SESSION[question_count]][2] = trim($_POST['comp_answer_'.$_SESSION[comp].'_'.$_SESSION[question_count]]); ! } ! } ! $_SESSION[comp]++; ! } ! ! // Error check Short Answer ! if ($qtype == "Short Answer") { ! for ($i=0; $i < $_SESSION['num_short_answer_'.$_SESSION[sa]]; $i++, $_SESSION[question_count]++) { ! $_SESSION['sa_question_'.$_SESSION[sa].'_'.$_SESSION[question_count]] = $_POST['sa_question_'.$_SESSION[sa].'_'.$_SESSION[question_count]]; ! $_SESSION['sa_answer_'.$_SESSION[sa].'_'.$_SESSION[question_count]] = $_POST['sa_answer_'.$_SESSION[sa].'_'.$_SESSION[question_count]]; ! ! if (trim($_POST['sa_question_'.$_SESSION[sa].'_'.$_SESSION[question_count]]) == "") { ! printf("Question #%s: You must enter a QUESTION<br>", $_SESSION[question_count]); ! $_SESSION['error_found'] = true; ! } ! else { ! $_SESSION[q_array][$_SESSION[question_count]][0] = "SA"; ! $_SESSION[q_array][$_SESSION[question_count]][1] = trim($_POST['sa_question_'.$_SESSION[sa].'_'.$_SESSION[question_count]]); ! } ! ! if (trim($_POST['sa_answer_'.$_SESSION[sa].'_'.$_SESSION[question_count]]) == "") { ! printf("Question #%s: You must enter an ANSWER<br>", $_SESSION[question_count]); ! $_SESSION['error_found'] = true; ! } ! else { ! $_SESSION[q_array][$_SESSION[question_count]][2] = trim($_POST['sa_answer_'.$_SESSION[sa].'_'.$_SESSION[question_count]]); ! } ! } ! $_SESSION[sa]++; ! } ! ! // Error check Essay ! if ($qtype == "Essay") { ! for ($i=0; $i < $_SESSION['num_essay_'.$_SESSION[essay]]; $i++, $_SESSION[question_count]++) { ! $_SESSION['essay_question_'.$_SESSION[essay].'_'.$_SESSION[question_count]] = $_POST['essay_question_'.$_SESSION[essay].'_'.$_SESSION[question_count]]; ! $_SESSION['essay_answer_'.$_SESSION[essay].'_'.$_SESSION[question_count]] = $_POST['essay_answer_'.$_SESSION[essay].'_'.$_SESSION[question_count]]; ! ! if (trim($_POST['essay_question_'.$_SESSION[essay].'_'.$_SESSION[question_count]]) == "") { ! printf("Question #%s: You must enter a QUESTION<br>", $_SESSION[question_count]); ! $_SESSION['error_found'] = true; ! } ! else { ! $_SESSION[q_array][$_SESSION[question_count]][0] = "ESSAY"; ! $_SESSION[q_array][$_SESSION[question_count]][1] = trim($_POST['essay_question_'.$_SESSION[essay].'_'.$_SESSION[question_count]]); ! } ! ! if (trim($_POST['essay_answer_'.$_SESSION[essay].'_'.$_SESSION[question_count]]) == "") { ! printf("Question #%s: You must enter an ANSWER<br>", $_SESSION[question_count]); ! $_SESSION['error_found'] = true; ! } ! else { ! $_SESSION[q_array][$_SESSION[question_count]][2] = trim($_POST['essay_answer_'.$_SESSION[essay].'_'.$_SESSION[question_count]]); ! } ! } ! $_SESSION[essay]++; ! } ! ! } ! $found_pos = strpos($_SESSION[qtypes], ","); ! $next_pos = strpos($_SESSION[qtypes], ",", $found_pos + 1); ! ! $_SESSION['error_found'] = false; ! // Error check first section ! $qtype = substr($_SESSION[qtypes], 0, $found_pos); ! error_check($qtype); ! ! // Error check other sections ! while ($found_pos < $next_pos) { ! $qtype = substr($_SESSION[qtypes], $found_pos + 1, $next_pos - $found_pos - 1); ! error_check($qtype); ! ! $found_pos = $next_pos; ! $next_pos = strpos($_SESSION[qtypes], ",", $found_pos + 1); ! } ! ! //---------------------------------------------------------------------------------------------- ! //IF NO ERRORS, SUBMIT TO DATABASE ! //---------------------------------------------------------------------------------------------- ! if ($_SESSION['error_found']) { ! printf("<br><div id=warning>Your test contained errors. Please back up, correct the errors, and resubmit.</div>"); ! } ! else { ! //Create new test code ! $sql = "SELECT * FROM Test"; ! $result = @mysql_query($sql) or die("Couldn't execute query."); ! ! if (mysql_num_rows($result) == 0) { ! $_SESSION[new_test_num] = 1; ! } ! else { ! $_SESSION[new_test_num] = mysql_result($result,mysql_num_rows($result) - 1,0) + 1; ! } ! ! //Store test instructions ! if ($_POST['test_instructions'] == "") { ! $test_instructions = "none"; ! } ! else { ! $test_instructions = $_POST['test_instructions']; ! } ! //Populate Test Table ! $sql = "INSERT INTO Test (Test_Code,Test_Name,Test_Instructions,Course_Code,Section_Code) ! VALUES($_SESSION[new_test_num],'$_SESSION[test_name]','$test_instructions','$_SESSION[course_code]','$_SESSION[section_code]')"; ! mysql_query($sql) or die('Cannot insert new test. '.mysql_error()); ! ! //Populate Question Table ! for ($x=1; $x < $_SESSION[question_count]; $x++) { ! $question_type = $_SESSION[q_array][$x][0]; ! $question_ask = $_SESSION[q_array][$x][1]; ! $question_answer = $_SESSION[q_array][$x][2]; ! $sql = "INSERT INTO Question (Test_Code,Question_Number,Question_Type_Code,Question_Ask,Question_Answer) ! VALUES($_SESSION[new_test_num],$x,'$question_type','$question_ask','$question_answer')"; ! mysql_query($sql) or die('Cannot insert new question. '.mysql_error()); ! } ! ?> ! <font size='3'><div class='secheader'>Your test was successfully created.<br><br><br></div></font> ! <?php ! //Clear the test creation forms keeping necessary info ! $_SESSION[submitted] = true; ! ! //View the submitted test ! $sql = "SELECT Question_Number,Question_Type_Code,Question_Ask,Question_Answer ! FROM Question ! WHERE Test_Code=$_SESSION[new_test_num] ! ORDER BY Question_Number"; ! $result = mysql_query($sql) or die('Cannot insert new question'.mysql_error()); ! //Print the test ! function next_question($current_question) { ! $sql2 = "SELECT Question_Type_Code FROM Question ! WHERE Test_Code=$_SESSION[new_test_num] AND Question_Number=($current_question + 1)"; ! $result2 = mysql_query($sql2) or die('Cannot find next question type. '.mysql_error()); ! $query_row2 = mysql_fetch_assoc($result2); ! return $query_row2['Question_Type_Code']; ! } ! ! $first_mc = true; ! $first_tf = true; ! $first_mtf = true; ! $first_match = true; ! $first_comp = true; ! $first_sa = true; ! $first_essay = true; ! ! for ($i=1; $i < mysql_num_rows($result) + 1; $i++) { ! $query_row = mysql_fetch_assoc($result); ! ! //Print MC ! if ($query_row['Question_Type_Code'] == "MC") { ! if ($first_mc) { ! ?> <div class='secheader'>Multiple Choice</div> ! <table border='1' class='sectable'> ! <th class='Q_td'></th> ! <th class='Q_td'>Question</th> ! <th class='Q_td'>Choices</th> ! <th class='Q_td'>Answer</th> ! <?php $first_mc = false; ! } ! ?> <tr> ! <td class='Q_td'><center><?php echo $current_question = $query_row['Question_Number']; ?></center></td> ! <td class='Q_td'> ! <?php //Print Question ! $found_pos = strpos($query_row['Question_Ask'], "|"); ! echo "<div class='spacer_left'>".substr($query_row['Question_Ask'], 0, $found_pos)."</div>"; ! ?> </td> ! <td class='Q_td'> ! <?php //Print Choices ! ?> <table border='0'> ! <tr> ! <?php $next_pos = strpos($query_row['Question_Ask'], "|", $found_pos + 1); ! $choice_count = "A"; ! $loop_count = 1; ! ! while ($found_pos < $next_pos) { ! $choice = substr($query_row['Question_Ask'], $found_pos + 1, $next_pos - $found_pos - 1); ! ?> <td class='spacer_left'><strong><?php echo $choice_count."." ?></strong></td> ! <td class='spacer_right'><?php echo $choice ?></td> ! <?php ! if ($loop_count % 3 == 0) { ! ?> </tr> ! <tr> ! <?php } ! ! $found_pos = $next_pos; ! $next_pos = strpos($query_row['Question_Ask'], "|", $found_pos + 1); ! $choice_count++; ! $loop_count++; ! } ! ! //Print last choice ! $choice = substr($query_row['Question_Ask'], -1, strlen($query_row['Question_Ask']) - $found_pos); ! ?> <td class='spacer_left'><strong><?php echo $choice_count."." ?></strong></td> ! <td class='spacer_right'><?php echo $choice ?></td> ! </tr> ! </table> ! </td> ! <td class='Q_td'><center><?php echo $query_row['Question_Answer']; ?></center></td> ! </tr> ! <?php ! $next_q_type = next_question($current_question); ! if ($next_q_type != "MC") { ! ?> </table><br> ! <?php $first_mc = true; ! } ! } ! ! //Print TF ! if ($query_row['Question_Type_Code'] == "TF") { ! if ($first_tf) { ! ?> <div class='secheader'>True/False</div> ! <table border='1' class='sectable'> ! <th class='Q_td'></th> ! <th class='Q_td'>Question</th> ! <th class='Q_td'>Answer</th> ! <?php $first_tf = false; ! } ! ?> <tr> ! <td class='Q_td'><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td class='Q_td'><div class='spacer_left'><?php echo $query_row['Question_Ask']; ?></div></td> ! <td class='Q_td'><center><?php echo $query_row['Question_Answer']; ?></center></td> ! </tr> ! <?php ! $next_q_type = next_question($current_question); ! if ($next_q_type != "TF") { ! ?> </table><br> ! <?php $first_tf = true; ! } ! } ! ! //Print MTF ! if ($query_row['Question_Type_Code'] == "MTF") { ! if ($first_mtf) { ! ?> <table border='1'> ! <?php $first_mtf = false; ! } ! ?> <tr> ! <td><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td><?php echo $query_row['Question_Type_Code']; ?></td> ! </tr> ! <?php ! $next_q_type = next_question($current_question); ! if ($next_q_type != "MTF") { ! ?> </table><br> ! <?php $first_mtf = true; ! } ! } ! ! //Print Match ! if ($query_row['Question_Type_Code'] == "MATCH") { ! if ($first_match) { ! ?> <table border='1'> ! <?php $first_match = false; ! } ! ?> <tr> ! <td><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td><?php echo $query_row['Question_Type_Code']; ?></td> ! </tr> ! <?php ! $next_q_type = next_question($current_question); ! if ($next_q_type != "MATCH") { ! ?> </table><br> ! <?php $first_match = true; ! } ! } ! ! //Print Comp ! if ($query_row['Question_Type_Code'] == "COMP") { ! if ($first_comp) { ! ?> <table border='1'> ! <?php $first_comp = false; ! } ! ?> <tr> ! <td><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td><?php echo $query_row['Question_Type_Code']; ?></td> ! </tr> ! <?php ! $next_q_type = next_question($current_question); ! if ($next_q_type != "COMP") { ! ?> </table><br> ! <?php $first_comp = true; ! } ! } ! ! //Print SA ! if ($query_row['Question_Type_Code'] == "SA") { ! if ($first_sa) { ! ?> <table border='1'> ! <?php $first_sa = false; ! } ! ?> <tr> ! <td><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td><?php echo $query_row['Question_Type_Code']; ?></td> ! </tr> ! <?php ! $next_q_type = next_question($current_question); ! if ($next_q_type != "SA") { ! ?> </table><br> ! <?php $first_sa = true; ! } ! } ! ! //Print Essay ! if ($query_row['Question_Type_Code'] == "ESSAY") { ! if ($first_essay) { ! ?> <table border='1'> ! <?php $first_essay = false; ! } ! ?> <tr> ! <td><?php echo $current_question = $query_row['Question_Number']; ?></td> ! <td><?php echo $query_row['Question_Type_Code']; ?></td> ! </tr> ! <?php ! $next_q_type = next_question($current_question); ! if ($next_q_type != "ESSAY") { ! ?> </table> ! <?php $first_essay = true; ! } ! } ! } ! } require(INCLUDES_PATH."html_footer.php"); ?> \ No newline at end of file |
Update of /cvsroot/etest/etest/administrator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26820/administrator Modified Files: admin_edit_classes.php admin_edit_students.php admin_edit_teachers.php admin_home.php admin_submit_class.php admin_submit_student.php admin_submit_teacher.php Log Message: updated querys to use DB_prefix -- craig Index: admin_edit_classes.php =================================================================== RCS file: /cvsroot/etest/etest/administrator/admin_edit_classes.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_edit_classes.php 16 Dec 2003 17:39:58 -0000 1.1 --- admin_edit_classes.php 2 Feb 2004 15:37:21 -0000 1.2 *************** *** 29,33 **** //connect to mySQL database require('../includes/db_connect.php'); ! $allcourses = mysql_query("select * from course order by course_code", $db) or die('Cannot retrieve existing courses' . mysql_error()); while ($row = mysql_fetch_array($allcourses)) { --- 29,33 ---- //connect to mySQL database require('../includes/db_connect.php'); ! $allcourses = mysql_query("select * from ".$DB_prefix."_course order by course_code", $db) or die('Cannot retrieve existing courses' . mysql_error()); while ($row = mysql_fetch_array($allcourses)) { *************** *** 45,47 **** </form> ! <?php require(INCLUDES_PATH."html_footer.php"); ?> \ No newline at end of file --- 45,47 ---- </form> ! <?php require(INCLUDES_PATH."html_footer.php"); ?> Index: admin_edit_students.php =================================================================== RCS file: /cvsroot/etest/etest/administrator/admin_edit_students.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_edit_students.php 10 Dec 2003 18:11:41 -0000 1.2 --- admin_edit_students.php 2 Feb 2004 15:37:21 -0000 1.3 *************** *** 29,33 **** //connect to mySQL database require('../includes/db_connect.php'); ! $allstudents = mysql_query("select * from student order by student_code", $db) or die('Cannot retrieve existing students' . mysql_error()); while ($row = mysql_fetch_array($allstudents)) { --- 29,33 ---- //connect to mySQL database require('../includes/db_connect.php'); ! $allstudents = mysql_query("select * from ".$DB_prefix."_student order by student_code", $db) or die('Cannot retrieve existing students' . mysql_error()); while ($row = mysql_fetch_array($allstudents)) { *************** *** 44,46 **** </form> ! <?php require(INCLUDES_PATH."html_footer.php"); ?> \ No newline at end of file --- 44,46 ---- </form> ! <?php require(INCLUDES_PATH."html_footer.php"); ?> Index: admin_edit_teachers.php =================================================================== RCS file: /cvsroot/etest/etest/administrator/admin_edit_teachers.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_edit_teachers.php 12 Dec 2003 18:55:49 -0000 1.1 --- admin_edit_teachers.php 2 Feb 2004 15:37:21 -0000 1.2 *************** *** 31,35 **** //connect to mySQL database require('../includes/db_connect.php'); ! $allteachers = mysql_query("select * from instructor order by inst_code", $db) or die('Cannot retrieve existing teachers' . mysql_error()); while ($row = mysql_fetch_array($allteachers)) { --- 31,35 ---- //connect to mySQL database require('../includes/db_connect.php'); ! $allteachers = mysql_query("select * from ".$DB_prefix."_instructor order by inst_code", $db) or die('Cannot retrieve existing teachers' . mysql_error()); while ($row = mysql_fetch_array($allteachers)) { *************** *** 46,48 **** </form> ! <?php require(INCLUDES_PATH."html_footer.php"); ?> \ No newline at end of file --- 46,48 ---- </form> ! <?php require(INCLUDES_PATH."html_footer.php"); ?> Index: admin_home.php =================================================================== RCS file: /cvsroot/etest/etest/administrator/admin_home.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** admin_home.php 10 Dec 2003 18:46:53 -0000 1.6 --- admin_home.php 2 Feb 2004 15:37:21 -0000 1.7 *************** *** 44,48 **** $password = addslashes($_POST['password']); $password = md5($password); ! $query = "SELECT * FROM administrator WHERE admin_code = '$username' AND admin_password = '$password'"; $result = mysql_query($query, $db) or die('Cannot run login query ' . mysql_error()); //store the user as a valid user --- 44,48 ---- $password = addslashes($_POST['password']); $password = md5($password); ! $query = "SELECT * FROM ".$DB_prefix."_administrator WHERE admin_code = '$username' AND admin_password = '$password'"; $result = mysql_query($query, $db) or die('Cannot run login query ' . mysql_error()); //store the user as a valid user Index: admin_submit_class.php =================================================================== RCS file: /cvsroot/etest/etest/administrator/admin_submit_class.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_submit_class.php 17 Dec 2003 17:57:59 -0000 1.2 --- admin_submit_class.php 2 Feb 2004 15:37:21 -0000 1.3 *************** *** 47,51 **** $classcode = $_POST["courses"]; require('../includes/db_connect.php'); ! $classinfo = mysql_query("select * from course where course_code='$classcode'",$db) or die('Cannot retrieve existing class'.mysql_error()); $row = mysql_fetch_array($classinfo); if($row) --- 47,51 ---- $classcode = $_POST["courses"]; require('../includes/db_connect.php'); ! $classinfo = mysql_query("select * from ".$DB_prefix."_course where course_code='$classcode'",$db) or die('Cannot retrieve existing class'.mysql_error()); $row = mysql_fetch_array($classinfo); if($row) *************** *** 64,68 **** <tr><td valign='top'>Sections:</td><td><select size='15' name='class_sections'> <?php ! $sectioninfo = mysql_query("select * from section s,instructor i where s.course_code='$classcode' and s.inst_code = i.inst_code",$db) or die('Cannot retrieve existing sections'.mysql_error()); while ($row = mysql_fetch_array($sectioninfo)) { --- 64,68 ---- <tr><td valign='top'>Sections:</td><td><select size='15' name='class_sections'> <?php ! $sectioninfo = mysql_query("select * from ".$DB_prefix."_section s,".$DB_prefix."_instructor i where s.course_code='$classcode' and s.inst_code = i.inst_code",$db) or die('Cannot retrieve existing sections'.mysql_error()); while ($row = mysql_fetch_array($sectioninfo)) { *************** *** 96,100 **** <tr><td>Instructor Name:</td><td><select name='instcode'> <?php ! $instinfo = mysql_query("select * from instructor order by inst_code",$db) or die('Cannot retrieve existing teachers'.mysql_error()); while ($row = mysql_fetch_array($instinfo)) { --- 96,100 ---- <tr><td>Instructor Name:</td><td><select name='instcode'> <?php ! $instinfo = mysql_query("select * from ".$DB_prefix."_instructor order by inst_code",$db) or die('Cannot retrieve existing teachers'.mysql_error()); while ($row = mysql_fetch_array($instinfo)) { *************** *** 123,127 **** //get current teacher ! $instresult = mysql_query("select * from section where course_code='$classcode' and section_code='$sectionnum'",$db) or die('Cannot retrieve existing section'.mysql_error()); $row = mysql_fetch_array($instresult); --- 123,127 ---- //get current teacher ! $instresult = mysql_query("select * from ".$DB_prefix."_section where course_code='$classcode' and section_code='$sectionnum'",$db) or die('Cannot retrieve existing section'.mysql_error()); $row = mysql_fetch_array($instresult); *************** *** 138,142 **** <tr><td>Instructor Name:</td><td><select name='instcode'> <?php ! $instinfo = mysql_query("select * from instructor order by inst_code",$db) or die('Cannot retrieve existing teachers'.mysql_error()); while ($row = mysql_fetch_array($instinfo)) { --- 138,142 ---- <tr><td>Instructor Name:</td><td><select name='instcode'> <?php ! $instinfo = mysql_query("select * from ".$DB_prefix."_instructor order by inst_code",$db) or die('Cannot retrieve existing teachers'.mysql_error()); while ($row = mysql_fetch_array($instinfo)) { *************** *** 168,172 **** $sectioncode = $_POST["class_sections"]; ! $sectioninfo = mysql_query("select * from enroll where course_code = '$classcode' and section_code='$sectioncode'",$db) or die('Cannot retrieve enrollment'.mysql_error()); if(mysql_num_rows($sectioninfo)<=0) { --- 168,172 ---- $sectioncode = $_POST["class_sections"]; ! $sectioninfo = mysql_query("select * from ".$DB_prefix."_enroll where course_code = '$classcode' and section_code='$sectioncode'",$db) or die('Cannot retrieve enrollment'.mysql_error()); if(mysql_num_rows($sectioninfo)<=0) { *************** *** 194,198 **** $coursecode = $_POST["coursecode"]; $sectioncode = $_POST["sectioncode"]; ! mysql_query("delete from section where course_code='$coursecode' and section_code='$sectioncode'",$db) or die('Cannot delete sections'.mysql_error()); echo "Section Information deleted"; } --- 194,198 ---- $coursecode = $_POST["coursecode"]; $sectioncode = $_POST["sectioncode"]; ! mysql_query("delete from ".$DB_prefix."_section where course_code='$coursecode' and section_code='$sectioncode'",$db) or die('Cannot delete sections'.mysql_error()); echo "Section Information deleted"; } *************** *** 213,221 **** else //everything was entered { ! $classinfo = mysql_query("select * from section where course_code='$classcode' and section_code='$sectionnum'",$db) or die('Cannot retrieve class information'.mysql_error()); //add section if(mysql_num_rows($classinfo)<=0) { ! mysql_query("insert into section (course_code,section_code,inst_code) values('$classcode','$sectionnum','$instcode')",$db) or die('Cannot add section'.mysql_error()); --- 213,221 ---- else //everything was entered { ! $classinfo = mysql_query("select * from ".$DB_prefix."_section where course_code='$classcode' and section_code='$sectionnum'",$db) or die('Cannot retrieve class information'.mysql_error()); //add section if(mysql_num_rows($classinfo)<=0) { ! mysql_query("insert into ".$DB_prefix."_section (course_code,section_code,inst_code) values('$classcode','$sectionnum','$instcode')",$db) or die('Cannot add section'.mysql_error()); *************** *** 224,228 **** else //modify section { ! mysql_query("update section set inst_code = '$instcode' where course_code='$classcode' and section_code='$sectionnum'",$db) or die('Cannot update section'.mysql_error()); printf("Successful Section Update"); } --- 224,228 ---- else //modify section { ! mysql_query("update ".$DB_prefix."_section set inst_code = '$instcode' where course_code='$classcode' and section_code='$sectionnum'",$db) or die('Cannot update section'.mysql_error()); printf("Successful Section Update"); } *************** *** 242,250 **** else //everything was entered { ! $classinfo = mysql_query("select * from course where course_code='$classcode'",$db) or die('Cannot retrieve class information'.mysql_error()); //add class if(mysql_num_rows($classinfo)<=0) { ! mysql_query("insert into course (course_code,course_name,course_max_sections) values('$classcode','$classname','10')",$db) or die('Cannot add class'.mysql_error()); --- 242,250 ---- else //everything was entered { ! $classinfo = mysql_query("select * from ".$DB_prefix."_course where course_code='$classcode'",$db) or die('Cannot retrieve class information'.mysql_error()); //add class if(mysql_num_rows($classinfo)<=0) { ! mysql_query("insert into ".$DB_prefix."_course (course_code,course_name,course_max_sections) values('$classcode','$classname','10')",$db) or die('Cannot add class'.mysql_error()); *************** *** 253,257 **** else //modify class { ! mysql_query("update course set course_name = '$classname' where course_code='$classcode'",$db) or die('Cannot update class'.mysql_error()); printf("Successful Class Update"); } --- 253,257 ---- else //modify class { ! mysql_query("update ".$DB_prefix."_course set course_name = '$classname' where course_code='$classcode'",$db) or die('Cannot update class'.mysql_error()); printf("Successful Class Update"); } *************** *** 269,276 **** $courses = $_POST["courses"]; ! $sectioninfo = mysql_query("select * from enroll where course_code = '$courses'",$db) or die('Cannot retrieve enrollment'.mysql_error()); if(mysql_num_rows($sectioninfo)<=0) { ! $courseinfo = mysql_query("select * from course where course_code='$courses'",$db) or die('Cannot retrieve existing course'.mysql_error()); $row = mysql_fetch_array($courseinfo); if($row) --- 269,276 ---- $courses = $_POST["courses"]; ! $sectioninfo = mysql_query("select * from ".$DB_prefix."_enroll where course_code = '$courses'",$db) or die('Cannot retrieve enrollment'.mysql_error()); if(mysql_num_rows($sectioninfo)<=0) { ! $courseinfo = mysql_query("select * from ".$DB_prefix."_course where course_code='$courses'",$db) or die('Cannot retrieve existing course'.mysql_error()); $row = mysql_fetch_array($courseinfo); if($row) *************** *** 301,306 **** require('../includes/db_connect.php'); $coursecode = $_POST["coursecode"]; ! mysql_query("delete from section where course_code='$coursecode'",$db) or die('Cannot delete sections'.mysql_error()); ! mysql_query("delete from course where course_code='$coursecode'",$db) or die('Cannot delete course'.mysql_error()); echo "Class Information deleted"; } --- 301,306 ---- require('../includes/db_connect.php'); $coursecode = $_POST["coursecode"]; ! mysql_query("delete from ".$DB_prefix."_section where course_code='$coursecode'",$db) or die('Cannot delete sections'.mysql_error()); ! mysql_query("delete from ".$DB_prefix."_course where course_code='$coursecode'",$db) or die('Cannot delete course'.mysql_error()); echo "Class Information deleted"; } *************** *** 310,312 **** } ?> ! <?php require(INCLUDES_PATH."html_footer.php"); ?> \ No newline at end of file --- 310,312 ---- } ?> ! <?php require(INCLUDES_PATH."html_footer.php"); ?> Index: admin_submit_student.php =================================================================== RCS file: /cvsroot/etest/etest/administrator/admin_submit_student.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_submit_student.php 12 Dec 2003 18:55:03 -0000 1.3 --- admin_submit_student.php 2 Feb 2004 15:37:21 -0000 1.4 *************** *** 40,44 **** <?php require('../includes/db_connect.php'); ! $allcourses = mysql_query("select * from section order by course_code,section_code", $db) or die('Cannot retrieve existing course sections' . mysql_error()); while ($row = mysql_fetch_array($allcourses)) { --- 40,44 ---- <?php require('../includes/db_connect.php'); ! $allcourses = mysql_query("select * from ".$DB_prefix."_section order by course_code,section_code", $db) or die('Cannot retrieve existing course sections' . mysql_error()); while ($row = mysql_fetch_array($allcourses)) { *************** *** 62,66 **** $students = $_POST["students"]; require('../includes/db_connect.php'); ! $studentinfo = mysql_query("select * from student where student_code='$students'",$db) or die('Cannot retrieve existing student'.mysql_error()); $row = mysql_fetch_array($studentinfo); if($row) --- 62,66 ---- $students = $_POST["students"]; require('../includes/db_connect.php'); ! $studentinfo = mysql_query("select * from ".$DB_prefix."_student where student_code='$students'",$db) or die('Cannot retrieve existing student'.mysql_error()); $row = mysql_fetch_array($studentinfo); if($row) *************** *** 76,80 **** //create a string containing all enrolled courses in format coursecode-section,coursecode-section,etc. ! $enrollinfo = mysql_query("select * from enroll where student_code='$students'",$db) or die('Cannot retrieve enrollment'.mysql_error()); $enrolllist = ''; while($row = mysql_fetch_array($enrollinfo)) --- 76,80 ---- //create a string containing all enrolled courses in format coursecode-section,coursecode-section,etc. ! $enrollinfo = mysql_query("select * from ".$DB_prefix."_enroll where student_code='$students'",$db) or die('Cannot retrieve enrollment'.mysql_error()); $enrolllist = ''; while($row = mysql_fetch_array($enrollinfo)) *************** *** 96,100 **** <?php ! $allcourses = mysql_query("select * from section order by course_code,section_code", $db) or die('Cannot retrieve existing course sections' . mysql_error()); while ($row = mysql_fetch_array($allcourses)) { --- 96,100 ---- <?php ! $allcourses = mysql_query("select * from ".$DB_prefix."_section order by course_code,section_code", $db) or die('Cannot retrieve existing course sections' . mysql_error()); while ($row = mysql_fetch_array($allcourses)) { *************** *** 130,134 **** else //everything was entered { ! $studentinfo = mysql_query("select * from student where student_code='$studentcode'",$db) or die('Cannot retrieve student information'.mysql_error()); //add student if(mysql_num_rows($studentinfo)<=0) --- 130,134 ---- else //everything was entered { ! $studentinfo = mysql_query("select * from ".$DB_prefix."_student where student_code='$studentcode'",$db) or die('Cannot retrieve student information'.mysql_error()); //add student if(mysql_num_rows($studentinfo)<=0) *************** *** 145,149 **** else //password checked out { ! mysql_query("insert into student (student_code,student_firstname,student_lastname,student_password) values('$studentcode','$firstname','$lastname',md5($password))",$db) or die('Cannot add student'.mysql_error()); --- 145,149 ---- else //password checked out { ! mysql_query("insert into ".$DB_prefix."_student (student_code,student_firstname,student_lastname,student_password) values('$studentcode','$firstname','$lastname',md5($password))",$db) or die('Cannot add student'.mysql_error()); *************** *** 153,157 **** $coursedesc = substr($courseval,0,$pos); $coursesec = substr($courseval,$pos+1); ! mysql_query("insert into enroll (course_code,section_code,student_code) values('$coursedesc','$coursesec','$studentcode')",$db) or die('Cannot enroll student'.mysql_error()); } printf("Successful Student Addition"); --- 153,157 ---- $coursedesc = substr($courseval,0,$pos); $coursesec = substr($courseval,$pos+1); ! mysql_query("insert into ".$DB_prefix."_enroll (course_code,section_code,student_code) values('$coursedesc','$coursesec','$studentcode')",$db) or die('Cannot enroll student'.mysql_error()); } printf("Successful Student Addition"); *************** *** 163,171 **** if(($password=='') || ($passwordconfirm=='')) { ! mysql_query("update student set student_firstname = '$firstname', student_lastname='$lastname' where student_code='$studentcode'",$db) or die('Cannot update student'.mysql_error()); } else //update password also { ! mysql_query("update student set student_firstname = '$firstname', student_lastname='$lastname', student_password = md5($password) where student_code='$studentcode'",$db) or die('Cannot update student'.mysql_error()); } --- 163,171 ---- if(($password=='') || ($passwordconfirm=='')) { ! mysql_query("update ".$DB_prefix."_student set student_firstname = '$firstname', student_lastname='$lastname' where student_code='$studentcode'",$db) or die('Cannot update student'.mysql_error()); } else //update password also { ! mysql_query("update ".$DB_prefix."_student set student_firstname = '$firstname', student_lastname='$lastname', student_password = md5($password) where student_code='$studentcode'",$db) or die('Cannot update student'.mysql_error()); } *************** *** 180,184 **** if(!in_array($courseval,$_POST["courses"])) { ! mysql_query("delete from enroll where student_code='$studentcode' and course_code='$coursecode' and section_code='$sectioncode'",$db) or die('Cannot clear enrollments'.mysql_error()); --- 180,184 ---- if(!in_array($courseval,$_POST["courses"])) { ! mysql_query("delete from ".$DB_prefix."_enroll where student_code='$studentcode' and course_code='$coursecode' and section_code='$sectioncode'",$db) or die('Cannot clear enrollments'.mysql_error()); *************** *** 192,199 **** $coursecode = substr($courseval,0,$pos); $sectioncode = substr($courseval,$pos+1); ! $enrolllist = mysql_query("select * from enroll where student_code='$studentcode' and course_code='$coursecode' and section_code='$sectioncode'",$db) or die('Cannot retrieve enrollments'.mysql_error()); //if not already enrolled then enroll if(mysql_num_rows($enrolllist)<=0) ! mysql_query("insert into enroll (course_code,section_code,student_code) values('$coursecode','$sectioncode','$studentcode')",$db) or die('Cannot enroll student'.mysql_error()); } printf("Successful Student Update"); --- 192,199 ---- $coursecode = substr($courseval,0,$pos); $sectioncode = substr($courseval,$pos+1); ! $enrolllist = mysql_query("select * from ".$DB_prefix."_enroll where student_code='$studentcode' and course_code='$coursecode' and section_code='$sectioncode'",$db) or die('Cannot retrieve enrollments'.mysql_error()); //if not already enrolled then enroll if(mysql_num_rows($enrolllist)<=0) ! mysql_query("insert into ".$DB_prefix."_enroll (course_code,section_code,student_code) values('$coursecode','$sectioncode','$studentcode')",$db) or die('Cannot enroll student'.mysql_error()); } printf("Successful Student Update"); *************** *** 211,215 **** $students = $_POST["students"]; require('../includes/db_connect.php'); ! $studentinfo = mysql_query("select * from student where student_code='$students'",$db) or die('Cannot retrieve existing student'.mysql_error()); $row = mysql_fetch_array($studentinfo); if($row) --- 211,215 ---- $students = $_POST["students"]; require('../includes/db_connect.php'); ! $studentinfo = mysql_query("select * from ".$DB_prefix."_student where student_code='$students'",$db) or die('Cannot retrieve existing student'.mysql_error()); $row = mysql_fetch_array($studentinfo); if($row) *************** *** 238,244 **** require('../includes/db_connect.php'); $students = $_POST["studentcode"]; ! mysql_query("delete from completedtests where student_code=$students",$db) or die('Cannot delete student tests'.mysql_error()); ! mysql_query("delete from enroll where student_code=$students",$db) or die('Cannot delete student enrollment'.mysql_error()); ! mysql_query("delete from student where student_code=$students",$db) or die('Cannot delete student information'.mysql_error()); echo "Student Information deleted"; } --- 238,244 ---- require('../includes/db_connect.php'); $students = $_POST["studentcode"]; ! mysql_query("delete from ".$DB_prefix."_completedtests where student_code=$students",$db) or die('Cannot delete student tests'.mysql_error()); ! mysql_query("delete from ".$DB_prefix."_enroll where student_code=$students",$db) or die('Cannot delete student enrollment'.mysql_error()); ! mysql_query("delete from ".$DB_prefix."_student where student_code=$students",$db) or die('Cannot delete student information'.mysql_error()); echo "Student Information deleted"; } *************** *** 249,251 **** ?> ! <?php require(INCLUDES_PATH."html_footer.php"); ?> \ No newline at end of file --- 249,251 ---- ?> ! <?php require(INCLUDES_PATH."html_footer.php"); ?> Index: admin_submit_teacher.php =================================================================== RCS file: /cvsroot/etest/etest/administrator/admin_submit_teacher.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_submit_teacher.php 12 Dec 2003 18:55:49 -0000 1.1 --- admin_submit_teacher.php 2 Feb 2004 15:37:21 -0000 1.2 *************** *** 51,55 **** $teachers = $_POST["teachers"]; require('../includes/db_connect.php'); ! $teacherinfo = mysql_query("select * from instructor where inst_code='$teachers'",$db) or die('Cannot retrieve existing teacher'.mysql_error()); $row = mysql_fetch_array($teacherinfo); if($row) --- 51,55 ---- $teachers = $_POST["teachers"]; require('../includes/db_connect.php'); ! $teacherinfo = mysql_query("select * from ".$DB_prefix."_instructor where inst_code='$teachers'",$db) or die('Cannot retrieve existing teacher'.mysql_error()); $row = mysql_fetch_array($teacherinfo); if($row) *************** *** 96,100 **** else //everything was entered { ! $teacherinfo = mysql_query("select * from instructor where inst_code='$instcode'",$db) or die('Cannot retrieve teacher information'.mysql_error()); //add teacher if(mysql_num_rows($teacherinfo)<=0) --- 96,100 ---- else //everything was entered { ! $teacherinfo = mysql_query("select * from ".$DB_prefix."_instructor where inst_code='$instcode'",$db) or die('Cannot retrieve teacher information'.mysql_error()); //add teacher if(mysql_num_rows($teacherinfo)<=0) *************** *** 112,116 **** { $password = md5($password); ! mysql_query("insert into instructor (inst_code,inst_firstname,inst_lastname,inst_password) values('$instcode','$firstname','$lastname','$password')",$db) or die('Cannot add teacher'.mysql_error()); --- 112,116 ---- { $password = md5($password); ! mysql_query("insert into ".$DB_prefix."_instructor (inst_code,inst_firstname,inst_lastname,inst_password) values('$instcode','$firstname','$lastname','$password')",$db) or die('Cannot add teacher'.mysql_error()); *************** *** 123,132 **** if(($password=='') || ($passwordconfirm=='')) { ! mysql_query("update instructor set inst_firstname = '$firstname', inst_lastname='$lastname' where inst_code='$instcode'",$db) or die('Cannot update teacher'.mysql_error()); } else //update password also { $password = md5($password); ! mysql_query("update instructor set inst_firstname = '$firstname', inst_lastname='$lastname', inst_password = '$password' where inst_code='$instcode'",$db) or die('Cannot update teacher'.mysql_error()); } printf("Successful Teacher Update"); --- 123,132 ---- if(($password=='') || ($passwordconfirm=='')) { ! mysql_query("update ".$DB_prefix."_instructor set inst_firstname = '$firstname', inst_lastname='$lastname' where inst_code='$instcode'",$db) or die('Cannot update teacher'.mysql_error()); } else //update password also { $password = md5($password); ! mysql_query("update ".$DB_prefix."_instructor set inst_firstname = '$firstname', inst_lastname='$lastname', inst_password = '$password' where inst_code='$instcode'",$db) or die('Cannot update teacher'.mysql_error()); } printf("Successful Teacher Update"); *************** *** 144,150 **** $teachers = $_POST["teachers"]; require('../includes/db_connect.php'); ! $course = mysql_query("select * from section s, enroll e where s.course_code = e.course_code and s.section_code = e.section_code and s.inst_code='$teachers'",$db) or die('Cannot check enrollment for teachers sections'.mysql_error()); ! $test = mysql_query("select * from section s,test t where s.course_code = t.course_code and s.section_code = t.section_code and s.inst_code='$teachers'",$db) or die('Cannot check tests for teachers sections'.mysql_error()); --- 144,150 ---- $teachers = $_POST["teachers"]; require('../includes/db_connect.php'); ! $course = mysql_query("select * from ".$DB_prefix."_section s, ".$DB_prefix."_enroll e where s.course_code = e.course_code and s.section_code = e.section_code and s.inst_code='$teachers'",$db) or die('Cannot check enrollment for teachers sections'.mysql_error()); ! $test = mysql_query("select * from ".$DB_prefix."_section s,".$DB_prefix."_test t where s.course_code = t.course_code and s.section_code = t.section_code and s.inst_code='$teachers'",$db) or die('Cannot check tests for teachers sections'.mysql_error()); *************** *** 152,156 **** if((mysql_num_rows($course)<=0) && (mysql_num_rows($test)<=0)) { ! $teacherinfo = mysql_query("select * from instructor where inst_code='$teachers'",$db) or die('Cannot retrieve existing teacher'.mysql_error()); $row = mysql_fetch_array($teacherinfo); if($row) --- 152,156 ---- if((mysql_num_rows($course)<=0) && (mysql_num_rows($test)<=0)) { ! $teacherinfo = mysql_query("select * from ".$DB_prefix."_instructor where inst_code='$teachers'",$db) or die('Cannot retrieve existing teacher'.mysql_error()); $row = mysql_fetch_array($teacherinfo); if($row) *************** *** 182,187 **** require('../includes/db_connect.php'); $teachers = $_POST["instcode"]; ! mysql_query("delete from section where inst_code=$teachers",$db) or die('Cannot delete teacher courses'.mysql_error()); ! mysql_query("delete from instructor where inst_code=$teachers",$db) or die('Cannot delete teacher information'.mysql_error()); echo "Teacher Information deleted"; } --- 182,187 ---- require('../includes/db_connect.php'); $teachers = $_POST["instcode"]; ! mysql_query("delete from ".$DB_prefix."_section where inst_code=$teachers",$db) or die('Cannot delete teacher courses'.mysql_error()); ! mysql_query("delete from ".$DB_prefix."_instructor where inst_code=$teachers",$db) or die('Cannot delete teacher information'.mysql_error()); echo "Teacher Information deleted"; } *************** *** 191,193 **** } ?> ! <?php require(INCLUDES_PATH."html_footer.php"); ?> \ No newline at end of file --- 191,193 ---- } ?> ! <?php require(INCLUDES_PATH."html_footer.php"); ?> |
From: <cpj...@pr...> - 2004-02-01 03:06:58
|
Update of /cvsroot/etest/etest/student In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26456/etest/student Modified Files: student_select_test.php Log Message: fixed query with DB_prefix Index: student_select_test.php =================================================================== RCS file: /cvsroot/etest/etest/student/student_select_test.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** student_select_test.php 27 Jan 2004 16:40:48 -0000 1.9 --- student_select_test.php 1 Feb 2004 03:05:10 -0000 1.10 *************** *** 27,31 **** $_SESSION['test_completed'] = false; // student hasnt taken test at this point ! $sql_query = "SELECT * FROM ".$DB_prefix."_enroll INNER JOIN course ON ".$DB_prefix."_enroll.Course_Code = ".$DB_prefix."_course.Course_Code WHERE ".$DB_prefix."_enroll.Student_Code='".$_SESSION['username']."'"; $query_result = mysql_query($sql_query, $db) or die('Cannot run enroll classes query '.mysql_error()); $query_num = mysql_num_rows($query_result); --- 27,31 ---- $_SESSION['test_completed'] = false; // student hasnt taken test at this point ! $sql_query = "SELECT * FROM ".$DB_prefix."_enroll INNER JOIN ".$DB_prefix."_course ON ".$DB_prefix."_enroll.Course_Code = ".$DB_prefix."_course.Course_Code WHERE ".$DB_prefix."_enroll.Student_Code='".$_SESSION['username']."'"; $query_result = mysql_query($sql_query, $db) or die('Cannot run enroll classes query '.mysql_error()); $query_num = mysql_num_rows($query_result); |
Update of /cvsroot/etest/etest/student In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23277/student Modified Files: student_grade.php student_home.php student_select_test.php student_submit_test.php student_view_grade.php student_view_test.php Log Message: updated querys to use DB_prefix -- craig Index: student_grade.php =================================================================== RCS file: /cvsroot/etest/etest/student/student_grade.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** student_grade.php 10 Dec 2003 03:58:59 -0000 1.13 --- student_grade.php 27 Jan 2004 16:40:48 -0000 1.14 *************** *** 40,44 **** if (substr($_SESSION['selected_test'], 0, 1) == "0") { ! $sql_query = "SELECT * FROM test,completedtests WHERE test.Test_Code=completedtests.Test_Code AND Section_Code ='".$_SESSION['section']."' AND Course_Code = '".$_SESSION['course']."' AND completedtests.Student_Code='".$_SESSION['username']."' ORDER BY test.Test_Code"; $query_result = mysql_query($sql_query, $db) or die ('Cannot run view all grades query ' . mysql_error()); $query_num = mysql_num_rows($query_result); --- 40,44 ---- if (substr($_SESSION['selected_test'], 0, 1) == "0") { ! $sql_query = "SELECT * FROM ".$DB_prefix."_test, ".$DB_prefix."_completedtests WHERE ".$DB_prefix."_test.Test_Code=".$DB_prefix."_completedtests.Test_Code AND Section_Code ='".$_SESSION['section']."' AND Course_Code = '".$_SESSION['course']."' AND ".$DB_prefix."_completedtests.Student_Code='".$_SESSION['username']."' ORDER BY ".$DB_prefix."_test.Test_Code"; $query_result = mysql_query($sql_query, $db) or die ('Cannot run view all grades query ' . mysql_error()); $query_num = mysql_num_rows($query_result); *************** *** 52,56 **** } ! $sql_query = "SELECT * FROM test, completedtests WHERE completedtests.Student_Code = '".$_SESSION['username']."' AND test.Test_Code=completedtests.Test_Code"; $query_result = mysql_query($sql_query, $db) or die ('Cannot run view test grades query '.mysql_error()); $query_num = mysql_num_rows($query_result); --- 52,56 ---- } ! $sql_query = "SELECT * FROM ".$DB_prefix."_test, ".$DB_prefix."_completedtests WHERE ".$DB_prefix."_completedtests.Student_Code = '".$_SESSION['username']."' AND ".$DB_prefix."_test.Test_Code=".$DB_prefix."_completedtests.Test_Code"; $query_result = mysql_query($sql_query, $db) or die ('Cannot run view test grades query '.mysql_error()); $query_num = mysql_num_rows($query_result); *************** *** 68,72 **** $test_code = substr($_SESSION['selected_test'], $found_space - 1, $next_space - $found_space - 1); ! $sql_query = "SELECT * FROM completedtests WHERE completedtests.Student_Code = '".$_SESSION['username']."' AND completedtests.Test_Code = '".$test_code."'"; $query_result = mysql_query($sql_query, $db) or die ('Cannot run view test grades query '.mysql_error()); $query_num = mysql_num_rows($query_result); --- 68,72 ---- $test_code = substr($_SESSION['selected_test'], $found_space - 1, $next_space - $found_space - 1); ! $sql_query = "SELECT * FROM ".$DB_prefix."_completedtests WHERE ".$DB_prefix."_completedtests.Student_Code = '".$_SESSION['username']."' AND ".$DB_prefix."_completedtests.Test_Code = '".$test_code."'"; $query_result = mysql_query($sql_query, $db) or die ('Cannot run view test grades query '.mysql_error()); $query_num = mysql_num_rows($query_result); *************** *** 91,95 **** for ($y=1; $y < $x; $y++) { ! $sql_query = "SELECT * FROM test WHERE Test_Code='".$tests[$y][0]."'"; $query_result = mysql_query($sql_query, $db); $query_row = mysql_fetch_assoc($query_result); --- 91,95 ---- for ($y=1; $y < $x; $y++) { ! $sql_query = "SELECT * FROM ".$DB_prefix."_test WHERE Test_Code='".$tests[$y][0]."'"; $query_result = mysql_query($sql_query, $db); $query_row = mysql_fetch_assoc($query_result); *************** *** 136,138 **** <?php include('../includes/html_student_footer.php'); ! ?> \ No newline at end of file --- 136,138 ---- <?php include('../includes/html_student_footer.php'); ! ?> Index: student_home.php =================================================================== RCS file: /cvsroot/etest/etest/student/student_home.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** student_home.php 27 Jan 2004 16:28:12 -0000 1.24 --- student_home.php 27 Jan 2004 16:40:48 -0000 1.25 *************** *** 54,58 **** $password = addslashes($_POST['password']); $password = md5($password); ! $query = "SELECT * FROM '$DB_prefix'_student WHERE Student_Code = $username AND Student_Password = $password"; $result = mysql_query($query, $db) or die('Cannot run login query ' . mysql_error()); $count = mysql_num_rows($result); --- 54,58 ---- $password = addslashes($_POST['password']); $password = md5($password); ! $query = "SELECT * FROM ".$DB_prefix."_student WHERE Student_Code = '$username' AND Student_Password = '$password'"; $result = mysql_query($query, $db) or die('Cannot run login query ' . mysql_error()); $count = mysql_num_rows($result); Index: student_select_test.php =================================================================== RCS file: /cvsroot/etest/etest/student/student_select_test.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** student_select_test.php 11 Dec 2003 02:18:35 -0000 1.8 --- student_select_test.php 27 Jan 2004 16:40:48 -0000 1.9 *************** *** 27,31 **** $_SESSION['test_completed'] = false; // student hasnt taken test at this point ! $sql_query = "SELECT * FROM enroll INNER JOIN course ON enroll.Course_Code = course.Course_Code WHERE enroll.Student_Code='".$_SESSION['username']."'"; $query_result = mysql_query($sql_query, $db) or die('Cannot run enroll classes query '.mysql_error()); $query_num = mysql_num_rows($query_result); --- 27,31 ---- $_SESSION['test_completed'] = false; // student hasnt taken test at this point ! $sql_query = "SELECT * FROM ".$DB_prefix."_enroll INNER JOIN course ON ".$DB_prefix."_enroll.Course_Code = ".$DB_prefix."_course.Course_Code WHERE ".$DB_prefix."_enroll.Student_Code='".$_SESSION['username']."'"; $query_result = mysql_query($sql_query, $db) or die('Cannot run enroll classes query '.mysql_error()); $query_num = mysql_num_rows($query_result); *************** *** 35,39 **** <?php /* First display all the classes that the student is enrolled in */ ! $sql_query = "SELECT enroll.Course_Code, enroll.Section_Code, Course_Name FROM enroll INNER JOIN course ON enroll.Course_Code = course.Course_Code WHERE enroll.Student_Code='".$_SESSION['username']."' ORDER BY course.Course_Code"; $query_result = mysql_query($sql_query, $db) or die ('Cannot run enroll classes query '.mysql_error()); --- 35,39 ---- <?php /* First display all the classes that the student is enrolled in */ ! $sql_query = "SELECT ".$DB_prefix."_enroll.Course_Code, ".$DB_prefix."_enroll.Section_Code, Course_Name FROM ".$DB_prefix."_enroll INNER JOIN ".$DB_prefix."_course ON ".$DB_prefix."_enroll.Course_Code = ".$DB_prefix."_course.Course_Code WHERE ".$DB_prefix."_enroll.Student_Code='".$_SESSION['username']."' ORDER BY ".$DB_prefix."_course.Course_Code"; $query_result = mysql_query($sql_query, $db) or die ('Cannot run enroll classes query '.mysql_error()); *************** *** 92,100 **** /* Check for all available test to be taken for selected course */ ! $test_query = "select * from test where Course_Code='".$_SESSION['course']."' and Section_Code='".$_SESSION['section']."' order by Test_Code;"; $test_result = mysql_query($test_query, $db) or die('Cannot execute tests available query '.mysql_error()); $test_count = mysql_num_rows($test_result); ! $complete_query = "select * from completedtests where completedtests.Student_Code='".$_SESSION['username']."' order by Test_Code;"; $complete_result = mysql_query($complete_query, $db) or die('Cannot execute completed tests query '.mysql_error()); $complete_count = mysql_num_rows($complete_result); --- 92,100 ---- /* Check for all available test to be taken for selected course */ ! $test_query = "select * from ".$DB_prefix."_test where Course_Code='".$_SESSION['course']."' and Section_Code='".$_SESSION['section']."' order by Test_Code;"; $test_result = mysql_query($test_query, $db) or die('Cannot execute tests available query '.mysql_error()); $test_count = mysql_num_rows($test_result); ! $complete_query = "select * from ".$DB_prefix."_completedtests where ".$DB_prefix."_completedtests.Student_Code='".$_SESSION['username']."' order by Test_Code;"; $complete_result = mysql_query($complete_query, $db) or die('Cannot execute completed tests query '.mysql_error()); $complete_count = mysql_num_rows($complete_result); *************** *** 134,141 **** <?php /* All tests */ ! $test_query = "select * from test where Course_Code='".$_SESSION['course']."' and Section_Code='".$_SESSION['section']."' order by Test_Code;"; $test_result = mysql_query($test_query, $db) or die('Cannot execute tests available query '.mysql_error()); /* Completed tests */ ! $complete_query = "select * from completedtests where completedtests.Student_Code='".$_SESSION['username']."' order by Test_Code;"; $complete_result = mysql_query($complete_query, $db) or die('Cannot execute completed tests query '.mysql_error()); --- 134,141 ---- <?php /* All tests */ ! $test_query = "select * from ".$DB_prefix."_test where Course_Code='".$_SESSION['course']."' and Section_Code='".$_SESSION['section']."' order by Test_Code;"; $test_result = mysql_query($test_query, $db) or die('Cannot execute tests available query '.mysql_error()); /* Completed tests */ ! $complete_query = "select * from ".$DB_prefix."_completedtests where ".$DB_prefix."_completedtests.Student_Code='".$_SESSION['username']."' order by Test_Code;"; $complete_result = mysql_query($complete_query, $db) or die('Cannot execute completed tests query '.mysql_error()); Index: student_submit_test.php =================================================================== RCS file: /cvsroot/etest/etest/student/student_submit_test.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** student_submit_test.php 22 Dec 2003 13:58:55 -0000 1.13 --- student_submit_test.php 27 Jan 2004 16:40:48 -0000 1.14 *************** *** 151,155 **** for ( ; $question_counter <= $_SESSION['mc_count']; $question_counter++) { ! $query = "select * from question where Test_Code='".$_SESSION['selected_test']."' and Question_Number = '".$question_counter."'"; $result = mysql_query($query, $db); $row = mysql_fetch_assoc($result); --- 151,155 ---- for ( ; $question_counter <= $_SESSION['mc_count']; $question_counter++) { ! $query = "select * from ".$DB_prefix."_question where Test_Code='".$_SESSION['selected_test']."' and Question_Number = '".$question_counter."'"; $result = mysql_query($query, $db); $row = mysql_fetch_assoc($result); *************** *** 168,172 **** for ( ; $question_counter <= $_SESSION['mc_count']; $question_counter++) { ! $query = "select * from question where Test_Code='".$_SESSION['selected_test']."' and Question_Number = '".$question_counter."'"; $result = mysql_query($query, $db); $row = mysql_fetch_assoc($result); --- 168,172 ---- for ( ; $question_counter <= $_SESSION['mc_count']; $question_counter++) { ! $query = "select * from ".$DB_prefix."_question where Test_Code='".$_SESSION['selected_test']."' and Question_Number = '".$question_counter."'"; $result = mysql_query($query, $db); $row = mysql_fetch_assoc($result); *************** *** 185,189 **** for ( ; $question_counter <= $_SESSION['mtf_count']; $question_counter++) { ! $query = "select * from question where Test_Code='".$_SESSION['selected_test']."' and Question_Number = '".$question_counter."'"; $result = mysql_query($query, $db); $row = mysql_fetch_assoc($result); --- 185,189 ---- for ( ; $question_counter <= $_SESSION['mtf_count']; $question_counter++) { ! $query = "select * from ".$DB_prefix."_question where Test_Code='".$_SESSION['selected_test']."' and Question_Number = '".$question_counter."'"; $result = mysql_query($query, $db); $row = mysql_fetch_assoc($result); *************** *** 225,229 **** for ( ; $question_counter <= $_SESSION['match_count']; $question_counter++) { ! $query = "select * from question where Test_Code='".$_SESSION['selected_test']."' and Question_Number = '".$question_counter."'"; $result = mysql_query($query, $db); $row = mysql_fetch_assoc($result); --- 225,229 ---- for ( ; $question_counter <= $_SESSION['match_count']; $question_counter++) { ! $query = "select * from ".$DB_prefix."_question where Test_Code='".$_SESSION['selected_test']."' and Question_Number = '".$question_counter."'"; $result = mysql_query($query, $db); $row = mysql_fetch_assoc($result); *************** *** 242,246 **** for ( ; $question_counter <= $_SESSION['comp_count']; $question_counter++) { ! $query = "select * from question where Test_Code='".$_SESSION['selected_test']."' and Question_Number = '".$question_counter."'"; $result = mysql_query($query, $db); $row = mysql_fetch_assoc($result); --- 242,246 ---- for ( ; $question_counter <= $_SESSION['comp_count']; $question_counter++) { ! $query = "select * from ".$DB_prefix."_question where Test_Code='".$_SESSION['selected_test']."' and Question_Number = '".$question_counter."'"; $result = mysql_query($query, $db); $row = mysql_fetch_assoc($result); *************** *** 259,263 **** for ( ; $question_counter <= $_SESSION['sa_count']; $question_counter++) { ! $query = "select * from question where Test_Code='".$_SESSION['selected_test']."' and Question_Number = '".$question_counter."'"; $result = mysql_query($query, $db); $row = mysql_fetch_assoc($result); --- 259,263 ---- for ( ; $question_counter <= $_SESSION['sa_count']; $question_counter++) { ! $query = "select * from ".$DB_prefix."_question where Test_Code='".$_SESSION['selected_test']."' and Question_Number = '".$question_counter."'"; $result = mysql_query($query, $db); $row = mysql_fetch_assoc($result); *************** *** 285,289 **** $incorrect_answers = substr($incorrect_answers, 0 , strlen($incorrect_answers) - 1); ! $sql_query = "insert into `completedtests` (`Student_Code`, `Test_Code`, `Correct_Answers`, `Total_Questions`, `Incorrect_Answers`) "; $sql_query .= "values (`".$_SESSION['username']."`, `".$_SESSION['selected_test']."`, `".$correct_answer_count."`, `".($question_counter - 1)."`, `".$incorrect_answers."`)"; //$result = mysql_query($sql_query, $db); --- 285,289 ---- $incorrect_answers = substr($incorrect_answers, 0 , strlen($incorrect_answers) - 1); ! $sql_query = "insert into `".$DB_prefix."_completedtests` (`Student_Code`, `Test_Code`, `Correct_Answers`, `Total_Questions`, `Incorrect_Answers`) "; $sql_query .= "values (`".$_SESSION['username']."`, `".$_SESSION['selected_test']."`, `".$correct_answer_count."`, `".($question_counter - 1)."`, `".$incorrect_answers."`)"; //$result = mysql_query($sql_query, $db); Index: student_view_grade.php =================================================================== RCS file: /cvsroot/etest/etest/student/student_view_grade.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** student_view_grade.php 11 Dec 2003 02:18:35 -0000 1.20 --- student_view_grade.php 27 Jan 2004 16:40:48 -0000 1.21 *************** *** 32,36 **** <?php ! $course_query = "SELECT * FROM enroll INNER JOIN course ON enroll.Course_Code = course.Course_Code WHERE enroll.Student_Code='$student_code' ORDER BY course.Course_Code"; $course_result = mysql_query($course_query, $db) or die ('Cannot run course query ' . mysql_error()); $num_course = mysql_num_rows($course_result); --- 32,36 ---- <?php ! $course_query = "SELECT * FROM ".$DB_prefix."_enroll INNER JOIN ".$DB_prefix."_course ON ".$DB_prefix."_enroll.Course_Code = ".$DB_prefix."_course.Course_Code WHERE ".$DB_prefix."_enroll.Student_Code='$student_code' ORDER BY ".$DB_prefix."_course.Course_Code"; $course_result = mysql_query($course_query, $db) or die ('Cannot run course query ' . mysql_error()); $num_course = mysql_num_rows($course_result); *************** *** 102,106 **** echo $_SESSION['course_name']."</h4>"; ! $sql_query = "SELECT * FROM completedtests, test WHERE Student_Code='".$_SESSION['username']."' AND completedtests.Test_Code = test.Test_Code AND test.Course_Code='".$_SESSION['course']."' AND test.Section_Code='".$_SESSION['section']."'"; $query_result = mysql_query($sql_query, $db) or die ('Cannot run grades available query ' . mysql_error()); $query_num = mysql_num_rows($query_result); --- 102,106 ---- echo $_SESSION['course_name']."</h4>"; ! $sql_query = "SELECT * FROM ".$DB_prefix."_completedtests, ".$DB_prefix."_test WHERE Student_Code='".$_SESSION['username']."' AND ".$DB_prefix."_completedtests.Test_Code = ".$DB_prefix."_test.Test_Code AND ".$DB_prefix."_test.Course_Code='".$_SESSION['course']."' AND ".$DB_prefix."_test.Section_Code='".$_SESSION['section']."'"; $query_result = mysql_query($sql_query, $db) or die ('Cannot run grades available query ' . mysql_error()); $query_num = mysql_num_rows($query_result); Index: student_view_test.php =================================================================== RCS file: /cvsroot/etest/etest/student/student_view_test.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** student_view_test.php 14 Dec 2003 18:26:11 -0000 1.18 --- student_view_test.php 27 Jan 2004 16:40:48 -0000 1.19 *************** *** 31,35 **** /*********************/ require("../includes/db_connect.php"); ! $sql_query = "select Test_Name, Test_Instructions from test where Test_Code='".$_SESSION['selected_test']."'"; $query_result = mysql_query($sql_query, $db); $query_row = mysql_fetch_assoc($query_result); --- 31,35 ---- /*********************/ require("../includes/db_connect.php"); ! $sql_query = "select Test_Name, Test_Instructions from ".$DB_prefix."_test where Test_Code='".$_SESSION['selected_test']."'"; $query_result = mysql_query($sql_query, $db); $query_row = mysql_fetch_assoc($query_result); *************** *** 44,48 **** <?php ! $sql_query = "select * from question where Test_Code='".$_SESSION['selected_test']."' order by Question_Number"; $query_result = mysql_query($sql_query, $db); --- 44,48 ---- <?php ! $sql_query = "select * from ".$DB_prefix."_question where Test_Code='".$_SESSION['selected_test']."' order by Question_Number"; $query_result = mysql_query($sql_query, $db); |
From: <cpj...@pr...> - 2004-01-27 16:29:22
|
Update of /cvsroot/etest/etest/student In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19813/student Modified Files: student_home.php Log Message: updated querys to use DB_prefix -- craig Index: student_home.php =================================================================== RCS file: /cvsroot/etest/etest/student/student_home.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** student_home.php 16 Dec 2003 15:55:43 -0000 1.23 --- student_home.php 27 Jan 2004 16:28:12 -0000 1.24 *************** *** 54,58 **** $password = addslashes($_POST['password']); $password = md5($password); ! $query = "SELECT * FROM student WHERE Student_Code = '$username' AND Student_Password = '$password'"; $result = mysql_query($query, $db) or die('Cannot run login query ' . mysql_error()); $count = mysql_num_rows($result); --- 54,58 ---- $password = addslashes($_POST['password']); $password = md5($password); ! $query = "SELECT * FROM '$DB_prefix'_student WHERE Student_Code = $username AND Student_Password = $password"; $result = mysql_query($query, $db) or die('Cannot run login query ' . mysql_error()); $count = mysql_num_rows($result); |
From: <cpj...@pr...> - 2004-01-27 16:24:35
|
Update of /cvsroot/etest/etest/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18672/doc Modified Files: INSTALL README Log Message: updates -- craig Index: INSTALL =================================================================== RCS file: /cvsroot/etest/etest/doc/INSTALL,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** INSTALL 27 Jan 2004 15:18:40 -0000 1.1 --- INSTALL 27 Jan 2004 16:23:30 -0000 1.2 *************** *** 11,12 **** --- 11,18 ---- * setup MySQL database with supplied etest_mysql_import.sql file * setup ./includes/configure.php file with proper values + + ** + some initial database data is included to get you started with. + you could start from scratch yourself and delete all the demo + data or use our demo info as a guide to get started with. + ** Index: README =================================================================== RCS file: /cvsroot/etest/etest/doc/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 27 Jan 2004 15:18:40 -0000 1.1 --- README 27 Jan 2004 16:23:30 -0000 1.2 *************** *** 9,24 **** ! ======= ! INSTALL ! ======= Read the 'INSTALL' file for more detailed directions. ! === ! RUN ! === Point your browser to the etest root directory. ! ======== \ No newline at end of file --- 9,24 ---- ! =========== ! | INSTALL | ! =========== Read the 'INSTALL' file for more detailed directions. ! ========== ! | RUN | ! ========== Point your browser to the etest root directory. ! ======================================================= |
From: <cpj...@pr...> - 2004-01-27 16:17:07
|
Update of /cvsroot/etest/etest/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16649/includes Modified Files: configure.php Log Message: fixed documentation -- craig Index: configure.php =================================================================== RCS file: /cvsroot/etest/etest/includes/configure.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** configure.php 27 Jan 2004 15:33:41 -0000 1.33 --- configure.php 27 Jan 2004 16:16:04 -0000 1.34 *************** *** 17,21 **** /* DB_NAME => the name of the DB to use /* DB_PREFIX => the table name prefix in the DB ! /* (this defaults to "etest") /* /****************************************************************/ --- 17,24 ---- /* DB_NAME => the name of the DB to use /* DB_PREFIX => the table name prefix in the DB ! /* (this defaults to "etest" -- if you change ! /* the prefix, you will need to manually ! /* update the table names in the DB with ! /* the new prefix value.) /* /****************************************************************/ |
From: <cpj...@pr...> - 2004-01-27 16:16:20
|
Update of /cvsroot/etest/etest/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16410/doc Modified Files: etest_mysql_import.sql Log Message: updated import file with new table prefix names -- craig Index: etest_mysql_import.sql =================================================================== RCS file: /cvsroot/etest/etest/doc/etest_mysql_import.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** etest_mysql_import.sql 27 Jan 2004 15:18:41 -0000 1.1 --- etest_mysql_import.sql 27 Jan 2004 16:15:08 -0000 1.2 *************** *** 3,25 **** # http://www.phpmyadmin.net # ! # Host: localhost ! # Generation Time: Dec 10, 2003 at 05:52 PM ! # Server version: 4.0.12 ! # PHP Version: 4.3.1 ! # # Database : `etest` ! # # -------------------------------------------------------- # ! # Table structure for table `administrator` # ! # Creation: Dec 10, 2003 at 05:48 PM ! # Last update: Dec 10, 2003 at 05:48 PM # ! DROP TABLE IF EXISTS `administrator`; ! CREATE TABLE `administrator` ( `Admin_Code` char(3) NOT NULL default '', `Admin_LastName` varchar(20) NOT NULL default '', --- 3,25 ---- # http://www.phpmyadmin.net # ! # Host: mysql ! # Generation Time: Jan 27, 2004 at 07:43 AM ! # Server version: 3.23.54 ! # PHP Version: 4.1.2 ! # # Database : `etest` ! # # -------------------------------------------------------- # ! # Table structure for table `etest_administrator` # ! # Creation: Jan 11, 2004 at 08:02 PM ! # Last update: Jan 11, 2004 at 08:02 PM # ! DROP TABLE IF EXISTS `etest_administrator`; ! CREATE TABLE `etest_administrator` ( `Admin_Code` char(3) NOT NULL default '', `Admin_LastName` varchar(20) NOT NULL default '', *************** *** 33,52 **** # ! # Dumping data for table `administrator` # ! INSERT INTO `administrator` (`Admin_Code`, `Admin_LastName`, `Admin_FirstName`, `Admin_Password`) VALUES ('001', 'Musgrave', 'Philip', 'cfcd208495d565ef66e7dff9f98764da'); # -------------------------------------------------------- # ! # Table structure for table `completedtests` # ! # Creation: Dec 10, 2003 at 05:48 PM ! # Last update: Dec 10, 2003 at 05:48 PM # ! DROP TABLE IF EXISTS `completedtests`; ! CREATE TABLE `completedtests` ( `Student_Code` char(3) NOT NULL default '', `Test_Code` int(11) NOT NULL default '0', --- 33,52 ---- # ! # Dumping data for table `etest_administrator` # ! INSERT INTO `etest_administrator` (`Admin_Code`, `Admin_LastName`, `Admin_FirstName`, `Admin_Password`) VALUES ('001', 'Musgrave', 'Philip', 'cfcd208495d565ef66e7dff9f98764da'); # -------------------------------------------------------- # ! # Table structure for table `etest_completedtests` # ! # Creation: Jan 11, 2004 at 08:02 PM ! # Last update: Jan 11, 2004 at 08:02 PM # ! DROP TABLE IF EXISTS `etest_completedtests`; ! CREATE TABLE `etest_completedtests` ( `Student_Code` char(3) NOT NULL default '', `Test_Code` int(11) NOT NULL default '0', *************** *** 65,75 **** # ! # Dumping data for table `completedtests` # ! INSERT INTO `completedtests` (`Student_Code`, `Test_Code`, `Correct_Answers`, `Total_Questions`, `Incorrect_Answers`) VALUES ('100', 2, '20', '30', '1|A|2|A|4|A|5|A|6|TRUE|10|TRUE|16|A|17|A|19|A|20|A'), ('100', 4, '11', '15', '1|TRUE|4|TRUE|5|TRUE|9|TRUE'), ('100', 5, '20', '25', '4|A|5|C|9|TRUE|11|TRUE|22|stored'), - ('100', 6, '6', '15', '3|FALSE|4|TRUE|6|FALSE, hard|7|b|8|d|10|a|11|logic|12|thinking|13|i don\'t know|14|testing'), ('100', 11, '12', '15', '12|best|13|fastest|15|more'); --- 65,74 ---- # ! # Dumping data for table `etest_completedtests` # ! INSERT INTO `etest_completedtests` (`Student_Code`, `Test_Code`, `Correct_Answers`, `Total_Questions`, `Incorrect_Answers`) VALUES ('100', 2, '20', '30', '1|A|2|A|4|A|5|A|6|TRUE|10|TRUE|16|A|17|A|19|A|20|A'), ('100', 4, '11', '15', '1|TRUE|4|TRUE|5|TRUE|9|TRUE'), ('100', 5, '20', '25', '4|A|5|C|9|TRUE|11|TRUE|22|stored'), ('100', 11, '12', '15', '12|best|13|fastest|15|more'); *************** *** 77,102 **** # ! # Table structure for table `course` # ! # Creation: Dec 10, 2003 at 05:48 PM ! # Last update: Dec 10, 2003 at 05:48 PM # ! DROP TABLE IF EXISTS `course`; ! CREATE TABLE `course` ( `Course_Code` varchar(5) NOT NULL default '', `Course_Name` varchar(30) NOT NULL default '', `Course_Max_Sections` varchar(5) default '10', PRIMARY KEY (`Course_Code`), - UNIQUE KEY `Course_Name` (`Course_Name`), UNIQUE KEY `Course_Code` (`Course_Code`), KEY `Course_Max_Sections` (`Course_Max_Sections`) ) TYPE=MyISAM; # ! # Dumping data for table `course` # ! INSERT INTO `course` (`Course_Code`, `Course_Name`, `Course_Max_Sections`) VALUES ('BA101', 'Introduction to Business', '10'), ('BI101', 'New Testament Survey', '10'), ('CS202', 'Introduction to Programming', '10'), --- 76,101 ---- # ! # Table structure for table `etest_course` # ! # Creation: Jan 11, 2004 at 08:02 PM ! # Last update: Jan 11, 2004 at 08:02 PM # ! DROP TABLE IF EXISTS `etest_course`; ! CREATE TABLE `etest_course` ( `Course_Code` varchar(5) NOT NULL default '', `Course_Name` varchar(30) NOT NULL default '', `Course_Max_Sections` varchar(5) default '10', PRIMARY KEY (`Course_Code`), UNIQUE KEY `Course_Code` (`Course_Code`), + UNIQUE KEY `Course_Name` (`Course_Name`), KEY `Course_Max_Sections` (`Course_Max_Sections`) ) TYPE=MyISAM; # ! # Dumping data for table `etest_course` # ! INSERT INTO `etest_course` (`Course_Code`, `Course_Name`, `Course_Max_Sections`) VALUES ('BA101', 'Introduction to Business', '10'), ('BI101', 'New Testament Survey', '10'), ('CS202', 'Introduction to Programming', '10'), *************** *** 110,122 **** # ! # Table structure for table `enroll` # ! # Creation: Dec 10, 2003 at 05:48 PM ! # Last update: Dec 10, 2003 at 05:48 PM ! # Last check: Dec 10, 2003 at 05:48 PM # ! DROP TABLE IF EXISTS `enroll`; ! CREATE TABLE `enroll` ( `Course_Code` varchar(5) NOT NULL default '', `Section_Code` char(2) NOT NULL default '', --- 109,120 ---- # ! # Table structure for table `etest_enroll` # ! # Creation: Jan 11, 2004 at 08:02 PM ! # Last update: Jan 11, 2004 at 08:02 PM # ! DROP TABLE IF EXISTS `etest_enroll`; ! CREATE TABLE `etest_enroll` ( `Course_Code` varchar(5) NOT NULL default '', `Section_Code` char(2) NOT NULL default '', *************** *** 131,138 **** # ! # Dumping data for table `enroll` # ! INSERT INTO `enroll` (`Course_Code`, `Section_Code`, `Student_Code`) VALUES ('BA101', '1', '100'), ('BA101', '1', '102'), ('BA101', '1', '104'), --- 129,136 ---- # ! # Dumping data for table `etest_enroll` # ! INSERT INTO `etest_enroll` (`Course_Code`, `Section_Code`, `Student_Code`) VALUES ('BA101', '1', '100'), ('BA101', '1', '102'), ('BA101', '1', '104'), *************** *** 215,218 **** --- 213,217 ---- ('EN101', '1', '102'), ('EN101', '1', '103'), + ('EN101', '1', '110'), ('EN201', '1', '101'), ('EN201', '1', '102'), *************** *** 244,280 **** # ! # Table structure for table `etest_sessions` ! # ! # Creation: Dec 10, 2003 at 05:48 PM ! # Last update: Dec 10, 2003 at 05:48 PM ! # ! ! DROP TABLE IF EXISTS `etest_sessions`; ! CREATE TABLE `etest_sessions` ( ! `session_id` varchar(32) NOT NULL default '', ! `session_created` int(11) NOT NULL default '0', ! `session_active` int(11) NOT NULL default '0', ! `session_counter` int(11) NOT NULL default '0', ! `session_remote_address` varchar(128) NOT NULL default '', ! `session_data` longtext NOT NULL, ! PRIMARY KEY (`session_id`) ! ) TYPE=MyISAM COMMENT='used for session managment'; ! ! # ! # Dumping data for table `etest_sessions` ! # ! ! ! # -------------------------------------------------------- ! ! # ! # Table structure for table `instructor` # ! # Creation: Dec 10, 2003 at 05:48 PM ! # Last update: Dec 10, 2003 at 05:48 PM # ! DROP TABLE IF EXISTS `instructor`; ! CREATE TABLE `instructor` ( `Inst_Code` char(3) NOT NULL default '', `Inst_LastName` varchar(20) NOT NULL default '', --- 243,254 ---- # ! # Table structure for table `etest_instructor` # ! # Creation: Jan 11, 2004 at 08:02 PM ! # Last update: Jan 19, 2004 at 06:48 AM # ! DROP TABLE IF EXISTS `etest_instructor`; ! CREATE TABLE `etest_instructor` ( `Inst_Code` char(3) NOT NULL default '', `Inst_LastName` varchar(20) NOT NULL default '', *************** *** 292,328 **** # ! # Dumping data for table `instructor` # ! INSERT INTO `instructor` (`Inst_Code`, `Inst_LastName`, `Inst_FirstName`, `Inst_Password`, `Admin_Code`) VALUES ('010', 'Geary', 'Michael', 'cfcd208495d565ef66e7dff9f98764da', '001'), ! ('011', 'Johnson', 'Dell', 'cfcd208495d565ef66e7dff9f98764da', '001'), ('012', 'Pribble', 'Jeff', 'cfcd208495d565ef66e7dff9f98764da', '001'), ('013', 'Reese', 'John', 'cfcd208495d565ef66e7dff9f98764da', '001'), ('014', 'Hunt', 'Arthur', 'cfcd208495d565ef66e7dff9f98764da', '001'), ! ('015', 'Roach', 'Andrew', 'cfcd208495d565ef66e7dff9f98764da', '001'); # -------------------------------------------------------- # ! # Table structure for table `possiblequestions` # ! # Creation: Dec 10, 2003 at 05:48 PM ! # Last update: Dec 10, 2003 at 05:48 PM # ! DROP TABLE IF EXISTS `possiblequestions`; ! CREATE TABLE `possiblequestions` ( `Question_Type_Code` varchar(10) NOT NULL default '', `Question_Type` varchar(25) NOT NULL default '', PRIMARY KEY (`Question_Type_Code`), ! UNIQUE KEY `Question_Type_Code` (`Question_Type_Code`), ! UNIQUE KEY `Question_Type` (`Question_Type`) ) TYPE=MyISAM; # ! # Dumping data for table `possiblequestions` # ! INSERT INTO `possiblequestions` (`Question_Type_Code`, `Question_Type`) VALUES ('COMP', 'Completion'), ('ESSAY', 'Essay'), ('MATCH', 'Matching'), --- 266,303 ---- # ! # Dumping data for table `etest_instructor` # ! INSERT INTO `etest_instructor` (`Inst_Code`, `Inst_LastName`, `Inst_FirstName`, `Inst_Password`, `Admin_Code`) VALUES ('010', 'Geary', 'Michael', 'cfcd208495d565ef66e7dff9f98764da', '001'), ! ('011', 'Johnson', 'Dell', '28a4567d9983e2f52ac508e14b95ba3e', '001'), ('012', 'Pribble', 'Jeff', 'cfcd208495d565ef66e7dff9f98764da', '001'), ('013', 'Reese', 'John', 'cfcd208495d565ef66e7dff9f98764da', '001'), ('014', 'Hunt', 'Arthur', 'cfcd208495d565ef66e7dff9f98764da', '001'), ! ('015', 'Roach', 'Andrew', 'cfcd208495d565ef66e7dff9f98764da', '001'), ! ('200', 'Burche', 'Steven', 'c592eff5625d551b0c5be656377ff871', ''); # -------------------------------------------------------- # ! # Table structure for table `etest_possiblequestions` # ! # Creation: Jan 11, 2004 at 08:02 PM ! # Last update: Jan 11, 2004 at 08:02 PM # ! DROP TABLE IF EXISTS `etest_possiblequestions`; ! CREATE TABLE `etest_possiblequestions` ( `Question_Type_Code` varchar(10) NOT NULL default '', `Question_Type` varchar(25) NOT NULL default '', PRIMARY KEY (`Question_Type_Code`), ! UNIQUE KEY `Question_Type` (`Question_Type`), ! UNIQUE KEY `Question_Type_Code` (`Question_Type_Code`) ) TYPE=MyISAM; # ! # Dumping data for table `etest_possiblequestions` # ! INSERT INTO `etest_possiblequestions` (`Question_Type_Code`, `Question_Type`) VALUES ('COMP', 'Completion'), ('ESSAY', 'Essay'), ('MATCH', 'Matching'), *************** *** 335,346 **** # ! # Table structure for table `question` # ! # Creation: Dec 10, 2003 at 05:48 PM ! # Last update: Dec 10, 2003 at 05:48 PM # ! DROP TABLE IF EXISTS `question`; ! CREATE TABLE `question` ( `Test_Code` int(11) NOT NULL default '0', `Question_Number` int(11) NOT NULL default '0', --- 310,321 ---- # ! # Table structure for table `etest_question` # ! # Creation: Jan 11, 2004 at 08:02 PM ! # Last update: Jan 11, 2004 at 08:02 PM # ! DROP TABLE IF EXISTS `etest_question`; ! CREATE TABLE `etest_question` ( `Test_Code` int(11) NOT NULL default '0', `Question_Number` int(11) NOT NULL default '0', *************** *** 359,366 **** # ! # Dumping data for table `question` # ! INSERT INTO `question` (`Test_Code`, `Question_Number`, `Question_Type_Code`, `Question_Ask`, `Question_Answer`) VALUES (2, 1, 'MC', 'What is the opposite of a verb?|adverb|noun|adjective|verb|pronoun', 'B'), (2, 2, 'MC', 'What describes a noun?|adverb|noun|adjective|verb|pronoun', 'C'), (2, 3, 'MC', 'What describes a verb?|adverb|noun|adjective|verb|pronoun', 'A'), --- 334,341 ---- # ! # Dumping data for table `etest_question` # ! INSERT INTO `etest_question` (`Test_Code`, `Question_Number`, `Question_Type_Code`, `Question_Ask`, `Question_Answer`) VALUES (2, 1, 'MC', 'What is the opposite of a verb?|adverb|noun|adjective|verb|pronoun', 'B'), (2, 2, 'MC', 'What describes a noun?|adverb|noun|adjective|verb|pronoun', 'C'), (2, 3, 'MC', 'What describes a verb?|adverb|noun|adjective|verb|pronoun', 'A'), *************** *** 451,467 **** (16, 18, 'SA', 'Constants are declared using what syntax?', 'const'), (16, 19, 'SA', 'What is the best way to declare a constant?', '#DEFINE'), ! (16, 20, 'SA', 'What function stops execution?', 'exit()'); # -------------------------------------------------------- # ! # Table structure for table `section` # ! # Creation: Dec 10, 2003 at 05:48 PM ! # Last update: Dec 10, 2003 at 05:48 PM # ! DROP TABLE IF EXISTS `section`; ! CREATE TABLE `section` ( `Course_Code` varchar(5) NOT NULL default '', `Section_Code` char(2) NOT NULL default '', --- 426,444 ---- (16, 18, 'SA', 'Constants are declared using what syntax?', 'const'), (16, 19, 'SA', 'What is the best way to declare a constant?', '#DEFINE'), ! (16, 20, 'SA', 'What function stops execution?', 'exit()'), ! (16, 21, 'MATCH', 'What is correct answer|no', 'B'), ! (16, 22, 'MATCH', 'What is wrong answer|yes', 'A'); # -------------------------------------------------------- # ! # Table structure for table `etest_section` # ! # Creation: Jan 11, 2004 at 08:02 PM ! # Last update: Jan 11, 2004 at 08:02 PM # ! DROP TABLE IF EXISTS `etest_section`; ! CREATE TABLE `etest_section` ( `Course_Code` varchar(5) NOT NULL default '', `Section_Code` char(2) NOT NULL default '', *************** *** 476,483 **** # ! # Dumping data for table `section` # ! INSERT INTO `section` (`Course_Code`, `Section_Code`, `Inst_Code`) VALUES ('BA101', '', '010'), ('BA101', '1', '010'), ('BI101', '1', '011'), --- 453,460 ---- # ! # Dumping data for table `etest_section` # ! INSERT INTO `etest_section` (`Course_Code`, `Section_Code`, `Inst_Code`) VALUES ('BA101', '', '010'), ('BA101', '1', '010'), ('BI101', '1', '011'), *************** *** 489,571 **** ('HI101', '1', '013'), ('HI101', '2', '013'), ! ('SP101', '1', '014'); # -------------------------------------------------------- # ! # Table structure for table `sessions` # ! # Creation: Dec 09, 2003 at 06:54 PM ! # Last update: Dec 09, 2003 at 07:52 PM # ! DROP TABLE IF EXISTS `sessions`; ! CREATE TABLE `sessions` ( ! `sesskey` varchar(32) NOT NULL default '', ! `expiry` int(11) unsigned NOT NULL default '0', ! `value` text NOT NULL, ! PRIMARY KEY (`sesskey`) ! ) TYPE=MyISAM COMMENT='Used for session management'; # ! # Dumping data for table `sessions` # ! INSERT INTO `sessions` (`sesskey`, `expiry`, `value`) VALUES ('2a3b0f95c56c22f0cc5aed57af94dde1', 1071015516, ''), ! ('0b414f32ac15820eb81745efa6604d90', 1071015613, ''), ! ('44c0d88d4be3b0d492aa113754ef1db0', 1071015679, ''), ! ('ba4a6dc355aa32c57949cb76e9758a3f', 1071015682, ''), ! ('f903ad27dc5609ecb7192221a1a2177c', 1071015862, ''), ! ('b9a635840ab37efab9a0b68a4d91e333', 1071015864, ''), ! ('472afe08a336c819dc66d87383028085', 1071015866, ''), ! ('6081cfcf893b7a9da31b3bd10c56f805', 1071015975, ''), ! ('d30d9caad4a0aff7b268298271009741', 1071016541, ''), ! ('51f7eeba64ed2c0acdaa783e747b9b45', 1071016693, ''), ! ('f2f4ec8016ae5d4da99c151c25dddd9c', 1071016757, ''), ! ('140113f33ed3a9454769eff3e1afcdc2', 1071016759, ''), ! ('264f1d15697e98270c2480759e34036c', 1071016762, ''), ! ('aa6e490b67ff05b5a4a98983b05992f6', 1071016763, ''), ! ('b2fec2fdd8ba4b2dfcf655a292e74886', 1071016764, ''), ! ('3d21b36431d28227f19e560392b7517a', 1071016765, ''), ! ('310fcf344ba171d464b5aeaac02eedc2', 1071016766, ''), ! ('3a6360575d64c47af2c956efcc0cfccc', 1071016768, ''), ! ('e1414db9ba3b87bb3d0f2e9f0430fe36', 1071016770, ''), ! ('309fd8b8f5425ce03fdc771f036d2748', 1071016770, ''), ! ('51e6e662134166bb54aa76afcc101374', 1071016903, ''), ! ('8c5fd735cf21b25e4d9e1c691ce017f9', 1071017168, ''), ! ('71dcce1ad0fc4f2968880bdfe8adaa8e', 1071017175, ''), ! ('db2a1600cbf1dd22ceb721a66ff421da', 1071017181, ''), ! ('79ceaed20d6b87cfdbb1e5f858152ae3', 1071017183, ''), ! ('d9d466d942547b793183d3b00841fbec', 1071017199, ''), ! ('250f610ec6665ac4f303bdf79b7ed45c', 1071017204, ''), ! ('94eb980bcf8083b89dd93e086672056d', 1071017214, ''), ! ('3f99d43bb6de3bc94368a9531bd3d199', 1071017216, ''), ! ('25226fb4f781a9cb3be311a71f0bc007', 1071017217, ''), ! ('4a84df8aa4de152f56b8b85455497f7d', 1071017218, ''), ! ('9a40aaea9b6cca69a61e9c815b584651', 1071017220, ''), ! ('65c7323271122a0c80bccfa61b836830', 1071017260, ''), ! ('a7d1ec625f6dcc0cc778cd5965fdff18', 1071017261, ''), ! ('d5d77e783c9876280e20372fe966c61a', 1071017261, ''), ! ('ca461d8b4a6b43c89d76f73499549539', 1071017262, ''), ! ('db52eeb6b8f45372f7076d31b1d8c807', 1071017263, ''), ! ('965cdc8db961b2fd67033b3ae821b607', 1071017263, ''), ! ('e3fd1a8e9b5a4e21b4148ffc40a42156', 1071017304, ''), ! ('8e2d910ccb3579832b6af104beaf41d8', 1071018849, ''), ! ('fcb6db605e124c6c61d2ce7324bc85cb', 1071018853, ''), ! ('ebca8187d597c3d3a57164c1c3d0b1df', 1071018867, ''), ! ('3c4d2f8e88765a59f51dbebb59d233d2', 1071019003, ''), ! ('6e21723412d0335a8ac5cab786581fdb', 1071019006, ''); # -------------------------------------------------------- # ! # Table structure for table `student` # ! # Creation: Dec 10, 2003 at 05:48 PM ! # Last update: Dec 10, 2003 at 05:52 PM # ! DROP TABLE IF EXISTS `student`; ! CREATE TABLE `student` ( `Student_Code` varchar(6) NOT NULL default '', `Student_LastName` varchar(20) NOT NULL default '', --- 466,509 ---- ('HI101', '1', '013'), ('HI101', '2', '013'), ! ('SP101', '1', '014'), ! ('CS214', '2', '012'); # -------------------------------------------------------- # ! # Table structure for table `etest_sessions` # ! # Creation: Jan 11, 2004 at 08:02 PM ! # Last update: Jan 27, 2004 at 01:23 AM # ! DROP TABLE IF EXISTS `etest_sessions`; ! CREATE TABLE `etest_sessions` ( ! `session_id` varchar(32) NOT NULL default '', ! `session_created` int(11) NOT NULL default '0', ! `session_active` int(11) NOT NULL default '0', ! `session_counter` int(11) NOT NULL default '0', ! `session_remote_address` varchar(128) NOT NULL default '', ! `session_data` longtext NOT NULL, ! PRIMARY KEY (`session_id`) ! ) TYPE=MyISAM COMMENT='used for session managment'; # ! # Dumping data for table `etest_sessions` # ! # etest_sessions needs no initial data import. # -------------------------------------------------------- # ! # Table structure for table `etest_student` # ! # Creation: Jan 11, 2004 at 08:02 PM ! # Last update: Jan 11, 2004 at 08:02 PM # ! DROP TABLE IF EXISTS `etest_student`; ! CREATE TABLE `etest_student` ( `Student_Code` varchar(6) NOT NULL default '', `Student_LastName` varchar(20) NOT NULL default '', *************** *** 580,587 **** # ! # Dumping data for table `student` # ! INSERT INTO `student` (`Student_Code`, `Student_LastName`, `Student_FirstName`, `Student_Password`) VALUES ('100', 'Smith', 'Chris', 'cfcd208495d565ef66e7dff9f98764da'), ('101', 'Erbentraut', 'Steven', 'cfcd208495d565ef66e7dff9f98764da'), ('102', 'Pierce', 'Brad', 'cfcd208495d565ef66e7dff9f98764da'), --- 518,525 ---- # ! # Dumping data for table `etest_student` # ! INSERT INTO `etest_student` (`Student_Code`, `Student_LastName`, `Student_FirstName`, `Student_Password`) VALUES ('100', 'Smith', 'Chris', 'cfcd208495d565ef66e7dff9f98764da'), ('101', 'Erbentraut', 'Steven', 'cfcd208495d565ef66e7dff9f98764da'), ('102', 'Pierce', 'Brad', 'cfcd208495d565ef66e7dff9f98764da'), *************** *** 618,629 **** # ! # Table structure for table `test` # ! # Creation: Dec 10, 2003 at 05:48 PM ! # Last update: Dec 10, 2003 at 05:48 PM # ! DROP TABLE IF EXISTS `test`; ! CREATE TABLE `test` ( `Test_Code` int(11) NOT NULL default '0', `Test_Name` longtext NOT NULL, --- 556,567 ---- # ! # Table structure for table `etest_test` # ! # Creation: Dec 05, 2003 at 08:04 AM ! # Last update: Dec 05, 2003 at 08:08 AM # ! DROP TABLE IF EXISTS `etest_test`; ! CREATE TABLE `etest_test` ( `Test_Code` int(11) NOT NULL default '0', `Test_Name` longtext NOT NULL, *************** *** 634,641 **** # ! # Dumping data for table `test` # ! INSERT INTO `test` (`Test_Code`, `Test_Name`, `Test_Instructions`, `Course_Code`, `Section_Code`) VALUES (2, 'Test 01 - Basic Grammar (created 4/15/2003 9:51:15 AM)', 'This test is to see how well you have listened during English Lecture!', 'EN101', '1'), (3, 'Test 1 (created 4/17/2003 8:30:10 AM)', 'Please read each question carefully and choose the answer that BEST answers the question.', 'HI101', '1'), (4, 'Matthew 1-7 (created 4/17/2003 8:47:51 AM)', 'none', 'BI101', '1'), --- 572,579 ---- # ! # Dumping data for table `etest_test` # ! INSERT INTO `etest_test` (`Test_Code`, `Test_Name`, `Test_Instructions`, `Course_Code`, `Section_Code`) VALUES (2, 'Test 01 - Basic Grammar (created 4/15/2003 9:51:15 AM)', 'This test is to see how well you have listened during English Lecture!', 'EN101', '1'), (3, 'Test 1 (created 4/17/2003 8:30:10 AM)', 'Please read each question carefully and choose the answer that BEST answers the question.', 'HI101', '1'), (4, 'Matthew 1-7 (created 4/17/2003 8:47:51 AM)', 'none', 'BI101', '1'), *************** *** 652,655 **** (15, 'Test 06 - The Noun Clause (created 4/19/2003 7:35:57 PM)', 'Select or fill in the use of each of the _underlined_ noun clauses: subject(s), direct object(do), predicate nominative (pn), object of preposition (op), or appositive (ap). For the Short Answer questions, use the above abbreviations.', 'EN101', '1'), (16, 'Chapter 1 Test (created 4/20/2003 10:05:08 PM)', 'none', 'CS202', '1'); - --- 590,592 ---- |
From: <cpj...@pr...> - 2004-01-27 15:34:48
|
Update of /cvsroot/etest/etest/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5078/includes Modified Files: configure.php Log Message: fixed syntax typos -- craig Index: configure.php =================================================================== RCS file: /cvsroot/etest/etest/includes/configure.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** configure.php 27 Jan 2004 15:32:23 -0000 1.32 --- configure.php 27 Jan 2004 15:33:41 -0000 1.33 *************** *** 67,71 **** $DB_user = DB_USERNAME; // mysql user $DB_password = DB_PASSWORD; // mysql user password ! $DB_preix = DB_PREFIX; // mysql table prefix /* Ensure we don't use both magic_quotes and addslashes() */ --- 67,71 ---- $DB_user = DB_USERNAME; // mysql user $DB_password = DB_PASSWORD; // mysql user password ! $DB_prefix = DB_PREFIX; // mysql table prefix /* Ensure we don't use both magic_quotes and addslashes() */ |
From: <cpj...@pr...> - 2004-01-27 15:33:30
|
Update of /cvsroot/etest/etest/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4743/includes Modified Files: configure.php Log Message: added DB_PREFIX and fixed user documentation -- craig Index: configure.php =================================================================== RCS file: /cvsroot/etest/etest/includes/configure.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** configure.php 16 Dec 2003 12:29:01 -0000 1.31 --- configure.php 27 Jan 2004 15:32:23 -0000 1.32 *************** *** 7,21 **** Released under the GNU General Public License */ ! //Local configuration if used on local testing machine ! if ($_SERVER['REMOTE_ADDR']=="127.0.0.1") ! { ! //Set local configuration ! define('DB_HOST', 'localhost'); // Set local mysql server hostname here ! } ! else ! { ! //Set remote Configuration ! define('DB_HOST', 'mysql'); // Set mysql server hostname here ! } //Define directory structure --- 7,45 ---- Released under the GNU General Public License */ ! /****************************************************************/ ! /* ! /* Several IMPORTANT values need to be set in this configuration ! /* file. These are used to connect the the MySQL database. ! /* ! /* DB_HOST => the hostname where your DB is located ! /* DB_USERNAME => the username to login to the DB ! /* DB_PASSWORD => the password to login to the DB ! /* DB_NAME => the name of the DB to use ! /* DB_PREFIX => the table name prefix in the DB ! /* (this defaults to "etest") ! /* ! /****************************************************************/ ! ! /************************************************/ ! /* Define your MySQL database setup values here */ ! /************************************************/ ! define('DB_USERNAME', 'etest'); // MySQL username ! define('DB_PASSWORD', 'protocol'); // MySQL password ! define('DB_NAME', 'etest'); // MySQL database name ! define('DB_PREFIX', 'etest'); // MySQL table prefix ! ! // Set DB_HOST here ! if ($_SERVER['REMOTE_ADDR']=="127.0.0.1") //Set local configuration ! { ! define('DB_HOST', 'localhost'); // Set local mysql server hostname here ! } ! else //Set remote Configuration ! { ! define('DB_HOST', 'mysql'); // Set remote mysql server hostname here ! } ! ! /****************************************************************/ ! /*** DO NOT EDIT BELOW THIS LINE ***/ ! /****************************************************************/ //Define directory structure *************** *** 38,53 **** define('CLASSES_PATH', INCLUDES_PATH.'classes/'); - /************************************************/ - /* Define your MySQL database setup values here */ - /************************************************/ - define('DB_USERNAME', 'etest'); // MySQL username - define('DB_PASSWORD', 'protocol'); // MySQL password - define('DB_NAME', 'etest'); // MySQL database name - /* Database Variables for MySQL session management */ ! $DB_host = DB_HOST; // mysql db host ! $DB_base = DB_NAME; // mysql db ! $DB_user = DB_USERNAME; // mysql user ! $DB_password = DB_PASSWORD; // mysql user password /* Ensure we don't use both magic_quotes and addslashes() */ --- 62,71 ---- define('CLASSES_PATH', INCLUDES_PATH.'classes/'); /* Database Variables for MySQL session management */ ! $DB_host = DB_HOST; // mysql db host ! $DB_base = DB_NAME; // mysql db ! $DB_user = DB_USERNAME; // mysql user ! $DB_password = DB_PASSWORD; // mysql user password ! $DB_preix = DB_PREFIX; // mysql table prefix /* Ensure we don't use both magic_quotes and addslashes() */ |
From: <cpj...@pr...> - 2004-01-27 15:21:16
|
Update of /cvsroot/etest/etest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1493 Removed Files: AUTHORS.txt COPYING.txt ChangeLog.txt INSTALL.txt README.txt etest_mysql_import.sql Log Message: moved doc files to doc directory -- craig --- AUTHORS.txt DELETED --- --- COPYING.txt DELETED --- --- ChangeLog.txt DELETED --- --- INSTALL.txt DELETED --- --- README.txt DELETED --- --- etest_mysql_import.sql DELETED --- |
From: <cpj...@pr...> - 2004-01-27 15:19:48
|
Update of /cvsroot/etest/etest/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1072/doc Added Files: AUTHORS COPYING ChangeLog INSTALL README etest_mysql_import.sql Log Message: moved doc files to doc directory -- craig --- NEW FILE: AUTHORS --- eTest - the online student-testing package ========================================== Administrators: --------------- * Craig P Jolicoeur <cpjolicoeur at users.sourceforge.net> * Brad Pierce <bradpierce9903 at users.sourcefore.net> Active Developers: ------------------ - Chris Wanstrath <cwanstrath at users.sourceforge.com> - Jeremy Eden <eden99_99 at users.sourceforge.com> --- NEW FILE: COPYING --- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) 19yy <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. --- NEW FILE: ChangeLog --- version 1.0 (01/27/2004): * This is the initial PHP only version * Changes from ASP version include the following: * Major redesign of test creation process * Major redesign of test taking process * Updated database structure * Use of MySQL database for session management * Use of single config file for configuration * Cleaner CSS pages --- NEW FILE: INSTALL --- ******************************* * * * Installation Instructions * * * ******************************* =============== For PHP verion: =============== * place files in webroot directory * setup MySQL database with supplied etest_mysql_import.sql file * setup ./includes/configure.php file with proper values --- NEW FILE: README --- Thanks for downloading eTest. We appreciate your interest in our project. If you have any questions, please send an email to the etest-users mailing list. Also, if you have downloaded the project I would love to hear from you, where you are located, and how you found our project. Email me at cpjolicoeur at users.sourceforge.net Thanks cpj ======= INSTALL ======= Read the 'INSTALL' file for more detailed directions. === RUN === Point your browser to the etest root directory. ======== --- NEW FILE: etest_mysql_import.sql --- # phpMyAdmin SQL Dump # version 2.5.4 # http://www.phpmyadmin.net # # Host: localhost # Generation Time: Dec 10, 2003 at 05:52 PM # Server version: 4.0.12 # PHP Version: 4.3.1 # # Database : `etest` # # -------------------------------------------------------- # # Table structure for table `administrator` # # Creation: Dec 10, 2003 at 05:48 PM # Last update: Dec 10, 2003 at 05:48 PM # DROP TABLE IF EXISTS `administrator`; CREATE TABLE `administrator` ( `Admin_Code` char(3) NOT NULL default '', `Admin_LastName` varchar(20) NOT NULL default '', `Admin_FirstName` varchar(15) NOT NULL default '', `Admin_Password` varchar(50) NOT NULL default '', PRIMARY KEY (`Admin_Code`), KEY `Admin_FirstName` (`Admin_FirstName`), KEY `Admin_LastName` (`Admin_LastName`), KEY `Admin_Password` (`Admin_Password`) ) TYPE=MyISAM; # # Dumping data for table `administrator` # INSERT INTO `administrator` (`Admin_Code`, `Admin_LastName`, `Admin_FirstName`, `Admin_Password`) VALUES ('001', 'Musgrave', 'Philip', 'cfcd208495d565ef66e7dff9f98764da'); # -------------------------------------------------------- # # Table structure for table `completedtests` # # Creation: Dec 10, 2003 at 05:48 PM # Last update: Dec 10, 2003 at 05:48 PM # DROP TABLE IF EXISTS `completedtests`; CREATE TABLE `completedtests` ( `Student_Code` char(3) NOT NULL default '', `Test_Code` int(11) NOT NULL default '0', `Correct_Answers` double NOT NULL default '0', `Total_Questions` double NOT NULL default '0', `Incorrect_Answers` longtext, PRIMARY KEY (`Student_Code`,`Test_Code`), KEY `Incorrect_Answers` (`Incorrect_Answers`(255)), KEY `Student_Code` (`Student_Code`), KEY `StudentCompletedTests` (`Student_Code`), KEY `Test_Code` (`Test_Code`), KEY `Test_Grade` (`Correct_Answers`), KEY `TestCompletedTests` (`Test_Code`), KEY `Total_Questions` (`Total_Questions`) ) TYPE=MyISAM; # # Dumping data for table `completedtests` # INSERT INTO `completedtests` (`Student_Code`, `Test_Code`, `Correct_Answers`, `Total_Questions`, `Incorrect_Answers`) VALUES ('100', 2, '20', '30', '1|A|2|A|4|A|5|A|6|TRUE|10|TRUE|16|A|17|A|19|A|20|A'), ('100', 4, '11', '15', '1|TRUE|4|TRUE|5|TRUE|9|TRUE'), ('100', 5, '20', '25', '4|A|5|C|9|TRUE|11|TRUE|22|stored'), ('100', 6, '6', '15', '3|FALSE|4|TRUE|6|FALSE, hard|7|b|8|d|10|a|11|logic|12|thinking|13|i don\'t know|14|testing'), ('100', 11, '12', '15', '12|best|13|fastest|15|more'); # -------------------------------------------------------- # # Table structure for table `course` # # Creation: Dec 10, 2003 at 05:48 PM # Last update: Dec 10, 2003 at 05:48 PM # DROP TABLE IF EXISTS `course`; CREATE TABLE `course` ( `Course_Code` varchar(5) NOT NULL default '', `Course_Name` varchar(30) NOT NULL default '', `Course_Max_Sections` varchar(5) default '10', PRIMARY KEY (`Course_Code`), UNIQUE KEY `Course_Name` (`Course_Name`), UNIQUE KEY `Course_Code` (`Course_Code`), KEY `Course_Max_Sections` (`Course_Max_Sections`) ) TYPE=MyISAM; # # Dumping data for table `course` # INSERT INTO `course` (`Course_Code`, `Course_Name`, `Course_Max_Sections`) VALUES ('BA101', 'Introduction to Business', '10'), ('BI101', 'New Testament Survey', '10'), ('CS202', 'Introduction to Programming', '10'), ('CS214', 'C Programming', '10'), ('EN101', 'English Grammar/Composition', '10'), ('EN201', 'English Literature', '10'), ('HI101', 'History of Civilization', '10'), ('SP101', 'Fundamentals of Speech', '10'); # -------------------------------------------------------- # # Table structure for table `enroll` # # Creation: Dec 10, 2003 at 05:48 PM # Last update: Dec 10, 2003 at 05:48 PM # Last check: Dec 10, 2003 at 05:48 PM # DROP TABLE IF EXISTS `enroll`; CREATE TABLE `enroll` ( `Course_Code` varchar(5) NOT NULL default '', `Section_Code` char(2) NOT NULL default '', `Student_Code` char(3) NOT NULL default '', PRIMARY KEY (`Course_Code`,`Section_Code`,`Student_Code`), KEY `Course_Code1` (`Course_Code`), KEY `CourseEnroll` (`Course_Code`), KEY `Section_Code` (`Section_Code`), KEY `Student_Code` (`Student_Code`), KEY `StudentEnroll` (`Student_Code`) ) TYPE=MyISAM; # # Dumping data for table `enroll` # INSERT INTO `enroll` (`Course_Code`, `Section_Code`, `Student_Code`) VALUES ('BA101', '1', '100'), ('BA101', '1', '102'), ('BA101', '1', '104'), ('BA101', '1', '106'), ('BA101', '1', '108'), ('BA101', '1', '110'), ('BA101', '1', '112'), ('BA101', '1', '114'), ('BA101', '1', '116'), ('BA101', '1', '118'), ('BA101', '1', '120'), ('BA101', '1', '122'), ('BA101', '1', '124'), ('BA101', '1', '126'), ('BA101', '1', '128'), ('BA101', '1', '130'), ('BI101', '1', '100'), ('BI101', '1', '101'), ('BI101', '1', '102'), ('BI101', '1', '103'), ('BI101', '1', '104'), ('BI101', '1', '105'), ('BI101', '1', '106'), ('BI101', '1', '107'), ('BI101', '1', '108'), ('BI101', '1', '109'), ('BI101', '1', '110'), ('BI101', '1', '111'), ('BI101', '1', '112'), ('BI101', '1', '113'), ('BI101', '1', '114'), ('BI101', '1', '115'), ('BI101', '2', '102'), ('BI101', '2', '116'), ('BI101', '2', '117'), ('BI101', '2', '118'), ('BI101', '2', '119'), ('BI101', '2', '120'), ('BI101', '2', '121'), ('BI101', '2', '122'), ('BI101', '2', '123'), ('BI101', '2', '124'), ('BI101', '2', '125'), ('BI101', '2', '126'), ('BI101', '2', '127'), ('BI101', '2', '128'), ('BI101', '2', '129'), ('BI101', '2', '130'), ('CS202', '1', '100'), ('CS202', '1', '106'), ('CS202', '1', '107'), ('CS202', '1', '109'), ('CS202', '1', '111'), ('CS202', '1', '112'), ('CS202', '1', '115'), ('CS202', '1', '118'), ('CS202', '1', '119'), ('CS202', '1', '121'), ('CS202', '1', '124'), ('CS202', '1', '125'), ('CS202', '1', '127'), ('CS202', '1', '129'), ('CS202', '1', '130'), ('CS214', '', '100'), ('CS214', '', '101'), ('CS214', '', '103'), ('CS214', '', '104'), ('CS214', '', '106'), ('CS214', '', '107'), ('CS214', '', '109'), ('CS214', '', '110'), ('CS214', '', '112'), ('CS214', '', '120'), ('CS214', '', '121'), ('CS214', '', '122'), ('CS214', '', '125'), ('CS214', '', '127'), ('CS214', '', '130'), ('EN101', '1', '100'), ('EN101', '1', '102'), ('EN101', '1', '103'), ('EN201', '1', '101'), ('EN201', '1', '102'), ('EN201', '1', '103'), ('EN201', '1', '105'), ('EN201', '1', '108'), ('HI101', '1', '100'), ('HI101', '1', '102'), ('HI101', '1', '104'), ('HI101', '1', '106'), ('HI101', '1', '108'), ('HI101', '2', '101'), ('HI101', '2', '103'), ('HI101', '2', '105'), ('HI101', '2', '107'), ('HI101', '2', '109'), ('SP101', '1', '101'), ('SP101', '1', '102'), ('SP101', '1', '103'), ('SP101', '1', '104'), ('SP101', '1', '105'), ('SP101', '1', '121'), ('SP101', '1', '125'), ('SP101', '1', '128'), ('SP101', '1', '129'), ('SP101', '1', '130'); # -------------------------------------------------------- # # Table structure for table `etest_sessions` # # Creation: Dec 10, 2003 at 05:48 PM # Last update: Dec 10, 2003 at 05:48 PM # DROP TABLE IF EXISTS `etest_sessions`; CREATE TABLE `etest_sessions` ( `session_id` varchar(32) NOT NULL default '', `session_created` int(11) NOT NULL default '0', `session_active` int(11) NOT NULL default '0', `session_counter` int(11) NOT NULL default '0', `session_remote_address` varchar(128) NOT NULL default '', `session_data` longtext NOT NULL, PRIMARY KEY (`session_id`) ) TYPE=MyISAM COMMENT='used for session managment'; # # Dumping data for table `etest_sessions` # # -------------------------------------------------------- # # Table structure for table `instructor` # # Creation: Dec 10, 2003 at 05:48 PM # Last update: Dec 10, 2003 at 05:48 PM # DROP TABLE IF EXISTS `instructor`; CREATE TABLE `instructor` ( `Inst_Code` char(3) NOT NULL default '', `Inst_LastName` varchar(20) NOT NULL default '', `Inst_FirstName` varchar(15) NOT NULL default '', `Inst_Password` varchar(50) NOT NULL default '', `Admin_Code` char(3) NOT NULL default '', PRIMARY KEY (`Inst_Code`), KEY `Admin_Code` (`Admin_Code`), KEY `AdministratorInstructor` (`Admin_Code`), KEY `Inst_Code` (`Inst_Code`), KEY `Inst_FirstName` (`Inst_FirstName`), KEY `Inst_LastName` (`Inst_LastName`), KEY `Inst_Password` (`Inst_Password`) ) TYPE=MyISAM; # # Dumping data for table `instructor` # INSERT INTO `instructor` (`Inst_Code`, `Inst_LastName`, `Inst_FirstName`, `Inst_Password`, `Admin_Code`) VALUES ('010', 'Geary', 'Michael', 'cfcd208495d565ef66e7dff9f98764da', '001'), ('011', 'Johnson', 'Dell', 'cfcd208495d565ef66e7dff9f98764da', '001'), ('012', 'Pribble', 'Jeff', 'cfcd208495d565ef66e7dff9f98764da', '001'), ('013', 'Reese', 'John', 'cfcd208495d565ef66e7dff9f98764da', '001'), ('014', 'Hunt', 'Arthur', 'cfcd208495d565ef66e7dff9f98764da', '001'), ('015', 'Roach', 'Andrew', 'cfcd208495d565ef66e7dff9f98764da', '001'); # -------------------------------------------------------- # # Table structure for table `possiblequestions` # # Creation: Dec 10, 2003 at 05:48 PM # Last update: Dec 10, 2003 at 05:48 PM # DROP TABLE IF EXISTS `possiblequestions`; CREATE TABLE `possiblequestions` ( `Question_Type_Code` varchar(10) NOT NULL default '', `Question_Type` varchar(25) NOT NULL default '', PRIMARY KEY (`Question_Type_Code`), UNIQUE KEY `Question_Type_Code` (`Question_Type_Code`), UNIQUE KEY `Question_Type` (`Question_Type`) ) TYPE=MyISAM; # # Dumping data for table `possiblequestions` # INSERT INTO `possiblequestions` (`Question_Type_Code`, `Question_Type`) VALUES ('COMP', 'Completion'), ('ESSAY', 'Essay'), ('MATCH', 'Matching'), ('MC', 'Multiple Choice'), ('MTF', 'Modified True/False'), ('SA', 'Short Answer'), ('TF', 'True/False'); # -------------------------------------------------------- # # Table structure for table `question` # # Creation: Dec 10, 2003 at 05:48 PM # Last update: Dec 10, 2003 at 05:48 PM # DROP TABLE IF EXISTS `question`; CREATE TABLE `question` ( `Test_Code` int(11) NOT NULL default '0', `Question_Number` int(11) NOT NULL default '0', `Question_Type_Code` varchar(10) NOT NULL default '', `Question_Ask` longtext NOT NULL, `Question_Answer` longtext NOT NULL, PRIMARY KEY (`Test_Code`,`Question_Number`), KEY `PossibleQuestionsQuestion` (`Question_Type_Code`), KEY `Question` (`Question_Ask`(255)), KEY `Question_Answer` (`Question_Answer`(255)), KEY `Question_Number` (`Question_Number`), KEY `Question_type` (`Question_Type_Code`), KEY `Test_Code` (`Test_Code`), KEY `TestQuestion` (`Test_Code`) ) TYPE=MyISAM; # # Dumping data for table `question` # INSERT INTO `question` (`Test_Code`, `Question_Number`, `Question_Type_Code`, `Question_Ask`, `Question_Answer`) VALUES (2, 1, 'MC', 'What is the opposite of a verb?|adverb|noun|adjective|verb|pronoun', 'B'), (2, 2, 'MC', 'What describes a noun?|adverb|noun|adjective|verb|pronoun', 'C'), (2, 3, 'MC', 'What describes a verb?|adverb|noun|adjective|verb|pronoun', 'A'), (2, 4, 'MC', 'What is another name for a noun?|adverb|noun|adjective|verb|pronoun', 'E'), (2, 5, 'MC', 'What describes an action?|adverb|noun|adjective|verb|pronoun', 'D'), (12, 6, 'SA', 'By 1946, independence _had been offered_ to India by Great Britian.', 'passive'), (12, 7, 'SA', 'Tom _was bitten_ by a rattlesnake whe he had nearly stepped on.', 'passive'), (12, 8, 'SA', 'Andrew Carnegie _gave_ large sums of money to build libraries.', 'active'), (12, 9, 'SA', 'The lost _should be told_ by Christians about how to be saved.', 'passive'), (12, 10, 'SA', 'The teacher _discouraged_ cheating on the test.', 'active'), (12, 11, 'SA', 'Maple trees _are tapped_ for sap near the end of winter or in the early spring.', 'passive'), (12, 12, 'SA', 'Lincoln _prepared_ the stirring "Gettysburg Address" after the horrible battle at Gettysburg, Pennsylvania.', 'active'), (12, 13, 'SA', 'Your room _must be cleaned_ tomorrow afternoon.', 'passive'), (12, 14, 'SA', 'Miss Wood _found_ Bill always dependable.', 'active'), (12, 15, 'SA', 'Sharon _was given_ the job as cashier at Mr. Hill\'s hardware store.', 'passive'), (12, 16, 'SA', 'The old hermit _was considered_ strong-willed and eccentric.', 'passive'), (12, 17, 'SA', 'Tina\'s grandmother _has made_ her a lace tablecloth for a wedding present.', 'active'), (12, 18, 'SA', 'The rough ride through the air pockets _made_ some of the passengers airsick.', 'active'), (12, 19, 'SA', 'We _were shown_ this house by our real estate agent.', 'passive'), (12, 20, 'SA', 'Mr. Dobson _was thought_ a very competent pilot.', 'passive'), (13, 1, 'MC', 'should be left|Active|Passive|Neither', 'B'), (13, 2, 'MC', 'prayed|Active|Passive|Neither', 'A'), (13, 3, 'MC', 'did grow|Active|Passive|Neither', 'A'), (13, 4, 'MC', 'is frozen|Active|Passive|Neither', 'B'), (13, 5, 'MC', 'will wear|Active|Passive|Neither', 'A'), (13, 6, 'MC', 'is being seen|Active|Passive|Neither', 'B'), (13, 7, 'MC', 'will have eaten|Active|Passive|Neither', 'A'), (13, 8, 'MC', 'was sunk|Active|Passive|Neither', 'B'), (13, 9, 'MC', 'shall have built|Active|Passive|Neither', 'A'), (13, 10, 'MC', 'have been walking|Active|Passive|Neither', 'A'), (13, 11, 'MC', 'have been thrown|Active|Passive|Neither', 'B'), (13, 12, 'MC', 'am bought|Active|Passive|Neither', 'B'), (13, 13, 'MC', 'should know|Active|Passive|Neither', 'A'), (13, 14, 'MC', 'have torn|Active|Passive|Neither', 'A'), (13, 15, 'MC', 'are chosen|Active|Passive|Neither', 'B'), (13, 16, 'MC', 'is beginning|Active|Passive|Neither', 'A'), (13, 17, 'MC', 'do study|Active|Passive|Neither', 'A'), (13, 18, 'MC', 'were being taken|Active|Passive|Neither', 'B'), (13, 19, 'MC', 'was being written|Active|Passive|Neither', 'B'), (13, 20, 'MC', 'are denied|Active|Passive|Neither', 'B'), (14, 1, 'MC', '_Stand_ fast therefore in the liberty wherewith Christ has made us free. - Gal. 5:1|Indicative|Imperative|Subjective', 'B'), (14, 2, 'MC', 'Your teachers wish that you _were_ more industrious.|Indicative|Imperative|Subjective', 'C'), (14, 3, 'MC', '_Was_ Emily Bronte no the author of "Wuthering Heights"?|Indicative|Imperative|Subjective', 'A'), (14, 4, 'MC', 'And I, if I _be lifted_ up from the earth, will draw all men unto me. - John 12:32|Indicative|Imperative|Subjective', 'C'), (14, 5, 'MC', 'On that first Palm Sunday, Christ _rode_ a colt into Jerusalem.|Indicative|Imperative|Subjective', 'A'), (14, 6, 'SA', 'What city in North Columbia _received_ the title "Heroic City"?', 'indicative'), (14, 7, 'SA', 'Please _put_ your pencils down and close your test booklets.', 'imperative'), (14, 8, 'SA', 'And if it _seem_ evil unto you to serve the Lord, choose you this day whom ye will serve. - Jer. 24:14', 'subjective'), (14, 9, 'SA', 'The French pianist Robert Casadesus _entered_ the Paris Conservatory of Music at the age of thirteen.', 'indicative'), (14, 10, 'SA', 'He wishes that he _were_ traveling in Europe now.', 'subjective'), (15, 1, 'MC', 'I know _that my Redeemer liveth_.|Subject|Direct Object|Predicate Nominative|Object of Preposition|Appositive', 'B'), (15, 2, 'MC', 'We learned in class today about _how people in Finland live_.|Subject|Direct Object|Predicate Nominative|Object of Preposition|Appositive', 'D'), (15, 3, 'MC', 'A return to Biblical principles is _what is needed in America today_.|Subject|Direct Object|Predicate Nominative|Object of Preposition|Appositive', 'C'), (15, 4, 'MC', '_Who bravely dares_ must sometimes risk a fall. - Smollett|Subject|Direct Object|Predicate Nominative|Object of Preposition|Appositive', 'A'), (15, 5, 'MC', 'The announcement _that the French would come to their aid_ encouraged the colonists.|Subject|Direct Object|Predicate Nominative|Object of Preposition|Appositive', 'E'), (15, 6, 'MC', '_That legalized gambling fosters organized crime_ is a well-established fact.|Subject|Direct Object|Predicate Nominative|Object of Preposition|Appositive', 'A'), (15, 7, 'MC', 'Whatever I need is _what my Lord gives me_.|Subject|Direct Object|Predicate Nominative|Object of Preposition|Appositive', 'C'), (15, 8, 'MC', 'We are but stewards of _what we falsely call our own_. - Seneca|Subject|Direct Object|Predicate Nominative|Object of Preposition|Appositive', 'D'), (15, 9, 'MC', 'Wrinkles should merely indicate _where smiles have been_. - Twain|Subject|Direct Object|Predicate Nominative|Object of Preposition|Appositive', 'B'), (15, 10, 'MC', 'The soldier welcomed the news _that he would soon return to American soil_.|Subject|Direct Object|Predicate Nominative|Object of Preposition|Appositive', 'E'), (15, 11, 'SA', 'In a few minutes, the storm destroyed _what had taken years to build_.', 'do'), (15, 12, 'SA', 'The steamship is _what replaced the clipper ship_.', 'pn'), (15, 13, 'SA', '_Whoever reads directions_ saves time.', 's'), (15, 14, 'SA', 'The suggestion _that we spend the profits on improvements_ seems valid.', 'ap'), (15, 15, 'SA', 'The Lord is my helper, and I will not fear _what man shall do unto me_. - Heb. 13:6', 'do'), (15, 16, 'SA', 'The Finnish saunas were _what interested Rita most_.', 'pn'), (15, 17, 'SA', 'We will be thankful for _whatever help tou can give_.', 'op'), (15, 18, 'SA', '_How Longfellow related to his public_ is part of the reason for his wide appeal at home and abroad.', 's'), (15, 19, 'SA', 'Mathematics and science are _what he will be teaching this fall_.', 'pn'), (15, 20, 'SA', 'We should do our best in _whatever we do_.', 'op'), (16, 1, 'MC', 'Which loop executes once no matter the expression?|do while loop|for loop|do loop', 'C'), (16, 2, 'MC', 'What syntax prints to the screen?|print|printf|write', 'B'), (16, 3, 'MC', 'How many bytes is a short?|1|2|4', 'B'), (16, 4, 'MC', 'What declares a floating-point variable?|int|float|double', 'B'), (16, 5, 'MC', 'What starts a newline?|\\b|\\t|\\n', 'C'), (16, 6, 'TF', 'C is an object-oriented language.', 'FALSE'), (16, 7, 'TF', 'You may or may not end a line of code with a semicolon.', 'FALSE'), (16, 8, 'TF', 'A comment is indicated by the a backspace and asterisk.', 'TRUE'), (16, 9, 'TF', 'It is okay to use x, y, and z for all loop control variables.', 'FALSE'), (16, 10, 'TF', 'For loops iterate a specific number of times.', 'TRUE'), (16, 11, 'MTF', 'Compiling a program will create an executable file.|Compiling', 'FALSE|Linking'), (16, 12, 'MTF', 'You declare an array by placing parentheses after the array name.|parentheses', 'FALSE|brackets'), (16, 13, 'MTF', 'The abs() function returns the absolute value of a number.|abs()', 'TRUE'), (16, 14, 'MTF', 'To declare a structure we would use struct|struct', 'TRUE'), (16, 15, 'MTF', 'We close a file with close()|close()', 'FALSE|fclose()'), (16, 16, 'SA', 'Declare an array of ten (10) elements: use array as variable name.', 'array[10]'), (16, 17, 'SA', 'Where was the C programming language invented.', 'Bell Labs'), (16, 18, 'SA', 'Constants are declared using what syntax?', 'const'), (16, 19, 'SA', 'What is the best way to declare a constant?', '#DEFINE'), (16, 20, 'SA', 'What function stops execution?', 'exit()'); # -------------------------------------------------------- # # Table structure for table `section` # # Creation: Dec 10, 2003 at 05:48 PM # Last update: Dec 10, 2003 at 05:48 PM # DROP TABLE IF EXISTS `section`; CREATE TABLE `section` ( `Course_Code` varchar(5) NOT NULL default '', `Section_Code` char(2) NOT NULL default '', `Inst_Code` char(3) NOT NULL default '', PRIMARY KEY (`Course_Code`,`Section_Code`), KEY `Course_Code` (`Course_Code`), KEY `CourseSection` (`Course_Code`), KEY `Inst_Code` (`Inst_Code`), KEY `InstructorSection` (`Inst_Code`), KEY `Section_Code` (`Section_Code`) ) TYPE=MyISAM; # # Dumping data for table `section` # INSERT INTO `section` (`Course_Code`, `Section_Code`, `Inst_Code`) VALUES ('BA101', '', '010'), ('BA101', '1', '010'), ('BI101', '1', '011'), ('BI101', '2', '011'), ('CS202', '1', '010'), ('CS214', '', '010'), ('EN101', '1', '012'), ('EN201', '1', '012'), ('HI101', '1', '013'), ('HI101', '2', '013'), ('SP101', '1', '014'); # -------------------------------------------------------- # # Table structure for table `sessions` # # Creation: Dec 09, 2003 at 06:54 PM # Last update: Dec 09, 2003 at 07:52 PM # DROP TABLE IF EXISTS `sessions`; CREATE TABLE `sessions` ( `sesskey` varchar(32) NOT NULL default '', `expiry` int(11) unsigned NOT NULL default '0', `value` text NOT NULL, PRIMARY KEY (`sesskey`) ) TYPE=MyISAM COMMENT='Used for session management'; # # Dumping data for table `sessions` # INSERT INTO `sessions` (`sesskey`, `expiry`, `value`) VALUES ('2a3b0f95c56c22f0cc5aed57af94dde1', 1071015516, ''), ('0b414f32ac15820eb81745efa6604d90', 1071015613, ''), ('44c0d88d4be3b0d492aa113754ef1db0', 1071015679, ''), ('ba4a6dc355aa32c57949cb76e9758a3f', 1071015682, ''), ('f903ad27dc5609ecb7192221a1a2177c', 1071015862, ''), ('b9a635840ab37efab9a0b68a4d91e333', 1071015864, ''), ('472afe08a336c819dc66d87383028085', 1071015866, ''), ('6081cfcf893b7a9da31b3bd10c56f805', 1071015975, ''), ('d30d9caad4a0aff7b268298271009741', 1071016541, ''), ('51f7eeba64ed2c0acdaa783e747b9b45', 1071016693, ''), ('f2f4ec8016ae5d4da99c151c25dddd9c', 1071016757, ''), ('140113f33ed3a9454769eff3e1afcdc2', 1071016759, ''), ('264f1d15697e98270c2480759e34036c', 1071016762, ''), ('aa6e490b67ff05b5a4a98983b05992f6', 1071016763, ''), ('b2fec2fdd8ba4b2dfcf655a292e74886', 1071016764, ''), ('3d21b36431d28227f19e560392b7517a', 1071016765, ''), ('310fcf344ba171d464b5aeaac02eedc2', 1071016766, ''), ('3a6360575d64c47af2c956efcc0cfccc', 1071016768, ''), ('e1414db9ba3b87bb3d0f2e9f0430fe36', 1071016770, ''), ('309fd8b8f5425ce03fdc771f036d2748', 1071016770, ''), ('51e6e662134166bb54aa76afcc101374', 1071016903, ''), ('8c5fd735cf21b25e4d9e1c691ce017f9', 1071017168, ''), ('71dcce1ad0fc4f2968880bdfe8adaa8e', 1071017175, ''), ('db2a1600cbf1dd22ceb721a66ff421da', 1071017181, ''), ('79ceaed20d6b87cfdbb1e5f858152ae3', 1071017183, ''), ('d9d466d942547b793183d3b00841fbec', 1071017199, ''), ('250f610ec6665ac4f303bdf79b7ed45c', 1071017204, ''), ('94eb980bcf8083b89dd93e086672056d', 1071017214, ''), ('3f99d43bb6de3bc94368a9531bd3d199', 1071017216, ''), ('25226fb4f781a9cb3be311a71f0bc007', 1071017217, ''), ('4a84df8aa4de152f56b8b85455497f7d', 1071017218, ''), ('9a40aaea9b6cca69a61e9c815b584651', 1071017220, ''), ('65c7323271122a0c80bccfa61b836830', 1071017260, ''), ('a7d1ec625f6dcc0cc778cd5965fdff18', 1071017261, ''), ('d5d77e783c9876280e20372fe966c61a', 1071017261, ''), ('ca461d8b4a6b43c89d76f73499549539', 1071017262, ''), ('db52eeb6b8f45372f7076d31b1d8c807', 1071017263, ''), ('965cdc8db961b2fd67033b3ae821b607', 1071017263, ''), ('e3fd1a8e9b5a4e21b4148ffc40a42156', 1071017304, ''), ('8e2d910ccb3579832b6af104beaf41d8', 1071018849, ''), ('fcb6db605e124c6c61d2ce7324bc85cb', 1071018853, ''), ('ebca8187d597c3d3a57164c1c3d0b1df', 1071018867, ''), ('3c4d2f8e88765a59f51dbebb59d233d2', 1071019003, ''), ('6e21723412d0335a8ac5cab786581fdb', 1071019006, ''); # -------------------------------------------------------- # # Table structure for table `student` # # Creation: Dec 10, 2003 at 05:48 PM # Last update: Dec 10, 2003 at 05:52 PM # DROP TABLE IF EXISTS `student`; CREATE TABLE `student` ( `Student_Code` varchar(6) NOT NULL default '', `Student_LastName` varchar(20) NOT NULL default '', `Student_FirstName` varchar(15) NOT NULL default '', `Student_Password` varchar(50) NOT NULL default '', PRIMARY KEY (`Student_Code`), KEY `Student_Code` (`Student_Code`), KEY `Student_FirstName` (`Student_FirstName`), KEY `Student_LastName` (`Student_LastName`), KEY `Student_Password` (`Student_Password`) ) TYPE=MyISAM; # # Dumping data for table `student` # INSERT INTO `student` (`Student_Code`, `Student_LastName`, `Student_FirstName`, `Student_Password`) VALUES ('100', 'Smith', 'Chris', 'cfcd208495d565ef66e7dff9f98764da'), ('101', 'Erbentraut', 'Steven', 'cfcd208495d565ef66e7dff9f98764da'), ('102', 'Pierce', 'Brad', 'cfcd208495d565ef66e7dff9f98764da'), ('103', 'Hale', 'Ben', 'cfcd208495d565ef66e7dff9f98764da'), ('104', 'Kendall', 'Aaron', 'cfcd208495d565ef66e7dff9f98764da'), ('105', 'Musgrave', 'Philip', 'cfcd208495d565ef66e7dff9f98764da'), ('106', 'Jolicoeur', 'Craig', 'cfcd208495d565ef66e7dff9f98764da'), ('107', 'Smith', 'Aaron', 'cfcd208495d565ef66e7dff9f98764da'), ('108', 'Gunawan', 'Yonatan', 'cfcd208495d565ef66e7dff9f98764da'), ('109', 'Jones', 'Aaron', 'cfcd208495d565ef66e7dff9f98764da'), ('110', 'Davis', 'Heather', 'cfcd208495d565ef66e7dff9f98764da'), ('111', 'Thompson', 'Alisa', 'cfcd208495d565ef66e7dff9f98764da'), ('112', 'Stout', 'Zoie', 'cfcd208495d565ef66e7dff9f98764da'), ('113', 'Stout', 'Faith', 'cfcd208495d565ef66e7dff9f98764da'), ('114', 'Hearn', 'Michael', 'cfcd208495d565ef66e7dff9f98764da'), ('115', 'Lancaster', 'Brandon', 'cfcd208495d565ef66e7dff9f98764da'), ('116', 'Lynn', 'Nathan', 'cfcd208495d565ef66e7dff9f98764da'), ('117', 'Park', 'Coral', 'cfcd208495d565ef66e7dff9f98764da'), ('118', 'Smith', 'Sean', 'cfcd208495d565ef66e7dff9f98764da'), ('119', 'Campbell', 'Shawn', 'cfcd208495d565ef66e7dff9f98764da'), ('120', 'Valles', 'David', 'cfcd208495d565ef66e7dff9f98764da'), ('121', 'Lassiter', 'Ben', 'cfcd208495d565ef66e7dff9f98764da'), ('122', 'Fredrick', 'Lance', 'cfcd208495d565ef66e7dff9f98764da'), ('123', 'Williams', 'Ryan', 'cfcd208495d565ef66e7dff9f98764da'), ('124', 'Steele', 'Geoffe', 'cfcd208495d565ef66e7dff9f98764da'), ('125', 'Campbell', 'Joseph', 'cfcd208495d565ef66e7dff9f98764da'), ('126', 'Martell', 'Chris', 'cfcd208495d565ef66e7dff9f98764da'), ('127', 'McCarville', 'Doug', 'cfcd208495d565ef66e7dff9f98764da'), ('128', 'Williams', 'Rodney', 'cfcd208495d565ef66e7dff9f98764da'), ('129', 'Gathard', 'Ryan', 'cfcd208495d565ef66e7dff9f98764da'), ('130', 'Weary', 'Jeremy', 'cfcd208495d565ef66e7dff9f98764da'); # -------------------------------------------------------- # # Table structure for table `test` # # Creation: Dec 10, 2003 at 05:48 PM # Last update: Dec 10, 2003 at 05:48 PM # DROP TABLE IF EXISTS `test`; CREATE TABLE `test` ( `Test_Code` int(11) NOT NULL default '0', `Test_Name` longtext NOT NULL, `Test_Instructions` longtext, `Course_Code` varchar(5) NOT NULL default '', `Section_Code` char(2) NOT NULL default '' ) TYPE=MyISAM; # # Dumping data for table `test` # INSERT INTO `test` (`Test_Code`, `Test_Name`, `Test_Instructions`, `Course_Code`, `Section_Code`) VALUES (2, 'Test 01 - Basic Grammar (created 4/15/2003 9:51:15 AM)', 'This test is to see how well you have listened during English Lecture!', 'EN101', '1'), (3, 'Test 1 (created 4/17/2003 8:30:10 AM)', 'Please read each question carefully and choose the answer that BEST answers the question.', 'HI101', '1'), (4, 'Matthew 1-7 (created 4/17/2003 8:47:51 AM)', 'none', 'BI101', '1'), (5, 'Chapter 1 (created 4/17/2003 11:15:32 AM)', 'Read each question carefully.', 'BA101', '1'), (6, 'Chapter 1 (created 4/17/2003 7:08:20 PM)', 'Please read all instructions carefully.', 'CS214', ''), (7, 'Units 2,3,4 - Quiz 1 (created 4/17/2003 8:02:22 PM)', 'Questions based on Scripture Reading, Telephone Usage, and Impromptu Speaking sections.', 'SP101', '1'), (8, 'Units 2,3,4 - Quiz 2 (created 4/17/2003 8:09:37 PM)', 'Questions based on Scripture Reading, Telephone Usage, and Impromptu Speaking sections.', 'SP101', '1'), (9, 'Units 2,3,4 - Quiz 3 (created 4/17/2003 8:15:52 PM)', 'Questions based on Scripture Reading, Telephone Usage, and Impromptu Speaking sections.', 'SP101', '1'), (10, 'Units 2,3,4 - Quiz 4 (created 4/17/2003 8:20:38 PM)', 'Questions based on Scripture Reading, Telephone Usage, and Impromptu Speaking sections.', 'SP101', '1'), (11, 'Test 02 - Correct Use of Modifiers (created 4/17/2003 8:27:58 PM)', 'Write the correct form of the modifier in the parenthesis.', 'EN101', '1'), (12, 'Test 03 - Correct Use of Voice (Part 1) (created 4/19/2003 4:33:21 PM)', 'In the blanks, write active or passive to indicate the voice of the underlined verbs.', 'EN101', '1'), (13, 'Test 04 - Correct use of Voice (Part 2) (created 4/19/2003 5:01:03 PM)', 'Select whether the verb/verb-phrase is active, passive, or neither.', 'EN101', '1'), (14, 'Test 05 - Correct use of Mood (created 4/19/2003 5:15:57 PM)', 'Identify the mood of the _underlined_ verbs by selecting or writing indicative, imperative, or subjective (You must write out the whole word!)', 'EN101', '1'), (15, 'Test 06 - The Noun Clause (created 4/19/2003 7:35:57 PM)', 'Select or fill in the use of each of the _underlined_ noun clauses: subject(s), direct object(do), predicate nominative (pn), object of preposition (op), or appositive (ap). For the Short Answer questions, use the above abbreviations.', 'EN101', '1'), (16, 'Chapter 1 Test (created 4/20/2003 10:05:08 PM)', 'none', 'CS202', '1'); |
From: <cpj...@us...> - 2003-12-22 18:04:24
|
Update of /cvsroot/etest/etest/student In directory sc8-pr-cvs1:/tmp/cvs-serv1766/student Modified Files: student_basics.css Log Message: fixed file format for use with new css_edit.php editor file -- craig Index: student_basics.css =================================================================== RCS file: /cvsroot/etest/etest/student/student_basics.css,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** student_basics.css 22 Dec 2003 14:17:37 -0000 1.3 --- student_basics.css 22 Dec 2003 18:04:21 -0000 1.4 *************** *** 1,120 **** ! body { ! font-family: Arial, Helvetica, sans-serif; ! background-color: #FFFFF0; ! } ! ! td { ! font-family: Arial, Helvetica, sans-serif; ! } ! ! th { ! font-family: Arial, Helvetica, sans-serif; ! } ! ! h3 { ! font-family: Arial, Helvetica, sans-serif; ! color: #800000; ! } ! ! h4 { ! font-family: Arial, Helvetica, sans-serif; ! color: #800000; ! } ! ! a { ! color: #800000; ! } ! ! #warning { ! font-family: Arial, Helvetica, sans-serif; ! color: #FF0000; ! font-weight: bold; ! } ! ! #secheader { ! font-family: Arial, Helvetica, sans-serif; ! color: #800000; ! font-weight: bold; ! } ! ! select { ! font-family: Courier New; ! } ! ! .singleselect { ! color:#000000; ! background-color:#F9F9F9; ! font-size: 12px; ! line-height: 14px; ! font-family: Courier New; ! height: 20px; ! } ! ! .QTypeSelect { ! color:#000000; ! background-color:#F9F9F9; ! font-size: 12px; ! line-height: 14px; ! font-family: Courier New; ! width: 175px; ! } ! ! .form { ! color:#000040; ! font-size: 12px; ! line-height: 14px; ! font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; ! background-color: #FFFFD0; ! padding: 1px 3px 1px 1px; ! border: solid 1px #000; ! height: 20px; ! } ! ! .longform { ! color:#000040; ! font-size: 12px; ! line-height: 14px; ! font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; ! background-color: #C1DAFF; ! padding: 1px 3px 1px 1px; ! border: solid 1px #000; ! height: 20px; ! width: 200px; ! } ! ! .shortform { ! color:#000040; ! font-size: 12px; ! line-height: 14px; ! font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; ! background-color: #C1DAFF; ! padding: 1px 3px 1px 1px; ! border: solid 1px #000; ! height: 20px; ! width: 50px; ! } ! ! .submitbutton { ! color:#FFFFF0; ! font-weight: bold; ! font-size: 12px; ! line-height: 12px; ! font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; ! background-color:#800000; ! padding: 1px; ! border-style: solid; ! border-width: 1px; ! border-color: #FFFFD0 #FFFFD0 #FFFFD0 #FFFFD0; ! height: 20px; ! } ! ! .indent { ! padding: 0px 0px 0px 13px; ! } ! ! .Q_Quantity_Table { ! background-color:#D2D4D8; ! padding:5px 5px 5px 5px; ! border: solid 2px #425BA8; ! border-collapse:collapse; ! } --- 1,17 ---- ! body { font-family: Arial, Helvetica, sans-serif; background-color: #FFFFF0; } ! td { font-family: Arial, Helvetica, sans-serif; } ! th { font-family: Arial, Helvetica, sans-serif; } ! h3 { font-family: Arial, Helvetica, sans-serif; color: #800000; } ! h4 { font-family: Arial, Helvetica, sans-serif; color: #800000; } ! a { color: #800000; } ! #warning { font-family: Arial, Helvetica, sans-serif; color: #FF0000; font-weight: bold; } ! #secheader { font-family: Arial, Helvetica, sans-serif; color: #800000; font-weight: bold; } ! select { font-family: Courier New; } ! .singleselect { color:#000000; background-color:#F9F9F9; font-size: 12px; line-height: 14px; font-family: Courier New; height: 20px; } ! .QTypeSelect { color:#000000; background-color:#F9F9F9; font-size: 12px; line-height: 14px; font-family: Courier New; width: 175px; } ! .form { color:#000040; font-size: 12px; line-height: 14px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #FFFFD0; padding: 1px 3px 1px 1px; border: solid 1px #000; height: 20px; } ! .longform { color:#000040; font-size: 12px; line-height: 14px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #C1DAFF; padding: 1px 3px 1px 1px; border: solid 1px #000; height: 20px; width: 200px; } ! .shortform { color:#000040; font-size: 12px; line-height: 14px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: #C1DAFF; padding: 1px 3px 1px 1px; border: solid 1px #000; height: 20px; width: 50px; } ! .submitbutton { color:#FFFFF0; font-weight: bold; font-size: 12px; line-height: 12px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color:#800000; padding: 1px; border-style: solid; border-width: 1px; border-color: #FFFFD0 #FFFFD0 #FFFFD0 #FFFFD0; height: 20px; } ! .indent { padding: 0px 0px 0px 13px; } ! .Q_Quantity_Table { background-color:#D2D4D8; padding:5px 5px 5px 5px; border: solid 2px #425BA8; border-collapse:collapse; } |
From: <cpj...@us...> - 2003-12-22 18:04:24
|
Update of /cvsroot/etest/etest/administrator In directory sc8-pr-cvs1:/tmp/cvs-serv1766/administrator Modified Files: admin_basics.css Log Message: fixed file format for use with new css_edit.php editor file -- craig Index: admin_basics.css =================================================================== RCS file: /cvsroot/etest/etest/administrator/admin_basics.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_basics.css 4 Dec 2003 01:06:05 -0000 1.1 --- admin_basics.css 22 Dec 2003 18:04:21 -0000 1.2 *************** *** 1,42 **** ! body { ! font-family: Arial, Helvetica, sans-serif; ! background-color: #F0F4FF; ! } ! ! td { ! font-family: Arial, Helvetica, sans-serif; ! } ! ! th { ! font-family: Arial, Helvetica, sans-serif; ! } ! ! h3 { ! font-family: Arial, Helvetica, sans-serif; ! color: #000040; ! } ! ! h4 { ! font-family: Arial, Helvetica, sans-serif; ! color: #000099; ! } ! ! a { ! color: #000099; ! } ! ! #warning { ! font-family: Arial, Helvetica, sans-serif; ! color: #FF0000; ! font-weight: bold; ! } ! ! #secheader { ! font-family: Arial, Helvetica, sans-serif; ! color: #000099; ! font-weight: bold; ! } ! ! select { ! font-family: Courier New; ! } \ No newline at end of file --- 1,9 ---- ! body { font-family: Arial, Helvetica, sans-serif; background-color: #F0F4FF; } ! td { font-family: Arial, Helvetica, sans-serif; } ! th { font-family: Arial, Helvetica, sans-serif; } ! h3 { font-family: Arial, Helvetica, sans-serif; color: #000040; } ! h4 { font-family: Arial, Helvetica, sans-serif; color: #000099; } ! a { color: #000099; } ! #warning { font-family: Arial, Helvetica, sans-serif; color: #FF0000; font-weight: bold; } ! #secheader { font-family: Arial, Helvetica, sans-serif; color: #000099; font-weight: bold; } ! select { font-family: Courier New; } |
From: <cpj...@us...> - 2003-12-22 14:17:40
|
Update of /cvsroot/etest/etest/student In directory sc8-pr-cvs1:/tmp/cvs-serv21903/student Modified Files: student_basics.css Log Message: changed submit button style -- craig Index: student_basics.css =================================================================== RCS file: /cvsroot/etest/etest/student/student_basics.css,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** student_basics.css 16 Dec 2003 15:52:15 -0000 1.2 --- student_basics.css 22 Dec 2003 14:17:37 -0000 1.3 *************** *** 96,109 **** .submitbutton { ! color:#D2D4D8; font-weight: bold; font-size: 12px; line-height: 12px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; ! background-color:#555454; padding: 1px; border-style: solid; border-width: 1px; ! border-color: #c0c0c0 black black #c0c0c0; height: 20px; } --- 96,109 ---- .submitbutton { ! color:#FFFFF0; font-weight: bold; font-size: 12px; line-height: 12px; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular; ! background-color:#800000; padding: 1px; border-style: solid; border-width: 1px; ! border-color: #FFFFD0 #FFFFD0 #FFFFD0 #FFFFD0; height: 20px; } |