version 1.134, 2003/06/13 20:50:57
|
version 1.138, 2003/07/22 19:55:26
|
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 72 sub get_target {
|
Line 72 sub get_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 92 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 471 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 665 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") { |
if ( -e $file ) { |
if ( -e $file ) { |
|
&Apache::loncommon::get_unprocessed_cgi |
|
($ENV{'QUERY_STRING'},['problemmode']); |
if (!(defined $ENV{'form.problemmode'})) { |
if (!(defined $ENV{'form.problemmode'})) { |
#first visit to problem in construction space |
#first visit to problem in construction space |
#&view_or_edit_menu($request); |
#&view_or_edit_menu($request); |