You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
161 lines
4.8 KiB
161 lines
4.8 KiB
5 months ago
|
<!-- $Id: qdefhdr.htt,v 1.4 2006/01/17 20:37:50 ddoughty Exp $ -->
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE>Question <%=QUESTION.id%></TITLE>
|
||
|
<META name="generator" content="S. Caldwell">
|
||
|
<%=SYSTEM.STARTIF?SESSION.browserapp MSIE INCLUDE %>
|
||
|
<STYLE>
|
||
|
<!--
|
||
|
SELECT {font-size: 10px;}
|
||
|
INPUT {font-size: 10px;height: 20;}
|
||
|
-->
|
||
|
</STYLE>
|
||
|
<%=SYSTEM.ENDIF%>
|
||
|
<%=SYSTEM.INCLUDEJS global.js %>
|
||
|
<script language="JavaScript">
|
||
|
<!--
|
||
|
var down, csec, syncform;
|
||
|
|
||
|
function wdw_onLoad() {
|
||
|
var oform,i;
|
||
|
syncform = top.findex.document.syncform
|
||
|
syncform.csec.value = <%=SYSTEM.autologout%>;
|
||
|
monitor();
|
||
|
oform=document.form1;
|
||
|
for (n=0; n< oform.qid.options.length; n++) {
|
||
|
s=oform.qid.options[n].value;
|
||
|
if (s=="<%=FORM.qid%>") {
|
||
|
oform.qid.selectedIndex=n;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
function monitor() {
|
||
|
monitorrepeat();
|
||
|
}
|
||
|
function monitorrepeat() {
|
||
|
csec=syncform.csec.value;
|
||
|
csec--;
|
||
|
syncform.csec.value=csec;
|
||
|
if ((csec > 0)) {
|
||
|
down=setTimeout("monitorrepeat()",1000);
|
||
|
}
|
||
|
}
|
||
|
function reset_autotimer() {
|
||
|
syncform.csec.value=<%=SYSTEM.autologout%>;
|
||
|
}
|
||
|
function select_question(objForm) {
|
||
|
var nIdx,s,n,nNoOpts;
|
||
|
nIdx = objForm.qid.selectedIndex;
|
||
|
s=objForm.qid.options[nIdx].value;
|
||
|
if (s.substring(0,1) == "*") {
|
||
|
n=s.length+1;
|
||
|
styp=s.substring(1,n);
|
||
|
if ((styp == "mcs") || (styp == "mcm") || (styp == "mch") || (styp == "ord") || (styp == "mca")) {
|
||
|
nNoOpts=prompt("How many answers (2 - 25) ?","3");
|
||
|
if (nNoOpts) {
|
||
|
sURL = "<%=PATHS.cgiroot%>/qdef.pl?tid=<%=SESSION.tid%>&lang=<%=SESSION.lang%>&frm=2&tstid=<%=TEST.id%>&qid=<%=TEST.id%>.000&qtp="+styp+"&numanswers="+nNoOpts;
|
||
|
parent.qanswers.document.location = sURL;
|
||
|
}
|
||
|
} else if (styp == "mtx" || styp == "mtr") {
|
||
|
nNoRows=prompt("How many rows (2 - 25) ?","3");
|
||
|
nNoCols=prompt("How many columns/answers (2 - 5) ?","5");
|
||
|
var lblall = "";
|
||
|
if (!confirm("<%=PHRASE.792%>\n<%=PHRASE.793%>")) {
|
||
|
lblall = "&lblall=Y";
|
||
|
}
|
||
|
if (nNoRows && nNoCols) {
|
||
|
sURL = "<%=PATHS.cgiroot%>/qdef.pl?tid=<%=SESSION.tid%>&lang=<%=SESSION.lang%>&frm=2&tstid=<%=TEST.id%>&qid=<%=TEST.id%>.000&qtp="+styp+"&numacols="+nNoCols+"&numarows="+nNoRows+lblall;
|
||
|
parent.qanswers.document.location = sURL;
|
||
|
}
|
||
|
} else {
|
||
|
sURL = "<%=PATHS.cgiroot%>/qdef.pl?tid=<%=SESSION.tid%>&lang=<%=SESSION.lang%>&frm=2&tstid=<%=TEST.id%>&qid=<%=TEST.id%>.000&qtp="+styp;
|
||
|
parent.qanswers.document.location = sURL;
|
||
|
}
|
||
|
} else {
|
||
|
if (nIdx > 0) {
|
||
|
sURL = "<%=PATHS.cgiroot%>/qdef.pl?tid=<%=SESSION.tid%>&lang=<%=SESSION.lang%>&frm=2&tstid=<%=TEST.id%>&qid=" + objForm.qid.options[nIdx].value;
|
||
|
parent.qanswers.document.location = sURL;
|
||
|
return true;
|
||
|
} else {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
function btn_next_click(oform) {
|
||
|
var n,s;
|
||
|
n=oform.qid.selectedIndex;
|
||
|
s=oform.qid.options[n].value;
|
||
|
if (s.substring(0,1)=="*") {
|
||
|
for (n=0; n < oform.qid.options.length; n++) {
|
||
|
s=oform.qid.options[n].value;
|
||
|
if (s.substring(0,1)!="*") {
|
||
|
oform.qid.selectedIndex=n;
|
||
|
select_question(oform);
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
} else {
|
||
|
if (n < oform.qid.options.length-1) {
|
||
|
n++;
|
||
|
oform.qid.selectedIndex=n;
|
||
|
select_question(oform);
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
function btn_previous_click(oform) {
|
||
|
var n,s;
|
||
|
n=oform.qid.selectedIndex;
|
||
|
n--;
|
||
|
s=oform.qid.options[n].value;
|
||
|
if (s.substring(0,1) != "*") {
|
||
|
oform.qid.selectedIndex=n;
|
||
|
select_question(oform);
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
window.onload=wdw_onLoad;
|
||
|
// -->
|
||
|
</SCRIPT>
|
||
|
</HEAD>
|
||
|
|
||
|
<BODY BACKGROUND="<%=SYSTEM.BACKGROUND%>" BGCOLOR="<%=SYSTEM.BGCOLOR%>"
|
||
|
TEXT="<%=SYSTEM.TEXT%>" LINK="<%=SYSTEM.LINK%>"
|
||
|
VLINK="<%=SYSTEM.VLINK%>" ALINK="<%=SYSTEM.ALINK%>">
|
||
|
<FORM NAME="form1" METHOD=POST ACTION="<%=PATHS.cgiroot%>/qdef.pl" TARGET="qanswers">
|
||
|
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH="100%">
|
||
|
<TR>
|
||
|
<td align="left" valign="top" nowrap>
|
||
|
<FONT SIZE=2 COLOR="<%=SYSTEM.HEADERCOLOR%>"><nobr>
|
||
|
<%=PHRASE.331%>:
|
||
|
<input type=button name=btnPrev value="<< <%=PHRASE.4%>" onClick="btn_previous_click(this.form)"
|
||
|
><SELECT NAME="qid" onChange="return select_question(this.form)">
|
||
|
<option value="*tf"> <%=PHRASE.286%> <%=PHRASE.438%>
|
||
|
<option value="*mcs"> <%=PHRASE.286%> <%=PHRASE.50%>
|
||
|
<option value="*mcm"> <%=PHRASE.286%> <%=PHRASE.49%>
|
||
|
<option value="*esa"> <%=PHRASE.286%> <%=PHRASE.212%>
|
||
|
<option value="*nrt"> <%=PHRASE.286%> <%=PHRASE.202%>
|
||
|
<option value="*mch"> <%=PHRASE.286%> <%=PHRASE.48%>
|
||
|
<option value="*ord"> <%=PHRASE.286%> <%=PHRASE.52%>
|
||
|
<%=SYSTEM.STARTIF?TEST.seq svy,dmg INCLUDE %>
|
||
|
<option value="*mtx"> <%=PHRASE.286%> <%=PHRASE.841%>
|
||
|
<option value="*mtr"> <%=PHRASE.286%> <%=PHRASE.842%>
|
||
|
<option value="*plc"> <%=PHRASE.286%> <%=PHRASE.843%>
|
||
|
<%=SYSTEM.ENDIF%>
|
||
|
<%=SYSTEM.STARTIF?TEST.seq adp,dmg INCLUDE %>
|
||
|
<option value="*mca"> <%=PHRASE.286%> Fork
|
||
|
<%=SYSTEM.ENDIF%>
|
||
|
<%=TEST.questionlist%>
|
||
|
</SELECT
|
||
|
><input type=button name=btnNext value="<%=PHRASE.3%> >>" onClick="return btn_next_click(this.form)">
|
||
|
<BR>
|
||
|
</nobr></FONT>
|
||
|
</td>
|
||
|
</TR>
|
||
|
</TABLE>
|
||
|
</FORM>
|
||
|
</BODY>
|
||
|
</HTML>
|