ZIP Download Activity Plugin for Moodle
Personalized Code Distribution for Lab-Based Programming Courses
This Moodle activity plugin allows teachers to upload a ZIP template containing .c and .h files (including subfolders) and one or more Makefiles. When a student accesses the activity, a personalized ZIP file is generated and downloaded. The plugin automatically replaces placeholders like @author and 00000 with the student’s full name and ID.
It is ideal for courses that require distributing lab starter code, such as embedded systems, robotics, or microcontroller programming.
What It Does
- Teachers upload a ZIP template when creating the activity.
- The ZIP may include subfolders,
.c/.h files, and one or more Makefiles.
- On student access:
@ Firstname Lastname is inserted where @Author TODO was used.
"00000" is replaced with the student’s ID.
Makefiles are modified based on the student’s platform selection.
- A personalized ZIP is generated instantly for download.
Platform Selection
When the student clicks the activity:
- They are prompted to select their platform:
- Lab '
PORT=/dev/ttyUSB_MySmartUSB
- Windows '
PORT=COM3
- Mac '
PORT=/dev/tty.SLAB_USBtoUART
- All
Makefile files are automatically updated with the selected PORT value.
- The generated ZIP file is renamed to reflect the student and platform:
Templates-12345-Lab.zip
Templates-12345-Win.zip
Templates-12345-Mac.zip
Installation
- Unzip this plugin into the
mod directory of your Moodle installation: /path/to/moodle/mod/zipdownload
- Visit Site Administration > Notifications to complete installation.
Creating the Activity
- In your Moodle course, turn editing on and Add an activity.
- Choose ZIP Download.
- Upload your ZIP template containing
.c/.h files and Makefiles.
- Save and return to the course.
Student View
- Students click the activity and select their platform.
- The plugin processes the uploaded ZIP template:
- Replaces author and ID placeholders
- Edits
Makefiles with platform-specific ports
- A personalized ZIP file is downloaded immediately.
Authors
Ivan Volosyak
Tangat Baktybergen
License
GNU GPL v3 or later
Developed at Rhine-Waal University of Applied Sciences (HSRW), Kleve, Germany.