Autolab icon indicating copy to clipboard operation
Autolab copied to clipboard

Maintenance of autolab.rake

Open damianhxy opened this issue 2 years ago • 0 comments

Current autolab.rake file has several issues

  • It populates fake submissions (load_submissions_for) with old submission path
    • Should update s.filename to "#{i.to_s}_#{a.handin_filename}" and submission_path to File.join(assessment_handin_dir, user.email, s.filename)
  • delete_course (called by depopulate task) uses removed method File.exists?, should use File.exist? instead
  • populate task isn't idempotent, will fail on future runs due to e.g. existing users
  • Minor style issues, e.g. if User.where( ... ).first could be replaced with if User.exists?( ... )

damianhxy avatar Mar 11 '24 17:03 damianhxy