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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 14 Oct 2002 20:48:36 -0000


albertel		Mon Oct 14 16:48:36 2002 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - start of analyzing a problem support
  
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.125 loncom/homework/structuretags.pm:1.126
--- loncom/homework/structuretags.pm:1.125	Mon Oct 14 11:43:06 2002
+++ loncom/homework/structuretags.pm	Mon Oct 14 16:48:36 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.125 2002/10/14 15:43:06 sakharuk Exp $
+# $Id: structuretags.pm,v 1.126 2002/10/14 20:48:36 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -163,6 +163,12 @@
   if (defined($ENV{'form.showallfoils'})) { $result.='checked="on"'; }
   $result.= ' /> Show All Foils
              <hr />';
+  my $numtoanalyze=$ENV{'form.numtoanalyze'};
+  if (!$numtoanalyze) { $numtoanalyze=100; }
+  #DISABLED for now.
+  #$result.= '<input type="submit" name="problemmode" value="Answer Distribution" />
+#             <input type="text" name="numtoanalyze" value="'.
+#		 $numtoanalyze.'" size="5" /> <hr />';
 }
 
 sub initialize_storage {
@@ -476,7 +482,7 @@
 sub start_block {
   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
 
-  if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') {
+  if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex' || $targer eq 'analyze') {
     my $code = @$parstack[$#$parstack];
     $code =~ s/\"//g;
     $code .=';return $condition;';
@@ -533,7 +539,7 @@
   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
   my $result;
   if ($target eq 'answer' || $target eq 'grade' || $target eq 'web' ||
-      $target eq 'tex') {
+      $target eq 'tex' || $target eq 'analyze') {
     my $body= &Apache::lonxml::get_all_text("/randomlist",$$parser[$#$parser]);
     my $b_parser= HTML::TokeParser->new(\$body);
     my $b_tok;