--- loncom/homework/lonsimpleproblemedit.pm	2003/07/09 06:23:20	1.2
+++ loncom/homework/lonsimpleproblemedit.pm	2003/07/09 10:05:15	1.3
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Problem Parameter Setting "Editor"
 #
-# $Id: lonsimpleproblemedit.pm,v 1.2 2003/07/09 06:23:20 www Exp $
+# $Id: lonsimpleproblemedit.pm,v 1.3 2003/07/09 10:05:15 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -204,7 +204,9 @@ ENDDOCUMENT
 # Question Type        
 	my %questiontypes=('radio'  => 
                                '1 out of N multiple choice (radio button)',
-			   'option' => 'Option Response');
+			   'option' => 'Option response',
+                           'string' => 'Short string response',
+                           'essay'  => 'Essay, open end');
         $qtype=$qparms{$prefix.'questiontype'};
         unless (defined($qtype)) { $qtype='radio'; }
         unless ($questiontypes{$qtype}) { $qtype='radio'; }
@@ -255,9 +257,28 @@ ENDDOCUMENT
 
 # End Response
 	    $r->print('</td></tr></table><br />');
+# Hint
+	    $r->print(&hint());
 	}
+	if ($qtype eq 'string') {
+            my %stringtypes=(
+	       'cs' => 'Case sensitive',
+	       'ci' => 'Case Insensitive',
+	       'mc' => 'Multiple Choice, Order of characters unchecked');
+            my $stringanswer=$qparms{$prefix.'stringanswer'};
+            unless (defined($stringanswer)) { $stringanswer=''; }
+            my $stringtype=$qparms{$prefix.'stringtype'};
+            unless (defined($stringtype)) { $stringtype='cs'; }
+            unless ($stringtypes{$stringtype}) { $stringtype='cs'; }
+	    $r->print(
+		  '<table bgcolor="#00ee44" cellspacing="4" cellpadding="2">'.
+	          '<tr><td>Correct answer: <input type="text" size="20" name="stringanswer" value="'.$stringanswer.'" />&nbsp;&nbsp;'.
+		      &Apache::loncommon::select_form
+		      ($stringtype,'stringtype',%stringtypes).
+		  '</td></tr></table><br />');
 # Hint
-        $r->print(&hint());
+	    $r->print(&hint());
+	}
 # Store Button
 	$r->print(
   '<input type="submit" name="storeproblem" value="Store Changes" /></form>');