app/models/submission.rb
# Create submission files for this submission. Do not create submission
# files that are one of the reserved filenames for a given repository type.
#
# Return True if at least one submission file was created.
Create submission files for this submission. Do not create submission
files that are one of the reserved filenames for a given repository type.

Return True if at least one submission file was created.
Create submission files for this submission . Do not create submission files that are one of the reserved filenames for a given repository type . Return True if at least one submission file was created .
def populate_with_submission_files(revision, path = '/')
    if path == '/'
      path = assignment.repository_folder
    end
    files_added = false
    directories = revision.directories_at_path(path)
    directories.each do |_directory_name, directory|
      files_added = populate_with_submission_files(revision, File.join(path, directory.name))
    end
    files = revision.files_at_path(path)
    files.each do |filename, file|
      next if Repository.get_class.internal_file_names.include? filename
      files_added = true
      new_file = SubmissionFile.new
      new_file.submission = self
      new_file.filename = file.name
      new_file.path = file.path
      new_file.save
    end
    files_added
  end
def populate_with_submission_files ( revision , path = '/' ) if path == '/' path = assignment . repository_folder end files_added = false directories = revision . directories_at_path ( path ) directories . each do | _directory_name , directory | files_added = populate_with_submission_files ( revision , File . join ( path , directory . name ) ) end files = revision . files_at_path ( path ) files . each do | filename , file | next if Repository . get_class . internal_file_names . include? filename files_added = true new_file = SubmissionFile . new new_file . submission = self new_file . filename = file . name new_file . path = file . path new_file . save end files_added end
Create submission files for this submission.
Create submission files for this submission .
# Remember that assignments have folders within repositories - these # will be "spoofed" as root... # First, go through directories...
revision
<not_specific>
path
<not_specific>