Diff for /rat/client/parameter.html between versions 1.64.2.5 and 1.69

version 1.64.2.5, 2022/01/04 04:03:47 version 1.69, 2015/11/21 00:16:09
Line 39  Parameter Input Window Line 39  Parameter Input Window
   
 var ptype='';  var ptype='';
 var pvalue='';  var pvalue='';
   var pmodval='';
 var preturn='';  var preturn='';
 var pcode='';  var pcode='';
 var pscat='';  var pscat='';
Line 268  function inthour() { Line 269  function inthour() {
     }      }
     result += '</select>';      result += '</select>';
     return result;      return result;
 }  } 
   
 function intsecond() {  function intsecond() {
    var thisseconds=csecs;      var thisseconds=csecs;
     var i;      var i;
     var result = '';      var result = '';
     result += '<select name="seconds" onchange="parent.intcalc();">';      result += '<select name="seconds" onchange="parent.intcalc();">';
Line 284  function intsecond() { Line 285  function intsecond() {
     }      }
     result += '</select>';      result += '</select>';
     return result;      return result;
 }  } 
   
   
 function intday() {  function intday() {
Line 309  function intcalc() { Line 310  function intcalc() {
              sform.hours.options[sform.hours.selectedIndex].value*1)*60+               sform.hours.options[sform.hours.selectedIndex].value*1)*60+
              sform.minutes.options[sform.minutes.selectedIndex].value*1)*60+               sform.minutes.options[sform.minutes.selectedIndex].value*1)*60+
              sform.seconds.options[sform.seconds.selectedIndex].value*1;               sform.seconds.options[sform.seconds.selectedIndex].value*1;
     draw();      if ((ptype=='date') && (pscat=='interval')) {
           var newpmodval = '';
           if (sform.donebutton.length) {
               for (var i=0; i<sform.donebutton.length; i++) {
                   if (sform.donebutton[i].checked) {
                       if (sform.donebutton[i].value == '_done') {
                           newpmodval = sform.donebutton[i].value;
                       }
                   }
               }
           }
           pmodval = newpmodval;
           draw();
           if (pmodval) {
               svalue += pmodval;
           }
       } else {
           draw();
       }
 }  }
   
 function integereval() {  function integereval() {
Line 353  function callradiostringeval(newval) { Line 372  function callradiostringeval(newval) {
     return 'onclick="parent.radiostringeval(\''+newval+'\')"';      return 'onclick="parent.radiostringeval(\''+newval+'\')"';
 }  }
   
   function callintervalpmodval() {
       return 'onclick="parent.intcalc()"';
   } 
   
 function intervaldis() {  function intervaldis() {
     csecs=svalue;      csecs=svalue;
     cdays=Math.floor(csecs/86400);      cdays=Math.floor(csecs/86400);
Line 489  function draw() { Line 512  function draw() {
             '</table>',              '</table>',
             '<br />',              '<br />',
             ].join("\n"));              ].join("\n"));
       } else {            tablestart('Provide a "Done" button to students?');
            choicewrite('<tr><td>Value:</td><td colspan="2">');
            choicewrite('<label><input name="donebutton" value="_done"'+
                        ' type="radio" '+callintervalpmodval());
            if (pmodval =='_done') { choicewrite(' checked="checked"'); }
            choicewrite(' /> Yes</label><br />');
            choicewrite('<label><input name="donebutton" value=""'+
                        ' type="radio" '+callintervalpmodval());
            if (pmodval != '_done') { choicewrite(' checked="checked"'); }
            choicewrite(' /> No</label><br />');
            choicewrite('</td></tr></table>');
         } else {
          choicewrite('<tr><td colspan="3">'           choicewrite('<tr><td colspan="3">'
          +cdate.toString()+           +cdate.toString()+
          '</td></tr><tr><td>Date:</td><td colspan="2">');           '</td></tr><tr><td>Date:</td><td colspan="2">');
Line 570  function draw() { Line 604  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 639  function draw() { Line 673  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 740  function draw() { Line 774  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 840  function assemble() { Line 874  function assemble() {
 function init() {  function init() {
   var i;    var i;
   var subs=new Array();    var subs=new Array();
     var doneRegExp = /_done/;
   var namevalue=this.window.location.search.split('&');    var namevalue=this.window.location.search.split('&');
   namevalue[0]=namevalue[0].substr(1,namevalue[0].length-1);    namevalue[0]=namevalue[0].substr(1,namevalue[0].length-1);
   
Line 869  function init() { Line 904  function init() {
      if (pair[0]=='defsec' && pair[1] >= 0 && pair[1] < 60) { defsec=pair[1]; }       if (pair[0]=='defsec' && pair[1] >= 0 && pair[1] < 60) { defsec=pair[1]; }
   }    }
   
     if (ptype=='date' && pscat == 'interval') {
         if (doneRegExp.test(pvalue)) {
             var pnumval = pvalue.replace(doneRegExp,'');
             pmodval = pvalue.match(doneRegExp);
             pvalue = pnumval;
         }
     }
   svalue=pvalue;    svalue=pvalue;
   if (((ptype=='float') || (ptype=='string') || (ptype=='int')) &&    if (((ptype=='float') || (ptype=='string') || (ptype=='int')) &&
       (pscat=='default') &&         (pscat=='default') && 
Line 1018  function init() { Line 1060  function init() {
   selwrite('</body></html>');    selwrite('</body></html>');
   this.window.selector.document.close();    this.window.selector.document.close();
   draw();    draw();
     
 }  }
   
 // ]]>  // ]]>

Removed from v.1.64.2.5  
changed lines
  Added in v.1.69


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>