coatless-rpkg / assignr

Tools for Educators Writing Assignments in RMarkdown
https://r-pkg.thecoatlessprofessor.com/assignr/
42 stars 7 forks source link

Clone resources to assign/soln directories #3

Closed coatless closed 3 years ago

coatless commented 6 years ago

Clone any images files in hw**-main directory to all locations where the Rmd file is made.

daviddalpiaz commented 3 years ago

So I finally decided to use assignr instead of my hacked together script. Currently running into this issue. Also, cannot simply add the files to the assign/soln directories as it seems they are being deleted and re-created?

Edit: Fixing isn't mission critical, I do have a workaround. Just noting that there are still users.

coatless commented 3 years ago

@daviddalpiaz tried a lazy approach in #11.

Try it out with:

if(!requireNamespace('remotes')) install.packages('remotes')

remotes::install_github('r-assist/assignr@file-dependencies')

Idea: any files in hw_dir of hw_dir/hw00-main.Rmd should automatically get moved into the build directory.

daviddalpiaz commented 3 years ago

Hmmm. That didn't seem to do the trick. Files don't appear to be copied to assign/soln directories.

coatless commented 3 years ago

@daviddalpiaz re-install using the above steps.

I'm now using the full file paths whereas before I was just selecting only the file name to determine dependencies.

https://github.com/r-assist/assignr/pull/11/commits/017b9c28d01e94b9bc1d65f027d17c4fed943ac5

daviddalpiaz commented 3 years ago

Perfect. Thanks!