--- loncom/homework/lonhomework.pm 2006/07/20 03:57:38 1.257
+++ loncom/homework/lonhomework.pm 2006/10/02 20:44:31 1.259
@@ -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.259 2006/10/02 20:44:31 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);
@@ -986,25 +986,18 @@ sub newproblem {
my $instructions;
my $start_page =
&Apache::loncommon::start_page("Create New $extension");
- if ($templatelist) { $instructions=&mt(", select a template from the pull-down menu below.").'
-$lt{'createnew'} $extension$instructions $lt{'click'} "$lt{'Create'} $extension" $lt{'button'}.
-
'.&mt("Then");}
- my %lt=&Apache::lonlocal::texthash( 'create' => 'Creating a new',
- 'resource' => 'resource',
- 'requested' => 'The requested file',
- 'not exist' => 'currently does not exist',
- 'createnew' => 'To create a new',
- 'click' => 'click on the',
- 'Create' => 'Create',
- 'button' => 'button');
- $request->print(<$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")."