version 1.283, 2007/11/10 01:38:21
|
version 1.285, 2007/11/17 02:51:29
|
Line 494 sub check_access {
|
Line 494 sub check_access {
|
$Apache::lonhomework::history{"resource.$id.solved"}=~/^excused/) { |
$Apache::lonhomework::history{"resource.$id.solved"}=~/^excused/) { |
$status = 'CANNOT_ANSWER'; |
$status = 'CANNOT_ANSWER'; |
} |
} |
|
if ($status eq 'CANNOT_ANSWER' |
|
&& &show_answer_problem_status()) { |
|
$status = 'SHOW_ANSWER'; |
|
} |
} |
} |
if ($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER') { |
if ($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER') { |
my $interval=&Apache::lonnet::EXT("resource.$id.interval"); |
my $interval=&Apache::lonnet::EXT("resource.$id.interval"); |
Line 684 sub handle_save_or_undo {
|
Line 688 sub handle_save_or_undo {
|
my $error=0; |
my $error=0; |
if ($env{'form.Undo'} eq &mt('undo')) { |
if ($env{'form.Undo'} eq &mt('undo')) { |
my $error=0; |
my $error=0; |
if (!copy($file,$filetmp)) { $error=1; } |
if (!&File::Copy::copy($file,$filetmp)) { $error=1; } |
if ((!$error) && (!copy($filebak,$file))) { $error=1; } |
if ((!$error) && (!&File::Copy::copy($filebak,$file))) { $error=1; } |
if ((!$error) && (!move($filetmp,$filebak))) { $error=1; } |
if ((!$error) && (!&File::Copy::move($filetmp,$filebak))) { $error=1; } |
if (!$error) { |
if (!$error) { |
&Apache::lonxml::info("<p><b>". |
&Apache::lonxml::info("<p><b>". |
&mt("Undid changes, Switched [_1] and [_2]", |
&mt("Undid changes, Switched [_1] and [_2]", |
Line 883 sub analyze {
|
Line 887 sub analyze {
|
|
|
sub show_problem_status { |
sub show_problem_status { |
return ($show_problem_status eq 'yes' |
return ($show_problem_status eq 'yes' |
|
|| $show_problem_status eq 'answer' |
|| $show_problem_status eq ''); |
|| $show_problem_status eq ''); |
} |
} |
|
|
Line 893 sub analyze {
|
Line 898 sub analyze {
|
sub show_no_problem_status { |
sub show_no_problem_status { |
return ($show_problem_status eq 'no_feedback_ever'); |
return ($show_problem_status eq 'no_feedback_ever'); |
} |
} |
|
|
|
sub show_answer_problem_status { |
|
return ($show_problem_status eq 'answer'); |
|
} |
} |
} |
|
|
sub editxmlmode { |
sub editxmlmode { |