--- loncom/homework/lonhomework.pm 2001/12/06 16:19:05 1.65 +++ loncom/homework/lonhomework.pm 2001/12/07 23:57:52 1.66 @@ -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.66 2001/12/07 23:57:52 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -49,6 +49,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 +363,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);