Update to analysis.py
The get_web_filepath function has been updated to return the right path Issue #129
... | ... | @@ -722,6 +722,10 @@ class Analysis (Component): |
return t3mysql.select_analysis_directory(str(self.id)) | ||
def change_space (self, space_id ): | ||
""" | ||
Migrate an analysis to another space | ||
@param space_id : the new space id | ||
""" | ||
import os | ||
from ng6.project import Project | ||
ng6conf = NG6ConfigReader() | ||
... | ... | @@ -761,6 +765,12 @@ class Analysis (Component): |
return [retcode, str_cmd] | ||
def get_web_filepath(self, file_name, base_filepath='fileadmin' ): | ||
return base_filepath + os.path.join(self.directory, file_name) | ||
""" | ||
returns the full web filepath from a given filename | ||
@param file_name : the path to the file to link | ||
@param base_filepath : the first directory in the path (depends on the server's directory structure) | ||
@return : the full web filepath | ||
""" | ||
return base_filepath + os.path.join(self.get_directory, file_name) | ||
|
||
\ No newline at end of file |