version 1.71.6.2, 2020/07/19 22:02:14
|
version 1.74, 2016/05/21 20:08:35
|
Line 447 function ipstringeval() {
|
Line 447 function ipstringeval() {
|
svalue = ''; |
svalue = ''; |
for (var i=0; i<acctypes.length; i++) { |
for (var i=0; i<acctypes.length; i++) { |
var items = choices.document.getElementsByName('setip'+acctypes[i]); |
var items = choices.document.getElementsByName('setip'+acctypes[i]); |
if (items.length > 0) { |
if (items.length > 0) { |
for (var j=0; j<items.length; j++) { |
for (var j=0; j<items.length; j++) { |
if (items[j].type == "text") { |
if (items[j].type == "text") { |
var possip = items[j].value; |
var possip = items[j].value |
possip = possip.replace(/^\s+|\s+$/g,''); |
possip = possip.replace(/^\s+|\s+$/g,''); |
if (patternIp.test(possip)) { |
if (patternIp.test(possip)) { |
if (acctypes[i] == 'deny') { |
if (acctypes[i] == 'deny') { |
Line 472 function addIpRule(iptype) {
|
Line 472 function addIpRule(iptype) {
|
var frame = window.frames["choices"]; |
var frame = window.frames["choices"]; |
if (frame.document.getElementById('LC_string_ipacc_inner_'+iptype)) { |
if (frame.document.getElementById('LC_string_ipacc_inner_'+iptype)) { |
var innerDiv = frame.document.getElementById('LC_string_ipacc_inner_'+iptype); |
var innerDiv = frame.document.getElementById('LC_string_ipacc_inner_'+iptype); |
var count = innerDiv.childNodes.length |
var count = innerDiv.childNodes.length |
var ipDiv = frame.document.createElement('div'); |
var ipDiv = frame.document.createElement('div'); |
ipDiv.innerHTML = '<input type="text" size="10" name="setip'+iptype+'" onblur="parent.ipstringeval();" />'+ |
ipDiv.innerHTML = '<input type="text" size="10" name="setip'+iptype+'" onblur="parent.ipstringeval();" />'+ |
'<a href="#" onclick="parent.removeIpRule(\''+iptype+'\',\''+count+'\')">Remove</a>'; |
'<a href="#" onclick="parent.removeIpRule(\''+iptype+'\',\''+count+'\')">Remove</a>'; |
Line 504 function callradiostringeval(newval) {
|
Line 504 function callradiostringeval(newval) {
|
return 'onclick="parent.radiostringeval(\''+newval+'\')"'; |
return 'onclick="parent.radiostringeval(\''+newval+'\')"'; |
} |
} |
|
|
|
function lenienteval(newval) { |
|
if (newval == 'weighted') { |
|
if (document.getElementById('lenientweighteddiv')) { |
|
document.getElementById('lenientweighteddiv').style.display='block'; |
|
} |
|
var patternRelWeight = /^\-?[\d.]+$/; |
|
var sform=choices.document.forms.sch; |
|
if ((sform.lenientrelwt.length != 'undefined') && (sform.lenientrelwt.length) != 'null') { |
|
for (var i=0; i<sform.lenientrelwt.length; i++) { |
|
var relweight = sform.lenientrelwt[i].value; |
|
relweight = relweight.replace(/^\s+|\s+$/g,''); |
|
if (!patternRelWeight.test(relweight)) { |
|
if (i<2) { |
|
relweight = '1.0'; |
|
} else { |
|
relweight = '0.0'; |
|
} |
|
} |
|
sform.lenientrelwt[i].value = relweight; |
|
if (i==0) { |
|
svalue = relweight; |
|
} else { |
|
svalue += ','+relweight; |
|
} |
|
} |
|
} |
|
} else { |
|
if (document.getElementById('lenientweighteddiv')) { |
|
document.getElementById('lenientweighteddiv').style.display='none'; |
|
} |
|
svalue=newval; |
|
} |
|
draw(); |
|
} |
|
|
|
function calllenientradioeval(newval) { |
|
return 'onclick="parent.lenienteval(\''+newval+'\')"'; |
|
} |
|
|
function callintervalpmodval() { |
function callintervalpmodval() { |
return 'onclick="parent.intcalc();parent.toggleSecret()"'; |
return 'onclick="parent.intcalc();parent.toggleSecret()"'; |
} |
} |
Line 764 function draw() {
|
Line 803 function draw() {
|
} |
} |
|
|
if (ptype=='string') { |
if (ptype=='string') { |
if ((pscat=='any') || (pscat=='') || (pscat=='default') || |
if ((pscat=='any') || (pscat=='') || (pscat=='default') || |
(typeof(pscat)=='undefined')) { |
(typeof(pscat)=='undefined')) { |
tablestart('Text'); |
tablestart('Text'); |
choicewrite('<tr><td>Value:</td><td colspan="2">'); |
choicewrite('<tr><td>Value:</td><td colspan="2">'); |
Line 833 function draw() {
|
Line 872 function draw() {
|
choicewrite('<label><input name="stringval" value="exam"'+ |
choicewrite('<label><input name="stringval" value="exam"'+ |
' type="radio" '+callradiostringeval('exam')); |
' type="radio" '+callradiostringeval('exam')); |
if (svalue=='exam') { choicewrite(' checked="checked"'); } |
if (svalue=='exam') { choicewrite(' checked="checked"'); } |
choicewrite(' /> Exam</label><br />'); |
choicewrite(' /> Bubblesheet Exam</label><br />'); |
// choicewrite('<label><input name="stringval" value="assess"'+ |
// choicewrite('<label><input name="stringval" value="assess"'+ |
// ' type="radio" '+callradiostringeval('assess')); |
// ' type="radio" '+callradiostringeval('assess')); |
// if (svalue=='assess') { choicewrite(' checked="checked"'); } |
// if (svalue=='assess') { choicewrite(' checked="checked"'); } |
Line 868 function draw() {
|
Line 907 function draw() {
|
choicewrite(' /> Library</label><br />'); |
choicewrite(' /> Library</label><br />'); |
} |
} |
if (pscat=='lenient') { |
if (pscat=='lenient') { |
|
var patternLenientStd = /^(yes|no|default)$/; |
|
var patternLenientRel = /^([\-\d\.]+)\,([\-\d\.]+)\,([\-\d\.]+)\,([\-\d\.]+)$/; |
|
var lenientweighted = 'none'; |
|
var relatives = new Array; |
tablestart('Lenient Grading (Partial Credit)'); |
tablestart('Lenient Grading (Partial Credit)'); |
choicewrite('<tr><td>Value:</td><td colspan="2">'); |
choicewrite('<tr><td>Value:</td><td colspan="2">'); |
choicewrite('<label><input name="stringval" value="yes"'+ |
choicewrite('<label><input name="stringval" value="yes"'+ |
' type="radio" '+callradiostringeval('yes')); |
' type="radio" '+calllenientradioeval('yes')); |
if (svalue=='yes') { choicewrite(' checked="checked"'); } |
if (svalue=='yes') { choicewrite(' checked="checked"'); } |
choicewrite(' /> Yes</label><br />'); |
choicewrite(' /> Yes</label><br />'); |
choicewrite('<label><input name="stringval" value="no"'+ |
choicewrite('<label><input name="stringval" value="no"'+ |
' type="radio" '+callradiostringeval('no')); |
' type="radio" '+calllenientradioeval('no')); |
if (svalue=='no') { choicewrite(' checked="checked"'); } |
if (svalue=='no') { choicewrite(' checked="checked"'); } |
choicewrite(' /> No</label><br />'); |
choicewrite(' /> No</label><br />'); |
choicewrite('<label><input name="stringval" value="default"'+ |
choicewrite('<label><input name="stringval" value="default"'+ |
' type="radio" '+callradiostringeval('default')); |
' type="radio" '+calllenientradioeval('default')); |
if (svalue=='default') { choicewrite(' checked="checked"'); } |
if (svalue=='default') { choicewrite(' checked="checked"'); } |
choicewrite(' /> Default (only bubblesheet grading is lenient)</label><br />'); |
choicewrite(' /> Default (only bubblesheet grading is lenient)</label><br />'); |
|
choicewrite('<label><input name="stringval" value="weighted"'+ |
|
' type="radio" '+calllenientradioeval('weighted')); |
|
if (!patternLenientStd.test(svalue) && svalue != '') { |
|
choicewrite(' checked="checked"'); |
|
lenientweighted='block'; |
|
var relatives = svalue.match(patternLenientRel); |
|
} |
|
choicewrite(' />Yes, weighted (optionresponse in checkbox mode)</label><br /><br />'+ |
|
'<div id="lenientweighteddiv" style="display:'+lenientweighted+'">'+ |
|
'<table class="LC_parmsel_table"><tr bgcolor="#C5DB99">'+ |
|
'<th colspan="2">Foil submission status</th><th>Points</th></tr>'); |
|
var lenienttypes = ['Correct (checked)','Correct (unchecked)','Incorrect (checked)','Incorrect (unchecked)']; |
|
for (var i=0; i<lenienttypes.length; i++) { |
|
var j = i+1; |
|
if (relatives[j] == '') { |
|
if (i < 2) { |
|
relatives[j] = '1.0'; |
|
} else { |
|
relatives[j] = '0.0'; |
|
} |
|
} |
|
choicewrite('<tr><td colspan="2">'+lenienttypes[i]+'</td>'+ |
|
'<td><input type="text" name="lenientrelwt" value="'+relatives[j]+'"'+ |
|
' size="3" onblur="parent.lenienteval(\'weighted\')" /></td></tr>'); |
|
} |
|
choicewrite('</table></div>'); |
} |
} |
if (pscat=='discussvote') { |
if (pscat=='discussvote') { |
tablestart('Discussion Voting'); |
tablestart('Discussion Voting'); |
Line 900 function draw() {
|
Line 969 function draw() {
|
choicewrite(' /> No</label><br />'); |
choicewrite(' /> No</label><br />'); |
} |
} |
if (pscat=='ip') { |
if (pscat=='ip') { |
var currallow = new Array; |
var currallow = new Array; |
var currdeny = new Array; |
var currdeny = new Array; |
if ((svalue != '') && (svalue != null)) { |
if ((svalue != '') && (svalue != null)) { |
var patternComma = /,/; |
var patternComma = /,/; |
var patternAllow = /^([\[\]a-zA-Z\.\d\*\-]+)$/; |
var patternAllow = /^([\[\]a-zA-Z\.\d\*\-]+)$/; |
var patternDeny = /^\!([\[\]a-zA-Z\.\d\*\-]+)$/; |
var patternDeny = /^\!([\[\]a-zA-Z\.\d\*\-]+)$/; |
var current = new Array; |
var current = new Array; |
if (patternComma.test(svalue)) { |
if (patternComma.test(svalue)) { |
current = svalue.split(','); |
current = svalue.split(','); |
} else { |
} else { |
current = [svalue]; |
current = (svalue); |
} |
} |
for (var i=0; i<current.length; i++) { |
for (var i=0; i<current.length; i++) { |
if (patternDeny.test(current[i])) { |
if (patternDeny.test(current[i])) { |
Line 919 function draw() {
|
Line 988 function draw() {
|
} else { |
} else { |
if (patternAllow.test(current[i])) { |
if (patternAllow.test(current[i])) { |
currallow.push(current[i]); |
currallow.push(current[i]); |
} |
} |
} |
} |
} |
} |
} |
} |
Line 937 function draw() {
|
Line 1006 function draw() {
|
choicewrite('<td valign="top">'+ |
choicewrite('<td valign="top">'+ |
'<div class="LC_string_ipacc_wrap" id="LC_string_ipacc_'+acctypes[i]+'">'+ |
'<div class="LC_string_ipacc_wrap" id="LC_string_ipacc_'+acctypes[i]+'">'+ |
'<div class="LC_string_ipacc_inner" id="LC_string_ipacc_inner_'+acctypes[i]+'">'); |
'<div class="LC_string_ipacc_inner" id="LC_string_ipacc_inner_'+acctypes[i]+'">'); |
|
var num=0; |
for (var j=0; j<curripaccess[i].length; j++) { |
for (var j=0; j<curripaccess[i].length; j++) { |
choicewrite('<div><input type="text" size="10" name="setip'+acctypes[i]+'" value="'+curripaccess[i][j]+'" onblur="parent.ipstringeval();" />'); |
choicewrite('<div><input type="text" size="10" name="setip'+acctypes[i]+'" value="'+curripaccess[i][j]+'" onblur="parent.ipstringeval();" />'); |
choicewrite('<a href="#" onclick="parent.removeIpRule(\''+acctypes[i]+'\',\''+j+'\')">Remove</a>'); |
choicewrite('<a href="#" onclick="parent.removeIpRule(\''+acctypes[i]+'\',\''+j+'\')">Remove</a>'); |
choicewrite('</div>'); |
choicewrite('</div>'); |
|
num ++; |
} |
} |
choicewrite('</div><button onclick="parent.addIpRule(\''+acctypes[i]+'\');">Add item</button>'); |
choicewrite('</div><button onclick="parent.addIpRule(\''+acctypes[i]+'\');">Add item</button>'); |
} |
} |
Line 975 function draw() {
|
Line 1046 function draw() {
|
choicewrite('<label><input name="stringval" value="resource"'+ |
choicewrite('<label><input name="stringval" value="resource"'+ |
' type="radio" '+callradiostringeval('resource')); |
' type="radio" '+callradiostringeval('resource')); |
if (svalue=='resource') { choicewrite(' checked="checked"'); } |
if (svalue=='resource') { choicewrite(' checked="checked"'); } |
choicewrite(' /> Yes, and the scope of the slot is a single resource.</label><br />'); |
choicewrite(' /> Yes, and the scope of student selected slot is a single resource.</label><br />'); |
choicewrite('<label><input name="stringval" value="map"'+ |
choicewrite('<label><input name="stringval" value="map"'+ |
' type="radio" '+callradiostringeval('map')); |
' type="radio" '+callradiostringeval('map')); |
if (svalue=='map') { choicewrite(' checked="checked"'); } |
if (svalue=='map') { choicewrite(' checked="checked"'); } |
choicewrite(' /> Yes, and the scope of the slot is the enclosing map/folder. When checking in, it applies to only one resource.</label><br />'); |
choicewrite(' /> Yes, and the scope of student selected slot is the enclosing map/folder. When checking in, it applies to only one resource.</label><br />'); |
choicewrite('<label><input name="stringval" value="map_map"'+ |
choicewrite('<label><input name="stringval" value="map_map"'+ |
' type="radio" '+callradiostringeval('map_map')); |
' type="radio" '+callradiostringeval('map_map')); |
if (svalue=='map_map') { choicewrite(' checked="checked"'); } |
if (svalue=='map_map') { choicewrite(' checked="checked"'); } |
choicewrite(' /> Yes, and the scope of the slot is the enclosing map/folder. When checking in, all resources in the map/folder are checked in.</label><br />'); |
choicewrite(' /> Yes, and the scope of student selected slot is the enclosing map/folder. When checking in, all resources in the map/folder are checked in.</label><br />'); |
choicewrite('</td></tr></table>'); |
choicewrite('</td></tr></table>'); |
} |
} |
} |
} |
Line 1302 function init() {
|
Line 1373 function init() {
|
selwrite('</body></html>'); |
selwrite('</body></html>'); |
this.window.selector.document.close(); |
this.window.selector.document.close(); |
draw(); |
draw(); |
|
|
} |
} |
|
|
// ]]> |
// ]]> |