version 1.135, 2003/06/16 21:32:43
|
version 1.139, 2003/09/09 13:32:25
|
Line 50 use Apache::essayresponse();
|
Line 50 use Apache::essayresponse();
|
use Apache::externalresponse(); |
use Apache::externalresponse(); |
use Apache::rankresponse(); |
use Apache::rankresponse(); |
use Apache::matchresponse(); |
use Apache::matchresponse(); |
#use Apache::chemresponse(); |
use Apache::chemresponse(); |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
use HTML::Entities(); |
use HTML::Entities(); |
use Apache::loncommon(); |
use Apache::loncommon(); |
Line 69 sub get_target {
|
Line 69 sub get_target {
|
} elsif ( defined($ENV{'form.grade_target'} ) |
} elsif ( defined($ENV{'form.grade_target'} ) |
&& ($Apache::lonhomework::viewgrades eq 'F' )) { |
&& ($Apache::lonhomework::viewgrades eq 'F' )) { |
return ($ENV{'form.grade_target'}); |
return ($ENV{'form.grade_target'}); |
|
} elsif (defined($ENV{'form.grade_target'} ) |
|
&& ($ENV{'form.grade_target'} eq 'answer')) { |
|
return ($ENV{'form.grade_target'}); |
} |
} |
|
|
if ( defined($ENV{'form.submitted'}) && |
if ( defined($ENV{'form.submitted'}) && |
( !defined($ENV{'form.resetdata'}))) { |
( !defined($ENV{'form.resetdata'})) && |
|
( !defined($ENV{'form.newrandomization'}))) { |
return ('grade', 'web'); |
return ('grade', 'web'); |
} else { |
} else { |
return ('web'); |
return ('web'); |
Line 91 sub get_target {
|
Line 95 sub get_target {
|
if ( $ENV{'form.problemmode'} eq 'View' || |
if ( $ENV{'form.problemmode'} eq 'View' || |
$ENV{'form.problemmode'} eq 'Discard Edits and View') { |
$ENV{'form.problemmode'} eq 'Discard Edits and View') { |
if ( defined($ENV{'form.submitted'}) && |
if ( defined($ENV{'form.submitted'}) && |
(!defined($ENV{'form.resetdata'})) ) { |
(!defined($ENV{'form.resetdata'})) && |
|
(!defined($ENV{'form.newrandomization'}))) { |
return ('grade', 'web','answer'); |
return ('grade', 'web','answer'); |
} else { |
} else { |
return ('web','answer'); |
return ('web','answer'); |
Line 469 sub editxmlmode {
|
Line 474 sub editxmlmode {
|
&renderpage($request,$file); |
&renderpage($request,$file); |
} else { |
} else { |
my ($rows,$cols) = &Apache::edit::textarea_sizes(\$problem); |
my ($rows,$cols) = &Apache::edit::textarea_sizes(\$problem); |
my $xml_help = '<table><tr><td>'. |
my $xml_help = Apache::loncommon::helpLatexCheatsheet("Problem_Editor_XML_Index", |
&Apache::loncommon::help_open_topic("Problem_Editor_XML_Index",'Problem Editing Help') |
"Problem Editing Help"); |
.'</td><td>'. |
|
&Apache::loncommon::help_open_topic("Greek_Symbols",'Greek Symbols', |
|
undef,undef,600) |
|
.'</td><td>'. |
|
&Apache::loncommon::help_open_topic("Other_Symbols",'Other Symbols', |
|
undef,undef,600) |
|
.'</td></tr></table>'; |
|
if ($cols > 80) { $cols = 80; } |
if ($cols > 80) { $cols = 80; } |
if ($cols < 70) { $cols = 70; } |
if ($cols < 70) { $cols = 70; } |
if ($rows < 20) { $rows = 20; } |
if ($rows < 20) { $rows = 20; } |
Line 670 sub handler {
|
Line 668 sub handler {
|
&Apache::lonxml::debug('symb is '.$symb); |
&Apache::lonxml::debug('symb is '.$symb); |
if ($ENV{'request.state'} eq "construct" || $symb eq '') { |
if ($ENV{'request.state'} eq "construct" || $symb eq '') { |
if ($ENV{'form.resetdata'} eq 'Reset Submissions' || |
if ($ENV{'form.resetdata'} eq 'Reset Submissions' || |
$ENV{'form.resetdata'} eq 'New Problem Variation' ) { |
$ENV{'form.resetdata'} eq 'New Problem Variation' || |
|
$ENV{'form.newrandomization'} eq 'New Randomization') { |
my ($symb,$courseid,$domain,$name) = &Apache::lonxml::whichuser(); |
my ($symb,$courseid,$domain,$name) = &Apache::lonxml::whichuser(); |
&Apache::lonnet::tmpreset($symb,'',$domain,$name); |
&Apache::lonnet::tmpreset($symb,'',$domain,$name); |
|
&Apache::lonxml::debug("Attempt reset"); |
} |
} |
} |
} |
if ($ENV{'request.state'} eq "construct") { |
if ($ENV{'request.state'} eq "construct") { |