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

raeburn raeburn at source.lon-capa.org
Wed Sep 14 12:13:17 EDT 2016


raeburn		Wed Sep 14 16:13:17 2016 EDT

  Modified files:              
    /loncom/homework	lonhomework.pm 
  Log:
  - Use lonIncludes perlvar in place of hard-coded path. 
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.364 loncom/homework/lonhomework.pm:1.365
--- loncom/homework/lonhomework.pm:1.364	Wed Aug 31 19:08:18 2016
+++ loncom/homework/lonhomework.pm	Wed Sep 14 16:13:17 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.364 2016/08/31 19:08:18 raeburn Exp $
+# $Id: lonhomework.pm,v 1.365 2016/09/14 16:13:17 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1431,9 +1431,11 @@
 sub newproblem {
     my ($request) = @_;
 
-	if ($env{'form.mode'} eq 'blank'){
+    if ($env{'form.mode'} eq 'blank'){
         my $dest = &Apache::lonnet::filelocation("",$request->uri);
-        &File::Copy::copy('/home/httpd/html/res/adm/includes/templates/blank.problem',$dest);
+        my $templatefilename =
+            $request->dir_config('lonIncludes').'/templates/blank.problem';
+        &File::Copy::copy($templatefilename,$dest);
         &renderpage($request,$dest);
         return;
     }




More information about the LON-CAPA-cvs mailing list