--- loncom/homework/lonhomework.pm 2006/07/20 03:57:38 1.257 +++ loncom/homework/lonhomework.pm 2006/09/25 19:41:56 1.258 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.257 2006/07/20 03:57:38 albertel Exp $ +# $Id: lonhomework.pm,v 1.258 2006/09/25 19:41:56 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -969,7 +969,7 @@ sub newproblem { # I don't like hard-coded filenames but for now, this will work. use File::Copy; my $templatefilename = - $request->dir_config('lonIncludes').'/templates/blank.problem'; + $request->dir_config('lonIncludes').'/templates/blank.'.$extension; &Apache::lonxml::debug("$templatefilename"); my $dest = &Apache::lonnet::filelocation("",$request->uri); copy($templatefilename,$dest); @@ -995,16 +995,19 @@ sub newproblem { 'click' => 'click on the', 'Create' => 'Create', 'button' => 'button'); - $request->print(<print(" $start_page -

$lt{'create'} $extension $lt{'resource'}

+

".&mt("Creating a new $extension resource.")."

$errormsg -$lt{'requested'} $shownurl $lt{'not exist'}. +".&mt("The requested file [_1] currently does not exist.", + "$shownurl")."

-$lt{'createnew'} $extension$instructions $lt{'click'} "$lt{'Create'} $extension" $lt{'button'}. -

-

-ENDNEWPROBLEM + +".&mt("To create a new $extension, select a template from the". + "pull-down menu below. Then click on the \"Create $extension\" button.")." +

"); + if (defined($templatelist)) { $request->print(""); }