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

foxr lon-capa-cvs@mail.lon-capa.org
Thu, 03 Nov 2005 11:12:38 -0000


foxr		Thu Nov  3 06:12:38 2005 EDT

  Modified files:              
    /loncom/homework	outputtags.pm 
  Log:
  Do a bit of commenting and pre-position for allowing <duedate> to 
  produce formatted dates for target = 'tex'.
  
  
Index: loncom/homework/outputtags.pm
diff -u loncom/homework/outputtags.pm:1.40 loncom/homework/outputtags.pm:1.41
--- loncom/homework/outputtags.pm:1.40	Wed Nov  2 15:31:55 2005
+++ loncom/homework/outputtags.pm	Thu Nov  3 06:12:37 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # tags that create controlled output
 #
-# $Id: outputtags.pm,v 1.40 2005/11/02 20:31:55 albertel Exp $
+# $Id: outputtags.pm,v 1.41 2005/11/03 11:12:37 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -36,7 +36,9 @@
 BEGIN {
     &Apache::lonxml::register('Apache::outputtags',('displayduedate','displaytitle','displayweight','displaystudentphoto'));
 }
-
+#  Empties the hash of tags that have already been displayed
+#  that should only be displayed once.
+#
 sub initialize_outputtags {
     %Apache::outputtags::showonce=();
 }
@@ -52,9 +54,11 @@
     if (exists($Apache::outputtags::showonce{'displayduedate'})) {
 	if (grep(/^\Q$Apache::inputtags::part\E$/,
 		 @{$Apache::outputtags::showonce{'displayduedate'}})) {
-	    return '';
+	    return '';		# Already shown the duedate for this part.
 	}
     }
+    # since we will show the duedate for this part, remeber it.
+
     push (@{$Apache::outputtags::showonce{'displayduedate'}},
 	  $Apache::inputtags::part);
 
@@ -93,6 +97,9 @@
 	$result=&Apache::edit::tag_start($target,$token);
 	$result.='</td></tr>';
 	$result.=&Apache::edit::end_table();
+    } elsif {$target eq 'tex'} {
+	# print target.
+	$result ='';		# Stubbed off for now.
     }
     return $result;
 }