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

sakharuk lon-capa-cvs@mail.lon-capa.org
Mon, 13 Jan 2003 21:24:02 -0000


sakharuk		Mon Jan 13 16:24:02 2003 EDT

  Modified files:              
    /loncom/homework	essayresponse.pm 
  Log:
  Now you can print essay type of problems in exam with Ed's environment (CAPA-like).
  
  
Index: loncom/homework/essayresponse.pm
diff -u loncom/homework/essayresponse.pm:1.15 loncom/homework/essayresponse.pm:1.16
--- loncom/homework/essayresponse.pm:1.15	Wed Aug  7 12:23:05 2002
+++ loncom/homework/essayresponse.pm	Mon Jan 13 16:24:02 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # essay (ungraded) style responses
 #
-# $Id: essayresponse.pm,v 1.15 2002/08/07 16:23:05 albertel Exp $
+# $Id: essayresponse.pm,v 1.16 2003/01/13 21:24:02 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -30,6 +30,7 @@
 #
 package Apache::essayresponse;
 use strict;
+use Apache::lonxml;
 
 BEGIN {
     &Apache::lonxml::register('Apache::essayresponse',('essayresponse'));
@@ -95,6 +96,13 @@
 	}
     } elsif ($target eq 'edit') {
 	$result.=&Apache::edit::end_table();
+    } elsif ($target eq 'tex') {
+	if ($Apache::lonhomework::type eq 'exam') {
+	    $result.='\begin{enumerate}\item[\textbf{'.$Apache::lonxml::counter.'}.]\textit{Live blank on scoring form}\vskip 0 mm';
+	    &Apache::lonxml::increment_counter();
+	    $result.= '\item[\textbf{'.$Apache::lonxml::counter.'}.]\textit{Live blank on scoring form}\vskip 0 mm \end{enumerate}';
+	    &Apache::lonxml::increment_counter();
+	}
     }
 
     &Apache::response::end_response;