⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inst_choose_test_modifications.asp

📁 A java project in e-bussiness module.
💻 ASP
字号:
<html>
<head>
<% help_location = "inst_choose_test_modifications" %>

<!-- Author: Brad Pierce -->
<title>Teacher View/Modify Test</title>
<link href="../instructor/inst_basics.css" rel="stylesheet" type="text/css">

<table border='0'><tr><td><img src="../images/netest.png"></td><td width='5%'></td><td width='100%'><br><h2>View/Modify Test</h2></td></tr>
<!-- #include file="../inst_navbar/teacher_navbar_print.inc" -->

<% 
   If not Session("inst_authenticated") Then
      Response.Redirect("inst_login.asp")
   End If
    
   IF session("test_deleted") = TRUE THEN
      Response.Redirect "inst_view_modify_test.asp"
   END IF
   
   Response.Buffer = True
   Response.ExpiresAbsolute = Now() - 1
   Response.Expires = 0
   Response.CacheControl = "no-cache"
   
   ' keep page from cacheing
   'IF session("submitted") <> TRUE AND session("deleted") <> TRUE AND session("modified") <> TRUE AND session("added") <> TRUE THEN
   '   Response.Write "<META http-equiv='Expires' content='0'>"      
   'END IF
%>
<META http-equiv='Expires' content='0'>
</head>

<TD valign='top'><br>
<% 
   dim oConn   ' Connection Object
   dim oRS     ' Record Set Object
   dim num_questions
   dim question_counter
   dim list_size
   
   Set oConn=Server.CreateObject("ADODB.connection")
   set oRS=Server.CreateObject("ADODB.recordset")
   
   oConn.Open "DSN=sd2db; UserID=Admin; pwd=netest"

   ' check to see if person is being forwarded from trying to hit back button and delete or modify again
   IF session("submitted") <> TRUE AND session("deleted") <> TRUE AND session("modified") <> TRUE AND session("added") <> TRUE THEN
      ' check for page refresh after the added, deleted, modified, and added variables have been reset.
	  IF request("selected_test") <> "" THEN
	     session("selected_test") = request("selected_test")
      END IF
   ELSE
      session("deleted") = FALSE
	  session("modified") = FALSE
	  session("added") = FALSE
	  session("submitted") = FALSE
   END IF
   
   IF session("selected_test") <> "" THEN
      response.write "<table><tr><td><img src='../images/asterisk.gif'></td><td><font size='2' color='#003333'><b>Scroll to bottom of page to make changes to test.</b></font></td></tr></table><hr><br>"
      session("multi_visit") = FALSE
	  session("print_header") = TRUE
%>
	  <!-- #include file="inst_view_test.asp" -->
<%
      if question_counter > 1 then
	     response.write "</table>"
	  end if 
	  
      oRS.Close
    
	  ' get the number of questions on the test
      sqltext = "SELECT Question_Number FROM Question WHERE Test_Code=" & session("selected_test") & ""
	  oRS.Open sqltext, oConn, 3
   
      num_questions = oRS.RecordCount
	  
	  IF num_questions < 13 THEN
	     list_size = num_questions
      ELSE
	     list_size = 13
      END IF
%>

<br><hr><br><br>
<table border='0'><tr><td><img src="../images/checkmark.gif"></td><td><font color='#003333'><b>Modify Test</b></font></td></tr>
<tr><td></td><td height='35' valign='top'>Add, delete, or update any questions on the test.</td></tr></table>

<table border='1' cellpadding='5'><tr>
<th><h4>Add:</h4></th>
<th><h4>Delete:</h4></th>
<th><h4>Update:</h4></th></tr>

<tr><td>
<FORM METHOD='post' ACTION='inst_create_test_additions.asp'><P>
<table border='0'>
<tr><td></td><td><h5>Number</td><td><h5>Choices</td></tr>
<tr><td><h5>Multiple Choice</td><td><INPUT NAME="num_multiple_choice" SIZE="5"></td><td><INPUT NAME="num_mc_choices" SIZE="5"></td></tr>
<tr><td><h5>True/False</td><td><INPUT NAME="num_true_false" SIZE="5"></td></tr>
<tr><td><h5>Modified True/False</td><td><INPUT NAME="num_m_true_false" SIZE="5"></td></tr>
<tr><td><h5>Matching</td><td><INPUT NAME="num_matching" SIZE="5"></td></tr>
<tr><td><h5>Completion</td><td><INPUT NAME="num_completion" SIZE="5"></td></tr>
<tr><td><h5>Short Answer</td><td><INPUT NAME="num_short_answer" SIZE="5"></td></tr>
<tr><td><h5>Essay</td><td><INPUT NAME="num_essay" SIZE="5"></td></tr>
<tr><td height='15'></td></tr>
<tr><td></td><td align='center'><INPUT TYPE='submit' VALUE='  Add  '></td></tr>
</table></P>
</FORM>
</td>

<FORM METHOD='post' ACTION='inst_view_delete_questions.asp'><P>
<td align='center' valign='top'>
<table border='0'><tr><td align='center'>
<P><SELECT MULTIPLE NAME='delete_questions' SIZE='<% = list_size + 1 %>'>
<%
   Response.Write "<option value='0'>Delete Test"
   FOR question_counter=1 to num_questions
      Response.Write "<OPTION VALUE='" & question_counter & "'>"
	  Response.Write question_counter & "</OPTION>"
   NEXT
%>
</SELECT>
</td>
<tr><td><INPUT TYPE='submit' VALUE='Delete'></td></tr>
</table>
</FORM>


<FORM METHOD='post' ACTION='inst_update_test.asp'><P>
<td align='center' valign='top'>
<table border='0'><tr><td align='center'>
<P><SELECT MULTIPLE NAME='modify_questions' SIZE='<% = list_size + 1 %>'>
<%
   Response.Write "<option value='0'>Instructions"
   FOR question_counter=1 to num_questions
      Response.Write "<OPTION VALUE='" & question_counter & "'>"
	  Response.Write question_counter & "</OPTION>"
   NEXT
%>
</SELECT>
</td>
<tr><td><INPUT TYPE='submit' VALUE='Update'></td></tr>
</table></p>
</FORM>
</table>

<%
      oRS.Close
      Set oRS = nothing
      oConn.Close
      Set oConn = nothing
   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>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -