Skip to main content
All CollectionsFor InstructorsGrading
Autograding in VS Code labs
Autograding in VS Code labs
K
Written by Kevin Wesley
Updated over 2 years ago

To first setup a VS Code lab click here

When students submits their work and there is a non-empty file /voc/grade.sh then it is run on our grading servers. Student submission is copied to the /home/labsuser directory of a new container and the script is run in the home directory. Following environment variables are made available to grade.sh

$vocareumGradeFile

This is a randomly named temporary file used indicate the grades for a student's submission. It is expected that either the grading script populates the $vocareumGradeFile during execution. After the script exits, the scores are entered into the Vocareum grade database and the file is removed.

The format of the file is CSV, as follows -

<Rubric Criterion Name 1>,<Grade 1>  
<Rubric Criterion Name 2>,<Grade 2>

where <Rubric Criterion Name> is the pre-defined rubric name as specified in the Part setup and the <Grade> is the calculated score for that Part.

Example:

Code Compiles,5
Code Runs,3

$vocareumReportFile

This is a randomly named temporary file to capture stdout and stderr output and/or teacher feedback for a student's submission. Any stdout or stderr generated during execution is added to the Student Report by default. If that is not desired, please add the Vocareum-attribute VOC_NO_REPORT_OUTPUT to the reporting file - this can be on any line provided it's the only string on that line. If no Student Report is required to be generated, please put this attribute in the file without any other data.

The format of the file is -

[VOC_NO_REPORT_OUTPUT]     
<Free form multi-line-text here - everything goes into the report file>

Example:

VOC_NO_REPORT_OUTPUT
Test 1 ... Passed [5/5]
Test 2 ... Failed [0/5]

List of Available Environment Variables

VOC_COURSEID - Vocareum course-id for the course.

VOC_ASSIGNMENTID - Vocareum ID for the assignment.

VOC_PARTID - Vocareum ID for the part.

VOC_LTI_USER_ID - LTI user ID passed via LTI launch.

VOC_SUBMISSION_COUNT - Submission count.

VOC_PKG_DIR - Where course python packages get installed.

VOC_WORKAREA

VOC_CURRENT_GRADE

VOC_PARTVERSION - Identify the version which the learner selected (in case of multiple versions)

Did this answer your question?