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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Wed, 18 Apr 2007 00:32:06 -0000


albertel		Tue Apr 17 20:32:06 2007 EDT

  Modified files:              
    /loncom/homework	inputtags.pm bridgetask.pm 
  Log:
  - 2622, task seems to not need a previous submission mechanism
  
  
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.222 loncom/homework/inputtags.pm:1.223
--- loncom/homework/inputtags.pm:1.222	Mon Apr 16 19:15:48 2007
+++ loncom/homework/inputtags.pm	Tue Apr 17 20:32:02 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.222 2007/04/16 23:15:48 albertel Exp $
+# $Id: inputtags.pm,v 1.223 2007/04/18 00:32:02 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1106,7 +1106,7 @@
 }
 
 sub gradestatus {
-    my ($id,$target) = @_;
+    my ($id,$target,$no_previous) = @_;
     my $showbutton = 1;
     my $message = '';
     my $latemessage = '';
@@ -1145,7 +1145,13 @@
 	if ($target eq 'tex') {
 	    return $button.' \vskip 0 mm '.$output.' ';
 	} else {
-	    return '<table><tr><td>'.$button.'</td>'.$output.'<td>'.&previous_tries($id,$target).'</td></tr></table>';
+	    $output =
+		'<table><tr><td>'.$button.'</td>'.$output;
+	    if (!$no_previous) {
+		$output.='<td>'.&previous_tries($id,$target).'</td>';
+	    }
+	    $output.= '</tr></table>';
+	    return $output;
 	}
     }
 }
@@ -1190,7 +1196,7 @@
 	
 
 	$output.='<tr class="'.$class.'">';
-	$output.='<td align ="center">'.$count.'</td>';
+	$output.='<td align="center">'.$count.'</td>';
 	$output.=$message;
 
 	foreach my $resid (@Apache::inputtags::response) {
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.231 loncom/homework/bridgetask.pm:1.232
--- loncom/homework/bridgetask.pm:1.231	Fri Apr  6 20:12:43 2007
+++ loncom/homework/bridgetask.pm	Tue Apr 17 20:32:03 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.231 2007/04/07 00:12:43 albertel Exp $
+# $Id: bridgetask.pm,v 1.232 2007/04/18 00:32:03 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1064,7 +1064,7 @@
 		}
 		if (!$previous && $status ne 'SHOW_ANSWER' &&
 		    &show_task($status,$previous)) {
-		    $result.=&Apache::inputtags::gradestatus('0');
+		    $result.=&Apache::inputtags::gradestatus('0',$target,1);
 		}
 		
 		$result.='</form>';