Created
February 5, 2021 09:52
-
-
Save sebastiansauer/3e2d9d1d1547e2d1efbb776c39b7a66c to your computer and use it in GitHub Desktop.
Workflow of grading an R/exams nops exams. BUGGY!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Grading BDA WS20" | |
author: "Sebastian Sauer" | |
date: "2/5/2021" | |
output: html_document | |
--- | |
```{r global-knitr-options, include=FALSE} | |
knitr::opts_chunk$set(fig.pos = 'H', | |
fig.asp = 0.618, | |
fig.width = 5, | |
fig.cap = "", | |
fig.path = "", | |
echo = TRUE, | |
message = FALSE, | |
warning = FALSE, | |
cache = FALSE, | |
fig.show = "hold") | |
``` | |
# Setup | |
```{r message = FALSE, warning = FALSE} | |
library(tidyverse) | |
library(exams) | |
``` | |
That's our working directory: | |
```{r} | |
getwd() | |
``` | |
# Notes | |
- This makeup assumes that all input files rest in the working directory. | |
- Better use PNG scan files instead of PDF. | |
- Check for scanning errors! | |
# Define input files | |
## Scan file (image) | |
Define scan file: | |
```{r} | |
scan_file <- "2358_001-MC-only.png" | |
file.exists(scan_file) | |
``` | |
Define scan output file: | |
```{r} | |
scan_output_file <- "bda-ws20-scanned.zip" | |
``` | |
## Registration file | |
Define registration file: | |
```{r} | |
registration_file <- "punkterfassung-3570344-NOPS.csv" | |
file.exists(registration_file) | |
``` | |
## Solution file | |
Define solution file: | |
```{r} | |
solution_file <- "Klausur-BDA-WS2020-20210129.rds" | |
file.exists(solution_file) | |
``` | |
# Scan the exams | |
Scan it: | |
```{r scan-exams} | |
res <- nops_scan( | |
images = scan_file, | |
file = scan_output_file, | |
verbose = TRUE) | |
``` | |
```{r} | |
file.exists(scan_output_file) | |
``` | |
# Evaluate the exam | |
**THROWS ERROR:** | |
```{r eval-exams} | |
ev1 <- nops_eval( | |
register = registration_file, | |
solutions = solution_file, | |
scans = scan_output_file, | |
eval = exams_eval(partial = FALSE, negative = FALSE), | |
interactive = TRUE, | |
language = "de" | |
) | |
``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment