To configure a VS Code Lab click here
To configure a JupyterLab click here
Configure Workspace - Teacher Interface for Assignment Preparation
The Vocareum “Configure Workspace” interface is where Teachers may prep an assignment and its parts with starter code, scripts and other resources in their private work area. This becomes the golden or “Teacher Copy” of the assignment which will be processed and populated to the Student work area when an assignment is “Published” or “Updated”. When a Student submits their assignments, the Grader work area is populated with the Teacher resources and the Student work in preparation for grading. Each resource may have different permissions and visibility, depending on user role, as defined below.
When an assignment is updated, teachers have the option to push the updated scripts and resources directly to Students work area, or offer Students with choice on if and when to update the scripts and resources in their work area. See Assignment Versioning.
Pre-defined Vocarem Scripts
Pre-defined Vocareum Scripts are bash shell scripts written by the teacher to facilitate student work, and assignment. By default, script contents are not visible to Students.
SCRIPT | LOCATION | DESCRIPTION |
Run | /voc/scripts/run.sh | This scripts is used to run the assignment interactively with output to the Terminal window. |
Grading | /voc/scripts/grade.sh | This script is run in the Grader workarea to register the user submission, run the assignment , grade the assignment, and the report the students grade on the grading server. This is accomplished by writing to the $vocareumGradeFile and $vocareumReportFile |
User Setup | /voc/scripts/user_setup.sh | This script is used to prepare a student's workarea before they enter it. |
Scripts are always run in a folder containing student’s work. When they are run on “submitted” work, a copy of student submission is made and scripts are run in that folder. Scripts can reference other resource directories by using environment variables such as $LIB, etc. as defined below.
The exit value of these scripts is used to determine pass or fail status - following the unix convention, an exit value of '0' denotes 'pass' and any other value denotes 'fail'.
Directory Structure
Vocareum provides a standard folder structure for each user (Student, Teacher, Grader) as defined here -
$LIB (located at ../resource/lib)
This is a course-level folder that Teachers may use to store course-level resources (code, data, scripts, etc). Apart from the sub-folders listed below, all files in this folder is only visible in the Teacher and Grader work areas. Graders may not edit these contents.
NOTE: while all other scripts, directories and files are pushed to the Grader and Student work areas after an “Update” action, files in the publicdata folder are immediately available.
$ASNLIB (located at ../resource/asnlib)
This is an assignment-level folder that Teachers may use to store assignment-level resources (code, data, scripts, etc). Apart from the sub-folders listed below, all files in this folder are only visible in the Teacher and Grader work areas. Graders may not edit these contents.
NOTE: while all other scripts, directories and files are pushed to the Grader and Student work areas after an “Update” action, files in the publicdata folder are immediately available.
$HOME (located at ../work)
This is the private work folder for Teacher, Graders and Students for a given assignment and pre-populated with the assignment startercode. This is where the students work on their assignments and where the teacher scripts are executed. They may create directories and files. When Students complete their assignment, this work area is submitted for Grading.
Students may “Reset Assignment” from the “Actions” menu to revert their work area back to the original starting state.
$vocareumGradeFile
This is a randomly named temporary file used indicate the grades for a student's submission. It is expected that 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]
Saving Script Output Data
As mentioned above, the Grading script is run in a copy of the student's work. This means that any files they create are not available for later viewing unless you use the following commands:
It is recommended that these commands be put at the end of the grading script when all the data to be stored has been created.
List of Available Environment Variables
Full list of Vocareum environment variables here