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

📄 multiques.jsp

📁 老外的在线考试
💻 JSP
字号:
<%-- * CyberTester - J2EE Web application for creating, delivering and managing tests/exams/surveys.  * Copyright (C) 2004 CyberDemia Research and Services Pty Ltd * * 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 (see the file COPYING); if not, write to the * Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA * * See the COPYING file located in the top-level-directory of * the archive of this program for complete text of license.--%><%@ page language="java" buffer="64kb" %><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %><%@ taglib uri="/WEB-INF/c.tld" prefix="c" %><%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %><%@ taglib uri="/WEB-INF/cd_core.tld" prefix="cyberdemia" %><html:html xhtml="true">	<head>		<title><fmt:message key="title.testee.test.multiques" /></title>		<meta http-equiv="pragmas" content="no-cache" />		<meta http-equiv="cache-control" content="no-cache" />		<meta http-equiv="expires" content="0" />		<link rel="stylesheet" href="<%= request.getContextPath() %>/cybertester.css" type="text/css" />		<link rel="stylesheet" href="<%= request.getContextPath() %>/testee/testee.css" type="text/css" />		<style type="text/css">		<!--			.quesText {				font-weight: bold;				font-size: 11pt;				background-color:#ffffcc;				padding-top: 10px;				padding-bottom: 10px;			}			.answerChoices {				border:none;				background-color: #ddffdd;				margin-bottom: 30px;			}			.answerInput {				border:none;				background-color: #ddffdd;				margin-bottom: 30px;			}			.oddIndexChoice {				background-color:#ddeedd;			}		// -->		</style>		<script type="text/javascript" src="<%= request.getContextPath() %>/utils.js" ></script>		<script type="text/javascript" >		<!--			var cancelling = false;			function cancelClicked()			{				cancelling = true;			}			function alertMissingAnswer( qidx )			{				alert("<cyberdemia:jsString><fmt:message key="jstext.testee.test.multiques.error.missingAnswer" /></cyberdemia:jsString>"+qidx);			}			function validateForm(form )			{				if (cancelling)				{					return true;				}				var hasCorrect = false;				<c:forEach var="quesData" items="${quesList}" varStatus="qStatus" begin="${quesListOffset}" end="${quesListBlockEndIndex}" >					<c:choose>						<c:when test="${quesData.multipleChoiceType}" >							hasCorrect = false;							<c:forEach items="${quesData.answerChoices}" varStatus="aStatus" >								if (form.elements["answer_<c:out value="${qStatus.index}" />_<c:out value="${aStatus.index}" />"].checked)								{									hasCorrect = true;								}							</c:forEach>							if (!hasCorrect)							{								alertMissingAnswer( <c:out value="${qStatus.index}" /> );								return false;							}						</c:when>						<c:when test="${quesData.keywordsType}" >							if (form.elements["answer_<c:out value="${qStatus.index}" />"].value.trim().length ==0)							{								alertMissingAnswer( <c:out value="${qStatus.index}" /> );								return false;							}						</c:when>					</c:choose>				</c:forEach>				return true;			}		// -->		</script>		<html:base/>	</head>	<body>		<%@ include file="/include/header.jsp" %>				<p class="warning"><fmt:message key="text.testee.test.ques.warning.backForwardButtons" /></p>				<table width="90%" class="viewer" style="margin-bottom:20px;">			<tr>				<th width="1%" class="label" style="font-size:14pt;">&nbsp;<fmt:message key="label.testee.test.multiques.test" />&nbsp;</th>				<td width="99%" class="value" style="font-size:14pt;">&nbsp;<c:out value="${testData.name}" /></td>			</tr>			<c:if test="${testData.timeLimitSeconds gt 0}">				<tr>					<th width="1%" class="label"><html:img page="/images/clock.gif" alt="This test has a time limit" /><fmt:message key="label.testee.test.multiques.timeLimit" /></th>					<td width="99%" class="value"><c:out value="${testData.timeLimitSeconds}" />&nbsp;<fmt:message key="label.testee.test.multiques.timeLimit.seconds" /></td>				</tr>			</c:if>		</table>		<form action="<cyberdemia:encodeUrl>/testee/test/checkMultiAnswers.do</cyberdemia:encodeUrl>" method="post" onsubmit="return validateForm(this);" >			<c:forEach var="quesData" items="${quesList}" varStatus="qStatus" begin="${quesListOffset}" end="${quesListBlockEndIndex}" >				<table width="90%" class="viewer">					<tr>						<th width="1%" class="label"><fmt:message key="label.testee.test.multiques.question" ><fmt:param value="${qStatus.index + 1}" /><fmt:param value="${quesCount}" /></fmt:message></th>						<td width="99%" class="value"><c:out value="${quesData.name}" /></td>					</tr>					<tr>						<td colspan="2" class="quesText" ><pre><c:out value="${quesData.question}" /></pre></td>					</tr>					<c:if test="${not empty quesData.hint}" >						<tr>							<th class="label"><fmt:message key="label.testee.test.multiques.hint" /></th>							<td class="value"><pre><c:out value="${quesData.hint}" /></pre></td>						</tr>					</c:if>				</table>				<c:choose>					<c:when test="${quesData.singleChoiceType}" >						<table width="90%" class="answerChoices">							<tr>								<td style="font-size:8pt;color:#550000;"><fmt:message key="label.testee.test.multiques.singleChoiceType.selectAnswer" /></td>							</tr>							<c:forEach var="choice" items="${quesData.answerChoices}" varStatus="aStatus" >								<tr>									<td <c:if test="${aStatus.index%2 == 1}" >class="oddIndexChoice"</c:if> >										<c:out value="${aStatus.index}" /> <label><input type="radio" name="answer_<c:out value="${qStatus.index}" />" value="<c:out value="${aStatus.index}" />" <c:if test="${aStatus.index == 0}" >checked="checked"</c:if> /><c:out value="${choice}" /></label>									</td>								</tr>							</c:forEach>						</table>					</c:when>					<c:when test="${quesData.multipleChoiceType}" >						<table width="90%" class="answerChoices">							<tr>								<td style="font-size:8pt;color:#550000;"><fmt:message key="label.testee.test.multiques.multipleChoiceType.selectAnswers" /></td>							</tr>							<c:forEach var="choice" items="${quesData.answerChoices}" varStatus="aStatus" >								<tr>									<td <c:if test="${aStatus.index%2==1}" >class="oddIndexChoice"</c:if> >										<c:out value="${aStatus.index}" /> <label><input type="checkbox" name="answer_<c:out value="${qStatus.index}" />_<c:out value="${aStatus.index}" />" value="true" /><c:out value="${choice}" /></label>									</td>								</tr>							</c:forEach>						</table>					</c:when>					<c:when test="${quesData.keywordsType}" >						<table width="90%" class="answerInput">							<tr>								<td style="font-size:8pt;color:#550000;"><fmt:message key="label.testee.test.multiques.keywordsType.enterText" /></td>							</tr>							<tr>								<td><textarea name="answer_<c:out value="${qStatus.index}" />" cols="50" rows="3" ></textarea></td>							</tr>						</table>					</c:when>				</c:choose>			</c:forEach>			<p>				<html:submit><fmt:message key="label.button.submit" /></html:submit> 				<c:if test="${quesListOffset==0}" >					<html:cancel onclick="cancelClicked()"><fmt:message key="label.button.cancel" /></html:cancel>				</c:if>			</p>		</form>		<%@ include file="/include/footer.jsp" %>	</body></html:html>

⌨️ 快捷键说明

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