version 1.165, 2004/02/16 17:20:39
|
version 1.170, 2004/03/02 20:59:25
|
Line 47 use Apache::externalresponse();
|
Line 47 use Apache::externalresponse();
|
use Apache::rankresponse(); |
use Apache::rankresponse(); |
use Apache::matchresponse(); |
use Apache::matchresponse(); |
use Apache::chemresponse(); |
use Apache::chemresponse(); |
|
use Apache::drawimage(); |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
use HTML::Entities(); |
use HTML::Entities(); |
use Apache::loncommon(); |
use Apache::loncommon(); |
Line 201 sub check_access {
|
Line 202 sub check_access {
|
my $passed; |
my $passed; |
|
|
if ($ENV{'request.state'} eq "construct") { |
if ($ENV{'request.state'} eq "construct") { |
if (defined($ENV{'form.problemstatus'})) { |
if ($ENV{'form.problemstate'}) { |
if ($ENV{'form.problemstate'} =~ /^CANNOT_ANSWER/) { |
if ($ENV{'form.problemstate'} =~ /^CANNOT_ANSWER/) { |
return ('CANNOT_ANSWER','is in this state by royal decree.'); |
if ( ! ($ENV{'form.problemstate'} eq 'CANNOT_ANSWER_correct' && |
|
lc($Apache::lonhomework::problemstatus) eq 'no')) { |
|
return ('CANNOT_ANSWER', |
|
&mt('is in this state by royal decree.')); |
|
} |
} else { |
} else { |
return ($ENV{'form.problemstate'}, |
return ($ENV{'form.problemstate'}, |
'is in this state by royal decree.'); |
&mt('is in this state by royal decree.')); |
} |
} |
} |
} |
&Apache::lonxml::debug("in construction ignoring dates"); |
&Apache::lonxml::debug("in construction ignoring dates"); |
Line 548 sub editxmlmode {
|
Line 553 sub editxmlmode {
|
<form name="lonhomework" method="POST" action="'. |
<form name="lonhomework" method="POST" action="'. |
$ENV{'request.uri'}.'"> |
$ENV{'request.uri'}.'"> |
<input type="hidden" name="problemmode" value="'.&mt('EditXML').'" /> |
<input type="hidden" name="problemmode" value="'.&mt('EditXML').'" /> |
<input type="submit" name="problemmode" value="'.&mt('Discard Edits and View').'" /> |
<input type="submit" name="problemmode" accesskey="d" value="'.&mt('Discard Edits and View').'" /> |
<input type="submit" name="problemmode" value="'.&mt('Edit').'" /> |
<input type="submit" name="problemmode" accesskey="e" value="'.&mt('Edit').'" /> |
<hr /> |
<hr /> |
<input type="submit" name="submit" value="'.&mt('Submit Changes').'" /> |
<input type="submit" name="submit" accesskey="s" value="'.&mt('Submit Changes').'" /> |
<input type="submit" name="submit" value="'.&mt('Submit Changes and View').'" /> |
<input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" /> |
<input type="submit" name="Undo" value="'.&mt('undo').'" /> |
<input type="submit" name="Undo" accesskey="u" value="'.&mt('undo').'" /> |
<hr /> |
<hr /> |
' . $xml_help . ' |
' . $xml_help . ' |
<textarea rows="'.$rows.'" cols="'.$cols.'" name="editxmltext">'. |
<textarea rows="'.$rows.'" cols="'.$cols.'" name="editxmltext">'. |
Line 704 sub view_or_edit_menu {
|
Line 709 sub view_or_edit_menu {
|
$request->print(<<EDITMENU); |
$request->print(<<EDITMENU); |
<body bgcolor="#FFFFFF"> |
<body bgcolor="#FFFFFF"> |
<form action="$url" method="POST"> |
<form action="$url" method="POST"> |
$lt{'would'} <input type="submit" name="problemmode" value="<{'view'}"> |
$lt{'would'} <input type="submit" name="problemmode" accesskey="v" value="<{'view'}"> |
<{'or'} <input type="submit" name="problemmode" value="<{'Edit'}"> |
<{'or'} <input type="submit" name="problemmode" accesskey="e" value="<{'Edit'}"> |
<{'the problem'}. |
<{'the problem'}. |
</form> |
</form> |
</body> |
</body> |