class Object
Constants
- CONVERTED_FILES
- OUTPUT_DIR
- OUTPUT_NAME
- QTI_TYPE
- SOURCE_DIR
CHANGED THESE TO CHANGE THE FOLDER LOCATIONS
- SOURCE_FILES
- SOURCE_NAME
Don't change these, these are just getting the last of the folder name for the script below to use
- UPLOAD_DIR
- UPLOAD_NAME
Public Instance Methods
log_file(name)
click to toggle source
# File lib/senkyoshi/tasks.rb, line 52 def log_file(name) sh "touch #{name}" sh "date >> #{name}" end
make_directories(name, upload_dir)
click to toggle source
# File lib/senkyoshi/tasks.rb, line 47 def make_directories(name, upload_dir) mkdir_p name.pathmap("%d") mkdir_p upload_dir end
source_for_imscc(imscc_file)
click to toggle source
# File lib/senkyoshi/tasks.rb, line 33 def source_for_imscc(imscc_file) SOURCE_FILES.detect do |f| path = imscc_file.pathmap("%{^#{OUTPUT_DIR}/,#{SOURCE_DIR}/}X") f.ext("") == path end end
source_for_upload_log(upload_log)
click to toggle source
# File lib/senkyoshi/tasks.rb, line 40 def source_for_upload_log(upload_log) CONVERTED_FILES.detect do |f| path = upload_log.pathmap("%{^#{UPLOAD_DIR}/,#{OUTPUT_DIR}/}X") f.ext("") == path end end