| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Online Homework Delivery System |
2 | # WeBWorK Online Homework Delivery System |
| 3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm,v 1.66.2.4 2006/01/11 22:58:36 dpvc Exp $ |
4 | # $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm,v 1.66.2.5 2006/01/11 23:07:16 dpvc Exp $ |
| 5 | # |
5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify it under |
6 | # This program is free software; you can redistribute it and/or modify it under |
| 7 | # the terms of either: (a) the GNU General Public License as published by the |
7 | # the terms of either: (a) the GNU General Public License as published by the |
| 8 | # Free Software Foundation; either version 2, or (at your option) any later |
8 | # Free Software Foundation; either version 2, or (at your option) any later |
| 9 | # version, or (b) the "Artistic License" which comes with this package. |
9 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 858 | my $forcedSourceFile = $self->{sourceFilePath}; |
858 | my $forcedSourceFile = $self->{sourceFilePath}; |
| 859 | # if the source file is in the temporary edit directory find the original source file |
859 | # if the source file is in the temporary edit directory find the original source file |
| 860 | # the source file is relative to the templates directory. |
860 | # the source file is relative to the templates directory. |
| 861 | if ($self->isTempEditFilePath($forcedSourceFile) ) { |
861 | if ($self->isTempEditFilePath($forcedSourceFile) ) { |
| 862 | $forcedSourceFile = $self->determineOriginalEditFilePath($forcedSourceFile); # original file path |
862 | $forcedSourceFile = $self->determineOriginalEditFilePath($forcedSourceFile); # original file path |
| 863 | $self->addgoodmessage("the original path to the file is $forcedSourceFile"); #FIXME debug |
863 | #$self->addgoodmessage("the original path to the file is $forcedSourceFile"); #FIXME debug |
| 864 | } |
864 | } |
| 865 | # bail if no source path for the problem is found ; |
865 | # bail if no source path for the problem is found ; |
| 866 | die "Cannot find a file path to save to" unless( defined($forcedSourceFile) and ($forcedSourceFile =~ /\S/) ); |
866 | die "Cannot find a file path to save to" unless( defined($forcedSourceFile) and ($forcedSourceFile =~ /\S/) ); |
| 867 | $self->{problemSeed} = 1234; |
867 | $self->{problemSeed} = 1234; |
| 868 | $editFilePath .= '/' . $forcedSourceFile; |
868 | $editFilePath .= '/' . $forcedSourceFile; |