📄 testeditor.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="32kb" %><%@ 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" %><%@ taglib uri="/WEB-INF/cd_cybertester.tld" prefix="cybertester" %><html:html xhtml="true"> <head> <title><fmt:message key="title.testeditor" /></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" /> <script type="text/javascript" src="<%= request.getContextPath() %>/utils.js" ></script> <script type="text/javascript" > <!-- var cancelling = false; function cancelClicked() { cancelling = true; } function validateForm(form ) { if (cancelling) { return true; } if (form.elements["name"].value.trim().length ==0) { alert("<cyberdemia:jsString><fmt:message key="jstext.testeditor.testForm.error.missingName" /></cyberdemia:jsString>"); return false; } var passPercentage = form.elements["passPercentage"].value.trim(); if (passPercentage.length ==0) { alert("<cyberdemia:jsString><fmt:message key="jstext.testeditor.testForm.error.missingPassPercentage" /></cyberdemia:jsString>"); return false; } if (!isIntegerInRange( parseFloat( passPercentage ), 0, 99 ) ) { alert("<cyberdemia:jsString><fmt:message key="jstext.testeditor.testForm.error.invalidPassPercentage" /></cyberdemia:jsString>"); return false; } var timeLimit = form.elements["timeLimitSeconds"].value.trim(); if (timeLimit.length ==0) { alert("<cyberdemia:jsString><fmt:message key="jstext.testeditor.testForm.error.missingTimeLimit" /></cyberdemia:jsString>"); return false; } var timeLimitInt = parseInt( timeLimit ); if (isNaN(timeLimitInt) || (timeLimitInt<0) ) { alert("<cyberdemia:jsString><fmt:message key="jstext.testeditor.testForm.error.invalidTimeLimit" /></cyberdemia:jsString>"); return false; } return true; } // --> </script> <html:base /> </head> <body onload="parent.disableHierarchyTree()"> <%@ include file="/include/header.jsp" %> <h1><html:img page="/images/admintests_big.gif" alt="Tests admin" /> <fmt:message key="h1.testeditor" /></h1> <html:errors/> <cybertester:hierarchyNode /> <hr /> <html:form styleId="testForm" action="/admin/saveTest" method="post" onsubmit="return validateForm(this);" > <html:hidden property="mode" /> <html:hidden property="id" /> <html:hidden property="ownerHierId" /> <table width="100%" class="editor" > <tr> <th align="right" width="1%"><fmt:message key="label.testeditor.testForm.name" /></th> <td align="left" width="99%"> <html:text property="name" size="40" maxlength="40"/> </td> </tr> <tr> <th align="right" width="1%"><fmt:message key="label.testeditor.testForm.passPercentage" /></th> <td align="left" width="99%"> <html:text property="passPercentage" size="2" maxlength="3"/>% </td> </tr> <tr> <th align="right" width="1%"><fmt:message key="label.testeditor.testForm.multiQuestionsMode" /></th> <td align="left" width="99%"> <html:checkbox property="multiQuestionsMode" /><span class="superscript">*</span> </td> </tr> <tr> <th align="right" width="1%"><fmt:message key="label.testeditor.testForm.timeLimit" /></th> <td align="left" width="99%"> <html:text property="timeLimitSeconds" size="4" maxlength="6" /><span class="superscript">**</span> </td> </tr> <tr> <th align="right" width="1%"><fmt:message key="label.testeditor.testForm.suppressQuestionFeedback" /></th> <td align="left" width="99%"> <html:checkbox property="suppressQuestionFeedback" /><span class="superscript">***</span> </td> </tr> <tr> <th align="right" width="1%"><fmt:message key="label.testeditor.testForm.suppressTestEndFeedback" /></th> <td align="left" width="99%"> <html:checkbox property="suppressTestEndFeedback" /><span class="superscript">****</span> </td> </tr> </table> <div class="footnotes">* <fmt:message key="text.testeditor.testForm.footnote.multiQuesMode" ><fmt:param value="${quesListBlockSize}" /></fmt:message></div> <div class="footnotes">** <fmt:message key="text.testeditor.testForm.footnote.timeLimit" /></div> <div class="footnotes">*** <fmt:message key="text.testeditor.testForm.footnote.suppressQuestionFeedback" /></div> <div class="footnotes">**** <fmt:message key="text.testeditor.testForm.footnote.suppressTestEndFeedback" /></div> <c:if test="${mode == 'edit'}"> <hr /> <h2><fmt:message key="label.testeditor.testForm.questions" /></h2> <table width="100%" class="editor" > <c:if test="${testData.relatedResourcesCount gt 0}" > <tr><th colspan="4"><fmt:message key="label.testeditor.testForm.associated" /></th></tr> <tr> <th width="1%"><fmt:message key="label.testeditor.testForm.disassociate" /></th> <th width="49%"><fmt:message key="label.testeditor.testForm.quesName" /></th> <th width="49%"><fmt:message key="label.testeditor.testForm.quesContent" /></th> <th width="1%"><fmt:message key="label.testeditor.testForm.quesScore" /></th> </tr> <c:forEach var="relResource" items="${testData.relatedResources}" > <tr> <td> <input type="checkbox" name="<c:out value="${disassocParamPrefix}" /><c:out value="${relResource.id}" />" value="true" /> </td> <td> <c:out value="${relResource.name}" /> </td> <td> <c:out value="${relResource.properties.description}" /> </td> <td> <c:out value="${relResource.properties.score}" /> </td> </tr> </c:forEach> </c:if> <c:if test="${testData.unrelatedResourcesCount gt 0}" > <tr><th colspan="4"><fmt:message key="label.testeditor.testForm.available" /></th></tr> <tr> <th width="1%"><fmt:message key="label.testeditor.testForm.associate" /></th> <th width="49%"><fmt:message key="label.testeditor.testForm.quesName" /></th> <th width="49%"><fmt:message key="label.testeditor.testForm.quesContent" /></th> <th width="1%"><fmt:message key="label.testeditor.testForm.quesScore" /></th> </tr> <c:forEach var="unrelResource" items="${testData.unrelatedResources}"> <tr> <td> <input type="checkbox" name="<c:out value="${assocParamPrefix}" /><c:out value="${unrelResource.id}" />" value="true" /> </td> <td> <c:out value="${unrelResource.name}" /> </td> <td> <c:out value="${unrelResource.properties.description}" /> </td> <td> <c:out value="${unrelResource.properties.score}" /> </td> </tr> </c:forEach> </c:if> </table> </c:if> <div style="margin-top:10px;"> <html:submit><fmt:message key="label.button.submit" /></html:submit> <html:cancel onclick="cancelClicked()" ><fmt:message key="label.button.cancel" /></html:cancel> </div> </html:form> <p> <html:link page="/admin/goAdmin.do"><html:img page="/images/home.gif" alt="Click to return to Admin Home" /><fmt:message key="label.link.adminHome" /></html:link> </p> <%@ include file="/include/footer.jsp" %> </body></html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -