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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 09 Nov 2006 21:39:35 -0000


albertel		Thu Nov  9 16:39:35 2006 EDT

  Modified files:              
    /loncom/homework	bridgetask.pm 
  Log:
  - some updates to the button html layout
  
  
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.200 loncom/homework/bridgetask.pm:1.201
--- loncom/homework/bridgetask.pm:1.200	Thu Nov  9 16:31:11 2006
+++ loncom/homework/bridgetask.pm	Thu Nov  9 16:39:34 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.200 2006/11/09 21:31:11 albertel Exp $
+# $Id: bridgetask.pm,v 1.201 2006/11/09 21:39:34 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2666,35 +2666,28 @@
 	if ($status eq $which) { $checked{$which} = 'checked="checked"'; }
     }
     if (!%checked) { $checked{'ungraded'} = 'checked="checked"'; }
-    
+    my $buttons;
+    foreach my $which  ('ungraded','fail','pass','review') {
+	$buttons .= <<END_BUTTON;
+		<label class="LC_GRADING_$which">
+			<input type="radio" name="HWVAL_$link" value="$which" $checked{$which} />
+			$lt{$which}
+		</label>
+END_BUTTON
+    }
     my $result = <<END_CRITERIA;
-  <div class="LC_GRADING_criteria">
-     <div class="LC_GRADING_criteriatext">
-	$criteria
-     </div>
-     <div class="LC_GRADING_grade">
-       <label class="LC_GRADING_ungraded">
-         <input type="radio" name="HWVAL_$link" value="ungraded" $checked{'ungraded'} />
-	 $lt{'ungraded'}
-       </label>
-       <label class="LC_GRADING_fail">
-         <input type="radio" name="HWVAL_$link" value="fail" $checked{'fail'} />
-	 $lt{'fail'}
-       </label>
-       <label class="LC_GRADING_pass">
-         <input type="radio" name="HWVAL_$link" value="pass" $checked{'pass'} />
-	 $lt{'pass'}
-       </label>
-       <label class="LC_GRADING_review">
-         <input type="radio" name="HWVAL_$link" value="review" $checked{'review'} />
-	 $lt{'review'}
-       </label>
-     </div>
-     <label class="LC_GRADING_comment">
-       $lt{'comment'}
-       <textarea class="LC_GRADING_comment_area" name="HWVAL_comment_$link">$comment</textarea>
-     </label>
-  </div>
+<div class="LC_GRADING_criteria">
+	<div class="LC_GRADING_criteriatext">
+		$criteria
+	</div>
+	<div class="LC_GRADING_grade">
+$buttons
+	</div>
+	<label class="LC_GRADING_comment">
+		$lt{'comment'}
+		<textarea class="LC_GRADING_comment_area" name="HWVAL_comment_$link">$comment</textarea>
+	</label>
+</div>
 END_CRITERIA
     $result .= &grading_history($version,$dim,$id);
     return $result;