version 1.115, 2003/03/11 18:43:08
|
version 1.118, 2003/04/03 20:05:21
|
Line 69 sub get_target {
|
Line 69 sub get_target {
|
return ($ENV{'form.grade_target'}); |
return ($ENV{'form.grade_target'}); |
} |
} |
|
|
if ( defined($ENV{'form.submitted'})) { |
if ( defined($ENV{'form.submitted'}) && |
|
( !defined($ENV{'form.resetdata'}))) { |
return ('grade', 'web'); |
return ('grade', 'web'); |
} else { |
} else { |
return ('web'); |
return ('web'); |
Line 422 sub editxmlmode {
|
Line 423 sub editxmlmode {
|
my ($request,$file) = @_; |
my ($request,$file) = @_; |
my $result; |
my $result; |
my $problem=&Apache::lonnet::getfile($file); |
my $problem=&Apache::lonnet::getfile($file); |
if ($problem == -1) { |
if ($problem eq -1) { |
&Apache::lonxml::error("<b> Unable to find <i>$file</i></b>"); |
&Apache::lonxml::error("<b> Unable to find <i>$file</i></b>"); |
$problem=''; |
$problem=''; |
} |
} |
Line 478 sub renderpage {
|
Line 479 sub renderpage {
|
foreach my $target (@targets) { |
foreach my $target (@targets) { |
#my $t0 = [&gettimeofday()]; |
#my $t0 = [&gettimeofday()]; |
my $problem=&Apache::lonnet::getfile($file); |
my $problem=&Apache::lonnet::getfile($file); |
if ($problem == -1) { |
if ($problem eq -1) { |
&Apache::lonxml::error("<b> Unable to find <i>$file</i></b>"); |
&Apache::lonxml::error("<b> Unable to find <i>$file</i></b>"); |
$problem=''; |
$problem=''; |
} |
} |
Line 631 sub handler {
|
Line 632 sub handler {
|
} |
} |
} |
} |
|
|
|
my ($symb) = &Apache::lonxml::whichuser(); |
|
&Apache::lonxml::debug('symb is '.$symb); |
|
if ($ENV{'request.state'} eq "construct" || $symb eq '') { |
|
if ($ENV{'form.resetdata'} eq 'Reset Submissions' || |
|
$ENV{'form.resetdata'} eq 'New Problem Variation' ) { |
|
my ($symb,$courseid,$domain,$name) = &Apache::lonxml::whichuser(); |
|
&Apache::lonnet::tmpreset($symb,'',$domain,$name); |
|
} |
|
} |
if ($ENV{'request.state'} eq "construct") { |
if ($ENV{'request.state'} eq "construct") { |
if ($ENV{'form.resetdata'} eq 'Reset Submissions') { |
|
my ($symb,$courseid,$domain,$name) = &Apache::lonxml::whichuser(); |
|
&Apache::lonnet::tmpreset($symb,'',$domain,$name); |
|
} |
|
if ( -e $file ) { |
if ( -e $file ) { |
if (!(defined $ENV{'form.problemmode'})) { |
if (!(defined $ENV{'form.problemmode'})) { |
#first visit to problem in construction space |
#first visit to problem in construction space |