--- loncom/homework/lonhomework.pm 2001/12/06 16:19:05 1.65 +++ loncom/homework/lonhomework.pm 2001/12/21 20:06:25 1.67 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.65 2001/12/06 16:19:05 matthew Exp $ +# $Id: lonhomework.pm,v 1.67 2001/12/21 20:06:25 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -34,6 +34,7 @@ use strict; use Apache::style; use Apache::lonxml; use Apache::lonnet; +use Apache::lonplot; use Apache::inputtags; use Apache::structuretags; use Apache::randomlabel; @@ -49,6 +50,10 @@ sub BEGIN { sub get_target { if ( $ENV{'request.state'} eq "published") { + if ( defined($ENV{'form.grade_target'}) + && ($Apache::lonhomework::viewgrades == 'F' )) { + return ($ENV{'form.grade_target'}); + } if ( defined($ENV{'form.submitted'})) { return ('grade', 'web'); } else { @@ -359,7 +364,8 @@ sub newproblem { # I don't like hard-coded filenames but for now, this will work. use File::Copy; my $templatefilename = - "/home/httpd/html/res/adm/includes/templates/blank.problem"; + $request->dir_config('lonIncludes').'/templates/blank.problem'; + &Apache::lonxml::debug("$templatefilename"); my $dest = &Apache::lonnet::filelocation("",$request->uri); copy($templatefilename,$dest); &renderpage($request,$dest);