Moodle Plugins directory: Virtual Programming Lab | Moodle.org

Virtual Programming Lab
Activities ::: mod_vpl
Maintained by
Juan Carlos Rodríguez-del-Pino
Part of set VPL - Virtual Programming lab.
VPL is an activity module to manage programming assignments
Latest release:
2327 sites
1k downloads
164 fans
Current versions available: 5

Virtual Programming Lab for Moodle
VPL- Virtual Programming Lab is a activity module that manage programming assignments and whose salient features are:
- Enable to edit the programs source code in the browser
- Students can run interactively programs in the browser
- You can run tests to review the programs.
- Allows searching for similarity between files.
- Allows setting editing restrictions and avoiding external text pasting.
Useful links
Contributors
Juan Carlos Rodríguez-del-Pino (Lead maintainer)
Please login to view contributors details and/or to contact them
We need ID Number to use in formular in Gradebook.
How to fix this?
The same think happens when a create a new VPL activity, in description I only see the icons and no editor. Any help would be much appreciated.
Thank you for bringing this to our attention.
Given the extensive use of JavaScript in the VPL plugin, it is possible that the editor may experience disruptions after an upgrade. I recommend the following steps:
1. The Moodle administrator should “purge all caches”. This can be accomplished by navigating to “Site administration -> Development -> Purge caches”.
2. Some users may also benefit from clearing their browser's cache. This can be done by pressing “Ctrl + F5”.
Additionally, I'd like to inform you that the current VPL version you are using, 4.1, is not the latest. Version 4.2 is available and is compatible with Moodle 4.1. Please note that VPL versions are not necessarily tied to the corresponding Moodle versions.
I hope this resolves your issue. If you continue to encounter difficulties, please do not hesitate to reach out.
Best regards,
Thank you for your inquiry.
We are currently conducting compatibility tests for the newly released Moodle 4.5. In our initial manual review, we haven’t identified any major issues so far. However, we are working to address some challenges with the Behat tests, which are not running due to interface changes in Moodle 4.5.
the error for python is
Traceback (most recent call last):
File "/home/p10303/hello.py", line 3, in forward(100)
File "", line 6, in forward
File "/usr/lib/python3.12/turtle.py", line 3875, in __init__
Turtle._screen = Screen()
^^^^^^^^
File "/usr/lib/python3.12/turtle.py", line 3730, in Screen
Turtle._screen = _Screen()
^^^^^^^^^
File "/usr/lib/python3.12/turtle.py", line 3741, in __init__
_Screen._root = self._root = _Root()
^^^^^^^
File "/usr/lib/python3.12/turtle.py", line 430, in __init__
TK.Tk.__init__(self)
File "/usr/lib/python3.12/tkinter/__init__.py", line 2345, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: no display name and no $DISPLAY environment variable
Please help
First, I would like to point out that this is not the best way to ask questions, as there is no proper thread for each question and answer. Please, next time use the VPL forum (discussion area) for this kind of communication.
Regarding your problem: the VPL system checks for the use of tkinter in your code to automatically switch to GUI mode. However, in some cases, it may not detect it correctly. To solve this, simply add a comment mentioning tkinter in your code.
Also, remember not to name your file turtle.py, as this can cause conflicts with the standard Python Turtle module.
Here is an example you can follow:
import turtle
# Tkinter
screen = turtle.Screen()
screen.bgcolor("white")
screen.title("Turtle Example")
# Create a turtle
my_turtle = turtle.Turtle()
my_turtle.shape("turtle") # Make the turtle look like a turtle
my_turtle.color("blue")
my_turtle.speed(3)
# Move the turtle
my_turtle.forward(100) # Move forward 100 units
my_turtle.left(90) # Turn left 90 degrees
my_turtle.forward(100)
my_turtle.left(90)
my_turtle.forward(100)
my_turtle.left(90)
my_turtle.forward(100)
# Finish
turtle.done()
Please try this and let me know if you still encounter any issues.
Best regards,
Juan Carlos Rodríguez
Thanks,
Steve
Much appreciated, the VPL tool is a fantastic piece of tech, and would love this to work with JavaScript.
THanks,
Steve
Using pre_vpl_run.sh to install the required Node.js packages during each execution or evaluation is possible, but it tends to be time-consuming and not always reliable. A more effective approach is to install the necessary packages globally on the execution server. This ensures they are readily available without repeated installations.
Regarding the issue with asynchronous input/output, you're right—Node.js and some of its packages can take full control of the terminal, which can interfere with VPL’s evaluator and cause unexpected behavior.
After testing several packages that support synchronous input/output, I found that readline-sync works well and integrates properly with the VPL evaluator. I’ve tested it successfully with both VPL version 4.2 and the upcoming version 4.3.
I hope this resolves the issue you're facing.
Note: Please avoid using the plugin notification feature to ask technical questions, as it does not support threaded communication.
Best regards,
Juan Carlos Rodríguez
Legend! Thank you so much I'd not tried readline-sync and yes it works very well. I had already pre-installed the module using npm on the server.
As I mentioned earlier the VPL moodle addon is brilliant and all credit to you for creating this. Many thanks for your support.