[LON-CAPA-cvs] cvs: loncom /homework radiobuttonresponse.pm

matthew lon-capa-cvs@mail.lon-capa.org
Mon, 04 Oct 2004 17:41:02 -0000


matthew		Mon Oct  4 13:41:02 2004 EDT

  Modified files:              
    /loncom/homework	radiobuttonresponse.pm 
  Log:
  <label>s around input fields and foil text.  Does not appear to have any
  effect on printing.
  
  
Index: loncom/homework/radiobuttonresponse.pm
diff -u loncom/homework/radiobuttonresponse.pm:1.93 loncom/homework/radiobuttonresponse.pm:1.94
--- loncom/homework/radiobuttonresponse.pm:1.93	Sun Aug 29 22:03:44 2004
+++ loncom/homework/radiobuttonresponse.pm	Mon Oct  4 13:41:01 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # mutliple choice style responses
 #
-# $Id: radiobuttonresponse.pm,v 1.93 2004/08/30 02:03:44 albertel Exp $
+# $Id: radiobuttonresponse.pm,v 1.94 2004/10/04 17:41:01 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -260,9 +260,11 @@
 		} else {
 		    $result.="<br />";
 		}
+                $result .= '<label>';
 		$result.="<input type=\"radio\" name=\"HWVAL_$Apache::inputtags::response['-1']\" value=\"$temp\" ";
 		if (defined($lastresponse{$name})) { $result .= 'checked="on"'; }
-		$result .= '>'.$Apache::response::foilgroup{$name.'.text'}."</input>";
+		$result .= '>'.$Apache::response::foilgroup{$name.'.text'}.
+                    '</label>';
 		$temp++;
 		if ($direction eq 'horizontal') { $result.="</td>"; }
 	    }
@@ -433,8 +435,9 @@
 	    } else {
 		$result.='Incorrect:';
 	    }
+	    if ($target eq 'web') { $result.="<label>"; }
 	    $result.=$Apache::response::foilgroup{$name.'.text'};
-	    if ($target eq 'web') { $result.="</input>"; }
+	    if ($target eq 'web') { $result.="</label>"; }
 	    if ($Apache::response::foilgroup{$name.'.value'} eq 'true') {
 		if ($target ne 'tex') { $result.='</b>';} else {$result.='}';}
 	    }
@@ -467,9 +470,10 @@
 		} 
 	    }
 	    if ($target ne 'tex') { 
+                $result.= '<label>';
 		$result.="<input type=\"radio\" name=\"HWVAL_$Apache::inputtags::response['-1']\" value=\"$temp\" ";
 		if (defined($lastresponse{$name})) { $result .= 'checked="on"'; }
-		$result .= '>'.$Apache::response::foilgroup{$name.'.text'}."</input>";
+		$result .= '>'.$Apache::response::foilgroup{$name.'.text'}."</label>";
 	    } else {
 		if ($Apache::lonhomework::type eq 'exam') {
 		    $result .= '{\small \textbf{'.$alphabet[$i].'}}$\bigcirc$'.$Apache::response::foilgroup{$name.'.text'}.'\\\\';  #' stupid emacs