[LON-CAPA-cvs] cvs: rat /client parameter.html loncom/interface loncommon.pm lonparmset.pm

raeburn raeburn at source.lon-capa.org
Thu Jul 13 11:30:02 EDT 2017


raeburn		Thu Jul 13 15:30:02 2017 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonparmset.pm 
    /rat/client	parameter.html 
  Log:
  - Bugs 4373 and 6131: recursive parameters.
   - User interface changes for table mode: columns for display/setting
     recursive parameters (map-level) eliminated, although levels retained.
   - Parameters set for Enclosing Map/Folder can be set to "Recursive" in
     pop-up menu.
   - If a parameter is currently recursive, the text: recursive is shown
     below the current value (clickable link); also shown in "Parameter
     in effect" table cell.
  
  
-------------- next part --------------
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1284 loncom/interface/loncommon.pm:1.1285
--- loncom/interface/loncommon.pm:1.1284	Mon Jul 10 12:48:41 2017
+++ loncom/interface/loncommon.pm	Thu Jul 13 15:29:56 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1284 2017/07/10 12:48:41 raeburn Exp $
+# $Id: loncommon.pm,v 1.1285 2017/07/13 15:29:56 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -6773,6 +6773,12 @@
   border-collapse: collapse;
 }
 
+span.LC_parm_recursive,
+td.LC_parm_recursive {
+  font-weight: bold;
+  font-size: smaller;
+}
+
 table.LC_parm_overview_restrictions td {
   border-width: 1px 4px 1px 4px;
   border-style: solid;
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.577 loncom/interface/lonparmset.pm:1.578
--- loncom/interface/lonparmset.pm:1.577	Thu Jul 13 13:57:48 2017
+++ loncom/interface/lonparmset.pm	Thu Jul 13 15:29:56 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.577 2017/07/13 13:57:48 raeburn Exp $
+# $Id: lonparmset.pm,v 1.578 2017/07/13 15:29:56 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -846,17 +846,36 @@
     my $courselevelm=$env{'request.course.id'}.'.'.$mapparm;
 
     my $storeunder='';
+    my $possreplace='';
     if (($snum==18) || ($snum==4)) { $storeunder=$courselevel; }
-    if (($snum==17) || ($snum==3)) { $storeunder=$courseleveli; } 
-    if (($snum==16) || ($snum==2)) { $storeunder=$courselevelm; }
+    if (($snum==17) || ($snum==3)) { 
+        $storeunder=$courseleveli;
+        $possreplace=$courselevelm; 
+    } 
+    if (($snum==16) || ($snum==2)) { 
+        $storeunder=$courselevelm;
+        $possreplace=$courseleveli;
+    }
     if (($snum==13) || ($snum==1)) { $storeunder=$courselevelr; }
     if ($snum==12) { $storeunder=$seclevel; }
-    if ($snum==11) { $storeunder=$secleveli; }
-    if ($snum==10) { $storeunder=$seclevelm; }
+    if ($snum==11) { 
+        $storeunder=$secleveli;
+        $possreplace=$seclevelm; 
+    }
+    if ($snum==10) { 
+        $storeunder=$seclevelm;
+        $possreplace=$secleveli;
+    }
     if ($snum==9) { $storeunder=$seclevelr; }
     if ($snum==8) { $storeunder=$grplevel; }
-    if ($snum==7) { $storeunder=$grpleveli; }
-    if ($snum==6) { $storeunder=$grplevelm; }
+    if ($snum==7) { 
+        $storeunder=$grpleveli;
+        $possreplace=$grplevelm;
+    }
+    if ($snum==6) {
+        $storeunder=$grplevelm;
+        $possreplace=$grpleveli;
+    }
     if ($snum==5) { $storeunder=$grplevelr; }
 
 
@@ -875,7 +894,7 @@
         &Apache::lonnet::expirespread('','','studentcalc');
         if (($snum==13) || ($snum==9) || ($snum==5)) {
             &Apache::lonnet::expirespread('','','assesscalc',$symb);
-        } elsif (($snum==14) || ($snum==10) || ($snum==6)) {
+        } elsif (($snum==17) || ($snum==16) || ($snum==11) || ($snum==10) || ($snum==7) || ($snum==6)) {
             &Apache::lonnet::expirespread('','','assesscalc',$map);
         } else {
             &Apache::lonnet::expirespread('','','assesscalc');
@@ -889,6 +908,17 @@
             $reply=&Apache::lonnet::cput
             ('resourcedata',\%storecontent,$cdom,$cnum);
             &log_parmset(\%storecontent);
+            if ($possreplace) {
+                my $resdata = &Apache::lonnet::get_courseresdata($cnum,$cdom);
+                if (ref($resdata) eq 'HASH') {
+                    if (exists($resdata->{$possreplace})) {
+                        if (&Apache::lonnet::del
+                            ('resourcedata',[$possreplace,$possreplace.'.type'],$cdom,$cnum) eq 'ok') {
+                            &log_parmset({$possreplace => '', $possreplace.'.type' => $ntype},1);   
+                        }
+                    }
+                }
+            }
         }
         &Apache::lonnet::devalidatecourseresdata($cnum,$cdom);
     } else {
@@ -899,7 +929,7 @@
         if ($snum==1) {
             &Apache::lonnet::expirespread
             ($uname,$udom,'assesscalc',$symb);
-        } elsif ($snum==2) {
+        } elsif (($snum==2) || ($snum==3)) {
             &Apache::lonnet::expirespread
             ($uname,$udom,'assesscalc',$map);
         } else {
@@ -914,6 +944,18 @@
             $reply=&Apache::lonnet::cput
             ('resourcedata',\%storecontent,$udom,$uname);
             &log_parmset(\%storecontent,0,$uname,$udom);
+            if ($possreplace) {
+                my $resdata = &Apache::lonnet::get_userresdata($uname,$udom);
+                if (ref($resdata) eq 'HASH') {
+                    if (exists($resdata->{$possreplace})) {
+                        if (&Apache::lonnet::del
+                            ('resourcedata',[$possreplace,$possreplace.'.type'],$udom,$uname) eq 'ok') {
+                            &log_parmset({$possreplace => '',$possreplace.'.type' => $ntype},1,
+                                          $uname,$udom);
+                        }
+                    }
+                }
+            }
         }
         &Apache::lonnet::devalidateuserresdata($uname,$udom);
     }
@@ -1022,8 +1064,9 @@
 # @param {string} $marker - identifier for the parameter, "resource id&part_parameter name&level", will be passed as pres_marker when the user submits a change.
 # @param {string} $return - prefix for the name of the form and field names that will be used to submit the form ('parmform.pres')
 # @param {string} $call - javascript function to call to submit the form ('psub')
+# @param {boolean} $recursive - true if link is for a map/folder where parameter is currently set to be recursive. 
 sub plink {
-    my ($type,$dis,$value,$marker,$return,$call)=@_;
+    my ($type,$dis,$value,$marker,$return,$call,$recursive)=@_;
     my $winvalue=$value;
     unless ($winvalue) {
         if (&isdateparm($type)) {
@@ -1045,7 +1088,9 @@
     return '<table width="100%"><tr valign="top" align="right"><td><a name="'.$unencmarker.'" /></td></tr><tr><td align="center">'.
     '<a href="javascript:pjump('."'".$type."','".$dis."','".$winvalue."','"
         .$marker."','".$return."','".$call."','".$hour."','".$min."','".$sec."'".');">'.
-        $valout.'</a></td></tr></table>';
+        $valout.'</a></td></tr>'.($recursive?'<tr><td align="center" class="LC_parm_recursive">'.
+                                              &mt('recursive').'</td></tr>' : '').'</table>';
+
 }
 
 # Javascript for table mode.
@@ -1425,8 +1470,10 @@
     $thismarker=~s/^parameter\_//;
     my $mprefix=$rid.'&'.$thismarker.'&';
     my $effective_parm = &valout($outpar[$result],$typeoutpar[$result],$thismarker);
-    my ($othergrp,$grp_parm,$controlgrp);
-
+    my ($othergrp,$grp_parm,$controlgrp,$effparm_rec);
+    if ($result == 17 || $result == 11 || $result == 7 || $result == 3) {
+        $effparm_rec = 1;
+    }
     if ($parmlev eq 'general') {
         if ($uname) {
             &print_td($r,4,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
@@ -1439,17 +1486,13 @@
         }
     } elsif ($parmlev eq 'map') {
         if ($uname) {
-            &print_td($r,3,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
-            &print_td($r,2,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly); 
+            &print_td($r,2,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly,1); 
         } elsif ($cgroup) {
-            &print_td($r,7,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,$readonly);
-            &print_td($r,6,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,$readonly);
+            &print_td($r,6,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,$readonly,1);
         } elsif ($csec) {
-            &print_td($r,11,$defbgtwo,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
-            &print_td($r,10,$defbgtwo,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
+            &print_td($r,10,$defbgtwo,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly,1);
         } else {
-            &print_td($r,17,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
-            &print_td($r,16,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
+            &print_td($r,16,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly,1);
         }
     } else {
         if ($uname) {
@@ -1470,23 +1513,20 @@
         }
 
         &print_td($r,18,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
-        &print_td($r,17,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
-        &print_td($r,16,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
+        &print_td($r,16,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly,1);
         &print_td($r,15,'#FFDDDD',$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
         &print_td($r,14,'#FFDDDD',$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
         &print_td($r,13,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
 
         if ($csec) {
             &print_td($r,12,$defbgtwo,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
-            &print_td($r,11,$defbgtwo,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
-            &print_td($r,10,$defbgtwo,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
+            &print_td($r,10,$defbgtwo,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly,1);
             &print_td($r,9,$defbgtwo,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
         }
 
         if ($cgroup) {
             &print_td($r,8,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,$readonly);
-            &print_td($r,7,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,$readonly);
-            &print_td($r,6,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,$readonly);
+            &print_td($r,6,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp,$readonly,1);
             &print_td($r,5,$defbgthree,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,$noeditgrp.$readonly);
         }
 
@@ -1495,13 +1535,14 @@
                 $r->print($othergrp);
             }
             &print_td($r,4,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
-            &print_td($r,3,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
-            &print_td($r,2,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
+            &print_td($r,2,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly,1);
             &print_td($r,1,$defbgone,$result,\@outpar,$mprefix,$which,\@typeoutpar,$display,'',$readonly);
         }
 
     } # end of $parmlev if/else
-    $r->print('<td style="background-color:#CCCCFF;" align="center">'.$effective_parm.'</td>');
+    $r->print('<td style="background-color:#CCCCFF;" align="center">'.$effective_parm.
+              ($effparm_rec?'<br /><span class="LC_parm_recursive">'.&mt('recursive').
+                            '</span>':'').'</td>');
 
     if ($parmlev eq 'full') {
         my $sessionval=&Apache::lonnet::EXT('resource.'.$$part{$which}.
@@ -1535,15 +1576,40 @@
 # @param {hash reference} $display - parameter key -> full title for the parameter
 # @param {boolean} $noeditgrp - true if no edit is allowed for group level parameters
 # @param {boolean} $readonly -true if editing not allowed.
+# @param {boolean} $ismaplevel - true if level is for a map. 
 sub print_td {
-    my ($r,$which,$defbg,$result,$outpar,$mprefix,$value,$typeoutpar,$display,$noeditgrp,$readonly)=@_;
-    $r->print('<td style="background-color:'.(($result==$which)?'#AAFFAA':$defbg).
+    my ($r,$which,$defbg,$result,$outpar,$mprefix,$value,$typeoutpar,$display,
+        $noeditgrp,$readonly,$ismaplevel)=@_;
+    my ($ineffect,$recursive,$currval,$currtype,$currlevel);
+    $ineffect = 0;
+    $currval = $$outpar[$which];
+    $currtype = $$typeoutpar[$which];
+    $currlevel = $which;
+    if (($result) && ($result == $which)) {
+        $ineffect = 1;
+    } 
+    if ($ismaplevel) {
+        if ($mprefix =~ /(hiddenresource|encrypturl)\&/) {
+            if (($result) && ($result == $which)) {
+                $recursive = 1;
+            }
+        } elsif ($$outpar[$which+1] ne '') {
+            $recursive = 1;
+            $currlevel = $which+1;
+            $currval = $$outpar[$currlevel];
+            $currtype = $$typeoutpar[$currlevel];
+            if (($result) && ($result == $currlevel)) {
+                $ineffect = 1;
+            }
+        }
+    }
+    $r->print('<td style="background-color:'.($ineffect?'#AAFFAA':$defbg).
               ';" align="center">');
     my $nolink = 0;
     if ($readonly) {
         $nolink = 1;
     } else { 
-        if ($which == 14 || $which == 15 || $mprefix =~ /mapalias\&/) {
+        if ($which == 14 || $which == 15 || $mprefix =~ /mapalias\&$/) {
             $nolink = 1;
         } elsif (($env{'request.course.sec'} ne '') && ($which > 12)) {
             $nolink = 1;
@@ -1559,19 +1625,15 @@
             unless ($which == 2) {
                 $nolink = 1;
             }
-        } elsif ($mprefix =~ /(encrypturl|hiddenresource)/) {
-            if ($which == 16 || $which == 10 || $which == 6 || $which == 2) {
-                $nolink = 1;
-            }
         }
     }
     if ($nolink) {
         my ($parmname)=((split(/\&/,$mprefix))[1]=~/\_([^\_]+)$/);
-        $r->print(&valout($$outpar[$which],$$typeoutpar[$which],$parmname));
+        $r->print(&valout($currval,$currtype,$parmname));
     } else {
-        $r->print(&plink($$typeoutpar[$which],
-                         $$display{$value},$$outpar[$which],
-                         $mprefix."$which",'parmform.pres','psub'));
+        $r->print(&plink($currtype,
+                         $$display{$value},$currval,
+                         $mprefix.$currlevel,'parmform.pres','psub',$recursive));
     }
     $r->print('</td>'."\n");
 }
@@ -3119,10 +3181,10 @@
 #
 # This produces the cascading table output of parameters
 #
-            my $coursespan=$csec?10:6;
-            my $userspan=4;
+            my $coursespan=$csec?8:5;
+            my $userspan=3;
             if ($cgroup ne '') {
-                $coursespan += 4;
+                $coursespan += 3;
             }
 
             $r->print(&Apache::loncommon::start_data_table());
@@ -3152,44 +3214,43 @@
                 'femof'  => 'from Enclosing Map or Folder',
                 'gen'    => 'general',
                 'foremf' => 'for Enclosing Map or Folder',
-                'formfr' => 'for Map or Folder (recursive)',
                 'fr'     => 'for Resource'
             );
             $r->print(<<ENDTABLETWO);
 <th rowspan="3">$lt{'pie'}</th>
 <th rowspan="3">$lt{'csv'}<br />($csuname:$csudom)</th>
-</tr><tr><td colspan="5"></td><th colspan="3">$lt{'ic'}</th><th colspan="2">$lt{'rl'}</th>
+</tr><tr><td colspan="5"></td><th colspan="2">$lt{'ic'}</th><th colspan="2">$lt{'rl'}</th>
 <th colspan="1">$lt{'ic'}</th>
 
 ENDTABLETWO
             if ($csec) {
-                $r->print('<th colspan="4">'.
+                $r->print('<th colspan="3">'.
                 &mt("in Section")." $csec</th>");
             }
             if ($cgroup) {
-                $r->print('<th colspan="4">'.
+                $r->print('<th colspan="3">'.
                 &mt("in Group")." $cgroup</th>");
             }
             $r->print(<<ENDTABLEHEADFOUR);
 </tr><tr><th>$lt{'aut'}</th><th>$lt{'type'}</th>
 <th>$lt{'emof'}</th><th>$lt{'part'}</th><th>$lt{'pn'}</th>
-<th>$lt{'gen'}</th><th>$lt{'formfr'}</th><th>$lt{'foremf'}</th>
+<th>$lt{'gen'}</th><th>$lt{'foremf'}</th>
 <th>$lt{'def'}</th><th>$lt{'femof'}</th><th>$lt{'fr'}</th>
 ENDTABLEHEADFOUR
 
             if ($csec) {
-                $r->print('<th>'.$lt{'gen'}.'</th><th>'.$lt{'formfr'}.'</th><th>'.$lt{'foremf'}.'</th><th>'.$lt{'fr'}.'</th>');
+                $r->print('<th>'.$lt{'gen'}.'</th><th>'.$lt{'foremf'}.'</th><th>'.$lt{'fr'}.'</th>');
             }
 
             if ($cgroup) {
-                $r->print('<th>'.$lt{'gen'}.'</th><th>'.$lt{'formfr'}.'</th><th>'.&mt('foremf').'</th><th>'.$lt{'fr'}.'</th>');
+                $r->print('<th>'.$lt{'gen'}.'</th><th>'.$lt{'foremf'}.'</th><th>'.$lt{'fr'}.'</th>');
             }
 
             if ($uname) {
                 if (@usersgroups > 1) {
                     $r->print('<th>'.&mt('Control by other group?').'</th>');
                 }
-                $r->print('<th>'.$lt{'gen'}.'</th><th>'.$lt{'formfr'}.'</th><th>'.$lt{'foremf'}.'</th><th>'.$lt{'fr'}.'</th>');
+                $r->print('<th>'.$lt{'gen'}.'</th><th>'.$lt{'foremf'}.'</th><th>'.$lt{'fr'}.'</th>');
             }
 
             $r->print('</tr>');
@@ -3410,8 +3471,7 @@
                 $r->print('<p>'.&Apache::loncommon::start_data_table()
                          .&Apache::loncommon::start_data_table_header_row()
                          .'<th>'.&mt('Parameter Name').'</th>'
-                         .'<th>'.&mt('Recursive Value').'</th>'
-                         .'<th>'.&mt('Non-Recursive Value').'</th>'
+                         .'<th>'.&mt('Value').'</th>'
                          .'<th>'.&mt('Parameter in Effect').'</th>'
                          .&Apache::loncommon::end_data_table_header_row()
                 );
Index: rat/client/parameter.html
diff -u rat/client/parameter.html:1.75 rat/client/parameter.html:1.76
--- rat/client/parameter.html:1.75	Sat May 21 22:59:58 2016
+++ rat/client/parameter.html	Thu Jul 13 15:30:01 2017
@@ -5,7 +5,7 @@
 The LearningOnline Network with CAPA
 Parameter Input Window
 //
-// $Id: parameter.html,v 1.75 2016/05/21 22:59:58 raeburn Exp $
+// $Id: parameter.html,v 1.76 2017/07/13 15:30:01 raeburn Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -48,6 +48,10 @@
 var pmarker='';
 var pmodal='';
 var pname='';
+var precursive='';
+var pnonreccol='';
+var pmarkerst='';
+var pparm='';
 
 var defhour=0;
 var defmin=0;
@@ -1094,6 +1098,22 @@
    draw();
 }
 
+function recursechange() {
+   var rform=selector.document.forms.frec;
+   var count = rform.recurse.length;
+   if (count > 0) {
+       for (var i=0; i<count; i++) {
+           if (rform.recurse[i].checked) {
+               var colnum = pnonreccol;
+               if (rform.recurse[i].value == 1) {
+                   colnum++;
+               }
+               pmarker = pmarkerst+'_'+pparm+'&'+colnum; 
+           }
+       }
+   }
+}
+
 function assemble() {
     if ((ptype=='date') && (pscat!='interval')) {
         svalue=Math.floor(cdate.getTime()/1000);
@@ -1148,6 +1168,7 @@
   var doneproctorRegExp = /_done(|\:[^\:]+\:)_proctor/;
   var proctorkeyRegExp = /^(\d+)_(.+)$/;
   var donetextRegExp = /\:([^\:]+)\:/;
+  var markerRegExp = /^(.+)_([A-Za-z0-9]+)\&(\d+)$/; 
   var namevalue=this.window.location.search.split('&');
   namevalue[0]=namevalue[0].substr(1,namevalue[0].length-1);
 
@@ -1177,6 +1198,43 @@
      if (pair[0]=='defsec' && pair[1] >= 0 && pair[1] < 60) { defsec=pair[1]; }
   }
 
+  var tablecol = ''; 
+  var ismap = '';
+  if (markerRegExp.test(pmarker)) {
+      var markerinfo = pmarker.match(markerRegExp);
+      if (markerinfo.length == 4) {
+          pmarkerst = markerinfo[1];
+          pparm = markerinfo[2];
+          tablecol = markerinfo[3]; 
+          if (tablecol == 17 || tablecol == 16) {
+              ismap = 1;
+              if (tablecol == 17) {
+                  precursive = 1;
+              }
+              pnonreccol = 16;
+          } else if (tablecol == 11 || tablecol == 10) { 
+              ismap = 1;
+              if (tablecol == 11) {
+                  precursive = 1;
+              }
+              pnonreccol = 10;
+          } else if (tablecol == 7 || tablecol == 6) {
+              ismap = 1;
+              if (tablecol == 7) {
+                  precursive = 1;
+              }
+              pnonreccol = 6;
+          } else if (tablecol == 3 || tablecol == 2) {
+              ismap = 1;
+              if (tablecol == 3) {
+                  precursive = 1;
+              }
+              pnonreccol = 2;
+          }
+      }
+  }
+
+
   if (ptype=='date' && pscat == 'interval') {
       if (doneproctorRegExp.test(pvalue)) {
           var current = pvalue.match(doneproctorRegExp);
@@ -1336,6 +1394,22 @@
   }
 
   selwrite('</select></form>');
+  if (ismap = 1) {
+      if ((pparm != 'hiddenresource') && (pparm != 'encrypturl')) {
+          selwrite('<form name="frec" action="">');
+          selwrite('Recursive: <label><input type="radio" name="recurse" value="1" ');
+          if (precursive == 1) {
+              selwrite('checked="checked" ');
+          }
+          selwrite('onclick="parent.recursechange();" />Yes</label>  ');
+          selwrite('<label><input type="radio" name="recurse" value="0" ');
+          if (precursive != 1) {
+              selwrite('checked="checked" ');
+          }
+          selwrite('onclick="parent.recursechange();" />No</label>'); 
+          selwrite('</form><br />');
+      }
+  }
   var targ='parent.opener';
   if (pmodal==1) {
      targ='parent.parent';
@@ -1378,7 +1452,7 @@
 </script>
 </head>
 
-<frameset rows="120,*" onload="init();">
+<frameset rows="125,*" onload="init();">
 <frame name="selector" src="empty.html" />
 <frame name="choices" src="empty.html" />
 </frameset>


More information about the LON-CAPA-cvs mailing list