version 1.178, 2004/07/03 20:23:20
|
version 1.180, 2004/09/27 18:36:53
|
Line 52 use Apache::Constants qw(:common);
|
Line 52 use Apache::Constants qw(:common);
|
use HTML::Entities(); |
use HTML::Entities(); |
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
#use Time::HiRes qw( gettimeofday tv_interval ); |
use Time::HiRes qw( gettimeofday tv_interval ); |
|
|
BEGIN { |
BEGIN { |
&Apache::lonxml::register_insert(); |
&Apache::lonxml::register_insert(); |
Line 453 sub analyze_header {
|
Line 453 sub analyze_header {
|
<head><title>'.&mt("Analyzing a problem").'</title></head> |
<head><title>'.&mt("Analyzing a problem").'</title></head> |
<body bgcolor="#FFFFFF">'.&Apache::lonxml::message_location().' |
<body bgcolor="#FFFFFF">'.&Apache::lonxml::message_location().' |
<form name="lonhomework" method="POST" action="'. |
<form name="lonhomework" method="POST" action="'. |
&HTML::Entities::encode($ENV{'request.uri'},'<>&"').'"> |
&HTML::Entities::encode($ENV{'request.uri'},'<>&"').'">'. |
|
&Apache::structuretags::remember_problem_state().' |
<input type="submit" name="problemmode" value="'.&mt("EditXML").'" /> |
<input type="submit" name="problemmode" value="'.&mt("EditXML").'" /> |
<input type="submit" name="problemmode" value="'.&mt('Edit').'" /> |
<input type="submit" name="problemmode" value="'.&mt('Edit').'" /> |
<hr /> |
<hr /> |
Line 573 sub editxmlmode {
|
Line 574 sub editxmlmode {
|
$result.='<html><body bgcolor="#FFFFFF">'. |
$result.='<html><body bgcolor="#FFFFFF">'. |
&Apache::lonxml::message_location().' |
&Apache::lonxml::message_location().' |
<form name="lonhomework" method="POST" action="'. |
<form name="lonhomework" method="POST" action="'. |
&HTML::Entities::encode($ENV{'request.uri'},'<>&"').'"> |
&HTML::Entities::encode($ENV{'request.uri'},'<>&"').'">'. |
|
&Apache::structuretags::remember_problem_state().' |
<input type="hidden" name="problemmode" value="'.&mt('EditXML').'" /> |
<input type="hidden" name="problemmode" value="'.&mt('EditXML').'" /> |
<input type="submit" name="problemmode" accesskey="d" value="'.&mt('Discard Edits and View').'" /> |
<input type="submit" name="problemmode" accesskey="d" value="'.&mt('Discard Edits and View').'" /> |
<input type="submit" name="problemmode" accesskey="e" value="'.&mt('Edit').'" /> |
<input type="submit" name="problemmode" accesskey="e" value="'.&mt('Edit').'" /> |
Line 753 sub handler {
|
Line 755 sub handler {
|
if (&setupheader($request)) { return OK; } |
if (&setupheader($request)) { return OK; } |
$ENV{'request.uri'}=$request->uri; |
$ENV{'request.uri'}=$request->uri; |
|
|
#setup permissions |
&setuppermissions(); |
$Apache::lonhomework::browse= &Apache::lonnet::allowed('bre',$ENV{'request.filename'}); |
|
$Apache::lonhomework::viewgrades=&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'}); |
|
&Apache::lonxml::debug("Permissions:$Apache::lonhomework::browse:$Apache::lonhomework::viewgrades:"); |
&Apache::lonxml::debug("Permissions:$Apache::lonhomework::browse:$Apache::lonhomework::viewgrades:"); |
# some times multiple problemmodes are submitted, need to select |
# some times multiple problemmodes are submitted, need to select |
# the last one |
# the last one |