Activities: Virtual programming lab

Maintained by Picture of Juan Carlos Rodríguez-del-Pino Juan Carlos Rodríguez-del-Pino
VPL is an activity module to manage programming assignments
570 sites
36 fans
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.


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5


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

Comments RSS

Show comments
  • Picture of John Blesswin
    Thu, 30 Jun 2016, 6:33 PM
    I would like to know whether editor window can be enlarged.
    Also want to know the gcc version number.
    Also in Octave compiler its not supporting imread function. can you clarify
    John Blesswin
  • Picture of Juan Carlos Rodríguez-del-Pino
    Sat, 2 Jul 2016, 4:19 PM
    Hi John,
    the editor has a button "fullscreen" (its correct name might be "fullwindow") that lets you use the full window. It hides elements outside the editor. If you also set your browser in fullscreen mode (F11) you will get the maximum room.
    VPL uses the version of gcc that you installed in your jail server.

    Please, describe with more details your problem with Octave imread. Beware that the current versión of VPL is incompatible with binary files. As a workaround you can use binary files in base64 format. e.g. if I want to use a file image.jpg, I must convert the file to base64 and save it as image.jpg.b64. During your program execution you will get access to a the file image.jpg. (the system will decode image.jpg.b64 to image.jpg)

    Best regards.
  • Picture of Horatiu Brinza
    Wed, 2 Nov 2016, 4:01 AM
    Hi Juan,

    Can I use this plugin, along with the jailserver, to run PHP assignments?

    Thank you,
  • Picture of Juan Carlos Rodríguez-del-Pino
    Thu, 3 Nov 2016, 11:54 PM
    Yes, you can use VPL+jail server to run PHP assignments. VPL 3.1.X default script can run PHP5 CLI but not web programs. VPL 3.2 default script will run PHP to run web applications. But VPL is flexible anought to allow assigments of PHP web applications.
    You can use and customize the default script of VPL3.2 for PHP and use it as

    If you are using php7 remove php5 from line 10.

    Best regards,
    Juan Carlos.
  • Picture of Juan Carlos Rodríguez-del-Pino
    Fri, 4 Nov 2016, 12:14 AM
    Notice that you must reduce the security level of the firewall in the jail server service configuration to run PHP for a web application.
  • Picture of Denis Bouhineau
    Thu, 5 Jan 2017, 12:16 AM
    Happy new year!
    You could add erlang to the list of languages available for VPL!

    I've tried vpl for erlang:
    => that's ok (on my server and on the demo server):

    It's just a small test.
    1) I've changed the (for prolog) into:
    check_program escript
    cat > vpl_execution
    echo "escript $VPL_SUBFILE0" >>vpl_execution
    chmod +x vpl_execution

    2) test with an erlang program:

    plusOne(N)-> N+1.

    main([]) ->
    io:format('Give a number (end your line with .)~n',[]),
    {ok,X} = io:read(':>'),
    io:format('~p + 1 => ~p ~n',[X,Y]).

    That's all. And it works.

    But I'm not a specialist with Erlang, and not a specialist with VPL. Maybe, there are better ways to do that.

    Good surprise: the code editor colorized nicely erlang code (without anything to be done).

    Best for you,
    Denis B.

  • Picture of tt tt
    Thu, 5 Jan 2017, 12:59 PM
    hi , when I submitted the c++ program to be compiled or evaluated. It shows the error message
    "g++: error: unrecognized command line option ‘-fno-diagnostics-color’"
    how can I fix it?

    Best for you,
    James TT
  • Picture of Juan Carlos Rodríguez-del-Pino
    Sat, 7 Jan 2017, 3:20 AM
    Hello Denis Bouhineau,
    thank for your contribution. The next mayor release of VPL 3.3 will include a default script for Erlang.
    Best regards.
  • Picture of Juan Carlos Rodríguez-del-Pino
    Sat, 7 Jan 2017, 3:44 AM
    Hello tt tt,
    sorry for the inconvenience. You have two options:
    1) Edit at mod/vpl/jail/default_scripts/ and remove that args. Also you can replace the C and C++ related scripts with the ones in the VPL 3.1.5
    2) Upgrade your C++ compiler.

    I will try to solve the problem in future releases.

    Best regards,
    Juan Carlos.
  • Picture of Kushal patel
    Sat, 4 Feb 2017, 1:51 PM
    Hi Juan Carlos Rodríguez-del-Pino,
    I am using the vpl module of moodle and i need to customize some of its functionalities.
    I need to run sample testcases directly on RUN button and dont want command prompt to open and enter the input by user or student.
    so any suggestions and idea u can give on this?
  • Picture of Moussa Sarr
    Thu, 16 Feb 2017, 9:15 AM
    Hello ,
    some one already use vpl to java code with package and two classes in the same package?
    because, i test this example and i have error.
    Thank for your help
  • Picture of Juan Carlos Rodríguez-del-Pino
    Thu, 16 Feb 2017, 8:05 PM
    Sorry Kushal Patel for the late answer.
    If you want to avoid that the user interact when the students RUN their code you must modify the default script of the language you are using and redirect the standar input to /dev/null.
    e.g. if you are using java you must get the java default script and copy it to your , then replace the line
    echo "java -enableassertions $MAINCLASS" >> vpl_execution
    echo "{" >> vpl_execution
    echo "java -enableassertions $MAINCLASS" >> vpl_execution
    echo "} < /dev/null" >> vpl_execution

    I recomend to use the "based on" feature.

    Best regards.

  • Picture of Juan Carlos Rodríguez-del-Pino
    Thu, 16 Feb 2017, 8:11 PM
    Hello Moussa Sarr,
    you can use java classes and packages in VPL. To resolve the problem you need to give full detail of your code and how you use it in VPL.

    Best regards.
  • Picture of Mahesh Kalwakurthy
    Wed, 2 Aug 2017, 1:44 PM
    Hi all,
    I am able to run the following c program.
    but I need to evaluate this program. please let us know if anyone can help me.
    #include #include #include int main()

    int pid, id;
    if(fork() == 0)
    /* open for writing */
    printf("From child %d\n",getpid());

    printf("From parent \n");
    printf("Signal no= %d \n",id &355);

    //waitpid(-1, NULL, 0);
    return 0;

  • Picture of Juan Carlos Rodríguez-del-Pino
    Fri, 4 Aug 2017, 2:42 AM
    I don't know a easy way to test this type of program. I can imagine making a something similar to a facade pattern that replaces the API you are using to log and test the student's program behavior. But I also think it may be a hard and fragile way to test student's programs.
    Best regards,
    Juan Carlos.
1 2 3 4
Please login to post comments