[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 25 Sep 2006 19:41:57 -0000


albertel		Mon Sep 25 15:41:57 2006 EDT

  Modified files:              
    /loncom/homework	lonhomework.pm 
  Log:
  - update the mt so that it doesn't use sentence fragments
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.257 loncom/homework/lonhomework.pm:1.258
--- loncom/homework/lonhomework.pm:1.257	Wed Jul 19 23:57:38 2006
+++ loncom/homework/lonhomework.pm	Mon Sep 25 15:41:56 2006
@@ -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 @@
 	# 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 @@
 			  'click' => 'click on the',
 			  'Create' => 'Create',
 			  'button' => 'button');
-	$request->print(<<ENDNEWPROBLEM);
+	my $extensionTranslated = &mt($extension);
+	$request->print("
 $start_page
-<h1>$lt{'create'} $extension $lt{'resource'}</h1>
+<h1>".&mt("Creating a new $extension resource.")."</h1>
 $errormsg
-$lt{'requested'} <tt>$shownurl</tt> $lt{'not exist'}.
+".&mt("The requested file [_1] currently does not exist.",
+      "<tt>$shownurl</tt>")."
 <p>
-<b>$lt{'createnew'} $extension$instructions $lt{'click'} "$lt{'Create'} $extension" $lt{'button'}.</b>
-</p>
-<p><form action="$url" method="POST">
-ENDNEWPROBLEM
+<b>
+".&mt("To create a new $extension, select a template from the".
+      "pull-down menu below. Then click on the \"Create $extension\" button.")."</b>
+</p>");
+
 	if (defined($templatelist)) {
 	    $request->print("<select name=\"template\">$templatelist</select>");
 	}