[LON-CAPA-cvs] cvs: loncom /interface lonpopulate.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 09 Feb 2006 13:45:55 -0000


This is a MIME encoded message

--albertel1139492755
Content-Type: text/plain

albertel		Thu Feb  9 08:45:55 2006 EDT

  Modified files:              
    /loncom/interface	lonpopulate.pm 
  Log:
  - add in missing /
  - <label>
  - correct some invalid html
  
  
--albertel1139492755
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20060209084555.txt"

Index: loncom/interface/lonpopulate.pm
diff -u loncom/interface/lonpopulate.pm:1.38 loncom/interface/lonpopulate.pm:1.39
--- loncom/interface/lonpopulate.pm:1.38	Wed Feb  8 19:40:19 2006
+++ loncom/interface/lonpopulate.pm	Thu Feb  9 08:45:54 2006
@@ -1,5 +1,5 @@
 # automated enrollment configuration handler
-# $Id: lonpopulate.pm,v 1.38 2006/02/09 00:40:19 raeburn Exp $
+# $Id: lonpopulate.pm,v 1.39 2006/02/09 13:45:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -353,13 +353,13 @@
 ENDTWO
       if ($enrollvar{autoadds}) {
           $r->print("
-			    <input type=\"radio\" name=\"autoadds\" value=\"1\" checked=\"true\" />&nbsp;Enable&nbsp;&nbsp;&nbsp;
-			    <input type=\"radio\" name=\"autoadds\" value=\"0\" />&nbsp;Disable
+			    <label><input type=\"radio\" name=\"autoadds\" value=\"1\" checked=\"true\" />&nbsp;Enable&nbsp;&nbsp;&nbsp;</label>
+			    <label><input type=\"radio\" name=\"autoadds\" value=\"0\" />&nbsp;Disable</label>
          ");
       } else {
           $r->print("
-                            <input type=\"radio\" name=\"autoadds\" value=\"1\" />&nbsp;Enable&nbsp;&nbsp;&nbsp;
-                            <input type=\"radio\" name=\"autoadds\" value=\"0\" checked=\"true\" />&nbsp;Disable
+                            <label><input type=\"radio\" name=\"autoadds\" value=\"1\" />&nbsp;Enable&nbsp;&nbsp;&nbsp;</label>
+                            <label><input type=\"radio\" name=\"autoadds\" value=\"0\" checked=\"true\" />&nbsp;Disable</label>
          ");
       }
       $r->print("
@@ -370,12 +370,12 @@
  	       Removals based on classlist changes:&nbsp;&nbsp;");
       if ($enrollvar{autodrops}) {
           $r->print("
-                <input type=\"radio\" name=\"autodrops\" value=\"1\" checked=\"true\" />&nbsp;Enable&nbsp;&nbsp;&nbsp;
-                <input type=\"radio\" name=\"autodrops\" value=\"0\" />&nbsp;Disable");
+                <label><input type=\"radio\" name=\"autodrops\" value=\"1\" checked=\"true\" />&nbsp;Enable&nbsp;&nbsp;&nbsp;</label>
+                <label><input type=\"radio\" name=\"autodrops\" value=\"0\" />&nbsp;Disable</label>");
       } else {
           $r->print("
-                <input type=\"radio\" name=\"autodrops\" value=\"1\" />&nbsp;Enable&nbsp;&nbsp;&nbsp;
-                <input type=\"radio\" name=\"autodrops\" value=\"0\" checked=\"true\" />&nbsp;Disable");
+                <label><input type=\"radio\" name=\"autodrops\" value=\"1\" />&nbsp;Enable&nbsp;&nbsp;&nbsp;</label>
+                <label><input type=\"radio\" name=\"autodrops\" value=\"0\" checked=\"true\" />&nbsp;Disable</label>");
       }
       $r->print("
               </td>
@@ -389,12 +389,12 @@
              </tr>
              <tr>
               <td align=\"right\">
-               <input type=\"button\" name=\"chgsettings\" value=\"Go\" onClick=\"process('chgsettings')\" />
+               <input type=\"button\" name=\"chgsettings\" value=\"Go\" onclick=\"process('chgsettings')\" />
 	      </td>
              </tr>
 	    </table>
-            <input type=\"hidden\" name=\"action\" value=\"$action\">
-            <input type=\"hidden\" name=\"state\" value=\"process\">
+            <input type=\"hidden\" name=\"action\" value=\"$action\" />
+            <input type=\"hidden\" name=\"state\" value=\"process\" />
             </form>
       ");
   } elsif ($action eq "setdates") {
@@ -466,12 +466,12 @@
                   <table width="100%">
                    <tr>
                     <td align="right">
-                      <input type="button" name="setdates" value="Go" onClick="process('setdates')" />
+                      <input type="button" name="setdates" value="Go" onclick="process('setdates')" />
                     </td>
 	           </tr>
                   </table>
-                  <input type="hidden" name="action" value="$action">
-                  <input type="hidden" name="state" value="process">
+                  <input type="hidden" name="action" value="$action" />
+                  <input type="hidden" name="state" value="process" />
                   </form>
 ENDTWO
   } elsif ($action eq "setaccess") {
@@ -480,12 +480,12 @@
                   <table width="100%">
                    <tr>
                     <td align="right">
-                      <input type="button" name="$action" value="Go" onClick="process('$action')" />
+                      <input type="button" name="$action" value="Go" onclick="process('$action')" />
                     </td>
                    </tr>
                   </table>
-                  <input type="hidden" name="action" value="$action">
-                  <input type="hidden" name="state" value="process">
+                  <input type="hidden" name="action" value="$action" />
+                  <input type="hidden" name="state" value="process" />
                   </form>
 ENDTWO
   } elsif ($action eq "notify") {
@@ -517,13 +517,13 @@
       ");
       if ($notifycount) {
           $r->print("
-                        <input type=\"radio\" name=\"notify\" value=\"1\" checked=\"true\" />&nbsp;Yes&nbsp;&nbsp;&nbsp;
-                        <input type=\"radio\" name=\"notify\" value=\"0\" />&nbsp;No
+                        <label><input type=\"radio\" name=\"notify\" value=\"1\" checked=\"true\" />&nbsp;Yes&nbsp;&nbsp;&nbsp;</label>
+                        <label><input type=\"radio\" name=\"notify\" value=\"0\" />&nbsp;No</label>
           ");
       } else {
           $r->print("
-                        <input type=\"radio\" name=\"notify\" value=\"1\" />&nbsp;Yes&nbsp;&nbsp;&nbsp;
-                        <input type=\"radio\" name=\"notify\" value=\"0\" checked=\"true\" />&nbsp;No
+                        <label><input type=\"radio\" name=\"notify\" value=\"1\" />&nbsp;Yes&nbsp;&nbsp;&nbsp;</label>
+                        <label><input type=\"radio\" name=\"notify\" value=\"0\" checked=\"true\" />&nbsp;No</label>
           ");
       }
       $r->print("
@@ -614,7 +614,7 @@
                <table width=\"100%\" border=\"0\" cellspadding=\"2\" cellspacing=\"2\">
                 <tr>
                  <td align=\"right\">
-                  <input type=\"button\" name=\"notifyset\" value=\"Go\" onClick=\"process('notify')\" />
+                  <input type=\"button\" name=\"notifyset\" value=\"Go\" onclick=\"process('notify')\" />
                  </td>
                 </tr>
                </table>
@@ -631,9 +631,9 @@
       }
       $r->print("
           </table>
-          <input type=\"hidden\" name=\"notifyshow\" value=\"$notifyshow\">
-          <input type=\"hidden\" name=\"action\" value=\"$action\">
-          <input type=\"hidden\" name=\"state\" value=\"process\">
+          <input type=\"hidden\" name=\"notifyshow\" value=\"$notifyshow\" />
+          <input type=\"hidden\" name=\"action\" value=\"$action\" />
+          <input type=\"hidden\" name=\"state\" value=\"process\" />
           </form>
       ");
   } elsif ($action eq "crosslist") {
@@ -675,9 +675,9 @@
               my $colflag = $i%2;
               $r->print("
                 <tr bgcolor=\"$bgcolors[$colflag]\" align=\"left\">
-                 <td><input type=\"checkbox\" name=\"cross_$i\" checked=\"true\"/></td>
+                 <td><input type=\"checkbox\" name=\"cross_$i\" checked=\"true\" /></td>
                  <td>$xl</td>
-                 <td><input type =\"text\" size=\"10\" name=\"gp_$i\" value=\"$gp\"></td>
+                 <td><input type =\"text\" size=\"10\" name=\"gp_$i\" value=\"$gp\" /></td>
                 </tr> 
               ");
           }
@@ -709,12 +709,12 @@
             <table width=\"100%\" border=\"0\" cellspadding=\"2\" cellspacing=\"2\">
              <tr>
               <td align=\"right\">
-               <input type=\"button\" name=\"crosslist\" value=\"Go\" onClick=\"process('crosslist')\" />
+               <input type=\"button\" name=\"crosslist\" value=\"Go\" onclick=\"process('crosslist')\" />
               </td>
              </tr>
             </table>
-            <input type=\"hidden\" name=\"action\" value=\"$action\">
-            <input type=\"hidden\" name=\"state\" value=\"process\">
+            <input type=\"hidden\" name=\"action\" value=\"$action\" />
+            <input type=\"hidden\" name=\"state\" value=\"process\" />
             </form> 
       ");
   } elsif ($action eq "sections") {
@@ -770,7 +770,7 @@
               if ($shrflag) {
                   $r->print("</td><td><input type=\"text\" size=\"10\" name=\"loncapasec_$i\" value=\"$sec_id{$sections[$i]}\"></td><td><input type=\"checkbox\" name=\"sec_$i\" checked=\"true\" /></td></tr>"); 
               } else {
-                  $r->print("</td><td><input type=\"text\" size=\"10\" name=\"loncapasec_$i\" value=\"\"><td><input type=\"checkbox\" name=\"sec_$i\" /></td></tr>");
+                  $r->print("</td><td><input type=\"text\" size=\"10\" name=\"loncapasec_$i\" value=\"\" /></td><td><input type=\"checkbox\" name=\"sec_$i\" /></td></tr>");
               }
           }
           $r->print("
@@ -780,12 +780,12 @@
              <tr> 
               <td align=\"right\">
                <input type=\"hidden\" name=\"secshow\" value=\"$secshow\" />
-               <input type=\"button\" name=\"sections\" value=\"Go\" onClick=\"process('sections')\" />
+               <input type=\"button\" name=\"sections\" value=\"Go\" onclick=\"process('sections')\" />
               </td>
              </tr>
             </table>
-            <input type=\"hidden\" name=\"action\" value=\"$action\">
-            <input type=\"hidden\" name=\"state\" value=\"process\">
+            <input type=\"hidden\" name=\"action\" value=\"$action\" />
+            <input type=\"hidden\" name=\"state\" value=\"process\" />
             </form>
           ");
       } else {
@@ -817,9 +817,9 @@
                   my $colflag = $j%2;
                   $r->print("
                 <tr bgcolor=\"$bgcolors[$colflag]\" align=\"left\">
-                 <td><input type=\"checkbox\" name=\"sec_$j\" checked=\"true\"/></td>
+                 <td><input type=\"checkbox\" name=\"sec_$j\" checked=\"true\" /></td>
                  <td>$currsections[$j]</td>
-                 <td><input type=\"text\" name=\"secgp_$j\" size=\"10\" value=\"$sec_id{$currsections[$j]}\"></td>
+                 <td><input type=\"text\" name=\"secgp_$j\" size=\"10\" value=\"$sec_id{$currsections[$j]}\" /></td>
                 </tr> 
                   ");
               }
@@ -850,12 +850,12 @@
             <table width=\"100%\" border=\"0\" cellspadding=\"2\" cellspacing=\"2\">
              <tr>
               <td align=\"right\">
-               <input type=\"button\" name=\"sections\" value=\"Go\" onClick=\"process('sections')\" />
+               <input type=\"button\" name=\"sections\" value=\"Go\" onclick=\"process('sections')\" />
               </td>
              </tr>
             </table>
-            <input type=\"hidden\" name=\"action\" value=\"$action\">
-            <input type=\"hidden\" name=\"state\" value=\"process\">
+            <input type=\"hidden\" name=\"action\" value=\"$action\" />
+            <input type=\"hidden\" name=\"state\" value=\"process\" />
             </form> 
           ");
       }
@@ -878,13 +878,13 @@
       ");
       if ($enrollvar{showphoto}) {
           $r->print("
-                        <input type=\"radio\" name=\"showphotos\" value=\"1\" checked=\"true\" />&nbsp;Yes&nbsp;&nbsp;&nbsp;
-                        <input type=\"radio\" name=\"showphotos\" value=\"0\" />&nbsp;No
+                        <label><input type=\"radio\" name=\"showphotos\" value=\"1\" checked=\"true\" />&nbsp;Yes&nbsp;&nbsp;&nbsp;</label>
+                        <label><input type=\"radio\" name=\"showphotos\" value=\"0\" />&nbsp;No</label>
           ");
       } else {
           $r->print("
-                        <input type=\"radio\" name=\"showphotos\" value=\"1\" />&nbsp;Yes&nbsp;&nbsp;&nbsp;
-                        <input type=\"radio\" name=\"showphotos\" value=\"0\" checked=\"true\" />&nbsp;No
+                        <label><input type=\"radio\" name=\"showphotos\" value=\"1\" />&nbsp;Yes&nbsp;&nbsp;&nbsp;</label>
+                        <label><input type=\"radio\" name=\"showphotos\" value=\"0\" checked=\"true\" />&nbsp;No</label>
           ");
       }
       $r->print('
@@ -914,7 +914,7 @@
           $r->print('
                     <tr>
                      <td>'.
-&mt('There was a problem determining whether course owner permission is required in order for a course coordinator to have access to student photos in this domain.').' '.&mt('As a result you will not be able to configure access to student photos at this time').'<br /><br /><input type="button" name=mainmenu" value="Go back" onclick="javascript:history.go(-1);" />
+&mt('There was a problem determining whether course owner permission is required in order for a course coordinator to have access to student photos in this domain.').' '.&mt('As a result you will not be able to configure access to student photos at this time').'<br /><br /><input type="button" name="mainmenu" value="Go back" onclick="javascript:history.go(-1);" />
                     </td>
                    </tr>
                   </form>
@@ -950,7 +950,7 @@
               $r->print('
                     <tr>
                      <td>'.
-&mt('The policies of your institution [_1] require that the course owner [_2] must indicate acceptance of the conditions of use of digital photos of registered students, before they may be made available for use in a course.',$institution,$ownername).'<br /><br />'.&mt('Please direct the course owner [_1] to visit the "Student photos" page in the Automated Enrollment Manager to indicate acceptance of these conditions of use.',$emailstr).'<br /><br /><input type="button" name=mainmenu" value="Go back" onclick="javascript:history.go(-1);" />
+&mt('The policies of your institution [_1] require that the course owner [_2] must indicate acceptance of the conditions of use of digital photos of registered students, before they may be made available for use in a course.',$institution,$ownername).'<br /><br />'.&mt('Please direct the course owner [_1] to visit the "Student photos" page in the Automated Enrollment Manager to indicate acceptance of these conditions of use.',$emailstr).'<br /><br /><input type="button" name="mainmenu" value="Go back" onclick="javascript:history.go(-1);" />
                     </td>
                    </tr>
                   </form>
@@ -964,12 +964,12 @@
                     </tr>
                     <tr>
                      <td align="right">
-                      <input type="button" name="showphotos" value="Go" onClick="process('."'photos'".')">
+                      <input type="button" name="showphotos" value="Go" onclick="process('."'photos'".')" />
                      </td>
                     </tr>
                    </table>
-                   <input type="hidden" name="action" value="'.$action.'">
-                   <input type="hidden" name="state" value="process">
+                   <input type="hidden" name="action" value="'.$action.'" />
+                   <input type="hidden" name="state" value="process" />
                    </form>
       ');
   } elsif ($action eq "updatenow") {
@@ -985,14 +985,15 @@
 		    <tr>
 		     <td>
 	              Add any students currently included in institutional classlist(s) but not enrolled in your LON-CAPA course.<br />  
-		      <input type=\"radio\" name=\"updateadds\" value=\"1\">&nbsp;Yes&nbsp;<input type=\"radio\" name=\"updateadds\" value=\"0\">&nbsp;No&nbsp;
+		      <label><input type=\"radio\" name=\"updateadds\" value=\"1\" />&nbsp;Yes&nbsp;</label>
+                      <label><input type=\"radio\" name=\"updateadds\" value=\"0\" />&nbsp;No&nbsp;</label>
                      </td>
                     </tr>
                     <tr>
                      <td>
  	              Expire students previously added by nightly enrollment process, but no longer listed in institutional  classlist(s).<br />                  
-                      <input type=\"radio\" name=\"updatedrops\" value=\"1\">&nbsp;Yes&nbsp;
-                      <input type=\"radio\" name=\"updatedrops\" value=\"0\">&nbsp;No&nbsp;<br/>
+                      <label><input type=\"radio\" name=\"updatedrops\" value=\"1\" />&nbsp;Yes&nbsp;</label>
+                      <label><input type=\"radio\" name=\"updatedrops\" value=\"0\" />&nbsp;No&nbsp;</label><br />
                      </td>
                     </tr>
                     <tr>
@@ -1010,7 +1011,7 @@
                     </tr>
                     <tr>
                      <td align=\"right\">
-                      <input type=\"button\" name=\"updatenow\" value=\"Go\" onClick=\"process('updatenow')\" />
+                      <input type=\"button\" name=\"updatenow\" value=\"Go\" onclick=\"process('updatenow')\" />
                      </td>
                     </tr>
 	           </table>
@@ -1126,7 +1127,7 @@
                     </tr>
                     <tr>
                      <td align=\"right\">
-                      <input type=\"button\" name=\"viewclass\" value=\"Go\" onClick=\"process('viewclass','$autocount','$manualcount','$lockcount','$unlockcount')\" />
+                      <input type=\"button\" name=\"viewclass\" value=\"Go\" onclick=\"process('viewclass','$autocount','$manualcount','$lockcount','$unlockcount')\" />
                      </td>
                     </tr>
               ");
@@ -1337,13 +1338,13 @@
 	}
 	if ($autodrops) {
 	    if ($currdrops) {
-		$response .= "Nightly removals based on classlist changes still <b>enabled</b><br>";
+		$response .= "Nightly removals based on classlist changes still <b>enabled</b><br />";
 	    } else {
 		$response .= "Nightly removals based on classlist changes now <b>enabled</b><br/>";
 	    }
 	} else {
 	    if ($currdrops) {
-		$response .= "Nightly removals based on classlist changes now <b>disabled</b><br>";
+		$response .= "Nightly removals based on classlist changes now <b>disabled</b><br />";
 	    } else {
 		$response .= "Nightly removals based on classlist changes still <b>disabled</b>";
 	    }
@@ -1444,7 +1445,7 @@
 	  	    $firstaccess = "a date prior to today";
 	        }
 	        if (($nowstamp >= $autostart) && ($rosterupdated == 0)) {
-		    $response .= qq|<br>Although you have now set the first enrollment date to $firstaccess, automatic enrollment will <b>not</b> occur until the next automatic enrollment update occurs for all LON-CAPA courses at 1.30 am $nextupdate. If you wish to immediately enroll registered students included in the institutional classlist for this class, please visit the <a href="/adm/populate?action=updatenow">roster update page</a>.<br>|;
+		    $response .= qq|<br />Although you have now set the first enrollment date to $firstaccess, automatic enrollment will <b>not</b> occur until the next automatic enrollment update occurs for all LON-CAPA courses at 1.30 am $nextupdate. If you wish to immediately enroll registered students included in the institutional classlist for this class, please visit the <a href="/adm/populate?action=updatenow">roster update page</a>.<br />|;
 	        }
 	    }
 	    $warning = &warning_message($dom,$crs,$action);
@@ -1544,7 +1545,7 @@
 		    $firstaccess = "a date prior to today";
 	        }
 	        if (($nowstamp >= $startaccess) && ($accessgiven == 0)) {
-		    $response .= qq|<br>Although you have now set the first access date to $firstaccess, automatic enrollment will <b>not</b> occur until the next automatic enrollment update occurs for all LON-CAPA courses $nextupdate. If you wish to grant immediate course access for registered students included in the institutional classlist for this class, please visit the <a href="/adm/populate?action=updatenow">roster update page</a>.<br>|;
+		    $response .= qq|<br />Although you have now set the first access date to $firstaccess, automatic enrollment will <b>not</b> occur until the next automatic enrollment update occurs for all LON-CAPA courses $nextupdate. If you wish to grant immediate course access for registered students included in the institutional classlist for this class, please visit the <a href="/adm/populate?action=updatenow">roster update page</a>.<br />|;
 	        }
 	    }
 	    $warning = &warning_message($dom,$crs,$action);
@@ -1718,13 +1719,13 @@
              </tr>
              <tr>
               <td align="right">
-               <input type="button" name="newcross" value="Go" onClick="process('newcross')" />
+               <input type="button" name="newcross" value="Go" onclick="process('newcross')" />
               </td>
              </tr>
             </table>
-            <input type=\"hidden\" name=\"numcross\" value=\"$numcross\">
-            <input type=\"hidden\" name=\"action\" value=\"newcross\">
-            <input type=\"hidden\" name=\"state\" value=\"process\">
+            <input type=\"hidden\" name=\"numcross\" value=\"$numcross\" />
+            <input type=\"hidden\" name=\"action\" value=\"newcross\" />
+            <input type=\"hidden\" name=\"state\" value=\"process\" />
             </form>
 			      );
         }
@@ -2001,13 +2002,13 @@
              </tr>
              <tr>
               <td align="right">
-               <input type="button" name="newsections" value="Go" onClick="process('newsections')" />
+               <input type="button" name="newsections" value="Go" onclick="process('newsections')" />
               </td>
              </tr>
             </table>
-            <input type=\"hidden\" name=\"numsec\" value=\"$numsec\">
-            <input type=\"hidden\" name=\"action\" value=\"newsections\">
-            <input type=\"hidden\" name=\"state\" value=\"process\">
+            <input type=\"hidden\" name=\"numsec\" value=\"$numsec\" />
+            <input type=\"hidden\" name=\"action\" value=\"newsections\" />
+            <input type=\"hidden\" name=\"state\" value=\"process\" />
             </form>
 			      );
 	}
@@ -2457,15 +2458,15 @@
     my @currsections = ();
     my @currxlists = ();
     my $coursecode = $$settings{'internal.coursecode'};
-                                                                                       
+    
     if ($$settings{'internal.sectionnums'} ne '') {
         @currsections = split(/,/,$$settings{'internal.sectionnums'});
     }
-                                                                                      
+    
     if ($$settings{'internal.crosslistings'} ne '') {
         @currxlists = split(/,/,$$settings{'internal.crosslistings'});
     }
-                                                                                       
+    
     if (@currxlists > 0) {
         foreach (@currxlists) {
             if (m/^([^:]+):(\w*)$/) {
@@ -2779,11 +2780,11 @@
 sub date_setting_table {
     my ($starttime,$endtime,$action) = @_;
     my ($startform,$endform) = &setup_date_selectors($starttime,$endtime,$action);
-    my $perpetual = '<nobr><input type="checkbox" name="no_end_date"';
+    my $perpetual = '<nobr><label><input type="checkbox" name="no_end_date"';
     if (($action eq 'setdates' && defined($endtime) && $endtime == 0) || (($action eq 'setaccess' || $action eq 'updatenow') && ($endtime eq '' || $endtime == 0)) ) {
         $perpetual .= ' checked';
     }
-    $perpetual.= ' />'.' no ending date</nobr>';
+    $perpetual.= ' />'.' no ending date</label></nobr>';
     my $start_table = '';
     $start_table .= "<table>\n";
     $start_table .= '<tr><td align="right">Starting Date</td>'.

--albertel1139492755--