3.8 PERMID Check (G)
Purpose: Checks whether the student provided a valid PERMID.
Motivation: This Check is specific to the ECON 145 autograder. In all assignments, students must provide their PERMID (a sequence of digits) at the top of their R script, which is used to randomly generate data (see DGP.R). This Check flags missing (the default PERMID is 1
) or generic (i.e., 1234
) student PERMIDs.
#PERMID Check Example
#Make sure students actually entered their PERMID---------------------------
#If the student does not input PERMID as instructed by the prompt
#The default PERMID will be 1
if(isTRUE(all.equal(PERMID, 1))){
test.results[, 4] <- "Please follow the assignment prompt and input your PERMID!"
test.results[, 2] <- 0
} else if (isTRUE(all.equal(PERMID, 1234))){
test.results[, 4] <- "Please follow the assignment prompt and input your PERMID!"
test.results[, 2] <- 0
}