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.
 
 
 
 
 
 

212 lines
6.0 KiB

<!-- $Id: subjareahdr.htt -->
<HTML>
<HEAD>
<TITLE><%=PHRASE.419%> <%=PHRASE.64%></TITLE>
<BASEFONT FACE="Arial">
<%=SYSTEM.STARTIF?SESSION.browserapp MSIE INCLUDE %>
<STYLE>
<!--
SELECT {font-size: 10px;}
INPUT {font-size: 10px;height: 20;width: 100;}
-->
</STYLE>
<%=SYSTEM.ENDIF%>
<%=SYSTEM.INCLUDEJS global.js %>
<SCRIPT language="JavaScript">
<!--
function wdw_onLoad() {
document.form2.onsubmit=submit2;
document.form3.onsubmit=submit3;
if ("<%=FORM.respmsg%>" != "") {
alert("<%=FORM.respmsg%>");
}
}
function sbamidChange() {
if(document.form3.sbamid.selectedIndex == -1) {
document.form3.sbamids.value="";
} else {
resetDetail();
}
return true;
}
function resetDetail() {
var sURL;
sURL="<%=PATHS.cgiroot%>/sbadef.pl?tid=<%=SESSION.tid%>&lang=<%=SESSION.lang%>&frm=0"
parent.sbadtl.document.location = sURL;
document.form1.sbaid.selectedIndex=-1;
}
function submit1(oform) {
if (oform.sbaid.selectedIndex != -1) {
document.form3.sbamid.selectedIndex = -1;
if (oform.sbaid.selectedIndex == 0) {
oform.sbanew.value="Y";
} else {
oform.sbanew.value="N";
}
oform.submit();
return true;
} else {
return false;
}
}
function submit2(dop) {
var oform1,oform2,oform3,i,s;
oform1=document.form1;
oform2=document.form2;
oform3=document.form3;
if (dop=="m2t") {
// addfmmaster
oform3.dbop.value=dop;
submit3(oform3);
return false;
} else {
if (dop == "bq") {
// build from questions
if (confirm("Are you sure you want to build subject areas from the test questions?")==true) {
s="";
oform2.dbop.value=dop;
oform2.sbamids.value=s.substring(0,i);
oform2.submit();
resetDetail();
return true;
} else {
return false;
}
} else {
if ((dop == "t2m") || (dop == "dt")) {
// addtomaster, dropfmtest
if (oform1.sbaid.selectedIndex==-1) {
if (dop == "t2m") {
s="You must select a subject area to add to the test.";
} else {
s="You must select a subject area to drop from this test.";
}
alert(s);
return false;
} else {
if (dop == "t2m") {
s="Are you sure you want to add the selected subject areas to the Master?";
} else {
s="Are you sure you want to drop the selected subject areas from this test?";
}
if (confirm(s)==true) {
s="";
for (i=0;i<oform1.sbaid.options.length;i++) {
if(oform1.sbaid.options[i].selected) {
s+=oform1.sbaid.options[i].value+',';
}
}
i=s.length-1;
oform2.dbop.value=dop;
oform2.sbamids.value=s.substring(0,i);
oform2.submit();
resetDetail();
return true;
} else {
return false;
}
}
} else {
return false;
}
}
}
}
function submit3(oform) {
var i,s;
if (oform.sbamid.selectedIndex==-1) {
alert("You must select a subject area to add to the test.");
return false;
} else {
if (confirm("Are you sure you want to add to selected subject areas to this test?")==true) {
s="";
for (i=0;i<oform.sbamid.options.length;i++) {
if(oform.sbamid.options[i].selected) {
s+=oform.sbamid.options[i].value+',';
}
}
i=s.length-1;
oform.sbamids.value=s.substring(0,i);
oform.submit();
resetDetail();
return true;
} else {
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%>">
<TABLE cellpadding=0 cellspacing=0 border=0 width=100%>
<TR>
<TD colspan=3 align="CENTER" valign=top>
<FONT SIZE=1>
<B><%=TEST.id%>: <%=TEST.desc%></B><BR>
</FONT>
</TD>
</TR>
<TR>
<TD align="CENTER" valign=top>
<FORM METHOD=POST ACTION="<%=PATHS.cgiroot%>/sbadef.pl"
Name="form1" TARGET="sbadtl">
<INPUT NAME="frm" TYPE=HIDDEN VALUE="3">
<INPUT NAME="tid" TYPE=HIDDEN VALUE="<%=SESSION.tid%>">
<INPUT NAME="clid" TYPE=HIDDEN VALUE="<%=SESSION.clid%>">
<INPUT NAME="tstid" TYPE=HIDDEN VALUE="<%=TEST.id%>">
<INPUT NAME="dbop" TYPE=HIDDEN VALUE="">
<INPUT NAME="sbamids" TYPE=HIDDEN VALUE="">
<INPUT NAME="sbanew" TYPE=HIDDEN VALUE="">
<FONT SIZE=2>
<B><%=PHRASE.28%> <%=PHRASE.32%><br></B>
<SELECT NAME=sbaid size="10" multiple onChange="return submit1(this.form)" onDblClick="return submit1(this.form)">
<OPTION VALUE=0>-- NEW --
<%=SUBJAREA.testlist%>
</SELECT>
</FONT>
</FORM>
</TD>
<TD align="CENTER" valign=middle>
<FORM METHOD=POST ACTION="<%=PATHS.cgiroot%>/sbadef.pl"
Name="form2" TARGET="sbahdr">
<INPUT NAME="frm" TYPE=HIDDEN VALUE="2">
<INPUT NAME="tid" TYPE=HIDDEN VALUE="<%=SESSION.tid%>">
<INPUT NAME="clid" TYPE=HIDDEN VALUE="<%=SESSION.clid%>">
<INPUT NAME="tstid" TYPE=HIDDEN VALUE="<%=TEST.id%>">
<INPUT NAME="dbop" TYPE=HIDDEN VALUE="">
<INPUT NAME="sbamids" TYPE=HIDDEN VALUE="">
<FONT SIZE=2>
<INPUT TYPE=BUTTON NAME="addtomaster" VALUE="<- Add to Test" onClick="return submit2('m2t')"><br>
<INPUT TYPE=BUTTON NAME="addfmmaster" VALUE="Add to Master ->" onClick="return submit2('t2m')"><br>
&nbsp;<br>
<INPUT TYPE=BUTTON NAME="dropfmtest" VALUE="Drop from Test" onClick="return submit2('dt')"><br>
&nbsp;<br>
<INPUT TYPE=BUTTON NAME="buildfmquest" VALUE="Build From Test" onClick="return submit2('bq')"><br>
</FONT>
</FORM>
</TD>
<TD align="CENTER" valign=top>
<FORM METHOD=POST ACTION="<%=PATHS.cgiroot%>/sbadef.pl"
Name="form3" TARGET="sbahdr">
<INPUT NAME="frm" TYPE=HIDDEN VALUE="2">
<INPUT NAME="tid" TYPE=HIDDEN VALUE="<%=SESSION.tid%>">
<INPUT NAME="clid" TYPE=HIDDEN VALUE="<%=SESSION.clid%>">
<INPUT NAME="tstid" TYPE=HIDDEN VALUE="<%=TEST.id%>">
<INPUT NAME="sbamids" TYPE=HIDDEN VALUE="">
<INPUT NAME="dbop" TYPE=HIDDEN VALUE="m2t">
<FONT SIZE=2>
<B><%=PHRASE.32%> Master</B><br>
<SELECT NAME=sbamid size="10" multiple onChange="return sbamidChange()" onDblClick="return submit3(this.form)">
<%=SUBJAREA.masterlist%>
</SELECT>
</FONT>
</FORM>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>