version 1.171, 2004/03/09 20:37:58
|
version 1.174, 2004/04/17 14:06:41
|
Line 207 sub check_access {
|
Line 207 sub check_access {
|
if ( ! ($ENV{'form.problemstate'} eq 'CANNOT_ANSWER_correct' && |
if ( ! ($ENV{'form.problemstate'} eq 'CANNOT_ANSWER_correct' && |
lc($Apache::lonhomework::problemstatus) eq 'no')) { |
lc($Apache::lonhomework::problemstatus) eq 'no')) { |
return ('CANNOT_ANSWER', |
return ('CANNOT_ANSWER', |
&mt('is in this state by royal decree.')); |
&mt('is in this state due to author settings.')); |
} |
} |
} else { |
} else { |
return ($ENV{'form.problemstate'}, |
return ($ENV{'form.problemstate'}, |
&mt('is in this state by royal decree.')); |
&mt('is in this state due to author settings.')); |
} |
} |
} |
} |
&Apache::lonxml::debug("in construction ignoring dates"); |
&Apache::lonxml::debug("in construction ignoring dates"); |
Line 564 sub editxmlmode {
|
Line 564 sub editxmlmode {
|
<hr /> |
<hr /> |
' . $xml_help . ' |
' . $xml_help . ' |
<textarea rows="'.$rows.'" cols="'.$cols.'" name="editxmltext">'. |
<textarea rows="'.$rows.'" cols="'.$cols.'" name="editxmltext">'. |
&HTML::Entities::encode($problem).'</textarea> |
&HTML::Entities::encode($problem,'<>&"').'</textarea> |
</form></body></html>'; |
</form></body></html>'; |
&Apache::lonxml::add_messages(\$result); |
&Apache::lonxml::add_messages(\$result); |
$request->print($result); |
$request->print($result); |
Line 753 sub handler {
|
Line 753 sub handler {
|
#check if we know where we are |
#check if we know where we are |
if ($ENV{'request.course.fn'} && !&Apache::lonnet::symbread()) { |
if ($ENV{'request.course.fn'} && !&Apache::lonnet::symbread()) { |
# if we are browsing we might not be able to know where we are |
# if we are browsing we might not be able to know where we are |
if ($Apache::lonhomework::browse ne 'F') { |
if ($Apache::lonhomework::browse ne 'F' && |
|
$ENV{'request.state'} ne "construct") { |
#should know where we are, so ask |
#should know where we are, so ask |
if ( &Apache::lonnet::mod_perl_version() == 2 ) { |
if ( &Apache::lonnet::mod_perl_version() == 2 ) { |
&Apache::lonnet::cleanenv(); |
&Apache::lonnet::cleanenv(); |