Skip to content

Commit 800ec5d

Browse files
committed
rt_score: final + wait arguments removed
1 parent a8a15de commit 800ec5d

4 files changed

Lines changed: 10 additions & 16 deletions

File tree

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: codeoceanR
22
Title: Test R tasks with CodeOcean at HPI
3-
Version: 0.3.19
4-
Date: 2021-03-30
3+
Version: 0.3.20
4+
Date: 2021-08-08
55
Authors@R:
66
person(given = "Berry",
77
family = "Boessenkool",

R/rt_score.R

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,13 @@
1414
#' Must contain ".co" and all the "script_n.R" files
1515
#' referenced there, with the changes by the student, saved.
1616
#' DEFAULT: "."
17-
#' @param final,wait Deprecated argument.
1817
#' @param submit Submit grade to openHPI? To be called from [rt_submit()].
1918
#'
20-
rt_score <- function(dir=".", final, wait, submit=FALSE)
19+
rt_score <- function(dir=".", submit=FALSE)
2120
{
22-
# Avoid recursive posting in case students leave rt_score() in the exercise script:
21+
# Avoid recursive posting, so we can have rt_score() in the exercise script:
2322
if(!interactive()) return(NULL)
2423

25-
if(!missing(final) || !missing(wait))
26-
stop("rt_score(final=TRUE) has been deprecated. Use rt_submit() instead.")
27-
2824
# Check directory and file
2925
dir <- berryFunctions::normalizePathCP(dir)
3026
berryFunctions::checkFile(dir)

inst/extdata/tests.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# CodeOcean R Quiz
22
# Berry Boessenkool, berry-b@gmx.de, early 2020 + Oct 2020
33

4+
45
# This script is run by `rt_score()` (in Rstudio) or by clicking "Score" (in CodeOcean).
56
# Running this script may never fail on CodeOcean, hence keep it wrapped in `try()`.
67
# The object 'task_id' must be defined here for the error messages through `rt_warn`.
@@ -14,7 +15,6 @@ library(codeoceanR) # for all functions prefixed with rt_
1415
ntests <- 3 # number of tests
1516
npassed <- 0 # number of passed tests
1617

17-
1818
trytests <- try({
1919

2020
task_id <- "_run"
@@ -77,12 +77,12 @@ rt_has_argument(sol, "row.names", FALSE)
7777

7878
}, silent=TRUE)
7979
task_id <- "_post"
80-
if(inherits(trytests, "try-error")) {
80+
if(inherits(trytests, "try-error"))
8181
rt_warn("The test script failed. Sorry for the 0 points right now. ",
8282
"You'll have to revert the last thing(s) you did. ",
83-
if(interactive())"Please click 'Request comments' and copypaste the logfile below.\n", trytests)
84-
}
83+
"Please send Berry the logfile below through email or 'Request comments'.\n", trytests)
84+
8585
# Final output -----------------------------------------------------------------
8686

87-
# Keep the following at the end of the script, for CodeOcean scoring:
87+
if(npassed>ntests) npassed <- ntests # for Bonus points
8888
cat(ntests, "examples,", npassed, "passed\n")

man/rt_score.Rd

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)