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

📄 ques.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" %><%@ 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.ques" /></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() %>/admin/admin.css" type="text/css" />		<style type="text/css">		<!--			.quesText {				font-weight: bold;				font-size: 11pt;				background-color:#ffffcc;				padding-top: 20px;				padding-bottom: 20px;			}			.answerChoices {				border:none;				background-color: #ddffdd;			}			.answerInput {				border:none;				background-color: #ddffdd;			}			.oddIndexChoice {				background-color:#ddeedd;			}			<c:if test="${answerReceived != null}" >				.correct {					font-weight: bold;					color: #00aa00;					border: 1px solid #000066;				}				.wrong, .timedOut {					font-weight: bold;					color: #aa0000;					border: 1px solid #000066;				}			</c:if>		// -->		</style>		<script type="text/javascript" src="<%= request.getContextPath() %>/utils.js" ></script>		<script type="text/javascript" >		<!--			function validateForm(form )			{				<c:if test="${answerReceived == null}" >					<c:choose>									<c:when test="${quesData.multipleChoiceType}" >							var hasCorrect = false;							<c:forEach items="${quesData.answerChoices}" varStatus="aStatus" >								if (form.elements["multipleAnswerIndexed[<c:out value="${aStatus.index}" />]"].checked)								{									hasCorrect = true;								}							</c:forEach>							if (!hasCorrect)							{								alert("<cyberdemia:jsString><fmt:message key="jstext.testee.test.ques.error.missingMultipleChoiceAnswer" /></cyberdemia:jsString>");								return false;							}						</c:when>						<c:when test="${quesData.keywordsType}" >							if (form.elements["answer"].value.trim().length ==0)							{								alert("<cyberdemia:jsString><fmt:message key="jstext.testee.test.ques.error.missingKeywordsAnswer" /></cyberdemia:jsString>");								return false;							}						</c:when>					</c:choose>								return true;				</c:if>			}		// -->		</script>		<html:base/>	</head>	<body>		<%@ include file="/include/header.jsp" %>		<html:errors />		<p class="warning"><fmt:message key="text.testee.test.ques.warning.backForwardButtons" /></p>				<table width="90%" class="viewer">			<tr>				<th width="1%" class="label"><fmt:message key="label.testee.test.ques.test" /></th>				<td width="99%" class="value"><c:out value="${testData.name}" /></td>			</tr>			<tr>				<th width="1%" class="label"><fmt:message key="label.testee.test.ques.question" ><fmt:param value="${testQuestionForm.quesIndex + 1}" /><fmt:param value="${quesCount}" /></fmt:message></th>				<td width="99%" class="value"><c:out value="${quesData.name}" /></td>			</tr>			<c:if test="${quesData.timeLimitSeconds gt 0}">				<tr>					<th width="1%" class="label"><html:img page="/images/clock.gif" alt="This question has a time limit" /><fmt:message key="label.testee.test.ques.timeLimit" /></th>					<td width="99%" class="value"><c:out value="${quesData.timeLimitSeconds}" />&nbsp;<fmt:message key="label.testee.test.ques.timeLimit.seconds" /></td>				</tr>			</c:if>			<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.ques.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.ques.singleChoiceType.selectAnswer" /></td>					</tr>					<html:form action="/testee/test/checkAnswer.do">						<html:hidden property="quesIndex" />						<c:forEach var="choice" items="${quesData.answerChoices}" varStatus="status" >							<tr>								<td <c:if test="${status.index%2 == 1}" >class="oddIndexChoice"</c:if> >									<c:out value="${status.index}" /> <label><input type="radio" name="answer" value="<c:out value="${status.index}" />" <c:if test="${(status.index == 0) && (answerReceived == null)}" >checked="checked"</c:if> /><c:out value="${choice}" /></label>								</td>							</tr>						</c:forEach>						<c:if test="${answerReceived == null}" >							<tr><td><html:submit><fmt:message key="label.button.submit" /></html:submit></td></tr>						</c:if>					</html:form>				</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.ques.multipleChoiceType.selectAnswers" /></td>					</tr>					<html:form action="/testee/test/checkAnswer.do"  onsubmit="return validateForm(this);">						<html:hidden property="quesIndex" />						<c:forEach var="choice" items="${quesData.answerChoices}" varStatus="status" >							<tr>								<td <c:if test="${status.index%2==1}" >class="oddIndexChoice"</c:if> >									<c:out value="${status.index}" /> <label><input type="checkbox" name="multipleAnswerIndexed[<c:out value="${status.index}" />]" /><c:out value="${choice}" /></label>								</td>							</tr>						</c:forEach>						<c:if test="${answerReceived == null}" >							<tr><td><html:submit><fmt:message key="label.button.submit" /></html:submit></td></tr>						</c:if>					</html:form>				</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.ques.keywordsType.enterText" /></td>					</tr>					<html:form action="/testee/test/checkAnswer.do" onsubmit="return validateForm(this);">						<html:hidden property="quesIndex" />						<tr>							<td><html:textarea property="answer" cols="50" rows="5" /></td>						</tr>						<c:if test="${answerReceived == null}" >							<tr><td><html:submit><fmt:message key="label.button.submit" /></html:submit></td></tr>						</c:if>					</html:form>				</table>			</c:when>		</c:choose>		<c:if test="${answerReceived != null}" >			<hr />			<c:if test="${not testData.suppressQuestionFeedback}" >				<c:if test="${not quesData.keywordsType}" >					<c:if test="${answerStatus.correct}" >						<p class="correct"><fmt:message key="text.testee.test.ques.feedback.correct" /></p>					</c:if>					<c:if test="${answerStatus.wrong}" >						<p class="wrong"><fmt:message key="text.testee.test.ques.feedback.wrong" /></p>					</c:if>				</c:if>				<c:if test="${answerStatus.questionTimedOut}" >					<p class="timedOut"><fmt:message key="text.testee.test.ques.feedback.exceededTimeLimit" /></p>				</c:if>				<p><fmt:message key="text.testee.test.ques.feedback.score" ><fmt:param value="${answerStatus.score}/${quesData.score}" /></fmt:message></p>				<c:if test="${hasNextQuestion != null}">					<p>						<html:link page="/testee/test/getNextQuestion.do" >							<fmt:message key="label.testee.test.ques.link.nextQuestion" />						</html:link>					</p>				</c:if>			</c:if>			<c:if test="${hasNextQuestion == null}">				<p>					<fmt:message key="text.testee.test.ques.feedback.endOfTest" />				</p>				<c:if test="${not testData.suppressTestEndFeedback}" >					<div>						<html:link page="/testee/test/viewResults.do" paramId="testId" paramName="testId"  >							<fmt:message key="label.testee.test.ques.link.viewResults" />						</html:link>					</div>				</c:if>				<div>					<html:link page="/testee/goTestee.do"><fmt:message key="label.link.testeeHome" /></html:link>				</div>			</c:if>		</c:if>		<%@ include file="/include/footer.jsp" %>	</body></html:html>

⌨️ 快捷键说明

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