Appendix B — About Moodle (VPL)
This appendix describes the configuration of a VPL (Virtual Programming Lab) activity in Moodle, the plugin used for submitting and automatically grading the Programming Exercises (EPs), the biweekly mock exams, and the exams described in this book. The Moodle version used was 4.5.
B.1 Configuring a VPL activity
Creating an exam in MCTest with VPL integration (see Appendix A) generates two files that must be renamed to linker.json and students_variations.csv. These files, together with morph.py, must be added to the VPL activity’s Execution Files, along with all the files contained in VPL_modification/V14-AI-feedback.zip, available in the MCTest repository at https://github.com/fzampirolli/mctest. All of them must be marked with the “Files to keep when running” option.
In short, the VPL activity then knows, for each student, which variation of the question was drawn (via students_variations.csv) and which set of test cases corresponds to it (via linker.json). This allows grading to be individualized, even when dozens of students solve the same activity with different variations.
B.2 Publishing EPs as VPL activities
The Programming Exercises (EPs) presented at the end of each chapter of this book can also be published as VPL activities, following the same mechanism. The typical classroom usage flow was:
- Opening the chapter’s two Colab notebooks (theoretical and practical), with emphasis on the interactive simulators;
- Running the code blocks, changing parameters to reinforce understanding of the concepts;
- In lab classes, submitting the EP answers directly in the corresponding VPL activity, with immediate feedback on passing or failing the test cases.
If the VPL activity is not generated by MCTest, the linker.json and students_variations.csv files are not needed. However, to use AI feedback (see Appendix D), the files contained in VPL_modification/V14-EP0_VPL-TEMPLATE.zip, available in the same repository (https://github.com/fzampirolli/mctest), must be added, following the procedure described in Section B.1.
The .cases files used in local validation (the TestSuite class, described in the body of this book) are compatible with the format expected by VPL, allowing the same set of tests to be reused both in EP development and in automated grading in Moodle.
In the biweekly mock exams — applied with SEB (see Appendix C) and worth a 5% bonus on the final grade —, VPL activities were used with EPs similar to those in the regular assignment lists, but graded under internet-access restrictions, reinforcing the assessment nature of the activity.
B.3 Final remarks
This appendix described the configuration of VPL activities in Moodle for automatically grading EPs, mock exams, and parameterized exams. The combination of MCTest (generating variations and test cases), VPL (submission and grading), and SEB (access restriction) forms the tripod on which the automated, individualized assessment used throughout the course rests.