## Activities: Virtual programming lab

mod_vpl
Maintained by Juan Carlos Rodríguez-del-Pino
VPL is an activity module to manage programming assignments
1k
371
14
Moodle 2.3, 2.4, 2.5

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.

### Contributors

Juan Carlos Rodríguez-del-Pino (Lead maintainer)
Please login to view contributors details and/or to contact them

### Comments

Show comments
• Sun, Aug 30, 2015, 12:18 AM
In VPL the font size is very small we find it very difficult to write programs. How to increase the font size of the editor.
• Sun, Aug 30, 2015, 3:25 AM
Hello Venkatesh,
I will try to answer your questions.
1) I can't answer your question about automatic evaluation in C language because I can't reproduce your situation. Please, send me the definition of test cases and the code in C language that fails then I will reproduce your problem and try to resolve it.
2) Does graphics programs in C can be evaluated in VPL? This question really is not about. If you can test graphics programs in C outside VPL, then it's very possible to reproduce the test at VPL.
3) Increasing the font size temporarily, just push "CTRL and '+' key" in your browser. To increase the font size temporarily, just push "CTRL and '+' key" in your browser. Increasing the font size permanently is more difficult because it's in the code.

Please, do the next question at the forum
https://moodle.org/mod/forum/discuss.php?d=154988

Best regards
• Wed, Oct 7, 2015, 3:05 PM
Can we plug in other enviornments like j2ee , spring , hibernate into jail server? How do we do that
• Wed, Oct 7, 2015, 10:11 PM
Hello Deepa,
I haven't test to use an application server for Java in a jail server, but I think that it is possible to run it with some limitations. You must be aware that every execution start with the same data from the same point. If you manage to run a application server in user space then you 'll be able to run it in a jail server.
Note that
- You must choice a different port for every application server
- You can use firefox in the jail as browser
- The execution script must generate vpl_wexecution (not vpl_execution) to run in graphical mode

Best regards.
Juan Carlos
• Mon, Oct 12, 2015, 6:55 PM
Hi Juan,

I have one question regarding the VPL evaluation phase. I was thinking how to evaluate some C/C++ program that takes an array (dinamically allocated) as the input. I do not see that the default evaluation scripts is capable to read a variable size array of characters.

Since I am a begginer, I suppose that this problem has been already solved. Can you help me?

Thanks,

Slobodan Jelic
University of Osijek, Department of Mathematics
Croatia
• Tue, Oct 13, 2015, 5:25 PM
Hello Slobodan,
the VPL evaluation has nothing to do about any internal representation of information of evaluated programs. The evaluation process gives the input to the evaluated program. The evaluated program manages the input data.
If you write a program that take the data from the standard input, the data at the "input=" statement must be the same that you type as input when you run the program.

Best regards.
• Wed, Nov 25, 2015, 7:18 AM
Are you going to do a 3.0 update?
• Wed, Nov 25, 2015, 11:43 PM
Hello Simon,
VPL 3.1.4 can be used on Moodle 3.0.
We are working hard to release VPL 3.2.

Best regards.
• Wed, Dec 9, 2015, 11:04 PM
Hi Juan,
I am interested in using this plugin to teach c#. I was wondering if you had a detailed installation and setup guide some place to get it working with moodle?
• Thu, Dec 10, 2015, 12:07 AM
Hi Evan,
the available documentation (not too much) is shown at
http://vpl.dis.ulpgc.es
There is a demo site and links to documentation kindly offered by other users.

If you have questions you can ask at the forum.
- To start, you must know about Moodle, and you or somebody expert how to install plugins (it's really easy)
- Finally, you must get an execution server to run your tasks (the plugin, by default, uses a demo server).

Best regards.
• Thu, Dec 10, 2015, 4:17 AM
I've got the plugin installed on my site, but I'm not sure how to set it up for the c# language. I'm assuming that has something to do with the jail server? Does the jail server have to be local to the moodle installation, or can it be remote as well?
• Fri, Dec 11, 2015, 9:50 PM
HI Evan,
If you are using the latest VPL version then you only need to write C# code (.cs extension). The main procedure must be in the first code file.
The demojail server can help you to test your system but then you must install your own jail server in a "remote server", it's not recommended to install it on the moodle server.

Best regards.
Juan Carlos
• Fri, Apr 29, 2016, 11:02 PM
Thanks for your contribution!
I'm trying to use it with swi-prolog, and I can't try to make it read the input.
Any idea?
My prog looks like http://ideone.com/9HirfX (very short: input, output, halt!), in prolog it's
:- readln(Input), writeln(Input), halt.
But the console does not appear in "run", and compilation get in infinite loop in "evaluate"...
• Wed, May 4, 2016, 11:40 PM
Hello Denis,
The script that launch swi-prolog try in a first fase to check sintacticaly the code, but the input/output was not considered, the test was stalled trying to read an input.
To resolve this try using the following code as your vpl_run.sh as a workaround before I resolve the issue in the next release.

Best regards.
vpl_run.sh
-------------------------
#!/bin/bash
. common_script.sh
check_program swipl
swipl -q -s $VPL_SUBFILE0 -t halt 1>/dev/null < /dev/null cat common_script.sh > vpl_execution echo "swipl -q -L32M -s$VPL_SUBFILE0" >>vpl_execution
chmod +x vpl_execution
• Sun, May 8, 2016, 9:07 PM
Thank you, it works.

Best for you.
Please login to post comments