--- loncom/homework/lonsimpleproblemedit.pm 2003/07/09 06:23:20 1.2 +++ loncom/homework/lonsimpleproblemedit.pm 2003/12/11 21:23:58 1.10 @@ -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.10 2003/12/11 21:23:58 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,6 +32,7 @@ use strict; use Apache::Constants qw(:common :http); use Apache::loncommon; use Apache::lonnet; +use Apache::lonlocal; my %qparms; my $prefix; @@ -60,6 +61,7 @@ sub rawrendering { $ENV{'user.name'}=time; $ENV{'user.domain'}=time; my $result = &Apache::lonxml::xmlparse($request,'web', $problem); + undef($Apache::lonhomework::parsing_a_problem); $ENV{'user.name'}=$uname; $ENV{'user.domain'}=$udom; $result=~s/^.*\
]*\>//si; @@ -69,9 +71,10 @@ sub rawrendering { sub questiontext { my $text=$qparms{$prefix.'questiontext'}; + my $qt=&mt('Question Text'); return (<'); + '
'); # Question Text $r->print(&questiontext()); # Radio, Option === @@ -227,7 +241,8 @@ ENDDOCUMENT unless ($randomizes{$randomize}) { $randomize='yes'; } $r->print( '
Max number of foils displayed: '. + ' | |||
'.&mt('Max number of foils displayed'). +': '. &Apache::loncommon::select_form ($randomize,'randomize',%randomizes). ' | |||
');
@@ -239,8 +254,9 @@ ENDDOCUMENT
$r->print(
'
'); +# 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( + '
'); # Hint - $r->print(&hint()); + $r->print(&hint()); + } # Store Button $r->print( - ''); + ''); } else { - $r->print('Could not identify problem.'); + $r->print(&mt('Could not identify problem.')); } $r->print(' |