--- loncom/homework/lonhomework.pm 2002/09/25 18:49:01 1.91
+++ loncom/homework/lonhomework.pm 2002/11/10 15:39:37 1.100
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.91 2002/09/25 18:49:01 albertel Exp $
+# $Id: lonhomework.pm,v 1.100 2002/11/10 15:39:37 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -139,6 +139,8 @@ sub send_footer {
$Apache::lonxml::browse='';
+# JB, 9/24/2002: Any changes in this function may require a change
+# in lonnavmaps::resource::getDateStatus.
sub check_access {
my ($id) = @_;
my $date ='';
@@ -218,7 +220,7 @@ sub check_access {
sub showhash {
my (%hash) = @_;
- &showhashsubset(\%hash,'');
+ &showhashsubset(\%hash,'.');
return '';
}
@@ -376,31 +378,16 @@ sub renderpage {
my %mystyle;
my $result = '';
- &Apache::inputtags::initialize_inputtags;
- &Apache::edit::initialize_edit;
+ &Apache::inputtags::initialize_inputtags();
+ &Apache::outputtags::initialize_outputtags();
+ &Apache::edit::initialize_edit();
if ($target eq 'analyze') { %Apache::lonhomework::anaylze=(); }
- if ($target eq 'web') {
- my ($symb)=&Apache::lonxml::whichuser();
- if ($symb eq '') {
- if ($ENV{'request.state'} eq "construct") {
- } else {
- my $help = Apache::loncommon::help_open_topic("Ambiguous_Reference");
- $request->print("Browsing or ambiguous reference, submissions ignored $help
");
- }
- }
- #if ($Apache::lonhomework::viewgrades eq 'F') {&createmenu('grade',$request); }
- }
if ($target eq 'answer') { &showhash(%Apache::lonhomework::history); }
if ($target eq 'web') {&Apache::lonhomework::showhashsubset(\%ENV,'^form');}
- my $default=&Apache::lonnet::getfile('/home/httpd/html/res/adm/includes/default_homework.lcpm');
- if ($default == -1) {
- &Apache::lonxml::error("Unable to find default_homework.lcpm");
- $default='';
- }
&Apache::lonxml::debug("Should be parsing now");
$result = &Apache::lonxml::xmlparse($request, $target, $problem,
- $default.&setup_vars($target),%mystyle);
+ &setup_vars($target),%mystyle);
#$request->print("Result follows:");
if ($target eq 'modified') {
@@ -505,6 +492,7 @@ sub handler {
my $request=$_[0];
# if ( $ENV{'user.name'} eq 'albertel' ) {$Apache::lonxml::debug=1;}
+ $Apache::lonxml::debug=$ENV{'user.debug'};
if (&setupheader($request)) { return OK; }
$ENV{'request.uri'}=$request->uri;