');
-
-}
+}
function draw() {
choicestart();
@@ -463,7 +651,11 @@ function draw() {
choicewrite(' action="javascript:floateval();"');
}
if (ptype=='string') {
- choicewrite(' action="javascript:stringeval();"');
+ if (pscat == 'ip') {
+ choicewrite(' action="javascript:ipstringeval();"');
+ } else {
+ choicewrite(' action="javascript:stringeval();"');
+ }
}
if (ptype != 'int' && ptype != 'float' && ptype != 'string') {
choicewrite(' action=""');
@@ -551,8 +743,13 @@ function draw() {
}
if (pscat=='interval') {
var proctorkeytype = 'hidden';
+ var donebuttontext = 'none';
if (pmodval == '_done_proctor') {
proctorkeytype = 'text';
+ donebuttontext = 'block';
+ }
+ if (pmodval == '_done') {
+ donebuttontext = 'block';
}
tablestart('Time interval');
choicewrite( [
@@ -583,8 +780,14 @@ function draw() {
choicewrite(' /> Yes, with proctor key');
choicewrite(' ');
+ '" id="done_proctorkey" size="10"'+
+ ' onblur="parent.intcalc();" /> '+
+ '
'+
+ ' '+
+ 'Button text:'+
+ '
');
choicewrite('');
} else {
choicewrite('
'
@@ -648,7 +851,7 @@ function draw() {
if (ptype=='float') {
if (pscat=='default') {
tablestart('Default value or none');
- choicewrite('');
+ choicewrite('');
} else {
if (pscat=='pos') {
tablestart('Positive floating point number or zero');
@@ -771,20 +974,50 @@ function draw() {
choicewrite(' /> Library ');
}
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)');
choicewrite('
');
+ var lenienttypes = ['Correct (checked)','Correct (unchecked)','Incorrect (checked)','Incorrect (unchecked)'];
+ for (var i=0; i
'+lenienttypes[i]+'
'+
+ '
');
+ }
+ choicewrite('
');
}
if (pscat=='discussvote') {
tablestart('Discussion Voting');
@@ -803,10 +1036,51 @@ function draw() {
choicewrite(' /> No ');
}
if (pscat=='ip') {
- tablestart('IP Number/Name');
- choicewrite('
Value:
');
- choicewrite('');
+ var currallow = new Array;
+ var currdeny = new Array;
+ if ((svalue != '') && (svalue != null)) {
+ var patternComma = /,/;
+ var patternAllow = /^([\[\]a-zA-Z\.\d\*\-]+)$/;
+ var patternDeny = /^\!([\[\]a-zA-Z\.\d\*\-]+)$/;
+ var current = new Array;
+ if (patternComma.test(svalue)) {
+ current = svalue.split(',');
+ } else {
+ current = (svalue);
+ }
+ for (var i=0; i
Allow from
Deny from
');
+ var acctypes = ['allow','deny'];
+ for (var i=0; i'+
+ '
'+
+ '
');
+ for (var j=0; j');
+ choicewrite('Remove');
+ choicewrite('
');
+ }
+ choicewrite('
');
+ }
+ choicewrite('
');
}
if (pscat=='fileext') {
tablestart('Allowed File Extensions');
@@ -846,10 +1120,127 @@ function draw() {
' type="radio" '+callradiostringeval('map_map'));
if (svalue=='map_map') { choicewrite(' checked="checked"'); }
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. ');
- choicewrite('');
- }
+ choicewrite('');
+ }
+ if (pscat=='deeplink') {
+ var deeplinkvals = new Array();
+ var linktypeparts = new Array();
+ var ltikeyRegExp = /^(lti|key):(\w+)$/;
+ var dlinkkeysty = 'hidden';
+ var dlinkltidivsty = 'none';
+ var dlinkkeyval = '';
+ if ((svalue != '') && (svalue != null)) {
+ deeplinkvals = svalue.split(',');
+ if (ltikeyRegExp.test(deeplinkvals[2])) {
+ linktypeparts = deeplinkvals[2].split(':');
+ deeplinkvals[2] = linktypeparts[0];
+ if (linktypeparts[0] == 'key') {
+ dlinkkeysty = 'text';
+ dlinkkeyval = linktypeparts[1];
+ } else if (linktypeparts[0] == 'lti') {
+ dlinkltidivsty = 'inline-block';
+ }
+ }
+ } else {
+ deeplinkvals = ['full','res','any'];
+ }
+ var deeplinklisting = new Array();
+ deeplinklisting = ['full','absent','grades','details','datestatus'];
+ var deeplinklisttxt = new Array();
+ deeplinklisttxt = ['Listed (linked) in both','Not listed','Listed in grades only','Listed (unlinked) in both','Listed (unlinked) inc. status in both'];
+ var deeplinkscopes = new Array();
+ deeplinkscopes = ['res','map','rec'];
+ var deeplinkscopetxt = new Array();
+ deeplinkscopetxt = ['resource only','enclosing map/folder','recursive map/folder'];
+ var deeplinkurls = new Array();
+ deeplinkurls = ['any','only','key','lti'];
+ tablestart('Deep-linked items');
+ choicewrite('
In Contents or Gradebook?
');
+ choicewrite('
');
+ choicewrite('
Access scope via deep-link
');
+ choicewrite('
');
+ choicewrite('
Supported Link Types
');
+ choicewrite(' ');
+ choicewrite(' ');
+ choicewrite('');
+ choicewrite('');
+ choicewrite(' ');
+ if ((pextra != '') && (pextra != null)) {
+ var ltiRegExp = /^lti_/;
+ if (ltiRegExp.test(pextra)) {
+ pextra = pextra.replace(ltiRegExp,'');
+ var posslti = pextra.split(',');
+ if (posslti.length >= 1) {
+ var ltinums = new Array();
+ var ltititles = new Array();
+ for (var i=0; i');
+ choicewrite('
');
+ choicewrite('
');
+ }
+ }
+ }
+ }
+ choicewrite('
');
+ }
}
-
+
if (ptype=='color') {
tablestart('Choose a Color');
choicewrite('