--- rat/client/parameter.html 2025/06/30 20:29:06 1.97
+++ rat/client/parameter.html 2025/07/02 16:08:37 1.98
@@ -5,7 +5,7 @@
The LearningOnline Network with CAPA
Parameter Input Window
//
-// $Id: parameter.html,v 1.97 2025/06/30 20:29:06 raeburn Exp $
+// $Id: parameter.html,v 1.98 2025/07/02 16:08:37 raeburn Exp $
//
// Copyright Michigan State University Board of Trustees
//
@@ -485,6 +485,76 @@ function validateInterval() {
assemble();
}
+function validateGrace() {
+ var items = choices.document.getElementsByName('setgrace');
+ var needpcr = 0;
+ var neednum = 0;
+ if (items) {
+ if (items.length) {
+ if (items.length > 0) {
+ for (var i=0; i= 0) {
+ var val = timeSels[j].options[selidx].value;
+ if ((val !== null) && (val !== '') && (val !== 'undefined')) {
+ numnotnull = 1;
+ break;
+ }
+ }
+ }
+ }
+ var inputElems = graceDiv.getElementsByTagName("input");
+ if (inputElems.length) {
+ for (var j=0; j 0) && (poss <= 1)) {
+ fracnotnull = 1;
+ }
+ }
+ break;
+ }
+ }
+ }
+ if (numnotnull && !fracnotnull) {
+ needpcr ++;
+ }
+ if (fracnotnull && !numnotnull) {
+ neednum ++;
+ }
+ }
+ if (needpcr) {
+ if (needpcr == 1) {
+ alert("Grace period setting is incomplete: enter a number between 0 and 1.0 for 'Partial Credit', or use 'Remove'.");
+ } else {
+ alert(needpcr+" Grace period settings are incomplete: for each enter a number between 0 and 1.0 for 'Partial Credit', or use 'Remove'.");
+ }
+ return;
+ }
+ if (neednum) {
+ if (neednum == 1) {
+ alert("Grace period setting is incomplete: select a number in at least one of the 'Time past due' select boxes, or use 'Remove'.");
+ } else {
+ alert(neednum +" Grace period settings are incomplete: for each select a number in at least one of the 'Time past due' select boxes, or use 'Remove'.");
+ }
+ return;
+ }
+ }
+ }
+ }
+ assemble();
+}
+
function validateDeepLink() {
var sform=choices.document.forms.sch;
svalue = sform.deeplinkstate.options[sform.deeplinkstate.selectedIndex].value+',';
@@ -2112,6 +2182,8 @@ function init() {
selwrite('