This function grades one R script assignment submission and writes results out to a properly-formatted json file for Gradescope.
1 2 3 4 5 6 | calcGradesForGradescope(
submission_file,
test_file,
which_results = "gradescope",
suppress_warnings = TRUE
)
|
submission_file |
the name of the assignment submission file (e.g. "hw1.r") |
test_file |
the name of the .r file with test_that tests (e.g. "hw1_tests.R") |
which_results |
Choose either "testing" or "gradescope" If equal to "gradescope" then the json file is written out to the directory that Gradescope expects. Otherwise, results.json is written to your current working directory. |
suppress_warnings |
If FALSE, warnings are fatal; if set to TRUE, then warnings will not prematurely terminate running of student submission scripts. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.