General plugins

New Virtual Programming Lab (VPL) module

 
 
Picture of Juan Carlos Rodríguez-del-Pino
New Virtual Programming Lab (VPL) module
 

A team of teachers at the ULPGC (University of Las Palmas de Gran Canaria, Spain) in collaboration with CICEI (Innovation Center for Information Society) has developed VPL (Virtual Programming Lab). VPL is an activity module to manage programming assignments providing the usual characteristics such as upload, download and view assignments, data backup and restore, grading, groups, access control based on roles, access logs, etc. adding also a large number of features tailored to the programming assignments:

  • Enable to edit the programs source code in the browser using an applet
  • 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.
 
Average of ratings:Useful (2)
Picture of Marc Grober
Re: New Virtual Programming Lab (VPL) module
 
Have you created a new module page at moodle.org for your new module?
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Hi Marc,

yes, I have created a module page at moodle.org, but I think that is waiting the moderator approval.
Nevertheless, the module has its own page at http://vpl.dis.ulpgc.es and a demo at http://demovpl.dis.ulpgc.es/moodle
All comments are welcome.

Thanks for your interest.
 
Average of ratings: -
Picture of Doug Loomer
Re: New Virtual Programming Lab (VPL) module
 
We are extremely interested in VPL, and would love to see the Demo, but can't get a connection to it. Is the page down?
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Thank you for your interest in VPL.
The server is up and running and shows no symptoms of having network problems. I wonder if you're still having problems accessing the server and if someone else has them (The latter is a request to the forum).

 
Average of ratings: -
Picture of Doug Loomer
Re: New Virtual Programming Lab (VPL) module
 
Hi Juan Carlos. I was able to reach the server today and play with the demos a bit. It looks like it could be just the thing for our AP and IB Computer classes. I am swamped at the moment, but want to install it on our test server soon. Thanks for making this available! Oh, a couple of observations. I was able to get the java applet editor to run in Firefox on my Mac, but not in Chrome. Perhaps the fault is with Chrome or my Mac, but I just thought I'd let you know. Also, I think "Editing" or "Editor" or "Edit" would be a better tab title than "Edition" in your English language version of the module. Keep up the excellent work!
 
Average of ratings: -
Picture of Ashish Kumar
Re: New Virtual Programming Lab (VPL) module
 

hello ,

we developed a new applet as per vpl, and we need to integrate it in VPL so please tell me how can we do this

 

 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Dear Ashish Kumar,
I suppose that you have developed a new version of the editor/console applet of VPL. If it is the case, then you can learn how integrate it by reading de source code of the current applet. You must implement the same public methods than the org.acodeeditor.gui.Main class. The easyest way to set the new applet is replacing the corresponding jar file.
If you have developed another kind of applet, please, give us more details to understand the problem and help to resolve it.
Best regards.

 

 
Average of ratings: -
Picture of Ashish Kumar
Re: New Virtual Programming Lab (VPL) module
 

Dear Juan Carlos Rodríguez-del-Pino

Greetings......!

 

Thanks For your response , we make a Applet for J2ee and make the Jail Server  and need to integrate this applet with VPL Please share me the process for Integration of the applet in VPL

 
Average of ratings: -
Picture of Mónica Guerrero
Re: New Virtual Programming Lab (VPL) module
 
Hello, Juan Carlos.I have a question. I have two virtual machines one for moodle and one for jail-server. Virtual machines are in bridge mode. Moodle has a private ip 172.18..XX and public ip 190.96.X.X For the jail-server i have private ip 172.18.X.X. I have no problem for connection with jail-server and moodle in the internal network. However when I access Moodle from public ip 190.96.XX I have no connection with the jail-server, I am using port 80. What should I do to have connection with the jail-server. I understand that requests come to moodle and east to jail-server therefore should work.
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Mónica,

From VPL version 3, it is required that the browser can connect to the execution/jail server to monitor and interact with the running process.

Generally all the execution/jail servers must be accesible from internet. But only the ports used (http/ws and https/wss) of the servers need to be reachable.

In your case, if you don't want to use another public ip, you can set the "jail server" to use differents ports (80 and 443) than your moodle server. Configure your virtual machine hypervisor to port forwarding from your public ip (in this case shared with your Moodle server) to your jail server private ip. After that, you must access to your "jail server" using the public IP/name with the new port.

Best regards,
Juan Carlos

 
Average of ratings: -
Picture of Antonio Lepore
Re: New Virtual Programming Lab (VPL) module
 

Hi Juan.

I've installed VPL, the jail-server in a virtualbox Ubuntu. In server cofiguration file /etc/vpl/vpl-jail-system.conf, I've setted just URLPATH=http://jailserver.it and #Port=8080. Then, i wrote http://jailserver.it:8080 in Execution servers config of the plugin. When I try to run my code, it appears this message: "PHP XMLRPC requiered".  What does it mean and how i can solve this problem? Please help me! 

Antonio.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Hi Antonio,
I suppose that you are installing a 2.0.1 jail server. You're using incorrectly the URLPATH, this variable is part of the URL not the full URL. FOr example, if you set URLPATH=/HELLO your URL for your serviice must be http://jailserver.it:8080/HELLO.
The message you found say that your PHP don´t has the xmlrpc extension. VPL requires this PHP extension to communicate with the jail server.
Best regards.

 
Average of ratings: -
Picture of Antonio Lepore
Re: New Virtual Programming Lab (VPL) module
 

Hi Juan,

i setted my file in this way. I have some problem with xmlrpc, but, if you don't mind, can you take a look to my file conf, thanks!

#


#vpl-jail-system config file


#


#Format VAR=VALUE #no space before and after "="




#JAILPATH set the jail path


JAILPATH=/jail




#MIN_PRISONER_UGID set start first user id for prisoners


MIN_PRISONER_UGID=10000




#MIN_PRISONER_UGID set the last user id for prisoners


MAX_PRISONER_UGID=20000




#MAXTIME set the maximum time for a request in seconds


MAXTIME=600




#Maximum file size in bytes


#MAXFILESIZE=64000000




#Maximum memory size in bytes


#MAXMEMORY=2000000




#Maximum number of process


#MAXPROCESSES=500




#Path to control directory. the system save here information of request in progress


#CONTROLPATH="/var/vpl-jail-system"




#Limit the servers from we accept request


#IP or net (type A, B and C) separate with espaces


#Format IP: full dot notation. Example: 128.122.11.22


#Format net: dot notation ending with dot. Example: 10.1.


#TASK_ONLY_FROM=10.10.3.




#To serve only to one interface of your system


#INTERFACE=128.1.1.1




#Socket port number to listen for connections (http: and wssmile


#default 80


#PORT=8080




#Socket port number to listen for secure connections (https: and wsssmile


#default 443


#SECURE_PORT=443




#URL path for task request


#act as a password, if no matches with the path of the request then it's rejected


URLPATH=/unimol.


The field in moodle is "http://jail:8080/unimol". 

Is this correct?

Antonio. 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

You must remove "#" from "#PORT=8080" and may be that you need to set the SECURE_PORT, for example you may set it to 8081.

Best regards

 
Average of ratings: -
Picture of Antonio Lepore
Re: New Virtual Programming Lab (VPL) module
 
Hi Juan, thanks for your ansie.  I ' ve many questions. 
1)What do I write into The file vpl_debug.sh And vpl_evaluate.sh? 
2) In Tab "Similarity", i Can upload one file. What does It Mean,  that I  can use this file like comparison method with students' test? 
Thanks for your time And help!
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Aivar,
Promises must be fulfilled. VPL v3.1 (still beta) is ready to be downloaded  from GitHub and arrives with the web service that  I promised to you. To develop the client go to "tests/webservice_client.php" a test client that has the documentation inside.
Best regards

 
Average of ratings: -
Picture of Antonio Lepore
Re: New Virtual Programming Lab (VPL) module
 

Hi Juan,

I've a question for you. I've this file "vpl_evaluate.cases".

   1 Case = TC1
    2 Input = 5
    3 2
    4 
    5 Output = La somma tra 5 e 2 e' 7
    6 
    7 
    8 Case = TC2
    9 Input = -3
   10 -7
   11 
   12 Output = La somma tra -3 e -7 e' -10
   13 
   14 
   15 Case = TC3
   16 Input = 5
   17 2
   18 
   19 Output = La somma tra 2 e 5 e' 7
How I can evaluate every single case? For example
TC1 = 20%,TC2 = 30%,TC3 = 50%? Thanks for your help.
Antonio Lepore
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Antonio,

Quoting from documentation

"When an error (the output of a test case does not match with any expected value) is found, the value "grade_range/number_of_cases" is deducted from the mark. This value can be set by the teacher with the following statement:

"grade reduction = [ value | percent% ]". The discount can be a percentage or specific value, in other cases is used the general criterion."


In your case the  file "vpl_evaluate.cases" must be:

Case = TC1
Grade reduction = 20%
 
Input = 5 2 Output = "La somma tra 5 e 2 e' 7" Case = TC2 Grade reduction = 30%
Input = -3 -7 Output = "La somma tra -3 e -7 e' -10" Case = TC3 Grade reduction = 50%
Input = 5 2 Output = "La somma tra 2 e 5 e' 7"
Best regards
 
Average of ratings: -
Picture of Steve Towson
Re: New Virtual Programming Lab (VPL) module
 
Hello.

What programming languages does it support? Just C? How about Python?
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Hello Steve.
VPL supports other languages such as Ada, Java, C++.
You can find the list of supported programing languages at the page
http://vpl.dis.ulpgc.es/index.php/documentation/31-supported-programming-languages
Currently Python is not supported in the sense of syntax highlighting and files comparison, but this does not prevent to install an interpreter on a jail-server and execute code written in this language.
If you wish I can add "Python support" at the todo list.
If you have any problem installing a jail-server does not hesitate to ask me.
 
Average of ratings: -
Picture of Gulshan Kumar
Re: New Virtual Programming Lab (VPL) module
 
Dear Juan,

I have followed every step as mentioned in VPL Docs (for installation and configuration), but encountering the error "No jail server available" while 'Run'ing the C program. I have a CentOS 5.3, with PHP5.3 and Java 1.6.0 installed.

Please guide me.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Dear Gulshan
Check this please:
1) After installing the jail-server you can use a “telnet” to check that the server is accepting requests. Don’t forget to use the adequate port with ”telnet” (the port number is set at "/etc/xinetd.d/vpl-xmlrpc-jail", but may change with NAT configuration). The server should respond with an error message because it expects an http request. If no reply you may have a server configuration issue or firewall problem.
2) Check that the URL you are using is according with the “-uri” parameter at "/etc/xinetd.d/vpl-xmlrpc-jail"
3) If you need more information you can add "-d 255" in “server_args” at "/etc/xinetd.d/vpl-xmlrpc-jail" to get detailed information in the system log (jail-server).

I am pleased to inform you that version 1.2 is available. It can give you more information about connection problems.

Please, let me know if this solves the problem

Best regards
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Dear Gulshan,
In the previous post I forgot to tell you that you should check the memory requirements of the activity. If your memory requirements are greater than the maximum value configured on the jail-server, then it will reject the request.

Kind regards.

 
Average of ratings: -
Picture of Gulshan Kumar
Re: New Virtual Programming Lab (VPL) module
 
Dear Juan,

Thanks for your quick response, right now I'm out of town, but will definitely look into what you have suggested.
And will bother you again (if I stuck somewhere), i hope you don't mind ?
Again thanks for your reply.

Regards,
 
Average of ratings: -
Picture of Gulshan Kumar
Re: New Virtual Programming Lab (VPL) module
 
Dear Juan,


I have checked everything as you have suggested, telnet is opening a blank screen on the port mentioned at "/etc/xinetd.d/vpl-xmlrpc-jail"; but now getting a different kind of error it says 'Not executed'.

Thanks,
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Dear Gulshan Kumar,
Your instalation is now working, the message indicate that you do not generate the apropiate "vpl_execution" file by executing the "vpl_run.sh" script.
For example a simple "vpl_run.sh" for C language may be
---------begin of file--------------
#!/bin/sh
gcc -Wall -o vpl_execution *.c
----------end of file--------------
I think that this may be the last step to have a simple activity running.

Sorry, I'd like to ask you a question out of topic : are you relative of the famous Indian Bollywood movie producer?
 
Average of ratings: -
Brandon Horn
Re: New Virtual Programming Lab (VPL) module
 

I'm getting the same error. What would be an example of the file for Java? Once I make it, can I set it as the default for all assignments or do I have to edit it for each?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Dear Brandon
A "vpl_run.sh" file content for Java language may be
---------begin of file--------------
#!/bin/sh
. vpl_environment.sh
#this path may vary on different jail-server
PATH=$PATH:/usr/lib/jvm/java-1.6.0-openjdk/bin
javac -J-Xmx128m *.java
NAME=$(basename $VPL_SUBFILE0 .java)
if [ -f $NAME.class ] ; then
echo "#!/bin/sh" >> vpl_execution
echo "PATH=\$PATH:/usr/lib/jvm/java-1.6.0-openjdk/bin" >> vpl_execution
echo "java -Xmx128m $NAME" >> vpl_execution
chmod +x vpl_execution
else
echo "Not compiled or error in filename"
echo "The main method must be in the first file."
fi
----------end of file--------------
This script compiles all *.java files and generates a "vpl_execution" file to run the program starting at the main method in the first file.
The memory limit must be set to 256Mb or greater.
Others VPL activities can use this script file by using the "based on" option.

Please, let me know if this solves your problem
Best regards
Juan Carlos

 
Average of ratings: -
Brandon Horn
Re: New Virtual Programming Lab (VPL) module
 
Thanks for the help. I'm waiting for my hosting company to install the JDK instead of just the JRE so that javac is available. I'll let you know whether it works then.

If it does, you should definitely include sample vpl_run.sh files for various languages in the installation instructions. I would never have made up that file and without it, the add on is mostly a fancy text editor.

Brandon
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Dear Brandon
I have in my TODO list the task of make available basic VPL activities for as many languages as possible. This activities could be added easily to any course.
In your last post you said that your hosting company is going to install the JDK instead of just the JRE. I don't know about your instalation arquitecture, but you should note that you don’t need a compiler or interpreter on your Moodle server, except PHP. All the tools of programming languages must go in the jail-server. For security reasons, I don’t recommend using the moodle server as a jail-server, I strongly recomend to use virtual machines with readonly disks as jail-servers.

Best regards
Juan carlos

 
Average of ratings: -
Brandon Horn
Re: New Virtual Programming Lab (VPL) module
 
Juan carlos,

I don't have much choice on using the same server. I'm running Moodle on a VPS. A second VPS or a machine with sufficient memory to run a virtual server inside are both prohibitively expensive. I'm also less worried about security issues because of the small number of users with access to my Moodle installation (any my ability to make their lives uncomfortable if they attack the server smile ). If my district ever decides to use this with multiple classes, I'll make sure they run the jail server in a virtual box.

With the current configuration (jail server on same box), where do I have to put the Java compiler so that the jail server can access it? Currently, javac is in the path:

/usr/local/jdk1.6.0_21/bin

As far as I can tell, the jail server has the path:

/jail

In /jail there are directories such as:

/jail/bin
/jail/home
/jail/usr

and so on.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
The "/jail" directory is an adapted replica of the root file system, the processes in the jail sees the “/jail” directory as its root file system. You must use the same paths that in the host file system.

I suppose that your VPS is running Red-Hat, CentOS or equivalent linux distribution, if not, you may have problems with the scripts that start and stop the jail system because these scripts are made for these systems.

Do not hesitate to contact me if you have another question

Juan Carlos

 
Average of ratings: -
Brandon Horn
Re: New Virtual Programming Lab (VPL) module
 
Juan Carlos,

Hi again. Thanks for the help so far. This would be incredibly useful to get running.

Here's the current situation. I am running CentOS and the jail server does run. I know it runs because I can telnet to it and because I get, "Not executed" rather than a failed connection.

I copied the bin directory from my JDK installation to:

/jail/usr/local/jdk1.6.0_21/bin

My vpl_run.sh file looks like this:

#!/bin/sh
. vpl_environment.sh
#this path may vary on different jail-server
#PATH=$PATH:/usr/lib/jvm/java-1.6.0-openjdk/bin
PATH=$PATH:/usr/local/jdk1.6.0_21/bin
javac -J-Xmx128m *.java
NAME=$(basename $VPL_SUBFILE0 .java)
if [ -f $NAME.class ] ; then
echo "#!/bin/sh" >> vpl_execution
echo "PATH=$PATH:/usr/local/jdk1.6.0_21/bin" >> vpl_execution
echo "java -Xmx128m $NAME" >> vpl_execution
chmod +x vpl_execution
else
echo "Not compiled or error in filename"
echo "The main method must be in the first file."
fi I'm stumped. Brandon

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Hi Brandon,
First, you need to undo the copy of the JDK instalation to the “/jail” directory. In my last post I said that the “/jail” would be an adapted replica of the root file system, I omitted that this replica is made automatically by NFS. The vpl-jail-system service is the responsible to prepare the “/jail” directory (make the replica) and enable the vpl-xmlrpc-jail daemon.
You can use the command “service vpl-jail-system restart” to check if appear any error messages in this process.
If the vpl-jail-system start correctly you must see a read-only replica of “/bin” at “/jail/bin”. To add software to the jail system you only need to add software to the host system.

Juan Carlos.

 
Average of ratings: -
Brandon Horn
Re: New Virtual Programming Lab (VPL) module
 

Juan Carlos,

Hmm. I deleted the copy and I changed my path back to what it would be on the local system. There are no errors in the log. I still get, "Not executed"

What resources are required by your preconfigured virtual machine (CPU, disk, RAM)? I'm sure my hosting company could handle the installation, but I'm doubtful that the account has the resources to run it. I might be able to get some financial support from my school if I can show how useful this would be.

Brandon

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Hi Brandon

I need more information to try to resolve the problem. Please copy the file “vpl_run.sh” to the file “vpl_evaluate.sh” and then use the button “evaluate” . This will give us more information about what is happening.

Juan Carlos
 
Average of ratings: -
Brandon Horn
Re: New Virtual Programming Lab (VPL) module
 
JC,

The message is still "Not executed" When the "Evaluate" button is pressed. This is true with the same code in vpl_run.sh and vpl_evaluate.sh and with the code only in vpl_evaluate.sh (and nothing in vpl_run.sh).

B
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Dear Brandon,

After take a closer look to the problems that you report, I think that you still have a jail-server problem. Please, check that the file system replica at the jail directory is working well (/jail/usr => /usr, /jail/bin => /bin and /jail/lib => /lib). I must notice that the jail-server for CentOS need a running NFS server.

To get more information about the problem add "-d 255" in “server_args” at "/etc/xinetd.d/vpl-xmlrpc-jail". This will generate a detailed report of the jail daemon executionin in the system log “/var/log/messages”.

If you don't found the problem, you can send me the "/var/log/messages” file to search it.

Best regards

 
Average of ratings: -
Brandon Horn
Re: New Virtual Programming Lab (VPL) module
 
Juan Carlos,

Thanks for all the help, but getting this to work is beyond me. I might try again in a year if I develop better skills with Linux.

One last question: Is there an easy way to uninstall the VPL module from Moodle? What changes to the Moodle database need to be undone on uninstall?

Brandon
 
Average of ratings: -
Brandon Horn
Re: New Virtual Programming Lab (VPL) module
 

Thanks for helping me configure the server. It works great now!

For anyone else who got the jail server working but is having trouble getting Java files to compile and run, the attached TXT file contains code for vpl_run.sh and vpl_debug.sh that worked for me.

Brandon

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
How to remove VPL from a Moodle server:
1. Make a backup
2. Remove all the instances of VPL
3. Remove the directory “…/moodle/mod/vpl”
4. Remove the directory “../moodledata/vpl_data”
I don’t know the whole effect of removing VPL tables.
5. Remove (at your own risk) the VPL DB tables: vpl, vpl_submissions, vpl_jailservers, vpl_variations and vpl_assigned_variations.

 
Average of ratings: -
Picture of Gulshan Kumar
Re: New Virtual Programming Lab (VPL) module
 
Dear Juan,


Thanks for the help extended, but my setup doesn't seems to work (even failed to run a Hello World program in C). Now it is taking a lot time and after a minute or so it throws Jail Connection Timeout, Console Timeout and proxy timeout.
I hope there will be some more setting required.
And I am sorry to tell you that I am not relative to movie producer Gulshan Kumar, its just the name and music which is common wink

Thanks

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Dear Gulshan,
It seems that you are getting all the problems that we can offer. The symptoms indicate that you have a firewall configuration issue on the moodle server. You need to open the range of ports you have set in the general configuration of the module, if for any reason you can’t open these ports, you also can use the module without interactive execution by setting the script file “vpl_evaluate.sh” . The content of this file may be, in your case, equal to the content of “vpl_run.sh”. In this case, the output of the execution is saved and is show in different pages of VPL: the applet editor, the submission view, the evaluation page, etc.

Juan carlos

 
Average of ratings: -
Picture of Gulshan Kumar
Re: New Virtual Programming Lab (VPL) module
 
Dear Juan,


Thank you very much for your help, problem has been resolved by opening the ports.

Are the configurations same for C++ and Java compiler?

Thanks
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Dear Gulshan

The configuration for C++ is almost identical to the configuration for C. You only need to change the compiler from “gcc” to “g++”. The java configuration is more complex due to the need to run the java interpreter.

Again, an off topic question: In which context do you plan to use the VPL module?
 
Average of ratings: -
Picture of Gulshan Kumar
Re: New Virtual Programming Lab (VPL) module
 
Dear Juan,


Right now I will stick to the C and C++.
Anyhow thanks for the help.

Actually I am using Moodle for my college, someday I was wandering about the plugins for moodle, and your work strike the bell. And here I am.
I am trying your VPL just out of curiosity, nothing special.

Thanks for the help.
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Thank Gulshan,
I just want to know about the use of the module.

In my last post for you, I forgot to say tthat you must change, at the compiler comman, the filenames from "*.c" to "*.cpp" or the extensión for C++ that you use.

Best Regards
Juan Carlos

 
Average of ratings: -
Picture of udara weerakoon
Re: New Virtual Programming Lab (VPL) module
 

Dear Juan,

I have tried to run "Hello world" C program according to your guidence given, but I'm receiving an access denied message as show in the picutre. Could you please help me to overcome this problem?

Thank you.

Udara.


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Dear Udara,

To bypass this problem (to run programs in console) you must not access to your Moodle from the same machine (the server machine).

This is a known problem (or behavior) of the latest versions of Oracle Java plug-in, for example IcedTea plug-in for Ubuntu doesn’t show this behavior. For security reasons, applets are forbidden to connect to the local machine. Really, applets only are allowed to connect to the server from where they were downloaded. Oracle Java plug-in seems that prioritizes the ban.

Best regards.

Note: the user can give more priviliges to a Java applet, but I think that in this case it is not needed.

 
Average of ratings: -
Picture of udara weerakoon
Re: New Virtual Programming Lab (VPL) module
 

Dear Juan,

First, Thank you so much for your quick reply. I really appreciate it.

I'm browsing Moodle LMS using my desktop machine (which has windows xp operating system), but the Moodle server is a ubuntu based one. One more point, both Moodle and Jial services run on the same ubuntu server. I have installed icedtea6-plugin in my ubuntu server (server that has hosted both moodle and jial services), but still I am getting the same error message sad.

Thank you

Udara

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Dear Udara,
one question and one supposition:
Can you acces and run programs at the demo site http://vpldemo.dis.ulpgc.es/moodle with your Windows XP?
I suppose that you are using a firewall (at the client or server) that prevents the connection. If you can run programs at the demo site then the problem is at the server.
Best regards.

 
Average of ratings: -
Picture of udara weerakoon
Re: New Virtual Programming Lab (VPL) module
 

Dear Juan,

Yes, I can run programs at the demo site as both a student and a teacher without any problem. So, I don't think it is a problem in my desktop (client running on windows xp) machine, but probably the server. I have allowed port number 52000 in the firewall at the server. Do I need to configure the firewall (Server) any more?

Thank you.

 

Udara.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

You need to open, on Moodle server,  the range of ports you have set in the general configuration of the VPL module.

Best regards.


 
Average of ratings: -
Picture of udara weerakoon
Re: New Virtual Programming Lab (VPL) module
 

Dear Juan,

Thank you very much, I appreciate your helping me.

My confussion is, Do I need to add any records to my iptables of the server, since both Jail and Moodle services are running in this server?

Thank you.

Udara.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

You need to open the port range because the connections not only come from the Jail, also come from the applet console at the browser.


Best regards.

 
Average of ratings: -
Picture of udara weerakoon
Re: New Virtual Programming Lab (VPL) module
 

Dear Juan,

Great! Thank you so much

Udara.

 
Average of ratings: -
Picture of Antonio Lepore
Re: New Virtual Programming Lab (VPL) module
 

Sorry, I search "/etc/xinetd.d/vpl-xmlrpc-jail" in server directory but nothing. How is possible this?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Antonio,
the new 2.X jail server software does not uses xinetd


Best regards.

 
Average of ratings: -
Picture of OEE_Dev KW_Univ
Re: New Virtual Programming Lab (VPL) module
 

Hi, I am trying to run a java program using your interesting VPL module. I Installed jail server under  CentOS 5.5 and everything seems to be fine. I did clean installation for CentOS and configure it by following steps mentoined in your documentation, i.e. I didn't use preconfigured installation and I don't want to use virtual machine. I am running jail server on separate machine and connecting it to the other server machine where moodle is running.

But I am getting timeout when attempting to run some code. When I checked the /var/log/messages file , it indicates that error has bee generated that POST is expected and found GET instead.

I reviewed the documentation provided on your site but I can NOT  well understand what is meant by the following statement :

" "-uri path". Sets the path to add the URL of the server. If we had a server named "localhost" the URL to use in requests would be "http://localhost:port/path. The default is "/RPC. This parameter can be used as key, because if not used in the URL the request is not heeded.
"-d #". Sets the debugging level, a greater number means more information in the system logs. "

  1. What is meant by server? server where moodle is running? Or server where jail service is running?  I am running jail server on separate machine and I configured firewall settings.
  2. What is meant by "/RPC"?
  3. Do I need a value for "/path"? What is it?
  4. What is value for "-uri" argument?

 

I didn't set any *.sh file, do i need them even I want to run each submission alone?

 

thanks and keep pacing forward

Best.

Oee.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Oee,
I’ll try to answer your questions

Q1.    What is meant by server? server where moodle is running? Or server where jail service is running?  I am running jail server on separate machine and I configured firewall settings.
A1. In this paragraph “server” refers to “jail server”.

Q2.    What is meant by "/RPC"?
A2. The requests from the “moodle server” to the “Jail server” use XMLRPC protocol and “/RPC” is the default path in the URL of a XMLRPC service. Omitting the “-uri” parameter is equivalent to use “-uri /RPC”

Q3.   Do I need a value for "/path"? What is it?
A3. To simplify the configuration you may use “-uri /” then you can use as URL of your “jail server” http://hostname:port

Q4.  What is value for "-uri" argument?
A4. Well, “uri” is the parameter name for the “path” in the URL to the “jail server” (http://hostname:port/path)

Q5. I didn't set any *.sh file, do i need them even I want to run each submission alone?
A5. The VPL versions <=1.3 always need to setup “vpl_run.sh” file or  “vpl_evaluate.sh”  file to run programs. You may use the "based on" option to reduce the script files setting. The VPL 1.4 version will be loaded with default scripts for common programming languages as C, C++, Java, C#, etc.


A basic file for “vpl_run.sh” or “vpl_evaluate.sh” for Java may looks like this:
===========================
#!/bin/bash

#load VPL environment vars
. vpl_environment.sh
#reset LC_ALL
export LC_ALL=en_US.utf8
#Set path to JDK
PATH=$PATH:/usr/lib/jvm/java-1.6.0-openjdk/bin
#compile
echo "The first file/class must have the Main method"
javac -J-Xmx64m *.java
NAME=$(basename $VPL_SUBFILE0 .java)
if [ -f $NAME.class ] ; then
echo "#!/bin/bash" >> vpl_execution
echo "export LC_ALL=en_US.utf8" >> vpl_execution
echo "PATH=\$PATH:/usr/lib/jvm/java-1.6.0-openjdk/bin" >> vpl_execution
echo "java -Xmx64M -enableassertions $NAME" >> vpl_execution
chmod +x vpl_execution
else
echo "No compiled or error in file name"
fi
===========================

Examples of /etc/xinetd.d/vpl-xmlrpc-jail file:
1)
====================================
service vpl-xmlrpc-jail
{

port = 8080
# no server_args parameter

}
=====================================
If the server name is “jail1.uni.edu” then the URL to access the service in the “jail server” would be http://jail1.uni.edu:8080/RPC

2)
====================================
service vpl-xmlrpc-jail
{

port = 52000
server_args = -uri /

}
=====================================
If the server name is “jail1.uni.edu” then the URL to access the service in the “jail server” would be http://jail1.uni.edu:52000

Hope that this helps you.
Best regards.

 
Average of ratings: -
Picture of OEE_Dev KW_Univ
Can't run c++ programs
 

Thank you for your response.

When I am accessing the jail server via web browser firefox I got the following reply written in a blank page :

Server: vpl-xmlrpc-jail
Connection: close
Content-Length: 41
Content-Type: text/html;chartype=UTF-8

<html><body>Not Implemented</body></html>

What does this message mean? Is my jail server working well and ready to accept request?
given that when I telnet jail server I got empty screen.

I have postponed testing compiling and running Java programs as I realized that
it would be better to firstly test C++ programs because C++ compiler is already installed
on the jail server and it works pretty fine and I can compile/execute c++ programs from
from command line using this command:

g++ -Wall -o vpl_execution test.cpp


So please help me first detecting and tackling compiling/executing C++ programs first.

one more question:
The ports range set in general settings page of a the module should be opened on the moodle server or jail server?

best.
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Can't run c++ programs
 

Sorry for the delay of the response.
The message you get from the server is correct, your jail server is running and is reachable.
If you want to compile and run C++ programs you could use for “vpl_run.sh” and “vpl_evaluate.sh” a script like this:

------------------------------

#!/bin/bash
g++ -Wall -o vpl_execution *.cpp

-----------------------------
The port range set in the general setting should be opened in the Moodle server only.

Best regards.

 
Average of ratings: -
Picture of Tanaji Patil
Can't run c and c++ programs
 

Dear Juan,

I have installed Moodle 2.9 Server with mod_vpl 3.1.3 on CentOS 7 64-bit. Then on another server (again CentOS 7 64-bit) I installed vpl-jail-system-2.1.1. I tested it through browser and the status is OK. Then I tried to execute programs from moodle vpl activity, I am able to execute Java, Python programs but I am getting error for C & C++ programs as "gcc: error trying to exec 'cc1': execvp: No such file or directory".

Am I missing anything? I have executed install-vpl-sh script to install the jail-server.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Can't run c and c++ programs
 

Hello Tanaji,
vpl-jail-system-2.1.1 has been tested on Ubuntu 14.04 LTS and is the linux distribution that we recommended to use. I don't have a answer to your problem, I need spare time to reproduce your installation and find out the problem. If your are in a hurry, try using Ubuntu, if not, you may wait my response in a few days.

Best regards.
Juan Carlos Rodríguez


 
Average of ratings: -
Picture of Tanaji Patil
Re: Can't run c and c++ programs
 

Hello Juan,

Thanks for reply. I will try it on Ubuntu  14.04 LTS.

Best Regards

Tanaji Patil

 
Average of ratings: -
Picture of Tanaji Patil
Re: Can't run c and c++ programs
 

Hi Juan,

Thanks a lot. I just tried on Ubuntu 14.04 LTS Server and it is working fine.

Regards,

Tanaji Patil


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Can't run c and c++ programs
 

Hi Tanaji,
thanks for reporting your experience.

Best regards.
Juan Carlos Rodríguez

 
Average of ratings: -
Picture of OEE_Dev KW_Univ
Re: New Virtual Programming Lab (VPL) module
 

Dear,

What jail server version should I install ?   vpl_xmlrpc_jail-1.0.1.tar.gz   OR  vpl_xmlrpc_jail-1.1.tar.gz  OR vpl_xmlrpc_jail-1.0.tar.gz  ?

I am running CentOS 5.5 clean installation on different machine other than Moodle server machine (Windows2000 server, PHP 5.2, IIS) and installed VPL-module version 1.3

Here are symptoms:

  1. When I click evaluate I got "No jail server available" error.
  2. When I click run , I got "Running (Timeout)"
  3. When telnet the jail server:port I got blank screen only
  4. and when access the server through the designated port via web browser, I got blank page with this text in it:
Server: vpl-xmlrpc-jail
Connection: close
Content-Length: 41
Content-Type: text/html;chartype=UTF-8

<html><body>Not Implemented</body></html>

 

By the way, How can I uninstall jail server from the machine?

 

Please guide me.

thank you for your effort and time

best.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi again,
You should install vpl_xmlrpc_jail-1.1.tar.gz.
The symptoms show that your VPL module cannot reach the “jail server”.
1)    Check the URL of the jail server you set in the general setting. Be carefull with the URL path field (http://jailservername:jailserverport[/path]), it must match the configuration at file "/etc/xinetd/vpl-xmlrpc-jail" (-uri) in the "jail server".
2)    Check that your firewall lets the IIS/PHP server access the “jail server”. You can stop the firewall for a minute to check if the firewall configuration is the problem.

To uninstall the “jail server” from Centos use this steps
1)    Run “chkconfig --del vpl-jail-system”
2)    Remove “/etc/vpl” directory
3)    Remove “/jail” directory
4)    Remove “/etc/xinetd.d/vpl-xmlrpc-jail” file
5)    Run “service xinetd restart”

Best regards.

 
Average of ratings: -
Picture of Prav M
Re: New Virtual Programming Lab (VPL) module
 

Hi Juan,

I followed the instructions for installing Jail server on Ubuntu. When I try to access the vpl from Moodle, it give me a server busy. When I try to access via web page, this is what I get:

This xml file does not appear to have any style information associated with it. THe document tree is shown below.

<html>

<body>

<Not Implemented>

<br/>http GET request not implemented

</body>

<html/>

And can you explain the first portion of the vpl_xmlrpc-jail xinetd file?

protocol=tcp

type=UNLISTED

user=root (what user is this?, should we change it?)

server = /etc/vpl/vpl-xmlrpc-jail ( is this service file name?)

Also, in Ubuntu, do we install NFS? and should we open the port in /etc/services?

Thanks

Praveen

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Prav,
The problem using the jail seems to be that you configure your assignment to request too much memory and you configure the jail server with a low memory limit. To resolve this problem reduce the memory requested at “Resources limits|Maximum memory used” or increment the memory limit at the jail daemon config file “/etc/vpl/vpl-xmlrpc-jail.conf”.
xinetd options:
protocol=tcp
This is the type of network protocol used

type=UNLISTED
This is for named services (VPL is not asigned)

user=root (what user is this?, should we change it?)
This is the user that runs the service. It must be root.
server = /etc/vpl/vpl-xmlrpc-jail ( is this service file name?)
Yes, this is the program that manage the service (the VPL jail daemon)
You don’t need to install NFS in Ubuntu, this is required only for CentOS/RedHat 5
Best regards.

 
Average of ratings: -
Picture of Prav M
Re: New Virtual Programming Lab (VPL) module
 

The vpl-xmlrpc-jail.conf has only JAILPATH,MIN_PRISONER_UGID,MAX_PRISONER_UGID and MAXTIME.

Do I need to add MAXFILESIZE & MAXMEMORY?

And should I restart only the vpl-jail-system or also the xinetd?

 

Thanks for your help.!

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

To have more information about why the deamon says it is busy add "-d 8" in “server_args” at "/etc/xinetd.d/vpl-xmlrpc-jail". This will generate a detailed log of the jail daemon execution in the system log “/var/log/messages”.

If you don't found the problem, you can send me the file "/var/log/messages” to review it.

Best regards.

 
Average of ratings: -
Picture of John Andrewartha
Re: New Virtual Programming Lab (VPL) module
 

Sound like the Welcome to Linux Java Nightmare.

By default all Linux distro's install Open Java.  It is still to immature to run most of the Real Java.   Install Sun Java and it should work.

 
Average of ratings: -
Picture of Joel Gogwim
Re: New Virtual Programming Lab (VPL) module
 

Hello Carlos,

Please I am in the process of installing the jail server following the documentation but continuously received the following error message.

[root@cbtmain vpl_xmlrpc_jail-1.0]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
See `config.log' for more details.
[root@cbtmain vpl_xmlrpc_jail-1.0]#

I need a help.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Joel,
The demon vpl_xmlrpc_jail is written in C++. I think that ‘configure’ is saying that you don’t have a C++ compiler (like g++) installed and  need one to compile the demon.
Best regards.

 
Average of ratings: -
Brandon Horn
Re: New Virtual Programming Lab (VPL) module
 
Are you able to provide (paid) installation of the VPL jail and configuration of the firewall?

Brandon
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Sorry Brandon, but I do not provide VPL instalations/configurations for money. What I can do is to resolve any question you have regarding the installation of VPL for free.

I can suggest you that a linux expert installs VPL following the instruction provided in the documentation.

Juan Carlos

 
Average of ratings: -
Picture of Andrey Semenyuk
Re: New Virtual Programming Lab (VPL) module
 

Mr. Juan Carlos,

We tried the VPL JAIL system. Examples C and Java work fine but C++ examples not working .
Could you help us?
Below are the configuration files and log files.
Thank you/

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Andrey,

I suppose that you are using a prebuilt “jail system” then please post the “vpl_run.sh” file of the C++ activity to have a complete picture.

A simple content of “vpl_run.sh” for C++ may look like this

---------begin of file--------------
#!/bin/sh
g++ -Wall -o vpl_execution *.cpp
----------end of file--------------

Best regards

 
Average of ratings: -
Picture of adrin diggs
Re: New Virtual Programming Lab (VPL) module
 

Hi i am working on a VPL Moodle module, but I can not get C, C++, or Java to compile and execute. My "vpl_run.sh" looks like the one above for C++. And I was wondering am I to "Add file" vpl_execution, and then select it as one of the "files to keep when running". When I do this my /var/log/messages say vpl_execution: pemissions denied

help is needed: thankyou

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

HI Adrin,
I need more information to help you about your problems with C, C++ and  Java.  About the message you get when you add “vpl_execution” file and not getting it  by compilation, you must notice then that the file take the format of a shell script  and you must add “#!/bin/sh” as the first line and you need to add “chmod +x vpl_execution” in your “vpl_run.sh” to set it as executable.
Best regards.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Andrey,
Your problem seems to be that you have set a too low memory size limit. You must increase the memory size limit to16MB or a higher value in order  to run g++ and compile a C++ program.
Best regards

 
Average of ratings: -
Picture of Дмитрий я
Re: New Virtual Programming Lab (VPL) module
 

Does VPL programming language FreePascal?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

The applet editor and the module supports syntax highlighting for Pascal, I don’t know the differences with FreePascal. The virtual machine with preconfigured Jail-system that you can download at VPL home page don’t have the FreePascal compiler installed but you can install it:
At the virtual machine execute
wget ftp://ftp.freepascal.org/pub/fpc/dist/2.2.4/i386-linux/rpm/fpc-2.2.4-1.i386.rpm
rpm –i fpc-2.2.4-1.i386.rpm
The last FreePascal version (2.4.0) has a “dependence not resolved” problem in the VM with Centos 5.

Best regards

 
Average of ratings: -
Picture of Andrey Semenyuk
Re: New Virtual Programming Lab (VPL) module
 

Thanks for helping me configure the VPL. It works great now!

 
Average of ratings: -
Picture of OEE_Dev KW_Univ
Re: New Virtual Programming Lab (VPL) module
 

Is it possible to run VPL with moodle 1.7 and moodle 1.8 release ??

If NO, How can I make it run with moodle 1.7 release or Moodle 1.8 ?

 

Please help,

 

Thanks

Omer.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Dear Omer,
Sorry, but we are not planning to release a VPL version compatible with Moodle 1.7 or 1.8. We are planning, in a near future, to release a VPL version for Moodle 2.0.

Best regards

 
Average of ratings: -
Picture of Oleg Sychev
Re: New Virtual Programming Lab (VPL) module
Group Developers
Hi. We in Volgograd State Technical University are looking for a way to integrate automatic program testing with Moodle server (thought we are using individual tasks for each assignment) and it is good to see work in the same way. Is there a way in VPL to configure module instance (from user interface) to automatically link student's program with some teacher-supplied library(s)? Or choose compile/run script from a number of existing ones. It couldn't be done in one script since some assignments require one special library, some - another and some no at all. (Of course, it would be better if code for such library could be uploaded by web interface, but not strictly necessary).
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Oleg,

The use of automatic program testing is one of the main target of VPL. The libraries can be used in two ways: as source code  files of a VPL's activity, (they must be added in the “execution files” configuration page , better in a VPL activity shared as “based on”), or as software installed in every jail-servers you use.

To use one assignment for different tasks you can use “Variations”.  The variations define sets of different requirements for an assignment.  Each student will be randomly assigned a variation. Each variation has an identification code and a description. The variation description is shown to the students with the assignment description. The identification code is reported in the vpl_enviroment.sh , so it can be used in the script files (vpl_execution.sh, vpl_evaluation.sh) to do different actions depending on it.

Another way to control different task for one assignment may be to write a complex script able to detect the type of assignment submitted by checking , by example,the file names submitted by the student.

Best regards.

 
Average of ratings: -
Picture of Osvaldo Carvalho
Re: New Virtual Programming Lab (VPL) module
 

Hi, Juan,

How tests are specified when variants are used?

Best regards,

Osvaldo

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

At this moment the variations are not covered by the default evaluation program.
We use it in specific assessment programs that allow different assigning to each student.
The assigned variation to each student is sent to the evaluation process as a environment variable. The variable is named as $VPL_VARIATION0 and its value is the variation id. This environment variable is set in the vpl_enviroment.sh file.
If the users of VPL want to use variations with the default evaluation program then  it could be incorporated into future versions of this program.
Best regards.
Juan Carlos Rodríguez

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Virtual Programming Lab (VPL), version 1.3 released
 

The VPL development team announces the public release of VPL 1.3, the third stable version of VPL. This new release adds some improve and fixes errors.

  • Added a new type of activity "example" used to show programs running.
  • Files from "Requested files" and "Execution files" can be downloaded as a ZIP file.
  • It uses the new 1.0.3 ACodeEditor version that adds a workaround for a Java 6.0_22 error.
  • Added Ubuntu support for the jail system (scripts to install and service)
  • Fixed Jail system connectivity error that avoid interactive execution if the server is behind a NAT

This version is backward compatible with VPL versions 1.x < 1.3. The upgrade from older version adds a new field to the database. It is recommended to upgrade to this new version.

 
Average of ratings: -
me
Re: Virtual Programming Lab (VPL), version 1.3 released
 

Congratulations Juan. Looks very interesting though I have not installed it to look properly yet.

A short video would be great to go with the screenshoots to give people a flavour. Any plans to add PHP?

- Eamon

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Virtual Programming Lab (VPL), version 1.3 released
 

Thank Eamon,
if you have some question about the installation don't hesitate to ask me.
To make screencasts about the installation and configuration of VPL activities is in my TODO list.
The system can handle almost any programming language that use console iteration. The system don't  highlight the sintax of PHP but can edit and run PHP. After your question I have added a PHP generic activity to the demo site
http://demovpl.dis.ulpgc.es/moodle
We are planning, for a near future, to add sintax highlighting for a wide variety of programming languages.


The "vpl_run.sh" used at the PHP generic activity is
-------------------------
1 #!/bin/bash
2 echo  "#!/bin/bash" > vpl_execution
3 cat vpl_environment.sh >> vpl_execution
4 echo "php5 -n -f \$VPL_SUBFILE0" >> vpl_execution
5 chmod +x vpl_execution

-------------------------

Best regards
Juan Carlos

 
Average of ratings:Useful (1)
Picture of udara weerakoon
Re: Virtual Programming Lab (VPL), version 1.3 released
 

Dear Juan,

I have tried to install VPL 1.3 with moolde 1.9, but when I was running a C program in the activitiy (moodle), I got the message stating "not executed". I am using my test server (Ubuntu server 10) to run both moodle and jail servers. Here I'm attaching the log file. There are two question I am particular about.

1. what should I do with *.sh files, where should I create those?

2. What is the purpose of ACodeEditor? how can i use it?

 

I really appreciate your helping me.

 

Thank you.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Virtual Programming Lab (VPL), version 1.3 released
 

Dear Udara,
I’ll try to respond to your questions but not in the order you ask them.
==========
Question 1)
what should I do with *.sh files, where should I create those?
Answer 1)
There are three types of execution you can set for an activity: “run”, “debug” and “evaluate”. The “run” and “debug” actions do an online execution in a console (the console is part of the applet editor). The “evaluate” action does an offline execution and its output is saved as part of the submission.
Each action (“run”, “debug” and “evaluate”) has its own script: vpl_run.sh, vpl_debug.sh and vpl_evalaute.sh.  The goal of these scripts is generate a file named “vpl_execution”. This file must be a binary executable or a script and if it exists, after running the action script, it will be run.
You may set your script files (vpl_run.sh, vpl_debug.sh and vpl_evalaute.sh) by “updating” your VPL activity and then selecting “execution”. You can't set scripts when you are creating a new VPL activity.
==========
Question 2)
I got the message stating "not executed"
Answer 2)
This message say that your script linked to the action you request do not generate a file “vpl_execution”.
==========
Question 3)
What is the purpose of ACodeEditor? how can i use it?
Answer 3)
Really, to run VPL you don’t need the source files of “ACodeEditor”, the applet code editor. The VPL module already has the “ACodeEditor” compiled.  The source files of “ACodeEditor” are at the download page of the VPL site because it is Open Source as the rest of VPL.
==========
The log file you attach says that your Jail server is running OK, so far, but at your post you say that you are trying to run a C program and the file you use was “hello.java”.
To populate the script files, you can use the content I have suggested in other messages of the forum.


Best regards.

 
Average of ratings: -
Picture of udara weerakoon
Re: Virtual Programming Lab (VPL), version 1.3 released
 

Dear Juan,

I gotch you, Thank you so much.

I had to chop the log file due to the restricted file size of 100K. That is why the log file does not contain my hello.c program's execution logs.

Again, I really appreciate your helping me.

 

udara.

 
Average of ratings: -
Picture of saurabh singh
unable to get vpl working in moodle 2.0
 

Hello juan,

I am intrested in working for development of vpl.But in order to even start that i need to get it working.My moodle installation is version 2.0,When i am trying to install the vpl plugin it's saying broken plugin....It appears that vpl is not supported by moodle 2.0?Can i get it working in version 2.0?

Secondly i am having problems in configuring the jail server in my ubuntu machine,the vpl-jail-system service runs fine,but the vpl-xmlrpc-jail isnt recognized by the shell.

(I know these questions are too dumb for a wanabe developer but i have tried everything)

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: unable to get vpl working in moodle 2.0
 

Hello Saurabh,

Sorry, but VPL 1.3 is NOT COMPATIBLE with Moodle 2.0. VPL 1.4 that is near to be released will neither be COMPATIBLE with Moodle 2.0 . After the release of VPL 1.4 we will start a 2.0 branch of VPL. We are planning to make a first 2.0 compatible release of VPL before the end of the year. If you are planning to develop new VPL features you must take this into account.

vpl-xmlrpc-jail is a deamon intended to be managed by xinetd.
Did you install xinetd?

Best regards.

 
Average of ratings: -
Picture of saurabh singh
Re: unable to get vpl working in moodle 2.0
 

Yes xinetd is installed and is working..i can see it in the ps output.....

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: unable to get vpl working in moodle 2.0
 

Dear Saurabh,

To help you installing a "Jail server" I need more information about “the vpl-xmlrpc-jail isnt recognized by the shell”.
To check your “Jail server” you can follow the steps I posted here on 17 September 2010.


Best regards.

 
Average of ratings: -
Picture of saurabh singh
Re: unable to get vpl working in moodle 2.0
 

sudo service vpl-xmlrpc-jail start

unrecognized  service

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: unable to get vpl working in moodle 2.0
 

The message you get running “sudo service vpl-xmlrpc-jail start” is normal, vpl-xmlrpc-jail is a demon controlled by “xinetd”, you can’t use the command “service” to control vpl-xmlrpc-jail. The start/stop script of “vpl-jail-system” controls the activation/deactivation of “vpl-xmlrpc-jail”. If you want to control manually the “vpl-xmlrpc-jail” service you must edit “/etc/xinetd.d/“vpl-xmlrpc-jail”” and reload xinetd.

Best regards.

 
Average of ratings: -
Picture of Marcello Missiroli
Re: unable to get vpl working in moodle 2.0
 

Some MORE dumb questions:

1) vpl-xmlrpc-jail is intended to be run on the Moodle host, or on the jail (VM) system?

2) When I install on Virtualbox the jail system provided, it seems that no port is open, espcially port 52000. What am I missing here?

3) When I install the vpl module in moodle, a testing Jail system URL is provided. How do I test it?

Thank you for the good work!

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: unable to get vpl working in moodle 2.0
 

Hello Marcello,
I'll try to answer to your questions:
Q1) vpl-xmlrpc-jail is intended to be run on the Moodle host, or on the jail (VM) system?
A1) vpl-xmlrpc-jail is the daemon that manages the requests of execution received from a VPL module on Moodle server. vpl-xmlrpc-jail must be run on a jail system.

Q2) When I install on Virtualbox the jail system provided, it seems that no port is open, espcially port 52000. What am I missing here?
A2) I don't know. The vpl-xmlrpc-jail daemon is manage by xinetd and xinetd will open the appropriate/configured port

Q3) When I install the vpl module in moodle, a testing Jail system URL is provided. How do I test it?
A3) You can check the basic conectivity with the demo jail at Advanced settings->Check jail servers
You also can add any VPL activity and check to run some code in Test activity->Edit

Best regards

 
Average of ratings: -
Picture of Marcello Missiroli
Re: unable to get vpl working in moodle 2.0
 

I made progress, and I think I'm halfway through. Even like this the module it's very helpful, but I hope I can do more.

I installed the jail system in the VM, and at least sending the program works: I can see the output of the compiler on the rightmost window.

However, then the system hangs, and it reports that it cannot connect (I can see a dialogbox containing the printf output, so the program runs allright). So I suspect it's a firewall issue, but

a) I've already opened the ports on the main machine (this is the output)

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp spts:51001:51500

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
piffy@moodle:~/VirtualBox VMs$

b) I've already activated the port forwarding on Virtualbox, as stated on the site.

So, I don't really know what to do next.

NOTICE: If/whenever I'm through with this, I promise I'll write a step-by-step, idiot-proof setup guide both in English and my language. smile

 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: unable to get vpl working in moodle 2.0
 

If you can see the execution result in the error dialogbox, then you have a correct connection with the jail server. One question: are you running the browser in the same machine than the Moodle server? if the answer is yes then try acceding to your Moodle server from other machine.
Best regards

 
Average of ratings: -
Picture of udara weerakoon
Re: New Virtual Programming Lab (VPL) module
 

Hi,

I have tried hard to create a successful vpl activity to run a java program, but I was not successful. Here, I’m attaching the code in vpl_run.sh file:

1 #!/bin/sh

2 #load VPL environment vars

3 . vpl_environment.sh

4 # reset LC_ALL

5 export LC_ALL-en_US.utf8

6 PATH=PATH:/usr/lib/jvm/java-1.5.0-gcj-4.4/bin

7 echo "The first file/class must have the Main method"

8 javac -J-Xmx64m *.java

9 NAME=(basename VPL_SUBFILE0 .java)

10 if [ -f NAME.class ] ; then

11   echo "#!/bin/sh" >> vpl_execution

12   echo "export LC_ALL=en_US.utf8" >> vpl_execution

13   echo "PATH=\$PATH:/usr/lib/jvm/java-1.5.0-gcj-4.4/bin" >> vpl_execution

14   echo "java -Xnx64m -enableassertions $NAME" >> vpl_execution

15   chmod +x vpl_execution

16 else

17   echo "Not compiled or error in filename"

18   echo "The main method must be in the first file"

19 fi

 

Additionally, I’m attaching “messages” file of vpl actitivites for your convenient.

I have installed the proxy server “squid” in the same machine, but I didn’t configure it properly. The document in the official vpl website states “To establish the link the proxy needs to be able to open two ports. The two ports are selected from the range set.” Please, let me know the correct configuration statements to do that.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Udara,

The “vpl_run.sh” file that you use has some typewrite errors:

-       Line 5: change – for =

-       Line 6: the second PATH must be $PATH

-       Line 9: VPL_SUBFILE0 must be $VPL_SUBFILE0

-       Line 10: NAME must be $NAME

I recommend to use OpenJDK instead of GCJ.

I see, Inspecting the attached file, that you need to increase the maxmemory size value at least to 128Mb to run a java program.

You don't need to install any proxy server. The proxy of the documentation is an internal part of the VPL module.

Best regard.

 
Average of ratings: -
Picture of Scott Tearle
Re: New Virtual Programming Lab (VPL) module
 

Hi Juan,

Why haven't you used the Sun( Oracle ) JDK?  It's free and available for Windows and Linux.  It's a world standard (they invented the dang thing).  There are also the points that the IBM jdk is mainly used for very fast computations in specific environments, and the openjdk is only being developed in case the sun jdk goes propriatery.

Scott

Scott

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Of course, you can also use the Oracle JDK, it is free but not open source. I do not think there are great differences from one version to another, but OpenJDK is a bit easier to install because it is distributed as part of some Linux like Ubuntu.

 
Average of ratings: -
Picture of udara weerakoon
Re: New Virtual Programming Lab (VPL) module
 

Dear Juan,

Thank you very much, I really appreciate your helping me

Udara.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Release of VPL 1.4
 

The VPL development team is proud to announce the public release of VPL 1.4, the fourth version of VPL. This version incorporates many new features, highlighting that now you don't need to set up a script to run or debug programs and that you can test students programs without any programming.

  • Has been added default scripts to run and debug programs written in the following programming languages: Ada, C, C++, C#, Fortran, Haskell, Java, Matlab/Octave, Pascal, Perl, PHP, Prolog, Ruby, Scheme, Shell script, SQL and VHDL.
  • Has been added an evaluation program. To evaluate an student program, it is enough to write a file of test cases.
  • Has been added syntax highlighting for Matlab and Python.
  • Has been added a option to check and report jail-servers availability.
  • The applet, by default, is now launched using the Java Network Launch Protocol.
  • The applet now show figures and play sounds for Matlab/Octave programs.
  • The jail installation script now can install many compilers and interpreters.
  • The vpl-jail-system now are also distributed as LiveCD, allowing easier testing or installing a jail system in a real or virtual machine.

This version is backward compatible with previous VPL versions.

You can test this new version at the demo site http://demovpl.dis.ulpgc.es/moodle/

 
Average of ratings: -
Picture of eka fitriah
Re: Release of VPL 1.4
 

Dear Juan,

 

I want to ask you about VPL plugin. Because I want to try this plugin. If I want to install this plugin on Windows OS (Windows XP or 7), how I should do for the installation? I have try to install the VPL plugin but I do not know when I have to fill the Jail servers list. I do not find the jai system for Windows. I only find the jail system for linux. How I suppose to do? Thanks for your help.

 

Warmly,

Eka

 

 

 
Average of ratings: -
Picture of Jan Derriks
Re: Release of VPL 1.4
 

What a great plugin VPL is. Students like the "evaluate" to get immediate results.

We got the jail working on Gentoo and some memory checks needed to be disabled but now this works we find we need more documentation on the scripts and on the "similarity" function. What do those 95/98/ 73/ numbers in red tell me about the similarity?

Is there more documentation or a wiki where we can help adding documentation?

We would like to add "fixed/readonly" files to a C/C++ assignment requested files. To add some functions students must call but not change. Is that possible without hacking scripts?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 1.4
 

Hi Jan,
Yes, our students love to get an immediate evaluation from VPL activities too.
Your report is the first news about a VPL jail server on Gentoo.
I know that many VPL features need more documentation and your suggestion of using a wiki seems to be a good idea.
The three numbers that appear at the similarity function are the percentage of similarity found using three different metrics. Each metric is affected by different patterns of source code change. This information is used to order the pairs of files from most to less similar, but the teacher always has the last word.
You can get C/C++ activities; with a similar behavior to what you ask here; taking into account those:
1) You can add files to the "Execution files" group. These files will be compiled with the submitted files by the student. These files are never shown to students and they can't override them.
2) You can add the same files of "1)" to the "Requested files" group. These files will be shown to the students and must be submitted and the students can change its content, but at compilation time, these files will be replaced by the corresponding files in the "Execution files" group.
3) You can show code of “1)” in the full description of the activity.

Enjoy VPL
Best regards.
Juan Carlos.

 
Average of ratings: -
Picture of Jan Derriks
Re: Release of VPL 1.4
 

Hi Juan,

Thanks for the tip to add files into the "execution files" AND "requested files" section.
It's not pretty but serves the purpose. Must not forget to keep both versions in sync.

I have another tip: if you want to test Java exercises where students write "public static void main(int args[])" in their Assignment.java code, it is possible to test this by adding a Tester.java file that calls Assignment.main(args) with args set from evaluation inputs. However, the default java_run.sh script may call the wrong main method.

So I changed the java_run.sh in moodle/mod/vpl/jail/default_scripts so that IF there is a Tester.java file present, that wil be called as main.

 

#Search main procedure class
for FILENAME in $VPL_SUBFILES
do
        grep "void[ \n\t]*main[ \n\t]*(" $FILENAME 2>&1 >/dev/null
        if [ "$?" -eq "0" -a "$MAINCLASS" = "" ]        ; then
                MAINCLASS=$(basename $FILENAME .java)
        fi
        ## jand: Tester is special case
        if [ "$FILENAME" = "Tester.java" ] ; then
                MAINCLASS="Tester"
                break
        fi

Maybe this helps others writing testcases using Tester files too.

Next problem we have is: is there a way to test the student's code for specific constraints like "must use 1 FOR loop" or "javadoc must be present" or "maximum of three variables may be used"?

Tnx for any hints.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 1.4
 

The VPL activities can be easily configurable.
If you can’t change the file “moodle/mod/vpl/jail/default_scripts/java_run.sh” and you want to change how one activity select the main Java procedure (or another thing) then you may modify the execution file "run_vpl.sh". If you want to set the same run_vpl.sh file for many activities then you may add a new VPL activity (for this purpose) and set there the run_vpl.sh. To use this run_vpl.sh file, you must set this activity as “based on” (in execution options) in the other VPL activity where you need it.

The next issue that you referred to is a hard problem. If you find an easy solution for Java or other programming language, please let us know.

Best regards.
I have attached the last java_run.sh and java_debug.sh files we are using.

 
Average of ratings: -
Picture of Jose Antonio Ortiz Ramirez
Re: Release of VPL 1.4
 

Hello!!!

VPL 1.4 is compatible with MOODLE 2.x?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 1.4
 

Hello! José Antonio
Sorry, but no. We hope to have a 2.X compatible module before the summer.
Best regards.

 
Average of ratings: -
ME
Re: New Virtual Programming Lab (VPL) module
 

Dear Juan,

First of all thanks to build such a marvelous product, which solved so many issues of mine. 

There is an issue which i am not able to solve. The comment after pressing "Evaluate" button is

"virtual memory exhausted:Cannot allocate memory Error compiling evaluation program"

Thanks in advance.


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Gaurav,

it seems that you have set a so low memory limit that de C++  compiler (the evaluation program is written in C++) can’t run properly.
Try increasing the memory limit to at least 64Mb. Beware that you can set the memory limit value in two places (at each VPL instance and at the general setting of VPL module) and the lower one will be used.

Best regards.

 
Average of ratings: -
Picture of Jan Derriks
Re: Variations based on Moodle data
 

Hi Juan,

to prevent fraude to stimulate student's creativity I'd like to make assignments that use personal data to work on.

Like: write a program that reads file <your surname>.txt and replaces every <your phone number % 11>'th line with the text "censored by <your First Name>"

Where the <words> are from the Moodle user's profile.

Is that possible?

 
Average of ratings: -
Picture of Nick Papagiorgio
Re: Variations based on Moodle data
 

Hello,

I'm trying to get moodle to run with VPL, but I still have some problems. Here's my setup: moodle_latest-19, VPL module 1.4.1, VPL jail system 1.2. I followed the tutorial " How to install a VPL jail system in Ubuntu" to set up the jail system. I also tried the live CD, but if anything, this made things worse.

I can telnet into the jail server and it says "ready" in the "check jails" tab under "execution". So far so good..

I've set up some small "hello world" test assignments, namely for C++ and Java. I intend to use it solely with Java later, but this is just for the sake of testing. I inserted "output = Hello world" to vpl_evaluate.cases in all assignments and left the other files blank/empty. Now to the problems:

  • I can successfully evaluate a C++ submission. It says "1 tests run/ 0 tests failed" (the test fails, when I change/corrupt the submission, so evaluation really seems to work). When I try to evaluate a Java submission I get:
Compilation
mmap failed for CEN and END part of zip file
Error occurred during initialization of VM
java/lang/ClassNotFoundException: error in opening JAR file
/usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar
Not compiled
Comments
The compilation or preparation of execution has failed
  • I cannot simply "run" a submission, neither in C++ nor in Java. It just says "running" and then (after 30secs) "running (Timeout)".

I have no idea what's going on here, any help is greatly appreciated.

regards

papagiorgio

 
Average of ratings: -
Picture of Jan Derriks
Re: Variations based on Moodle data
 

 

I guess the Jail system's JDK is not OK. One nice way to test it:

1. do a DEBUG of a C/C++ session, then type SHELL in the GDB prompt and try the java -version command or javac to see if java / javac works.
2. As root, do chroot <jail folder> and test the java and javac there.

The shell command in GDB is a pretty sneaky way of getting shell access to the jail system for the time it is allowed. Fortunately it can do little harm.

 
Average of ratings:Useful (1)
Picture of Nick Papagiorgio
Re: Variations based on Moodle data
 

Thank you for the tips...it wasn't the jail system's JDK, it was an issue with the moodle server's firewall (which I apparently couldn't configure right). I set up a new moodle on a fresh Ubuntu in a virtual box and it worked with the (unaltered) jail-server right away.

I couldn't get shell access from the debugging, but at least I don't need it any more (for now) smile

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Release of VPL 2.0
 

The VPL development team announce the public release of VPL 2.0. This new version is compatible with Moodle 2, incorporates new features and fixes some minors errors of VPL 1.4.

The new features are:

  • Has been added group work. Every group has a shared repository of submissions; any group member can submit a new version and all members of a group will get the same evaluation. At this moment, this feature works only with groupings.
  • It is possible to run a batch evaluation of submissions (at "submissions list")
  • At global module setting has been added options to set default resource limits. When an activity don't set a resource limit the default value will be used
  • Backup and restore in Moodle 2.
  • Restore of Moodle 1.9 backups but user's information will be lost. Moodle 2.2 seems that don't restore user's information from Moodle 1.9.
  • Upgrade from Moodle 1.9 keeping all user information.
  • Report some statistics of submissions of students (at "submissions list")
  • The index of VPL activities now shows the number of submissions and submissions no evaluated.
  • Translations to Catalan and Japanese, thanks to Antonio Piedras Morente and Imaizumi Takashi, respectively

http://vpl.dis.ulpgc.es

 
Average of ratings: -
Picture of Jan Derriks
Re: Release of VPL 2.0 - segmantation fault error
 

 

After the installation of a new Gentoo linux with latest g++ compiler we found a serious bug in vpl_evaluate.cpp:

        static Evaluation* getSinglenton() {
                if (singlenton == NULL) {
                        singlenton = new Evaluation();
                }
        }

This function should return the singlenton variable. The patch for mod/jail/default_scripts/vpl_evaluate.cpp is:

750d749
<               return singlenton;
941c940
<                       printf("Testing %d/%ld : %s\n",i+1,testCases.size(),testCases[i].getCaseDescription().c_str());
---
>                       printf("Testing %d/%d : %s\n",i+1,testCases.size(),testCases[i].getCaseDescription().c_str());

The printf fix prevents a warning about the %d that should be %ld.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 2.0 - segmantation fault error
 

Thanks for reporting this serious bug. It will be fixed as soon as possible.

Best regards

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 2.0 - segmantation fault error
 

Thanks for reporting this serious bug. It will be fixed as soon as possible.

Best regards

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 2.0 - segmantation fault error
 

Thanks for reporting this serious bug. It will be fixed as soon as possible.

Best regards

 
Average of ratings: -
Picture of Rangga Wiratno
Re: Release of VPL 2.0
 

Does this version of VPL works for Moodle 2.3?

Is there a documentation or a manual on how to use VPL like how to set up the cases and others?

Thanks before

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 2.0
 

VPL seems to work correctly in Moodle 2.3, but our production server is 2.2 and we haven’t made an intense test of VPL in Moodle 2.3.
All the documentation we have are the module help pages and the docs at vpl.dis.ulpg.es.

Best regards.

 
Average of ratings: -
Picture of Rangga Wiratno
Re: Release of VPL 2.0
 

Yes, we are trying it in 2.3 and so far there are no problem, if a problem does occur I'll keep you informed.

I see, I'll try looking more into it and checking the Demos.

Thank you

 
Average of ratings: -
Picture of Finton Paul
Re: Release of VPL 2.0
 

Hi Juan Carlos

I've managed to install the vpl module for moodle but don't know what next to do. As a matter of fact, my moodle site is hosted on a shared server (hosted by hostek.com) and I am not the administrator of that server.  Any help will be appreciated as it relates to what i can do to complete the jail system installation (if this is necessary).

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 2.0
 

Hi Paul

Yes, you need a jail system configured and running. I don’t know your server limitations, but before installing a jail system you can test if your server can use the demojail correctly.

1)    Add a new VPL activity

2)    Go to “Test activity”

3)    Go to “Edit”

4)    Add a file, for example “hello.c”

5)    Add C code to the file.

6)    “Save” the submission

7)    Push “Run” button.

Best regards.

 
Average of ratings: -
Picture of Finton Paul
Re: Release of VPL 2.0
 

Hi Juan Carlos

I've done as instructed but I'm receiving the error message as depicted in the attachment.

No Jail Serve Available

Is this what should happen?

If yes, then my admin can create a Jailed server for my use.

If this shouldn't happen, then do you have any ideas/possible reasons why I am receiving this message?

Thanks for assistance with this matter.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 2.0
 

It seems that your server can’t connect with the demojail and commonly this is a firewall issue.
Due to security reasons, it is highly recommended that the jail server be installed in a dedicated machine.
The demojail server is at port 52000, not 5200. the second server that appears in your screenshot is incorrect.
Best regards.

 
Average of ratings: -
Picture of Adolfo Rodriguez
Re: Release of VPL 2.0
 

Hello, I am testing VPL 2.0 and I have a problem with automatic evaluation. Testing a Hello World in Java, I have created the file vpl_evaluate .cases with two lines:

case=test1
output="Hello World"

When the automatic evaluation run the test fail with this result

Incorrect program result 
--- Input --- 

--- Program output --- 

stty: standard input: Invalid argument
Hello World


--- Expected output --- 

Hello World

The problem is the line with the error of stty. Is this a problem with my jail system? I have installed the jail system with the liveCD in a VirtualBox  machine. 

Thank you for your excellent work.

 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 2.0
 

Hello Adolfo,
this regresion bug was inserted in VPL 2.0.1. To resove the bug replace the file vpl/jail/default_scripts/common_script.sh by the one attached.

Best regards.

 
Average of ratings: -
Picture of Julio Caiza
Re: Release of VPL 2.0
 

Hello Juan,

I would like to know how I could integrate tools like checkstyle and JUnit to make an evaluation more complete? and which are the archives to modify?

Thanks in advance.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 2.0
 

Hello Julio,

The steps to customize the evaluation are:

1) Install the tools you want to use at the jail servers.

2) To use the tools, write a shell script that evaluates the student’s submission, editing the vpl_evaluate.sh at “advanced settings ► execution files”. This script must generate a file named vpl_execution. This file must be a binary executable or a script.

3) The output of vpl_execution execution is processed to extract, if possible, comments and a proposed grade for the assessment

See “advanced settings ► execution files” help for more details.

Best regards.

 
Average of ratings: -
Picture of Michael Lang
Re: Release of VPL 2.0
 

¡Hola!

We're currently trying to install VPL for a university project.
The setup is as follows:
- Moodle Server: openSUSE 11.4 + Moodle 2.3 + VPL 2.0.2
- Jail Server: Ubuntu 12.04 + Jail system 1.2

Both machines run as VMs, have access to the internet and are accessible from the university intranet only. At the moment we've got two points that we seem to be unable to resolve:

1) Run / Debug
When I put in a HelloWorld-application in C or Python evaluation works as expected. The code is executed and graded according to the evaluation cases configured.
Hitting the "Run" or "Debug" button, however, results in a timeout. No console window is shown either.
When I try the demo course (http://demovpl.dis.ulpgc.es/moodle/) it works fine - so it's probably not an issue with the browser or Java plugin.

The moodle Server is running the susefirewall2 and I've configured it to allow access to TCP and UDP ports 22, 80 and 51001-51500.
I've tried both the default run-files and custom ones with the same result.
The firewall-log messages don't show any allowed or rejected connections to ports 51001 to 51500 - only ports 22 and 80.
The Jail-Server isn't running any firewall - although I've tried activating one to log the incoming and outgoing messages.

Have you got any further suggestions based on what differences there are between run/debug and evaluate?

2) Java
Unlike the other programming languages, Java code cannot even be evaluated.
When evaluating, the JVM cannot start up due to the following message:

execution.txt:
Comment :=>>-The compilation or preparation of execution has failed
<|--
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Not compiled
--|>
Grade :=>>0.00000

The settings that I've figured out which influence this are as follows:
Moodle -> Settings -> VPL Administration -> Advanced settings -> Maximum execution resource limits -> Maximum memory used: 256 MiB
Moodle -> Site administration -> Plugins -> Activity modules -> Virtual programming lab -> Maximum memory used: 512 MiB
Moodle -> Site administration -> Plugins -> Activity modules -> Virtual programming lab -> Maximum default memory used: 256 MiB
vpl_run.sh: javac -Xmx16m; java -Xmx16m
Memory free: 1,5GiB

I've tried changing these values and also adding -Xms Parameters - but with no different result.
I've also tried switching from the standard OpenJDK to the Oracle JDK 7 - didn't change anything either.
Running exaclty the same javac-command locally on the machine works without any problems. The only way to reproduce the error-message on the commandline was to add a -Xms larger than 4GiB (Server has only 2GiB RAM).
Do you know of any further settings that may be associated with this error or possible complications with the current (default) values?

Saludos,
  Michael

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 2.0
 
Hola Michael, Thank you for a so detailed report. It’s seems that you have a Moodle-server firewall configuration problem. Try stopping your server firewall. VPL don´t use UDP protocol, you don’t need to configure UDP ports for VPL. To spot this problem It would be better to let me access as student to your server. Java need a big amount of resources to compile or run a program, you need to set memory limit at least to 256MiB and number of processes limit at least to 20. Best regards.
 
Average of ratings: -
Picture of S Moodle
Re: Release of VPL 2.0
Group Particularly helpful Moodlers

This is related.  If you would like syntax highlighting in the TinyMCE editor for ANY programming language on the planet in Moodle 2.x, check out my post here:

https://moodle.org/mod/forum/discuss.php?d=176780

Doesn't require a separate VPS or anything complex.

 
Average of ratings: -
Picture of Michael Lang
Re: Release of VPL 2.0
 

Hi,

after some further progress, we just want to communicate back some of our findings and solutions to the problems addressed above.

Running/Debugging the submissions seems to indeed have been a firewall / network problem. We've been provided the VMs by our university IT department and they had misconfigured the VLAN settings.

The Java-Problem was being caused by the 64-bit version of Java. Because we're using Ubuntu 12.04 64-bit as Jail-Server, aptitude automatically installed the 64-bit version of oracle-jdk / openjdk. Once we switched to 32-bit openjdk the memory problems stopped.

Hopefully this helps others with the same problems in the future.

Best wishes,

Michael

 
Average of ratings: -
Picture of Julio Caiza
Re: Release of VPL 2.0
 
Hello again Juan, I had though about upload to VPL a .zip file with some Java source files, then to modify the vpl_evaluate.sh script to grade in a particular way. The problem is about upload and send the zip file to the jail. I just made some tests and I think that the file is arriving corrupted to the jail. It is because the original zip file size is 9 KB, I see in the user directory in the jail and the file arrives with 6 B. Could you suggest me something? considering that I can't make a preprocessing in the Moodle server before send the files to the jail or would it be the only solution? Thanks in advance, Julio
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 2.0
 

Hello Julio,
At this moment VPL can’t handle binary files. This feature is in the VPL TODO list. There is a workaround for this problem: you can code the content of a binary file to (for example)  base64 and decode the file content in the server. The problem here is that you need to change the default script to decode the file. In the next VPL release, the decode process will be added in the default script and all the files with b64 extension will be decoded to a binary file with the same name but with the b64 extension removed.
I hope that this help.
Best regards.

 
Average of ratings: -
Picture of Julio Caiza
Re: Release of VPL 2.0
 

Thanks Juan Carlos,

It was helpful.

 

Regards

Julio

 
Average of ratings: -
Picture of Jan Derriks
VPL output console terminal
 

Hi Juan and all,

In a paper about VPL I read that there are plans to change the Java Applet into a Html5 window. Is this already work in progress? I have a few questions about the java ouput terminal:

1. is there a way to get the output of a program in a file or copy it to clipboard?

2. can I do cursor control in the output window? I want to simulate a lcd screen or a maze. VT100 control characters do not work.

PS: the paper is nice! I found it at

http://elrond.informatik.tu-freiberg.de/papers/WorldComp2012/EEE3753.pdf

 

 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: VPL output console terminal
 

Hi Jan and all,

The plan to replace the editor based on Java Applet by one based on HTML5 + JavaScript, remains, especially with the security problems arising from the Java Applet in last and current year. Although we have made some progress in this development, we have not achieved a full functional version and does not seem to be near.

I will try to answer your questions about java output terminal.
A 1. At this moment, you cannot save the program output to a file which is stored in the Moodle server. To get something similar, you must write, in the configuration file "vpl_evaluate.sh", the following:
----------------------------
#/bin/sh
. vpl_run.sh
----------------------------
this will make that when you push "evaluate" the program output will be saved as the result of the automatic evaluation.
I add to the list of tasks to be done: to allow copy text from the terminal to the clipboard

A 2. Sorry, but the output terminal is almost a dumb terminal and it does not emulate terminals as "VT100". This feature has been for a long time in the TODO list and still is there.  sad

Best regards.

 

 
Average of ratings: -
Picture of Jan Derriks
Re: VPL output console terminal
 

Hi Juan

By copying data to /tmp/vpl_output and a symlink from the webserver to /var/jail/tmp/vpl_output we managed to get output to the client PC via a webserver on the machine that runs the jail. A bit clumsy but it works.

 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: VPL output console terminal
 

Thanks for sharing your workaround, I think that if this solution resolve your problem then it is good. But be careful, I guess that you have noticed that your solution don't take into account that two or more user can run concurrently programs.
Best regards.

 
Average of ratings: -
Picture of Jan Derriks
Moodle debugging VPL Errors
 

We upgraded to 2.3.4+ and in debugging mode, moodle complains about VPL:

The module vpl does not define the standard capability mod/vpl:addinstance

    line 3455 of /course/lib.php: call to debugging()
    line 1936 of /course/lib.php: call to course_allowed_module()

Is there a quick way to define the addinstance capability in mod/vpl/db/access.php ?

 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Moodle debugging VPL Errors
 

If you want to remove this debug message  (which, for now, seems to have no effect) then change your "access.php" and "version.php" of VPL by which I attached. Then go to "Site Administration -> Notifications"

Best regards.

Picture of Mark Howson
Re: New Virtual Programming Lab (VPL) module
 

Using VPL to run Linux labs?
I notice you use Cent OS to run you server and then us Virtual Box to set up VMs. After looking over you demo and pages I am wondering if you see it as possible to run labs training Linux level skills at the OS level?

I ask because I am currently trying to decide if the VPL module can be leveraged through adding additional features or if this type of lab support will have to be done from scratch.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Mark,

we now prefere running the jail servers on Ubuntu because installing interpreters and compilers for many programming languages is easy. We recommend installing the jail servers on a virtual machine but the use of VirtualBox is only an example. We think that VirtualBox is suitable for testing, for small installations or to reuse old hardware (without other virtualization capabilities).

If your labs require developing and testing drivers or recompiling the kernel then VPL is inadequate, but if you only need low level programming or shell scripting that don’t require root access, VPL may be useful out of the box. The full and correct answer to your question may be get by running your code at the demo site. If you don't get the expected answer, please, ask again attaching the offending code.

Best regards

 

 

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

Hi!

I'm trying to get VPL 2.0.2 working in CentOS 6.4. For testing purposes I have both Moodle and jail at the same (virtual) machine.

I had partial success -- could execute a Python script via VPL editor and saw the output. Then I messed around with my virtual machine (changed networking to bridged and then back to NAT). Now the situation is that jail server seems to be working (I can see localhost:52000 respond in my browser and I can telnet to it) but when I press the "Run" button in VPL editor or click the "Evaluate" link in "Grade" view, I get following error:

No Jail Server Available
localhost:52000 request failed: Failed to connect to ::1: Permission denied

(First time when I click the "Run" button the error message appears twice)

Can you recommend something to do about it?

best regards,Aivar

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Aivar,
I haven't checked a jail server in CentOS 6.4. You can use "Settings => Advanced Settings => Check Jail servers" as first test. Note that you must use a browser in a different machine to access the server and use the interactive console, If not, you get an "Permission denied" error in the console.
In any case check your server firewall. start removing the firewall adding it again when all are correct.

Best regards.

 
Average of ratings: -
Picture of Aivar Annamaa
Selecting correct execution script
 

Another question from me today:

Is it possible to specify (in assignment definition) which jail script should handle the submission?

Currently I've got the impression that jail server makes this decision according to file extension.

I would use VPL for evaluating Python 3 scripts. Sure, I can edit relevant script so that python3 interpreter is invoked for *.py files, but does it mean that I can't support Python2 and Python3 at the same time? (Most likely I don't even need them both. I just want to learn more about VPL).

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Selecting correct execution script
 

Hi Aivar,
The problem you describe is known. The workaround for an activity is to set a script to run, debug or evaluate. The script will be used instead of the default one. You also can use the "based on" feature to simplify the configuration of many activities.

Best regards.

 
Average of ratings: -
Picture of Aivar Annamaa
Re: Selecting correct execution script
 

Great tip, thanks Juan Carlos!

I'm interested only in evaluation, so I tried to create a custom vpl_evaluate.sh script in Python (attached). Although I used correct shebang line, the system still tried to execute it as a bash script. Is it a bug or feature?

Anyway, I got around this by adding my testing script as separate file and executed it via vpl_evaluate.sh. But I still have trouble getting the evaluation output right. According to VPL inline help, it should interpret text following "Grade :=>>" as proposed grade. But when I'm evaluating, I see all the output from my script as simple text in a box titled "Compilation". Have I misunderstood something?

I also noticed a confusing thing (bug?):1) Initially I misunderstood the difference between "execution files" and "requested files". I added my tester script via requested files and as a student I uploaded only the solution file. The system gave me confusing error message about "incorrect file name". Actually the first file was left empty (I assumed it will be filled by predefined file content), but second file had correct name.

I'm starting to like VPL more and more! (But the road to the enlightenment has been quite rocky smile )

Aivar.

PS. Initially I thought that vpl_run.sh is used when student presses "Run" button and vpl_evaluate.sh is used when student presses "Evaluate" button. Looks like it's not so simple though. Later I noticed that documentation actually explains this, but maybe it's worth pointing this out more directly.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Selecting correct execution script
 

Hi Aivar,
I will try to answer all your questions.
-- Answer to Q1
This is the two things at the same time smile:
feature: add bash to resolve de problem of people that write scripts without shebang
bug: don't check for people like you, that want to use other script language (no bash).
In the next version of VPL this problem will be resolved

-- Answer to Q2
Yes, the "misunderstanding" is this: vpl_run.sh, vpl_debug.sh and vpl_evaluate.sh are script to prepare the execution stage. The result of running one of this script should be a vpl_execution file (script o binary).
You can use a vpl_evaluate.sh like this:
#!/bin/bash
cat >> vpl_execution <<'SCRIPT_END'
write here your phyton script file
SCRIPT_END
chmod  x vpl_execution

-- Answer to Q3 (comment)
"requested files" are the list of file the student must submit. But the teacher can set a initial content to this files, but the student must submit the files.
"execution files" are the scripts and files that will be send, with the student's files, to in the jail server.  If you don't check it in "Files to keep when running", all "execution files" will be removed before run vpl_execution.

The student must submit all the "requested files" and in the proper order (future release of VPL might improve this).
The files that can be optional are ("Submission restrictions|Maximum number of files" - "number of requested files")

-- Comment to PS
Your initial thought was the correct, but these scripts must generate vpl_execution.

Best regards
Juan Carlos

 
Average of ratings: -
Picture of Joel Gogwim
Testing my VPL installation
 

Please I am a first timer in installing VPL; I have successfully installed vpl-jail-system version 2.0

I have configure the /etc/vpl/vpl-jail-system.conf file and vpl-jail-system started well but whenever I tried to check the availability of my execution server using the URLs http://172.16.15.13:80/OK and https://172.16.15.13:443/OK where 172.16.15.13 is the IP Address of the server and is the same thing added in my URLPATH=/ inside the config file mentioned above, it does not reurn OK in my browser instead it give and error message "The connection to the server was reset while the page was loading."

 

Please help me out.

 

 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Testing my VPL installation
 

Dear Joel,
The issue you describe seems to be due to a network problem. The IP of your server (172.16.15.13) is a private address which makes it not accessible from the internet, is only accessible from the same private network. If you plan to use VPL from outside this network, be aware that this IP is unreachable from the browsers and VPL 3.0 requires that the browser connect directly to the execution server.
To check if your execution server is running try this command from your execution server console
wget http://172.16.15.13/OK
or
wget http://127.0.0.1/OK
if all is correct, you must receive a 200 OK response

Best regards

 
Average of ratings: -
Picture of Joel Gogwim
Re: Testing my VPL installation
 

Dear Jaun and Team,

I am just a beginner on VPL; I did installed it and have problem with the version of the jail server and that VPL so I now do a fresh installation on my MAC system because I was having problem with upgrading my Moodle to a version that could support VPL3.1. On the MAC I installed MAMP which comes with Moodle 2.7, Apache, PHP, MySQL, etc in one.

I successfully installed and configure VPL3.1 on my MAMP server but when I tried to test a Java program I received an error message saying 'PHP XMLRPC required' see below is a screenshot of the error, especially click on Run, Debug, Evaluate etc.


Please help me.



 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Testing my VPL installation
 

Hello Joel Gogwim,
The XMLRPC PHP extension is an optional part of PHP that provide functions to VPL so that it can communicate with the jail server. The plugin VPL required this extension from its first version.
I have never use MAMP but I have downloaded it (from www.mamp.info) and it seem that do not provide xmlrpc.so. I have been looking for Moodle for mac in moodle.org and I have found Moodel4Mac and MAMP that come with xmlrpc.
Download it from
https://download.moodle.org/macosx/
Note: I haven't test it (I haven't a Mac). I only download the package and check that the xmlrpc.so is there and that the php.ini activates this extension

Best regards,
Juan Carlos

 
Average of ratings: -
Picture of Joel Gogwim
Re: Testing my VPL installation
 

Hello Juan,

I appreciate your prompt response. I will explore it and give you feedback.


Thank you,

Joel

 
Average of ratings: -
Picture of Joel Gogwim
Re: Testing my VPL installation
 

Hello Juan,

Compliments of the season!

Please I am still struggling with my VPL installation. I am able to overcome the XMLRPC PHP extension problem (by reinstalling the version of MAMP  you recommended). Currently my VPL installation is fine, jail server is also running but when I test a program I received the following error message: " No execution server available: 172.16.15.13 request failed: couldn't connect to host at 172.16.15.13:443 172.16.15.13 request failed: Empty reply from server".

The 172.16.15.13 is my jail server IP address; and the vpl / moodle server IP is 172.16.15.2

My /etc/vpl/vpl-jail-system-.conf file configuration is as follow:

#JAILPATH set the jail path
JAILPATH=/jail

#MIN_PRISONER_UGID set start first user id for prisoners
MIN_PRISONER_UGID=10000

#MIN_PRISONER_UGID set the last user id for prisoners
MAX_PRISONER_UGID=20000

#MAXTIME set the maximum time for a request in seconds
MAXTIME=600

#Maximum file size in bytes
#MAXFILESIZE=64000000

#Maximum memory size in bytes
#MAXMEMORY=2000000

#Maximum number of process
#MAXPROCESSES=500

#Path to control directory. the system save here information of request in progress
#CONTROLPATH="/var/vpl-jail-

system"

#Limit the servers from we accept request
#IP or net (type A, B and C) separate with espaces
#Format IP: full dot notation. Example: 128.122.11.22
#Format net: dot notation ending with dot. Example: 10.1.
#TASK_ONLY_FROM=10.10.3.

#To serve only to one interface of your system
#INTERFACE=128.1.1.1

#Socket port number to listen for connections (http: and wssmile
#default 80
PORT=80

#Socket port number to listen for secure connections (https: and wsssmile
#default 443
SECURE_PORT=443

#URL path for task request
#act as a password, if no matches with the path of the request then it's rejected
URLPATH=moodlevpl

While the VPL configuration for the jail server on my Moodle is (i.e. Execution servers list):

http://172.16.15.13:80/moodlevpl
http://172.16.15.13:443/moodlevpl

Please kindly help me.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Testing my VPL installation
 

Hello Joel,
I will try to help you. I have some comments about your configuration:

  1. You must change your URLPATH to URLPATH=/moodlevpl
  2. You don't need to add twice your execution server to the plugin configuration. This URL is used to connect the Moodle server with your execution server. If you use the secure port you must use https. I think that you must remove http://...:443 or use only https://.../moodlevpl
  3. About the IP you are using, you must be aware of my post https://moodle.org/mod/forum/discuss.php?d=154988#p1119372 and the limitations of using of the execution server in a private network
  4. If you wish, you can upgrade your VPL execution(jail) server to the 2.1 version


Best regards


 
Average of ratings: -
Picture of Joel Gogwim
Re: Testing my VPL installation
 

Hello Juan,

I appreciates your help.

I have changed my URLPATH to URLPATH=/moodlevpl and leave only http://172.16.15.13:80/moodlevpl on my execution server setting.

The private IPs i.e. 172.16.15.13 and 172.16.15.2 I am using now are just for a test on the intranet, when it works, I will change all the IPs to public ones for Internet access.

After these changes, I run the program again and this time I got the following error message:

" No execution server available: 172.16.15.13 request failed: Empty reply from server"

Please do I missed something out again?



 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Testing my VPL installation
 

Hello Joel,
You can restart you execution (jail) server with a highest logging level. Run at command line
sudo service vpl-jail-system start -d 8

I recommend that you upgrade your execution server to the 2.1 version (this version improves the logging system)
You can see the execution details at /var/log/syslog

Best regards

 
Average of ratings: -
Picture of Joel Gogwim
Re: Testing my VPL installation
 

Hello Juan,

I have tried the sudo service vpl-jail-system start -d 8 option but I still received the same error message. I will upgrade my jail server (execution) to 2.1 as recommended. And will keep you posted.


Thank you,

Joel.

 
Average of ratings: -
Picture of Joel Gogwim
Re: Testing my VPL installation
 

Hello Juan,

I have upgraded my jail server to 2.1.0 but the daemon refuses to start; so I then created a virtual box installed Ubuntu and later installed the jail server but still the daemon could not start. I continue to receive the following error message whenever I run the command 'sudo service vpl-jail-system start'

/sbin/start-stop-daemon: unable t ostat /etc/vpl/vpl-jail-server (No such file or directory)

*Daemon not started

Kindly help me out.


Regards,

Joel.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Testing my VPL installation
 

Hello Joel,
It seems that the problem is that the daemon is not where the service script expects.
You can rerun the command [sudo ./install-vpl-sh] and reinstall the daemon. You don't need to reinstall a fresh OS, it is secure running the installation repeatedly.

Please, send me the error messages you get and the installation log file [./installation.log]

Best regards
Juan Carlos

P.D.: Replace [ ] by quotes

 
Average of ratings: -
Picture of Joel Gogwim
Re: Testing my VPL installation
 

Hi Juan,

I appreciate your patient with me. I just resumed from leave; and I am able to get my daemon running with 2.1.0 version. My problem know is how I can set the  VPL configuration for the jail server on my Moodle since my jail server is on virtualbox (i.e. the virtualbox is on the system running my moodle) with IP address of 10.0.2.15. I checked the online documentation for this but did not see something that could guide me. 

I felt almost there, please kindly help me again.

Thanks,

Joel Gogwim.


 
Average of ratings: -
Picture of Joel Gogwim
Re: Testing my VPL installation
 

Hi Juan,

I also see FIREWALL components inside the jail server 2.1. version conf file; please what is the recommended value for my situation (virtualbox)?


Best wishes,

Joel Gogwim.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Testing my VPL installation
 
Level 2 may be a good option, but you may try first using level 0. Beware that the incoming connections are filtered if you are are using NAT mode.

Best regards.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Testing my VPL installation
 
Hi Joel,
If you are using a virtual machine into your Moodle server to host the execution (jail) server, this may be the configuration you need

1) You must assign two ports different than defaults (80 and 443) for example 52000 and 52001 to your execution (jail) server (service). Change properly the configuration file of the jail server (service).

2) Your jail server ports must be accessible from outside (not only from your Moodle server). If you are using NAT in your guest machine network then you must configure port forwarding: 52000 to guest_ip:52000 and 52001 to guest_ip:52001. If you are using bridge mode then you don't need configuration.

3) Use the correct URL (eg http://moodleservername:port/path) in the general plugin configuration in the Moodle server. The machine name must be equals to the Moodler server.

4) If you are using a firewall in your host machine you must open the selected ports.


Remember that your IP 10.0.2.15 is private and not reachable from Internet.

Best regards.

Juan Carlos
 
Average of ratings: -
Picture of Aivar Annamaa
Option to disable "Edit" page
 

Hi!

I propose a new small feature for next VPL version:
Add a new option in the "Execution setting" page to hide "Edit" page from students.

The reason is Java -- it always causes problems (for example, it looks like google analytics tracking code was recently added to our Moodle setup and after that the editor in VPL "Edit" page just doesn't load anymore in Firefox)

Even better solution would be an option which switches editor from Java applet to plain textarea.

 
Average of ratings: -
Picture of Aivar Annamaa
Can I download all submissions as zip file?
 

For some reason I haven't had success with plagiarism detection part of VPL -- it just doesn't show anything to me, not even a message of "nothing found".

I would use Stanford MOSS system for this, but I haven't found a way to download all submissions of a VPL exercise as a zip file (similar to possibility for downloading files associated with Moodle's generic tasks).

Is there such a possibility? If not, then I propose this as a new feature -- it would give VPL users more confidence that they wont be stuck if something in VPL stops working.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Can I download all submissions as zip file?
 

Hello Aivar,
The reason to not show anything may be that this feature in VPL 2.0.2 only supports C, C++, Java, Ada, Scheme and Prolog. If you are using other programing language, please let me know.
Your request of download all submissions is implemented in VPL 2.0.3. We will release VPL 2.0.3 as soon as possible.
Best regards.

 
Average of ratings: -
Picture of Aivar Annamaa
Re: Can I download all submissions as zip file?
 

I'm using Python 3

 
Average of ratings: -
Picture of Edson Norberto Caceres
Re: New Virtual Programming Lab (VPL) module
 

Dear Juan

We have installed the VLP on a 2.5 Moodle. Using a student profile, when I submit a program I have got:

Compilation
virtual memory exhausted: Cannot allocate memory 
Error compiling evaluation program 

Please, can you help us with this error??

Thank you very much.

Edson

 
Average of ratings: -
Picture of Edson Norberto Caceres
Re: New Virtual Programming Lab (VPL) module
 

Dear Juan.

We increased the memory and the problem was solved.

Edson

 
Average of ratings: -
Picture of Edson Norberto Caceres
Re: New Virtual Programming Lab (VPL) module
 

Dear Juan

Using a Teacher Profile, when I try to see the "Submissions list" I got (in Portuguese)

Erro ao ler a base de dados

Outras informações sobre este erro

If I try to follow the link of the error, I go to page without further information.

Please, could you give me some directions in order to solve this???

Thank you very much.

By the way, the tool is great.

Edson

 

 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Dear Edson,
I need more information to say something about your problem, please activate the Moodle debugging mode (Site Administration> Development> Debugging), repeat the action and get a screenshot.
By the way, we are working hard in the release of the new VPL version that has been tested in Moodle 2.5 and we hope to release a RC version the next week.
Best regards.

 
Average of ratings: -
Picture of Edson Norberto Caceres
Re: New Virtual Programming Lab (VPL) module
 

Dear Juan

Attached the file with errors (in debugging mode).

Thank you for your attention.

Amplexos

Edson


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Edson,

thank you very much for your information. This seems like a strange error since I have not been able to repeat it. The problem seems to be the use of a parameter of the function get_users_by_capability of Moodle and PostgreSQL. Actually the parameter is expendable. Unless you want to wait for the release of VPL 2.0.3 you can modify the line 201 of the file views/submissionslist.php of VPL 2.0.2, changing

$currentgroup, implode (',', array_keys ($graders)));

by

$currentgroup);

Best regards.

 
Average of ratings: -
Picture of Edson Norberto Caceres
Re: New Virtual Programming Lab (VPL) module
 

We will (try to) change the line. As soon we do it I will post what happened. When the new release was ok, we will install it.

Thank you very much for your answer.

Amplexos

Edson

 
Average of ratings: -
Picture of Edson Norberto Caceres
Re: New Virtual Programming Lab (VPL) module
 

We changed the line and we got a new error. Attached the debugging log.

Thank you for your attention and patience.

Amplexos

Edson


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Edson,

after studying the issue, the conclusion I have reached is that there may be a problem with the SQL syntax used in VPL <2.0.3 and your PostgreSQL (the problem don’t affects to mySQL). The problem seems to be related with the omission of the keyword ‘AS’ in some queries.

You must wait until the publication of the new version of VPL to check if this resolve de problem.

P.S.: But if my guess is correct this issue with PostgreSQL may be present in other parts of Moodle not related with VPL.

 
Average of ratings: -
Picture of Edson Norberto Caceres
Re: New Virtual Programming Lab (VPL) module
 

Thank you Juan

We are waiting the new release.

Amplexos

Edson

 
Average of ratings: -
Picture of S Moodle
Re: New Virtual Programming Lab (VPL) module
Group Particularly helpful Moodlers

I would love to have VPL work like Stanford's CodingBat

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Jeremy,

Thanks for the information about Stanford's CodingBat.
VPL is a flexible tool and useful for many uses. If you want to get activities similar to those of CodingBat with VPL, for example: an activity that asks for the sum of two integers, follow these steps:
1) Add a new VPL activity and write there the problem description.
2) Go to “VPL administration>Requested files” and add the file Sum2.java
3) Edit and write the following code in Sum2.java
-----------------------
public class Sum2 {
     public static int sum2 (int a, int b) {
           / / Add here your solution
     }
}
-------------------------
This will be the initial content file for the student
4) Go to “VPL administration> Advanced settings > Execution files” and add a file called LoadSum2.java
5) Edit and write the following code in LoadSum2.java
import java.util.Scanner;
public class LoadSum2 {
    public static void main (String [] args) {
        Scanner input = new Scanner (System.in) ;
        int a = input.nextInt ();
        int b = input.nextInt ();
        System.out.println (Sum2.sum2 (a, b));
    }
}
This code will pass test cases to the student’s code.
6) Go to “VPL administration> Test cases” and write as example two cases:
Case  = Case 1
input = 1 2
output = 3
Case = Case 2
input = 5  -1
output = 4
7) Finally, go to the “VPL administration> Execution options” and set Run and Evaluate to Yes.

Now you have a VPL activity with functionalities similar to CodingBat.

I don’t know if these steps are too complex but once you do one of these activities it is easy to do a lot of them.
Best regards.


 
Average of ratings: -
Picture of Jean Martina
Re: New Virtual Programming Lab (VPL) module
 

How can I use packages in the VPLs? 

I have students using some jar files in their code. I tried to add them as execution files but no luck.

I am also having problems to define packages and use the packages defined in other .java file in VPL. Any idea on how to sort this out?

 

Jean

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Jean,

At this moment the editor and the upload file process (submissions) can’t handle folders or binary files. These are known problems but there are workaround for both:

1)    To place package files in the correct folder for Java you may customize the corresponding scripts (see example attached).

2)    To send binary files to the jail servers you may encode the files to base64 and add the “.b64” extension to its names. The default script will search and decode the files “.b64”.

I attach an example script for the compilation of a Java package in source format

Best regards.

 
Average of ratings: -
Picture of Jean Martina
Re: New Virtual Programming Lab (VPL) module
 

Just to give back! This is doing the packages for me. Not the best code but does it.

 

IFS=$'\n'

for i in `grep package *.java` ; do

FILE=`echo $i | cut -d: -f1`
PACKAGE=`echo $i | cut -d: -f2| cut -d" " -f2 | cut -d";" -f 1 | sed 's/\./\//g'`
mkdir -p $PACKAGE
mv $FILE $PACKAGE
done
IFS=""

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

I assume your goal is to move java files into proper directories according to their package. This looks like good solution, but if you don't care about location of *.java files themselves but only about location of compiled class files, then you can do it also with javac -d option.

Following command compiles all java files in current directory so that each class file ends up in proper directory under current directory:

javac -d .  *.java

I've tried it with Java 7 and Java 8.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Release of VPL 2.0.3
 

The VPL development team is proud to announce the public release of VPL 2.0.3RC. This new version is compatible with Moodle 2.3, 2.4 and 2.5, incorporates new features and fixes some minors errors of VPL 2.0. This release candidate version will be the final release of 2.0.3 if no significant error emerges within the next 3 weeks (please report any issue you find).
You can download this new version from the VPL site Download page.
The bug fixes and new features are the followings:

  • VPL now strictly follows hidden/show grade as set in gradebook
  • "Activity Description" shows relevant settings to teachers
  • "activity description" shows execution files to teachers
  • At similarity page, teachers can get all the students’ submissions in a zip file.
  • At grade page, teachers can “Copy” current submission to its work area. This allows modifying and testing student’s submissions easily.
  • Add syntax highlighting for Scala language (1)
  • Add similarity checks for Scala and Python languages (1)
  • Fix and improve syntax highlighting of Matlab
  • Fix syntax highlighting of scheme
  • Add code to run/debug/evaluate default scripts to decode of base64 (b64) files. This is an easy way to send binary files to jail servers.
  • Add the German translation (1)
  • Update the Catalan translation (2)
  • Update the Japanese translation (3)
  • Fix group work check for managers to allow editing and uploading work group submissions.


(1) Thanks to Lang Michael, Lückl Bernd and Lang Johannes
(2) Thanks to Antonio Piedras Morente
(3) Thanks to Imaizumi Takashi

This new version of VPL is accompanied by the release of AcodeEditor 1.3. AcodeEditor is the applet that let edit the code and run the programs in a text console. The bug fixes and new features that came with this new version are the followings:

  • Add syntax highlighting for Scala language (1)
  • Update Java reserved words
  • Fix minor errors in test cases syntax highlighting
  • Fix Matlab Strings syntax highlighting
  • Fix auto remove spaces
  • Fix cut operation
  • Deactivate Drag and Drop when in restricted mode
  • Released under GPL 3


IMPORTANT NOTICE: Due to the security issues emerged in the last two years in the Java Applet technology, the behavior of Java browser plug-in has changed trying to avoid the execution of malicious Java code. These changes require (for a smooth operation) that you keep updated Java to the last version. Any way, you can review and compile the ACodeEditor source code.

 
Average of ratings: -
Picture of Edson Norberto Caceres
Re: Release of VPL 2.0.3
 

Dear Juan

We have done the upgrade and still we got an error. Bellow the log.

Thank you for your help.

Sincerely

Edson


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 2.0.3
 

Hi Edson,
Thanks for your bug report. Again the problem seems to be due to PostgreSQL syntax restrictions. Please, check the final 2.0.3 version, now available. This version address the reported problem.

Best regards.

 
Average of ratings: -
Picture of Edson Norberto Caceres
Re: Release of VPL 2.0.3
 

Hi Juan.

We still got an error when using submission list and similarity.

The others options work fine.

Amplexos

Edson


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 2.0.3
 

Thanks Edson for your bug report.
Best regards

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Release of VPL 2.0.3
 

The final 2.0.3 version is now available. This version fix some problems found in the RC version and add the translation to Estonian. It is highly recommended to update to the new version.

 
Average of ratings: -
Picture of Pragati Dhingra
Unable to run Java programs
 

Hello Juan,

Great contribution. VPL seems to be just the right tool to teach programming.

I am trying to configure VPL 2.0.3 to run Java programs but have not been successful.

Jail server is Ubuntu 12.04. I am able to execute small C programs, so I am assuming that setup is correct.

Here is the vpl_run.sh file that I have configured for Java VPL

   1 #!/bin/bash
    2 
    3 #load VPL environment vars
    4 . vpl_environment.sh
    5 #reset LC_ALL
    6 export LC_ALL=en_US.utf8
    7 #Set path to JDK
    8 PATH=$PATH:/usr/lib/jvm/java-1.6.0-openjdk-amd64/bin
    9 #compile
   10 echo "The first file/class must have the Main method"
   11 javac -J-Xmx512m *.java
   12 NAME=$(basename $VPL_SUBFILE0 .java)
   13 if [ -f $NAME.class ] ; then
   14 echo "#!/bin/bash" >> vpl_execution
   15 echo "export LC_ALL=en_US.utf8" >> vpl_execution
   16 echo "PATH=\$PATH:/usr/lib/jvm/java-1.6.0-openjdk-amd64/bin" >> vpl_execution
   17 echo "java -Xmx512M -enableassertions $NAME" >> vpl_execution
   18 chmod +x vpl_execution
   19 else
   20 echo "No compiled or error in file name"
   21 fi

This is the same file as what you recommended with just higher memory allocations.

However, this is the output I get when I submit a solution

Reviewed on Sunday, 11 August 2013, 7:42 AM by Automatic grade
Grade 0 / 100
Assessment report
[-]The compilation or preparation of execution has failed
The first file/class must have the Main method 
Error occurred during initialization of VM 
Could not reserve enough space for object heap 
Could not create the Java virtual machine. 
No compiled or error in file name

Jail server has 4 GB RAM and has enough free memory.

What am I missing? Also, can you please tell the location of default execution files.

Thanks!
Pragati
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Unable to run Java programs
 

Hi Pragati,
Your shell script seems to be correct, the problem is due to the  reserve of 512Mb of memory for the Java heap. If you set this memory for the heap then you will need a memory limit great than 512M (the execution of the Java VM needs much more). You should be aware that if you do not specify a value for the limit of memory to use in an activity, it takes the default value set in the global configuration of the module (Home ► Site administration ► Plugins ► Activity modules ► Virtual programming lab)
(the default value is 256MiB) .
The default scripts for all programming languages ​​are located under /vpl/jail/default_scripts
The default script for Java uses a heap of 16M
I add the default script to run Java programs (VPL 2.0.3).
If you need an specific script due to your Jail servers configuration then you can change your default script. If you need an specific script due to your activity, but you plan to use this script in other activities then you can try using the feature "based on".
Best regards
Juan Carlos

 
Average of ratings: -
Picture of Pragati Dhingra
Re: Unable to run Java programs
 

Apologies for delayed reply.

I am still struggling to get this running. If I use the default value or any value up to 180m, I get insufficient memory error

Comments The compilation or preparation of execution has failed # # There is insufficient memory for the Java Runtime Environment to continue. # pthread_getattr_np # An error report file with more information is saved as: # /home/p13490/hs_err_pid2714.log ./vpl_run.sh: line 18: 2714 Aborted (core dumped) javac -J-Xmx180m -Xlint:deprecation *.java Not compiled

 

and for 190m or greater, I get this

Comments The compilation or preparation of execution has failed Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. Not compiled

 

I used the same script as what you attached in your previous post and only updated the memory parameter on line 18

There is ample free memory (>3GB). Here is a current snapshot using top

KiB Mem:   4099148 total,   340096 used,  3759052 free,     7844 buffers
KiB Swap:  1999996 total,        0 used,  1999996 free,   158476 cached

I am not sure what else I should be trying.

 
Average of ratings: -
Picture of Pragati Dhingra
Re: Unable to run Java programs
 

It finally worked. It seems that VPL does not like 64 bit jail servers.

I created a new Ubuntu 32 bit jail server and it worked just fine.

I had another question though. Jail server uses Java 6 by default and I want to use features of Java 7. If I just install Java 7 would it work out fine or are there some other configurations that I should update?

 
Average of ratings: -
Picture of Pragati Dhingra
Re: Unable to run Java programs
 

I modified the install-sh file to install openjdk-7 instead of openjdk-6 and everything worked out fine.

I love VPL. smile

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Unable to run Java programs
 

Apologies for delayed reply.

I have not tested Java7 in a jail server and  I don't know if it has problems.
I you test it, please tell us your experience.
Best regards.

 
Average of ratings: -
Picture of Pragati Dhingra
Re: Unable to run Java programs
 

I am able to use Java 7 features fine. I haven't rolled out VPL to students yet. Will get to know more as it gets tested extensively. I shall keep you posted.

 
Average of ratings: -
Picture of saranya balaji
Re: New Virtual Programming Lab (VPL) module
 

The jail need to install "javac" to run this type of program

For PHP , The jail need to install "php5" to run this type of program

When i try to run the java, php programs in VPL its shows the above error message.

I installed the VPL Jail 1.2 Version. I installed successfully and no problem in jail server. Its running fine.

If i try to execute some programs like java, php . I got the Compilation error. In my server java, PHP5 are installed. I am able to run java/php without any problem.

I am using CentOS 6.3 , VPL Jail Server 1.2.

Thanks in advance,

Saranya.

 

 

 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Saranya,

First at all, I must say that I haven't tested VPL in CentOS 6.3. These messages are generated by the default run script that don't find the java compiler (javac) and the php5 interpreter in your CentOS 6.3.

The problems may be different for java than for PHP.

The default script for PHP tries to call to "php5" that for your system may be "php"

If you are sure that you have installed the java JDK and the php-cli, try writing your own "run_vpl.sh" script for a test activity in “execution files” configuration page. You can start with the "java_run.sh" I attach in a post in this thread a few months ago. Try removing the “check_programs” lines.

After you find the correct script for your installation you can replace the default script in your Moodle server that is located in .../mod/vpl/jail/default_scripts and please post your solution here.

Best regards

 
Average of ratings: -
Picture of saranya balaji
Re: New Virtual Programming Lab (VPL) module
 

Hi Juan Carlos,

We tried writing the own scripts in the CentOS 6.3 but we couldn't find the solution. So we moved to ubuntu 12.0.4 (64-bit) . In the ubuntu(64-bit) machine, the default JavaSDK(64-bit) which is installed by jail server cause the "insufficient memory " error which can be resolved by installation of JavaSDK(32-bit).

 

Thanks,

Saranya.

 

 

 
Average of ratings: -
Picture of Andrius Lauraitis
Re: New Virtual Programming Lab (VPL) module
 

Hello everybody,

Is it possible to execute a C++ program like this ( i want to write some information to an external file):

#include <iostream>
#include <fstream>
using namespace std;

const char fdr[] = "rez.txt";

int main()
{
ofstream fr(fdr);
int a,b;
cin >> a;
cin >> b;
int suma = a + b;
fr << "Suma nauja" << suma * suma << endl;
fr.close();
return 0;
}

I can create the file rez.txt in the editor however when i run the program the file "rez.txt" stays empty. Is it possible to do this with VPL?


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Andrius,
You can write information to an external file, but after the execution of your program, all the files are wiped out. The files you create in the editor are sent to the jail server to be part of the execution environment but never are retrieved.
At this moment VPL can't retrieve files from an execution in a jail server. The nearest feature to what do you want is this: After running your program with the evaluation option, the output (standard output and standard error) of the evaluation program is retrieve as the evaluation result. The last evaluation result is saved with the submitted files.
Also, you can write an evaluation program to process the file content and generate an appropriate output.

Best regards

 
Average of ratings: -
Picture of Carl LeBlond
Re: New Virtual Programming Lab (VPL) module
 

I almost have this working.  I have the following in vpl_run.sh and vpl_evalute.sh

    1 #!/bin/bash
    2 echo  "#!/bin/bash" > vpl_execution
    3 cat vpl_environment.sh >> vpl_execution
    4 echo "php5 -n -f \$VPL_SUBFILE0" >> vpl_execution
    5 chmod +x vpl_execution

When I click "evaluate" it seems to run fine, giving me the correct output.  However when I click "Run" a terminal pops up with following message in title bar.

Console 1 -  Connecting (www.mydomain.com:51143).....Connection refused.Then after a few seconds a popup shows this

Console connection timeout
-----------------------
Console output pending:
Hello World

 

I have iptables setup correct on my moodle I think with iptables -L giving

Chain cP-Firewall-1-INPUT (2 references)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:imaps
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:tpcsrvr
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:infowave
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:tsrmagt
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:26
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:webcache
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:imap
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:pop3s
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:pop3
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:smtp
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:gnunet
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:eli
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:nbx-ser
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:urd
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:nbx-dir
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:mysql
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:radsec
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpts:51001:51500

My moodle server is on a VPS (centos 6.4) and I asked them if there was anything with the kvm i should consider and they said no.  My jail sever is ubuntu 12.04.  Seems like a problem on moodle vps config but can't figure it out?

 

 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Dear Carl,
With the information that you supply, it seems that the problem is located on the client. The execution output has reached the Moodle server from the jail, but the console on the client could not connect to the Moodle server. May be a firewall in the client?
In any case, I can inform you that the version 3.0 of VPL to be published shortly (in a few days), will solve most of the current configuration problems. VPL 3.0 eliminates the use of Java applet and eliminates the need to open ports on the Moodle server. It's full compatible with previous version at data level but also it's needed to upgrade the jail server.

Best regards

 

 
Average of ratings: -
Picture of Carl LeBlond
Re: New Virtual Programming Lab (VPL) module
 

Thanks for the help. I look forward to the 3.0 version.

Carl

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

Hopefully new version of Jail server fixes this but just in case: compiling Jail system 1.2 gave me name error in Ubuntu 13.10 (32-bit, clean as they come in Amazon EC2).

Unfortunately I didn't save the error as I was in a hurry to switch my instance to an older Ubuntu (12.04 worked fine).

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

I noticed that VPL 3.0 and Jail Server 2.0 are released. Thats a great news, I'm exited about support for submitting files in a directory structure.

I tried out the new release, but unfortunately it doesn't seem to work in Moodle 2.4.1 and 2.5.4 on Windows -- the content part of "Advanced settings" => "Execution files" page is empty. No error messages were visible, although I had debug messages settings set to DEVELOPER.

The installation of the Jail server (on Ubuntu 12.04) completed without errors (only after I installed openssl-dev), and VPL module indicated that the server is ready.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Aivar,
thanks for your bug report.

Yes, VPL 3.0 is out. This version addresses the problem of the Java applet and reduces the complexity of configuration and use of the previous version.
You are reporting 2 problems that we didn't see in the test fase. Your are reporting the need of install openssl-dev package in Ubuntu 12.04, I guess your are refering to the libssl-dev package. The vpl-jail-system installer, "install-vpl-sh", installs this package and then compiles the server deamon. The "install-vpl-sh" script is the only one you need to install the software.
I am testing now VPL with Moodle 2.5.4+ and I will say what I'll find as soon as possible.

Best regards.

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

Your're right, it was libssl-dev that I had to install.

I thought that I have to do ./configure and make before ./install-vpl-sh, so probably it would have been fine if I did only ./install-vpl-sh

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Aivar,
I have tested VPL 3.0 in a just installed Moodle 2.5.4+ and I can't reproduce the problem you report, the system works without problems. Please try to give more details of the problem.

Best regards.


 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

Here is the screenshot of the page where I was hoping to be able to upload my vpl_evaluate.sh and some test scripts:

 

I didn't install VPL 3.0 to fresh Moodle installation: there was older VPL module installed before. I uninstalled the old plugin and deleted mod/vpl folder before installing new version. Should I try this again with fresh Moodle installation?

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

Now I tried it with fresh moodle 2.5.4+ installation and the result is the same.

I'll add a screenshot from my moodle installation, so that you see what modules my PHP has installed. My PHP version is 5.3.13

 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Hello Aivar, The screenshot that you show say to me that it is not a PHP problem, it seems to be a JavaScript problem. The edition and execution system of VPL 3.0 is based in JavaScript code. I guess that you are using an updated browser. These browsers have a JavaScript console that will show the possible error. Please, go to the JavaScript console of your browser, and show us the output that you find after loading the "Execution files" page. Best regards.
 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

Thanks for the response!

I think I found the problem: there was syntax error in a PHP-generated piece of javascript and it looked like unexpanded short php tags (<?=... ?>). I had short tags disabled (it was default setting in Wamp server). When I enabled short tags, the page content appeared finally. I will continue my testing tomorrow.

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

It seems to work, thanks! The editor looks really nice, good work! smile

There is a small problem with easy workaround, but I thought that maybe you want to know about it (I noticed the same problem with older VPL as well):

if I have all "No"-s in "Execution options", then after submitting the solution by uploading the file I get following error:

Coding error detected, it must be fixed by a programmer: Invalid state passed to moodle_page::set_state. We are in state 2 and state 1 was requested.

Debug info:
Error code: codingerror
Stack trace:
  • line 841 of \lib\pagelib.php: coding_exception thrown
  • line 789 of \lib\outputrenderers.php: call to moodle_page->set_state()
  • line 296 of \mod\vpl\locallib.php: call to core_renderer->header()
  • line 84 of \mod\vpl\forms\submission.php: call to vpl_redirect()

The solution actually gets uploaded. The same error happens both in designer role and in student role.

(I think I have seen this error occasionally also when "evaluate" in "execution settings" was set to "yes", but I can't replicate it at the moment)

 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Thanks very much Aivar,
This problems will be resolved as soon as possible.
Please, don't hesitate in telling us any other problem you found.

 

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

I didn't have any memory problems when I used VPL for Python programs but I have Java memory troubles under VPL Jail 1.2 almost every time I set up a Java exercise in VPL.

Today I tried Java 8 under jail and I was not able to execute even java -version (nor java -Xmx16m -version) when VPL exercise memory limit was set to 256MB -- this gave me "Could not reserve enough space for code cache". Can it be that java process really needs more memory for this task? (I could run it with memory limit raised to 512MB.)

I was able to overcome this problem by adding -client switch to java, ie. java -client -version ran fine with 256MB.

What memory related issues should I should take into account when using VPL jail 1.2? I don't have memory limit setting in my /etc/vpl/vpl-xmlrpc-jail.conf. Should I add one in order to override the default setting? What is the default?

 

 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Aivar,

this problem with Java in VPL Jail 1.2 made us change completely the way we limit the use of memory in VPL jail 2.0.

The VPL Jail 1.2 limits the virtual memory of users’ processes (but the virtual memory is not really the memory that the process is using). Java tend to use a large amount of virtual memory, in 64 bits systems Java maps easily more than 2Gb, in 32 bits systems the size of virtual memory that Java needs can be superior to 256Mb. Running java (OpenJDK7 32bit) with your suggested command line option (-client) seems to use around 65MB less virtual memory than without it.

 

We think that it will be better switch to VPL 3.0 + jail2.0 as soon as possible.

 

By default, the memory limit in jail 1.2 is INT_MAX. Add a memory limit in your jail server 1.2 configuration will not change the problem.

 

Best regards

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

Thank you for the response!

OK, I will ask our server admin to upgrade VPL soon.

Is it safe to run jail2.0 and jail1.2 together in the same system? This way I could first test the VPL 3.0 in our official test-Moodle.

 

 

BTW: the VPL 3.0 announcement says "Can be used directories on the required files, execution files or the files submitted by students" -- what does it actually mean? Can students upload files in a directory structure? Should it be zipped? I tried uploading a zip file but it looks like the system treated it as a text file.

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

One more thing -- when I test-installed Jail 2.0 then it installed a lot of GUI-related packages. Can this be avoided? I'm using VPL only for evaluation of students' work and I don't see how I can use GUI programs for that.

Still, it would be interesting to know how do you use VPL's Run and Debug features in teaching. Are these meant only for saving students the hassle of installing necessary stuff on their computers? Do your students actually develop their solutions in the browser?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

I will try to answer all your questions:
1) “Is it safe to run jail2.0 and jail1.2 together in the same system?” During the development of jail 2.0 we never consider this scenery. It may be possible, but I think it requires a lot of work.
2) "Can be used directories on the required files, execution files or the files submitted by students" what does it actually mean?
The module and the jail server are ready to use files in a directory structure but in this first feature release, this is only possible at the editor. You can't upload files to a directory without the editor.
3) "... installed a lot of GUI-related packages. Can this be avoided?"
The new jail server can run programs with GUI. If you don't use it you can remove it from your jail server, but I think that freeing 1 GB of disk space don't pay the work.
4) "... Are these meant only for saving students the hassle of installing necessary stuff on their computers?"
In general our students are free to use any IDE, but in the first contact they may prefer an easy to use development tool with few options (save/run/debug/evaluate). They also can work in any PC with a browser and get the bonus of using the evaluation feature. On the other hand they lost the autocomplete features and a good debugger of an IDE.
On the other hand, if the student use the editor, the teacher can get a better picture of the students' work (the system keeps previous submissions). The teacher can easily answer questions about a student work without the need of download or run any code in their machine. The teacher can also run easily GUI works as part of the evaluation.
We also use the system to do exams under controlled conditions, in these cases the use of the editor is required.

In short, many students and teachers use the editor when the job is small or even medium, but this is not commonly mandatory.


Best regards

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

Thank you for your thorough answer!

I agree that often the installation of tools can be too frustrating and sometimes the tools themselves are also frustrating smile

But still, more experienced students do love their IDE-s. Have you considered adding a web API to VPL? This way one could integrate other tools with VPL, eg. there could be an Eclipse plugin for submitting code directly from Eclipse. I've heard that a Finnish company has tried something like that (http://viope.com/en/schools/news/viope-eclipse-plugin-2013.html).

Currently I'm working on a Python IDE for beginners (https://bitbucket.org/aivarannamaa/thonny). In the future this IDE will be able to talk with our own home baked interactive web-textbook:

  1. The student logs into the textbook and clicks a special link next to an exercise
  2. the server responds with a python file containing a submission URL together with a token generated for identifying this student and this exercise
  3. the file gets opened in Thonny IDE (alternatively the student just copy-pastes the url+token from the textbook)
  4. the student writes the solution and presses the submit button in the IDE (no login needed here, the token is used for authentication)
  5. server checks the solution (possibly inside VPL jail, if I'm able to decipher the protocol) and sends the response to IDE, which shows it to the student
  6. (if necessary, the student goes back to point 4)

I think the same scheme could work also when you substitute textbook with VPL and Thonny IDE with Eclipse. I could contribute to creating the Eclipse plugin, if necessary.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Aivar,


I had not thought of adding a web API to VPL, but your question made ​​me reconsider it. If someone is interested in developing a plugin for Eclipse that interacts with VPL, I will develop the web API. The idea is not new, but the offer to develop the plugin, yes. Also, this is an appropriate time because at present the web API can be developed with little effort.

Best Regards

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

OK, I could start working on the Eclipse submission plugin in the end of June and hopefully complete the first version before August. Unfortunately I can't promise anything earlier. If this is OK with you then we have a deal smile

 

(About VPL 3.0.1 -- I sent the code to our admin and hopefully I can tell you tomorrow, whether it fixed the problems.)

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

This is OK for me, we have a deal. smile smile

I promise to have the Web service API in May.

Best regards

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Thank you, the upgrade went fine!

There are two small issues remaining: although I set up the plugin to use http, when I press "Evaluate" in the editor, it tries to connect to "https://<my-jail-server>/OK" and because of self signed certificate it creates this warning and requires accepting the certificate. Is there a way to avoid this?

This is NOT a issue, it is a feature. No matter what type conection you use from Moodel server to jail server (http or https), if you connect your browser to your Moodle server ussing https then the browser MUST connect to the jail server using wss. This is not a VPL elecction is a browser requisite, almost all browser reject to mix https (secure http) with ws (plain websocket), only Chrome accept this mix.

In any way, we think that its better to use https and wss with self-signed certificates than clear text. 

(Unfortunately I don't know much about network stuff, so I'd be grateful if you could recommend me a tutorial or guide for changing the certificate, if that's what is needed).

To avoid this you must get a certificate signed by a trusted CA. Also, you can easy customize your self-signed certificates. Take a look to the installation script 'install-vpl-sh', change the certificate information and run the script again (it is safe to run it several times) but before remove the key and certificate files "/etc/vpl/*.pem". This will regenerate customized certificates, but this will not avoid the request of accepting self signed certificate.


What are the possibilities for formatting the evaluator feedback? When I look at the output of built-in, IO based evaluator, it looks like there is some special markup used that allows to create headings or smth like that. Is this documented somewhere?

No, but I write it here.

Grade comment (automatic or manual) format

Lines starting with "-" are titles. The title may end with "(grade)". Example:- Error bla bla (-2)
Students don't see this discount. The grade (negative value = discount) is used by the button "calculate" in grade page.
Lines starting with > is shown as preformated text.
filename:linenumber generate hyperlink.

 


Thanks for your work again!

Aivar
(You can reply to forum, if you think this may be useful for others as well)

Best regards

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

Thank you for the answer!

Actually, it turned out that the problem with accepting the certificate was my smaller problem. The main problem, that I discovered only now, is that as my jail-server is behind the firewall, the students can't access the evaluation feature outside our local network.

Is the browser connecting to jail-server only for checking whether the service is available, or does it perform the whole evaluation protocol directly with jail-server? I assumed that the "Evaluate" button delegates communication with the jail to Moodle server, am I wrong about this?

In conclusion, are there any ways to leave the jail-server behind the firewall and at the same time allow students to access evaluation feature outside of local network?

best regards,
Aivar

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

I'm sorry Aivar,
but the current version of VPL require that the browser connects to the execution/jail server to monitor the process. The previous VPL versions kept the connection from the Moodle server to the execution server with a high resource use.
In VPL 3 all the execution/jail servers must be reachable from internet behind or not of a firewall. Only the service ports (http/ws and https/wss) of the servers need to be reachable.
If you want, also you can revert the upgrade, there is no difference on data used.

Best regards.

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

I think I'm able to convince the admin to open the required ports for the outside world. Until then I can use a small server outside our network. I don't want to give up the new editor smile

 
Average of ratings: -
Picture of Aivar Annamaa
Re: New Virtual Programming Lab (VPL) module
 

I discovered a small problem:

Indentations in preformated feedback text doesn't show on editor page. They do show in submission view page.

Eg. When I output

<|--
-+ test8_Combination
Tried with following input program:

>if n > 100 then {
>    print("big!")
>} else {
>    print("small!!")
>};
OK: your grammar accepts this. --|>

then the indentations are shown on submission view but not on editor page.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Aivar,
yes, this a known issue that has been resolved in the working 3.1 version available in GitHub. This problem is due to a trim of the lines processes that is not needed (line 530 of VPLIDE.js).
=====================================
- return $JQVPL.trim(s.replace(/&/g, "&amp;").replace(/</g, "&lt;")
- .replace(/>/g, "&gt;"));
+ return s.replace(/&/g, "&amp;").replace(/</g, "&lt;")
+ .replace(/>/g, "&gt;");
=====================================
Best regards

 

 
Average of ratings: -
Picture of Antonio Lepore
Re: New Virtual Programming Lab (VPL) module
 

Hi, I've started using moodle for my final work at university. I installed vpl in moodle ad admin but i can't understand how users can use it, f.e. how teacher can create quiz for student.

Thanks.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Dear Antonio,
your question is too general for give a simple answer. The VPL activities act similar to the Moodle task, I do a "copy" and "paste" here of part of the general documentation.
-----------------
Creating a simple activity

Follow these steps:
Create a VPL activity
Set the name of the activity and its description
Set the deadline
Set the maximum number of files that every student can upload
Set the maximum score to get
Save the new activity
Go to options and set the execution actions (run/debug/evaluate) that the student can do
It is desirable to set, in "Required Files", the names of the files that the student must submit.
-----------------

Best regards

 
Average of ratings: -
Picture of Antonio Lepore
Re: New Virtual Programming Lab (VPL) module
 
Thanks for your answer but i have another question. Can I made a quiz with authomatic evaluation? And if I can, how?
F.e.
I give  text to students, they make their own program and then system give me an authomatic evaluation of their test.
Thank you!
 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: New Virtual Programming Lab (VPL) module
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

For automated grading of computer programs, https://github.com/trampgeek/CodeRunner is another Moodle add-on that you might want to look at. (It is a question type.)

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Antonio,
You can find more information about automatic evaluation in VPL at the following links:

http://vpl.dis.ulpgc.es/index.php/en/documentation/76-general-documentation
Section "Creating automated tests"
and
http://vpl.dis.ulpgc.es/index.php/en/documentation/58-automatic-evaluation-of-students-submissions

Best regards

 
Average of ratings: -
Picture of Dominique Thiebaut
Having problem creating user vpl_evaluate.sh script
 

Dear Ruan Carlos,

First, thanks for putting together such a useful and sophisticated module for Moodle.

I teach computer science and am interested in setting VPL up for my class next semester.  

I have setup two virtual servers, one running LAMP+Moodle+VPL module, the other one running the vpl-jail-system.

It took me a while, but everything seems to run fine.   I have a simply python 3 program called test2.py that I am currently using as test:

x = float( input( "> " ) )
y = float( input( "> " ) ) 
print( min( x, y ) ) 

And I have a vpl_evaluate.cases file to test it:

case = Test 2a
input = 3
5
output = 3.0
case = Test 2b
input = 3
3
output = 3.0
case = Test 2c
input = 1000
-1000
output = -1000.0


When I run or evaluate the script with the default vpl_run.sh and vpl_evaluate.sh, i.e. without specifying them, I get the console, and I can enter 2 numbers and get the smallest one back, and the evaluate gives me a "0/3 tests fail" which is good.

When I create my own vpl_run.sh script, it also works fine and runs the program in the console.

#! /bin/bash
echo "#! /bin/bash"     > vpl_execution
echo python3.4 test2.py          >> vpl_execution
chmod a+x vpl_execution
However, trying to set the vpl_evaluate.sh script to the code above makes the system hang.
A 1-line window opens up and starts showing a counter showing seconds elapsing: "Evaluating: 3 seg", then 4 seg, 5 seg, etc.

When I look at the vpl-jail-server, I see that a new directory is created

jail/home/p15913# ls -l
total 16
-rwx------ 1 15913 15913 1559 Jun  7 21:28 common_script.sh
-rw------- 1 15913 15913   77 Jun  7 21:28 test2.py
-rwx------ 1 15913 15913  360 Jun  7 21:28 vpl_environment.sh
-rwxr-xr-x 1 15913 15913   32 Jun  7 21:28 vpl_execution
but it seems that vpl_evaluate.sh or vpl_evaluate.cases does not get created there.

I've been tweaking many different things, but I'm not finding out what the problem is.  It looks like my vpl_evaluate.sh is missing something.

Is there something obvious I'm missing?

Many thanks for any info/feedback you could share.

Dominique




 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Having problem creating user vpl_evaluate.sh script
 

Hello Dominique,
Thank for the clear exposition of your problem.
All types of executions (run/debug/evaluate) take two stages: The first generates vpl_execution or vpl_wexecution, the second executes vpl_?execution. But before start the second, the system remove all the execution files (vpl_evaluate.sh, vpl_evaluate.cases, etc.) that you set in  "ADVANCED SETTINGS  ► EXECUTION FILES".
Your 'ls' may be showing that you are in the second stage.
You can go to " ADVANCED SETTINGS /  FILES TO KEEP WHEN RUNNING" and set the files that you miss as to be kept. Also  you can rename the files in vpl_evaluation.sh and the system will not be able to delete them.

Best regards


 
Average of ratings: -
Picture of Dominique Thiebaut
Re: Having problem creating user vpl_evaluate.sh script
 

Thanks for the quick response, Juan Carlos.

Unfortunately, setting the files to keep to all the vpl_run/evaluate/cases does not solve my problem.

However, I discovered that I get an error on the jail server when I attempt to use my own vpl_evaluate.sh:

ERROR: apport (pid 8308) Tue Jun 10 10:16:51 2014: Unhandled exception:
Traceback (most recent call last):
  File "/usr/share/apport/apport", line 298, in <module>
    cwd = os.readlink('/proc/' + pid + '/cwd')
FileNotFoundError: [Errno 2] No such file or directory: '/proc/8307/cwd'
ERROR: apport (pid 8308) Tue Jun 10 10:16:51 2014: pid: 8308, uid: 0, gid: 0, euid: 0, egid: 0
ERROR: apport (pid 8308) Tue Jun 10 10:16:51 2014: environment: environ({})
ERROR: apport (pid 8310) Tue Jun 10 10:16:51 2014: another apport instance is already running, aborting
Apport is a tool that apparently gathers crash information, and I imagine the vpl_jail system is making use of it.   Here it looks like I have two such instances running at the same time.
Any suggestion for fixing this?
Thanks again,

Dominique
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Having problem creating user vpl_evaluate.sh script
 

Hi Dominique,
the error you show is not due to VPL and I don't know the reason of the problem. Nevertheless, I found that apport is logging a normal action in vpl-jail-server as an error. This is my fault I wrote a call to abort() instead of exit(). This problem (the logging) of apport will be solved in vpl-jail-server 2.0.2.

Returning to your question, I think that the better way to help you to resolve your problem with vpl_evaluation.sh is that you show the details of the activity you are developing.
A backup file with the activity migth be great! if you are using "based on" don't forget to also add this activity

Best regards.
Juan Carlos

 
Average of ratings: -
Picture of Dominique Thiebaut
Re: Having problem creating user vpl_evaluate.sh script
 

Sure, here's a description of the activity:

Test Python 1

Due date: Sunday, 31 August 2014, 8:00 PM
Requested files: test1.py (Download)
Type of work: Individual work
Grade settings: Maximum grade: 100
Run: Yes Evaluate: Yes
Automatic grade: Yes

This is the second trial...

Execution files

vpl_run.sh

    1 #! /bin/bash
    2 echo "#! /bin/bash" > vpl_execution
    3 echo "python3.4 test1.py" >> vpl_execution
    4 chmod a+x vpl_execution
    5 

vpl_debug.sh

vpl_evaluate.sh

    1 #! /bin/bash
    2 echo "#! /bin/bash" > vpl_execution
    3 echo "python3.4 test1.py" >> vpl_execution
    4 chmod a+x vpl_execution
    5 

vpl_evaluate.cases

    1 Case = Test 1
    2 output = "Hello World!
    3 "
    4 



When I test the activity in the VPL administration module, I go to Edit and enter this simple code:

print( "Hello World!" )

which I save.  I click on Run and get the correct output in the console.  

Now, for some reason I don't understand, when I click on Evaluate, I do not get the counter shown seconds elapsing (I haven't changed anything in my setup), but instead I get the output of the program but no evaluation of its output and no grade.


Moodle VPL Evaluate Window


I am forging ahead and learning how to setup VPL activities without having a custom vpl_evaluate.sh file, but I imagine that I will need to do so in the future, so any help on this would be much appreciated.

By the way, I am documenting my progress and putting sample VPL activities on my wiki, mostly so that I can remember how to set this up when the time comes next semester.  Others  may find them useful too:  http://cs.smith.edu/dftwiki/index.php/Tutorials


Thanks again for the superb tool and support!

Dominique

 
Average of ratings: -
Picture of Dominique Thiebaut
Re: Having problem creating user vpl_evaluate.sh script
 

Ah!  I did find what I think is the problem.   I just created a new VPL activity and created my own vpl_evaluate.sh, which is now stuck running and counting seconds as I originally described in my first post.

When I look on the jail server, I see that the files tested are located in /jail/home/p19526:

root@VPLServer:/jail/home/p19526# ls -l
total 32
-rwx------ 1 19526 19526 1559 Jun 11 10:23 common_script.sh
-rw------- 1 19526 19526  233 Jun 11 10:23 gremlin.py
-rw------- 1 19526 19526   97 Jun 11 10:23 sample.txt
-rwx------ 1 19526 19526  408 Jun 11 10:23 vpl_environment.sh
-rw------- 1 19526 19526  175 Jun 11 10:23 vpl_evaluate.cases
-rwx------ 1 19526 19526  162 Jun 11 10:23 vpl_evaluate.sh
-rwxr-xr-x 1 19526 19526   49 Jun 11 10:23 vpl_execution
-rwx------ 1 19526 19526  162 Jun 11 10:23 vpl_run.sh

However, when I check the vpl-related processes running, I see this:

root@VPLServer:/jail/home/p19526# ps auxw | grep vpl
root      2242  0.0  0.0  23520  1000 ?        S    Jun04   5:01 /etc/vpl/vpl-jail-server
root     22910  0.6  0.0  32232  1856 ?        S    10:23   0:00 /etc/vpl/vpl-jail-server
19526    22911  0.0  0.0      0     0 ?        Zs   10:23   0:00 [vpl_evaluate.sh] <defunct>
19526    22913  0.0  0.0  17960  1436 pts/3    Ss+  10:23   0:00 /bin/bash /home/p19526/vpl_execution
root     22915  1.0  0.0  23912  1724 ?        S    10:23   0:01 /etc/vpl/vpl-jail-server
root     22963  0.0  0.0  11744   924 pts/0    S+   10:25   0:00 grep --color=auto vpl

Note that the vpl_execution file was executed from "/home/p19526/", which does not exist.  It should have been "/jail/home/p19526"...

I will try to figure out where/how this setting can be modified...

Dominique


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Having problem creating user vpl_evaluate.sh script
 

The ps output is normal. Due to chroot, the path

/home/p19526/vpl_execution

is correct.


Best regards


 
Average of ratings:Useful (1)
Picture of Afzaal Shabbir
Re: Having problem creating user vpl_evaluate.sh script
 

Hi Juan,

i have a totally unrelated question, is it possible to install Moodle+VPL PLugin + Jail service install in one virtual machine?

i need to give this logic to one of our client who is unable to understand why we need to have two machines dedicated to moodle.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Having problem creating user vpl_evaluate.sh script
 

Yes, it's possible, but not recommended. The load of execution in the jail server can interfere in the execution of Moodle. The security is another problem that can arise.

If you have enough hardware assigned to the moodle server you can install Virtualbox in your virtual machine (yes, a virtual machine into a virtual machine) and install there the jail server.

You must be aware of three things:

1) Your jail server (service) must have assigned two ports differents than defaults (80 and 443) for example 52000 and 52001. Change properly the configuration file.

2) Your jail server ports must be accessible from internet (not only from your Moodle server). You can use NAT port forwarding if using in VirtualBox

3) Use the correct URL (eg http://servername:port/path) in the general plugin configuration in the Moodle server


Best regards

Juan Carlos

 
Average of ratings: -
Picture of Afzaal Shabbir
Re: Having problem creating user vpl_evaluate.sh script
 

Thank you very much for detailed response. really appreciate your help.

Cheers,

A

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Having problem creating user vpl_evaluate.sh script
 

Hi Dominique,
Thanks for your tutorial, any help is appreciated.

Again your clear report of the issue makes me to point out the problem easily.

The problem is that vpl_evaluation.sh is the script to generate the program/script that evaluates the student's program and NOT the student's program that is going to be evaluated.

The default vpl_evaluate.sh uses the result of vpl_run.sh (vpl_execute) as the program to be evaluated.
Notice that the output of the execution of vpl_execute, generated by vpl_evaluate.sh, is the result of the evaluation. You can see the format of the output of this  execution in the documentation .

Best regards

 
Average of ratings:Useful (1)
Picture of Dominique Thiebaut
Question: How to make output of program evaluated become the grade
 

Thank you so much for all the help, Juan Carlos.

I have another question, if you don't mind.

I would like to have students submit assembly language programs, and one of the requirements for one of the tests would be to generate code that as small an executable as possible.  In other words they would have to pay close attention to the size of their code and of their data.

I have figured out how to test/evaluate an assembly language program.  That's fine. (By the way, I documented the VPL activity here for those interested: http://cs.smith.edu/dftwiki/index.php/Tutorial_Moodle_VPL_Assembly_Language_with_Output)

Now, I know I could add a new program to the "Execution Files" section of the VPL administration block that could get the size of the executable version of the student assembly program.   This second program could easily output 100, 90, 80, 70, etc... depending on whether the size of the student program is within 10%, 20%, 30%, 40%, etc.,  of the best size. 

I would like the output of this second program (with will be a number between 100 and 0) to become the grade assigned to the student program.

I'm still very confused about how to write a vpl_evaluate.sh script that would take this number output by the program and make it the grade.

Any suggestion or hint?

Merci!

Dominique

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Question: How to make output of program evaluated become the grade
 

In this case I think that an example will be better. Copy and paste the following script into vpl_evaluate.sh and push evaluate in the test activity.
-------------------------------------------

#!/bin/bash
cat >vpl_execution <<END_SCRIPT
#!/bin/bash
# This is an example of evaluation output
#
# One line comment
echo "Comment :=>>This is a one line comment"
# Multiline comment
#start tag
echo "<|--"
echo "This is a multi line comment (line 1)"
echo "This is a multi line comment (line 2)"
echo "This is a multi line comment (line 3)"
echo "This is a multi line comment (line 4)"
#end tag
echo "--|>"
#This is a grade set
echo "Grade :=>>1Value"
# Comments may have some format
echo "<|--"
echo "-Titles start lines with '-'"
echo "Normal text"
echo ">preformated text"
echo "--|>"

#Last grade is taken
echo "Grade :=>>Value"
END_SCRIPT
chmod +x vpl_execution

--------------------------------

Best regards

 
Average of ratings: -
Picture of Dominique Thiebaut
Re: Question: How to make output of program evaluated become the grade
 

Once again, thanks for the quick answer.  This was what I needed to figure out how to make it work.  I can now test a program and assign a grade inversely proportional to the size of the executable version of the program.  

I have documented it here for those interested: http://cs.smith.edu/dftwiki/index.php/Tutorial:_Moodle_VPL_--_Testing_the_Size_of_A_Program%27s_Executable

Thanks much!

Dominique

 
Average of ratings: -
Picture of Michael Tanczos
Roadmap for 3.1?
 

I was curious as to what you were exploring for 3.1 - Is there any type of roadmap you are working with?   Also, I know there is another code-related plugin for moodle that integrates automated code-checking into quiz questions.   However the java code that is run is done directly on the server, which I'm not too keen on.

Is there any documentation on how to utilize the jail server as well?   It might be neat to have a suite of both assessment and assignment types that can utilize the jail server.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Roadmap for 3.1?
 
Hello Michael,
the 3.1 version is almost ready, but will not bring big news:
1) New web service. This will allow to write external clients for VPL (for example: an Eclipse plugin).
2) Adapt the code to running in Moodle 2.6 and 2.7
3) Add default script for Lua, D, Clojure and lisp languages
4) Add support for regular expressions to the default evaluation program
5) Update to noVNC 0.4-173. This fix the keyboard problem
6) Fix minor errors.
At this moment there are isn't a Jail server API documentation. But if some people is really interested in using the jail server for other purposes I will write the docs. In any case, it will be of low priority for me at this moment. You always can deduct the API by reading the code of the module.

Best regards
Juan Carlos

 
Average of ratings: -
Picture of CSE Batch
Re: Roadmap for 3.1?
 

Sir, i get this error, 

how to sole please help..


Failed to construct 'WebSocket': The URL 'ws:///52551982455300/monitor' is invalid.
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Roadmap for 3.1?
 

It seems that you have some configuration problem.

Please, show me the "Execution servers list" that you set in the VPL plugin general configuration and the file "vpl-jail-system.conf" in the execution server.


Best regards

 
Average of ratings: -
Picture of Dilvan Moreira
Re: Roadmap for 3.1?
 

   Hi,

   Very nice plugin! I am a professor at University of São Paulo (Brazil). We would like to be able to have questions taken from a list of programming questions. Similarly to what the moodle question engine does with the question bank. I have a student working on this. We would like to change your plugin to add this feature and contribute it back to the project. We would like to know:

1. Would it be better to rewrite part of the plugin as a question type? So the plugin could be instantiated as an assignment or a question type.

2.  Or would it be better to add the features of a question list and question draw (randomly choosing one or more questions) in the assignment plugin?

In either case, any advice in how to tackle the problem will be very welcomed.

Dilvan.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Roadmap for 3.1?
 

Hi Dilvan,
I think that the better solution is to create e new type of question.
The possibility of using VPL activities (or similar) as quiz questions would be a very good feature. To take advantage of the VPL infrastructure I think that the good balance should be create a type of question that use VPL as test provider for the defined questions. VPL don't has this feature then you (we) need to establish and write an API at VPL to accomplish this function.
Best regards.


 
Average of ratings: -
Picture of Rahul Garg
Re: Roadmap for 3.1?
 

Hi Dilvan,

   I am a faculty from India.  I am working with a student for exactly the same feature -- VPL based questions for quizzes. I am wondering if it will be possible to join hands to accomplish this quickly (would like to have this feature before the fall semester starts). Please let me know.

Thanks,

- R


 
Average of ratings: -
Picture of CSE Batch
Re: New Virtual Programming Lab (VPL) module
 

Hello,

I need your help.


How can i install this VPL in my ONLINE HOSTING SERVER ? 

How to install the execution server in my online hosting site.. ?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Sorry for the late reply, I have been traveling to different countries and I have been unable to respond earlier.

I don't know if I can guide you due to the lack of information. I don't know anything about your "online hosting server", there are a full range of "online hosting servers" . In any case, to install the "execution server" you need to have a full control of your "online server" including the OS.

Ask a concrete question with full information about the situation (full "online hosting server" details) and then I can give you a answer.


Best regards

 
Average of ratings: -
Picture of Haytham Abdulla
Re: New Virtual Programming Lab (VPL) module
 

Dear Sir,

Thank you for the great plugin.

I think your server is down:

http://vpl.dis.ulpgc.es/


is there any mirror?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Dear Haytham Abdulla,
Thanks for your message.
yes, we know our server is down. We are migrating the server to other system and it is taking more time than expected.

Best regards
 
Average of ratings: -
Picture of Dominique Thiebaut
Trying to evaluate Java program. Can get comment and grade output, but VPL does not accept them.
 

Hi,

I am trying to automatically grade a Java program that will generate a simple string of numbers.

I have a java program (Tester.java)  that inherits the student submitted program (Homework.java), and tests it.   In the vpl_run.sh file, both java files are compiled and Tester is executed (see at the end of this post for details).

Tester outputs its evaluation of the student program in this form (simplified):

<|-
Your program output: 1 7 21 35 35 21 7 1
Correct output!
-|>
grade :=>> 100

I am not sure what I should put in the vpl_evaluate.cases file, since Tester is doing all the work, i.e. checking the output of the program and assigning the grade.    If vpl_evaluate.cases  is empty, VPL complains with "No test case found".  If I put a "case = Test 1" line in it, it complains that  the output  is missing.   If I put a dummy "OK"  string in it, then I get this:


VPL output


Here are the basic settings for my VPL Project:

Due date: Thursday, September 18, 2014, 1:00 PM
Requested files: Hw1_1.java (Download)
Type of work: Individual work
Grade settings: Maximum grade: 100
Run: Yes Evaluate: Yes

Requested files

Hw1_1.java

    1 // paste your code below...
    2 

Execution files

vpl_run.sh

    1 cat > vpl_execution << 'EOF'
    2 #! /bin/bash
    3 javac -J-Xmx128m VPLFakeTester.java 
    4 javac -J-Xmx128m VPLJavaTester.java 
    5 java VPLJavaTester Hw1_1.java patterns.txt
    6   
    7 EOF
    8   
    9 chmod +x vpl_execution


Thanks for any help on this!


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Trying to evaluate Java program. Can get comment and grade output, but VPL does not accept them.
 

Hello Dominique,
I'm glad see that you are advancing in the use of VPL.  Your are in the correct way to use your own program tester, but you must be aware that the evaluation is launched from vpl_evaluation.sh and not from vpl_run.sh.
The script "vpl_run.sh" is intended to be only for the execution (in terminal) of student's own code. You must copy (or move) your vpl_run.sh to vpl_evaluate.sh.

Other comment about the script that you show: I think that is better to use the script to compile the code and after, if all is OK, generate the execution script. VPL processes the output of the script execution (vpl_run.sh,vpl_evaluate.sh) and the output of the vpl_execution on different way.

Best regards.

 
Average of ratings: -
Picture of CSE Batch
Re: New Virtual Programming Lab (VPL) module
 

Sir,

I wish to install your execution jail server in AMAZON WEB SERVICE..


i.e install jail system in UBUNTU server provided by AWS... 

Could you please guide me..

I have setup my ubuntu server and installed VPL.. 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
The steps for installation and configuration are:
  1. Install an Ubuntu server as clean as possible
  2. Download the latest version of the software (vpl-jail-system) with the command
    wget http://vpl.dis.ulpgc.es/releases/vpl_jail_system-2.0.2.tar.gz
  3. Unzip and install the vpl-jail-system
    tar -xvf vpl_jail_system-latest.tar.gz
    cd vpl_jail_system-*
    sudo ./install-vpl-sh
  4. Follow the instructions and wait for the necessary downloads. The installation script will try to install the development software commonly used, but you may need to install some other by hand.
  5. Stop the service with the command
    sudo service vpl-jail-system stop
  6. Edit the file /etc/vpl/vpl-jail-system.conf. Set the URLPATH that will be used as key in connections with your execution server
  7. Start the service
    sudo service vpl-jail-system start
 
Average of ratings: -
Picture of CSE Batch
Re: New Virtual Programming Lab (VPL) module
 
Sir,

i'm not clear with the 6th step.. i cant understand what to do..

could you please explain.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

"/etc/vpl/vpl-jail-system.conf" is the configuration file  of your execution server. You must edit it to customize your execution server.
This is a text file with a common format in linux.
See http://vpl.dis.ulpgc.es/index.php/en/documentation/78-execution-server-configuration for details
The parameter URLPATH is important to avoid that your server accept task from unauthorized servers (You can also use TASK_ONLY_FROM)
Use URLPATH as a the key to access your execuion server. The value set must be used in the URL to your server as the path.
Example:
with server name "exec.com" and "URLPATH=password" the the URL you must use to access your server is
http://exec.com/password

See also the section "Checking the installation of an execution server" in general documentation
http://vpl.dis.ulpgc.es/index.php/en/documentation/76-general-documentation

Best regards

 
Average of ratings: -
Picture of CSE Batch
Re: New Virtual Programming Lab (VPL) module
 

Thank you sir,


all that confuses me is "URLPATH"... Sir what is this urlpath and how to get this ?


Thanks

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

URLPATH is a parameter you can/must set in the file "/etc/vpl/vpl-jail-system.conf". You must invent a text to be used as URLPATH.
For example, suppose I want to use "INDIA" in my execution server called "execute.com"  then
1) I will modify /etc/vpl/vpl-jail-system.conf setting:
URLPATH=INDIA
2) I will modify/add in the my moodle server the VPL module general setting execution servers list the URL
http://execute.com/INDIA

best regards



 
Average of ratings: -
Picture of Aivar Annamaa
VPL: How to run a graphical tkinter (Python) program
 

Hi Juan Carlos!

Is it possible to run a graphical Python program in jail and see the output in Moodle? I'd like to make it easier for instructors to check the solutions for an exercise where students had to draw something with Python turtle.

When I tried, I got a console, which said:

_tkinter.TclError: no display name and no $DISPLAY environment variable

What should be the value of $DISPLAY?


 
Average of ratings: -
Davo
Re: VPL: How to run a graphical tkinter (Python) program
Group DevelopersGroup Particularly helpful Moodlers

The $DISPLAY environment variable will point at a screen, when using a graphical interface on your local computer. You might have some luck playing around with the xvfb command, but all I can say about that is to point you at these websites:

http://linux.die.net/man/1/xvfb

http://superuser.com/questions/58829/redirecting-x-output


 
Average of ratings: -
Picture of CSE Batch
Re: VPL: How to run a graphical tkinter (Python) program
 

I'm getting this error in your demo execution server : 

request failed: connect() timed out!
Please solve and help me use it... I cant setup my own execution server..
 
Average of ratings: -
Picture of Max Maff
Re: VPL: How to run a graphical tkinter (Python) program
 

I have almost the same error. When I hit "Run" I get this after 6 sec of processing:

No execution server available: demojail.dis.ulpgc.es request failed: connect() timed out!


Seems strange. Please, say what additional info should I give to you to solve this. Thanks.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: VPL: How to run a graphical tkinter (Python) program
 

Hello Max Maff,

First I must ask to everyone that is going to report an issue that must give a full detailed report. Without all the information may be very difficult to spot the problem.

From your post, I see that you are using our demo jail server. The messages say that your Moodle server can connect with our demo jail server. Our demo jail server has been up and running for a long time then I only see two possible problems:

1) It may be some temporary network issue.

2) Your Moodle server is protected by a firewall that don't let it connects with the jail server.

Best regards.

 
Average of ratings:Useful (1)
Picture of Max Maff
Re: VPL: How to run a graphical tkinter (Python) program
 

Hello Mr. Carlos,

Thank you for quick answer!

That's true about demo jail server. I've configured my own, but the problem is not about jail server.

I use proxy-server in Moodle. It works, because I can get updates over the web. One addition: proxy only accepts connections on 80 port (both directions). It rejects everything else, also 443.

Maybe, VPL module can't work through proxy?

I can give you a detailed report, but what should I include in it? I've done all steps from documentation of VPL white installing.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: VPL: How to run a graphical tkinter (Python) program
 

Hello Mr. Maff,
VPL uses cURL to connect to the execution (jail) server. VPL will use other port than 80 only if you use "https" or set explicitly a port in the URL to your jail server.
I assume you are not using a transparent proxy then, to manage proxy connections, you must use the OS environment vars: http_proxy and https_proxy.
Example:

export http_proxy=http://username:password@proxyserver.com:port/
export https_proxy=$http_proxy

Best regards.

P.D.: A detailed report may include:
versions of Moodle, VPL plugin, jail server, browser, OSs used, screenshots and how to replicate the error.


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: VPL: How to run a graphical tkinter (Python) program
 

VPL uses WebSockets to connect the browser with the execution server. If your are using a proxy, it must be WebSocket compatible.
See
http://en.wikipedia.org/wiki/WebSocket#Proxy_traversal

 
Average of ratings: -
Picture of Max Maff
Re: VPL: How to run a graphical tkinter (Python) program
 

Hello Mr. Carlos.

Thank you for the help!

I've done a little research and here's the results.

1. I've set up jail server in the same subnet as Moodle. I've used client computer from this subnet to access Moodle website. VPL works, I can run tests.

2. Same settings, but this time I've used my home computer and accessed Moodle website through the Internet. I've struggled with WebSockets problem. As I described above, we use proxy (Squid 2) for external access into internal network (where Moodle and jail servers located). And Squid doesn't allow WebSocket connections. So, I've got "Connection failed" error in browser's console. HTTPS also haven't solved the problem. And I can't change Squid settings. So, it's the end for this option for me (internal jail server).

3. I've switched back to http://demojail.dis.ulpgc.es

Same error: No execution server available: demojail.dis.ulpgc.es request failed: connect() timed out!

Seems like cURL methods in VPL classes don't use system proxy settings. When I SSH to Moodle server and execute #curl demojail.dis.ulpgc.es/OK - it works. But it doesn't when client clicks "Run" in their web browser. (I use tunnel for SSH)

I believe, I should explicity set proxy settings in VPL config files. Please, point me to the appropriate files.

Also, you can add proxy field into VPL settings in Moodle in next releases. The code may looks like this:

function curlFile($url,$proxy_ip,$proxy_port,$loginpassw){//$loginpassw = 'username:password';//$proxy_ip = '192.168.1.1';//$proxy_port = '12345';//$url = 'http://www.domain.com';

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER,0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_PROXYPORT, $proxy_port);
    curl_setopt($ch, CURLOPT_PROXYTYPE,'HTTP');
    curl_setopt($ch, CURLOPT_PROXY, $proxy_ip);
    curl_setopt($ch, CURLOPT_PROXYUSERPWD, $loginpassw);
    $data = curl_exec($ch);
    curl_close($ch);return $data;}
 
Average of ratings: -
Picture of Max Maff
Re: VPL: How to run a graphical tkinter (Python) program
 

Solved with fix in /home/web/moodle/mod/vpl/jail/jailserver_manager.class.php

curl_setopt($ch, CURLOPT_PROXY, 'https://proxy:port/'); (line 42)

And using of external jail server, ofc.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: VPL: How to run a graphical tkinter (Python) program
 

I'll add a new options in the VPL configuration to set the proxy configuration .

Best regards and thanks for your solution.


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: VPL: How to run a graphical tkinter (Python) program
 
yes, you can run almost any GUI(linux) program in jail and see and interact with it in Moodle. This feature is available from VPL 3.0, but still is not available by default to some programming languages as for Python.
Please, don't modify the $DISPLAY environment variable, it is handle by the jail system.
To run/debug a program as GUI (if not available by default) you need to write your own run/debug script. The difference of this script with the normal one is that the generated program must be called "vpl_wexecute".

The following script is ready to detect python+tkinter: #load common script and check programs
. common_script.sh
check_program python
cat common_script.sh > vpl_execution
echo "python $VPL_SUBFILE0" >>vpl_execution
chmod +x vpl_execution
grep -E "^from[\t ]*Tkinter[\t ]*import" $VPL_SUBFILE0 2>&1 >/dev/null
if [ "$?" -eq "0" ]    ; then
    mv vpl_execution vpl_wexecution
fi

Best regards.


 
Average of ratings: -
Picture of Aivar Annamaa
Re: VPL: How to run a graphical tkinter (Python) program
 

Great, it works! smile

Thanks!

 
Average of ratings: -
Picture of CSE Batch
Re: New Virtual Programming Lab (VPL) module
 

Sir,

My server is running good.. It returns "OK" on testing..


Now when i click on Evaluate or Run or Debug .. 

I get this :

Failed to construct 'WebSocket': The URL 'ws:///22442518253039/monitor' is invalid.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello, CSE Batch
I don't know why you get this message. Please, show me the URL that are you using to point to your execution (jail) server in the VPL general plugin configuration. It seems that you are using an empty URL and you must use a full URL.

Best regards.


 
Average of ratings: -
Picture of CSE Batch
Re: New Virtual Programming Lab (VPL) module
 

I have two questions :


1) How to automatically grade students ?


2) How to hide test cases from students ?

         i.e when they click evaluate, i don't want them to see the test cases.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello, CSE Batch
1) In a VPL activity go to "Setting -> Execution options" and activate "automatic grade"
2) At this moment if you activate the evaluation button to the students you can't hide the failed test cases to the students. We think that showing only the proposed grade or the final grade (if automatic evaluation is active) can be inadequate for the student. They may get a bad grade without explanation.
I want to notice that you can re-evaluate all the submission with one click, you can add/modify cases and re-evaluate in the submission list this will update the proposed grade and automatic grade if needed.

Best regards.

 
Average of ratings: -
Picture of Kevin Wiliarty
Re: New Virtual Programming Lab (VPL) module
Group DevelopersGroup Testers

Hello,

We are new to VPL and we are experiencing an interesting oddity. In a custom evaluation script ( written in Python) we have some code like this:

import inspect

import time

def comment(s):
    '''formats strings to create VPL comments'''
    print('Comment :=>> ' + s)

comment("Evaluation Time:" + str(time.strftime("%c")))

When the evaluation runs, the time shown is 4 hours ahead of our local time. Running the same code in a Python terminal on the jail server gives the correct current time, however.

The output to Moodle from an evaluation looks like this:

Reviewed on Tuesday, September 30, 2014, 2:25 PM by  Automatic grade
Grade 40 / 100
Assessment report
Evaluation Time:Tue Sep 30 18:25:03 2014

You can see the discrepancy between the "Reviewed on" time and the "Evaluation Time." We believe that the jail server has the correct time, and we are wondering if there is a configuration somewhere in the vpl that we need to adjust.

Any help would be appreciated.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Kevin,
From your bug report, I have been searching and, I think, I have located the problem. The issue is caused by the lack of the "localtime" file in the "etc" directory of the jail. In a few days I will release a new bug fix version of the jail that will resolve this and other problems.

Best regards.


 
Average of ratings: -
Picture of Kevin Wiliarty
Re: New Virtual Programming Lab (VPL) module
Group DevelopersGroup Testers

That's great news. Thank you so much for attending to it. I'll keep an eye out for your fix.

Cheers!

 
Average of ratings: -
Picture of CSE Batch
Re: New Virtual Programming Lab (VPL) module
 
New look to VPL site... Nice work sir !!

All the best
 
Average of ratings: -
Picture of CSE Batch
Re: New Virtual Programming Lab (VPL) module
 

Hello sir,

I'm giving my students an program to calculate factorial using functions.

This is my requested file, which act as an template.

Requested files

factorial.c

    1 int factorial (int n)
    2 {
    3     //your code
    4     return fact;
    5 }
    6 
    7 int main()
    8 {
    9     //your code
   10     printf("%d! = %d",num,factorial(num));
   11     return 0;
   12 }

But if my student submits the program like this 


1 #include <stdio.h> 2 //int factorial (int n) 3 /*{ 4 return fact; 8 } */ 10 int main() 11 { 12 int num,i,fact=1; 13 scanf("%d",&num); 14 for(i=1;i<=num;i++) 15 fact=fact*i; 16 printf("%d! = %d",num,fact); 17 return 0; 18 }

he is getting full grade, but i don't want this to happen.

How to do that ?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello CSE Batch,
I am pleased seeing that you have finally managed that VPL run in your server.
The problem that you expose here is very interesting and the answer may be useful for many VPL users. The first thing we have to be aware is that If we use the default tester program of VPL, we only can test the response of the program to any input but no how the response has been achieved. The first solution to your problem is that the teacher do a slight revision. This is bad news but not entirely. If we make the proper exercise we can get what we want. To facilitate the automatic evaluation of a exercise it is preferable that every requested element may be checked separately, if necessary we must divide the exercise in various parts.

In your case you can separate the "factorial" function from the "main". To test the factorial we can generate an activity that request the funtion in a file "factorial.c" without main (only the factorial function) we add to the "execution files" of the activity a file main.c with the main.  To check the main do the inverse.

A more complex way, but better is doing your own "vpl_run.sh", this way you can fine control the execution and the interface that the student generate.

Best regards.

 
Average of ratings: -
Picture of CSE Batch
Re: New Virtual Programming Lab (VPL) module
 
Hello Juan and yeah , Thanks ..


1) what is the use and purpose of 'vpl_run.sh' ?

2) Also, consider if I give my students an program to find the length of string without using string.h, how could I check if they have done it correctly or not ? ( such type of questions are too help full ) 



 
Average of ratings: -
Picture of CSE Batch
Re: New Virtual Programming Lab (VPL) module
 
and also,

how could i clear the submission list ?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

The module does not have a specific feature to "clean" the submission list. But you can "duplicate" the activity, getting an equal, but without  submissions.



 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
1) This is copied from http://vpl.dis.ulpgc.es/index.php/en/support
----------------------------
Creating scripts
The scripts for running/debugging and evaluation is a powerful tool for the creation of activities tailored to specific needs and using automated test mechanism different from the default. A simple way to start a own script is to take the default script for the language used as the start point. The default scripts are located in "/mod/vpl/jail/default_scripts/".

The purpose of the script is to compile or prepare the implementation of the action requested run/debug/evaluate. If the script succeed it will generate an executable file called vpl_execution to be run on a textual console or vpl_wexecution for execution in a graphics console.
---------------------------
default vpl_run.sh for C
---------------------------------------------------------------------------------------
#!/bin/bash
# Default C language run script for VPL
# Copyright (C) 2014 Juan Carlos Rodríguez-del-Pino
# License http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
# Author Juan Carlos Rodríguez-del-Pino <jcrodriguez@dis.ulpgc.es>

#load common script and check programs
. common_script.sh
check_program gcc
get_source_files c
#compile
gcc -o vpl_execution -std=c99 $SOURCE_FILES -lm -lutil
---------------------------------------------------------------------------------------
2) You can do almost anything programmatically to check the student code, but the effort may be high, the cost you pay is the time you expend to do an appropriate shell script.
For example: in vpl_run.sh before compile the program you can test if the student has write strcpy in its code by using "grep"

grep -e strcpy $SOURCE_FILES 2&>1 1> /dev/null
if [ "$?" == "0" ] ; then
     echo "Error: the use of strcpy is forbidden"
else
     gcc -o vpl_execution -std=c99 $SOURCE_FILES -lm -lutil
fi
 
Average of ratings:Useful (1)
Picture of Alberto Lopes
Re: New Virtual Programming Lab (VPL) module
 

Hello, Prof. Juan Carlos and VPL developers.

I am trying to install VPL on a Debian machine. However, my SSH connection dropped while the jail install script was still executing. When I logged in again, and tried to re-execute the script, I got messages like this:

/etc/init.d/vpl-jail-system: line 73: /jail/etc/group: Read-only file system
chmod: changing permissions of `/jail/etc/group': Read-only file system
chmod: changing permissions of `/jail/etc/ld.so.conf': Read-only file system
chmod: changing permissions of `/jail/etc/ld.so.cache': Read-only file system
mount: warning: /jail/etc/ConsoleKit seems to be mounted read-only.
[FAIL] Can't mkdir /jail/etc/ImageMagick ... failed!

What can I do to fix that? Is there a easy way to unroll all the changes the install script made so far to my system?

By the way, where can I find uninstall information for both the VPL moodle plugin and the jail server?


Thank you.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Alberto,
Sorry, I have never test the installation of the vpl-jail-system in a Debian machine, but some people has reported a success in this task.
The problem that you show is due to a fail in the service script (it isn't smart enough). Please, clean the "/jail" dir, by hand, and try again.
I will try modify this script to improve the way that it reacts to this cases.

To uninstall the jail system you can use the "uninstall" script that came with the distribution. To uninstall the VPL plugin follows the indications  to uninstall any plugin in www.moodle.org.

Best regards.


 
Average of ratings: -
Picture of Alberto Lopes
Re: New Virtual Programming Lab (VPL) module
 
Does the script do something to the mount points of the filesystem?

I suspect that because now I cannot delete the /jail directory or even touch a test file:

root@transfer:~# rm -Rf /jail
rm: cannot remove `/jail/etc/passwd': Read-only file system
rm: cannot remove `/jail/etc/group': Read-only file system
rm: cannot remove `/jail/etc/ld.so.conf': Read-only file system
rm: cannot remove `/jail/etc/ConsoleKit': Read-only file system
rm: cannot remove `/jail/etc/ld.so.cache': Read-only file system
root@transfer:~# cd
root@transfer:~# touch test
touch: cannot touch `test': Read-only file system

Thanks for your support.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

The vpl-jail-system try to simulate in "/jail" a new full filesystem but almost read only and without suid files. The script that start/stop the service is the responsible of mounting and unmounting replicas of the main directories of the real filesystem.

If the script fail it is common to find mounted dir under "/jail", but it's not common to have the full file system readonly.

I have installed vpl_jail_system-2.0.2 into a clean Debian 7.6 64bits (running in a virtual machine). The installation go after introducing the Debian CD-1 instalation disk (if not the installation was stalled asking it with no message) . I have found that some packages are missing from Ubuntu to Debian, for example: firefox must be changed by Iceweasel. Despite of all this the vpl_jail_system compiled and run without mayor problems.

The system you are are using is full dedicated server (may be virtualized) or some kind of virtual private server shared?

I don't know if the vpl_jail_service can run in this type of systems.

Best regards.

 
Average of ratings: -
Picture of Juan Cruz Martinez Luquez
Re: New Virtual Programming Lab (VPL) module
 

Hi Alberto,

I had the same issue trying to install VPL Jail system on an OpenVZ container (managed by Proxmox VE). I can not give you a solution because I decided to install the Jail system on a fresh installed Ubuntu using KVM instead of a container.

Regards!

 
Average of ratings: -
Picture of Rafael Pinto
Re: New Virtual Programming Lab (VPL) module
 

Is it possible to put automatic constraints on the submitted code?

For instance, I have an introductory exercise where the student must code in PHP to assign the value 100 to some variable, add 20 to it and then show the result. I'd like to force the student to code all those steps instead of just using "echo 120" to get the correct output. Just checking for the presence of the strings "<?php", "?>", "100", "20", "+",  "=", "$", ";" and "echo" would be enough for me (but it would be still better if I could also check for the absence of a "120" string too).

 
Average of ratings: -
Picture of Rafael Pinto
Re: New Virtual Programming Lab (VPL) module
 
SOLVED.
Just edited vpl_run.sh for the specific VPL according to a previous answer I found here, with minor modifications:
#!/bin/bash
# $Id: php_run.sh,v 1.3 2012-09-24 15:13:21 juanca Exp $
# Default PHP language run script for VPL
# Copyright (C) 2012 Juan Carlos Rodríguez-del-Pino
# License http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
# Author Juan Carlos Rodríguez-del-Pino <jcrodriguez@dis.ulpgc.es>
#load common script and check programs
. common_script.sh
check_program php5
grep -q -e 120 $VPL_SUBFILE0 2&>1
if [ "$?" == "0" ] ; then
     echo "Error: you are not allowed to output the result directly"
else
    cat common_script.sh > vpl_execution
    echo "php5 -n -f $VPL_SUBFILE0" >>vpl_execution
    chmod +x vpl_execution
fi
 
Average of ratings: -
Picture of Rafael Pinto
Re: New Virtual Programming Lab (VPL) module
 

Could you provide a PHP example for adding 2 numbers along with the test cases? I don't seem to be able to get PHP to work with stdin inputs. For instance, $a = fgets(STDIN); will block and give a timeout error, as if no data was passed to STDIN.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Rafael,

I have tested this case:

--------------------

case = 1
input = 7
13
output = 20

--------------------

without problem.

PHP example:

--------------------

<?php
$a = fgets(STDIN);
$b = fgets(STDIN);
echo $a+$b;
--------------------

Please provide your test cases to try to reproduce your problem.


 
Average of ratings: -
Picture of Rafael Pinto
Re: New Virtual Programming Lab (VPL) module
 
Thank you very much, Juan.

My test cases:
    1 case = Test 1
    2 input = 1
    3 output = "foi 1"
    4 case = Test 2
    5 input = 2
    6 output = "foi 2"
My code:
<?php
$a = fgets(STDIN);
echo "foi $a";
?>
I tried your example for adding two numbers too, and it also timeouts. Maybe it is some server misconfiguration? Can you think of any reason for it to fail to send the input data to my php program?
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

I have been unable to reproduce your problem.

what versión of VPL plugin and execution server are you using?

To know if the problem is a bug, the activity setting or your installation, please:

1) test your activity in http://demovpl.dis.ulpgc.es/moodle

2) Use http://demojail.dis.ulpgc.es as execution server

Your cases are almost correct. But you must be aware that if you use "input = 1", the space after the "=" will be send as part of the input. The result of fgets() is of type string and then in your code $a contents " 1". If you use "output="foi 1""(exact match) then your code will not pass the test.


Best regards


 
Average of ratings: -
Picture of Rafael Pinto
Re: New Virtual Programming Lab (VPL) module
 

VPL 3.1 with jail server 2.0.2

I've tried your example again but instead of clicking 'Run', I clicked 'Evaluate' and it works. The 'Run' option still gives me a timeout (not a big deal). But if I run your example with 2 identical test cases (or any other test cases), 'Evaluate' gives me a timeout again.

case = 1
input = 7
13
output = 20
case = 2
input = 7
13
output = 20

The same applies to any tests set (my previous example works with 1 test case too). IOW, it is working only for evaluation AND if my test set has only 1 test case.

Also, I'm on linux. Any chance I'm pasting some '\n' and VPL expects a '\r\n' to split test cases?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

It seems your are using adequate versions of VPL and of the jail server.

More questions:

3) What OS uses your Jail server?

4) What Browser are you using?

I don't know if you have tested the demovpl and demojail.

I would like to see the messages you get.


I attach screenshots of what I get in demovpl using your cases and code




 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

PHP running


 
Average of ratings: -
Picture of Garry Gardiner
Re: New Virtual Programming Lab (VPL) module
 

Hello There,

I have just installed VPL for our Computing department to use, there is one slight snag. I have been asked if we can have python 3.4 on it instead of 2.7.

I am sorry if I am being dense, but how can I achieve this?

Thank you

 
Average of ratings: -
Picture of Michael Jones
Re: New Virtual Programming Lab (VPL) module
 

Hi Garry

I asked this question a while back - the guy who created the plug-in provided this advice:

Dear Jones,


You only need to update your jail server NOT your Moodle server. In the case that your Moodle server and jail server are the same (not recommend) Python3 normally (Ubuntu for example) do NOT interfere with Python2 you must explicitly call the interpreter with "python3" and Python2 is still the default.

best regards

 
Mike


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Garry and Michael ,

¿How the python execution works? (by default)

1. The system select a default script to run the code (submission files) based on the files extension

2. For ".py" the system uses vpl/jail/default_scripts/python_run.sh. This script uses command "python" as interpreter.

3. The summision files and this script is send to the execution server.

4. Compilation phase: the script is run generating "vpl_execution".

5. Execution phase: "vpl_execution" is run


If you want to run python3:

1) Install python3 in your jail/execution server

2) Make one or more of the following steps

2.1) Change your default python interpreter in your jail/execution server

2.2) Change your file "vpl/jail/default_scripts/python_run.sh" in your moodle to generate a vpl_execution that use python3 as interpreter

2.3) Modify python_run.sh as described in 2.2 but save it to vpl_run.sh of your VPL activity. This activity will use vpl_run.sh instead of the"vpl/jail/default_scripts/python_run.sh"

2.4) Create a new activity called "base python3" follow step 2.3 and then uses this activity as "based on" in "execution options" in all the activities that you want to use python3. You only need to write the script one time in the "base python3" activity. Activity "base python3" acts as template of other activities then It is better to hide this activity to students.


Best regards.

 
Average of ratings: -
Picture of CSE Batch
Re: New Virtual Programming Lab (VPL) module
 
Hey Juan,

thankz for all your help..


Well now i need suggestions.. I'm planning to conduct an programming contest n my college using VPL...


Please give me some tips and suggestions for setting up moodle and vpl at its best for coding contest !!

 
Average of ratings: -
Picture of CSE Batch
Re: New Virtual Programming Lab (VPL) module
 
Hey Juan,

thankz for all your help..


Well now i need suggestions.. I'm planning to conduct an programming contest n my college using VPL...


Please give me some tips and suggestions for setting up moodle and vpl at its best for coding contest !!

 
Average of ratings: -
Picture of Awadhesh Srivastava
jail server installation on shared web hosting
 

Can I install jail server on shared hosting (Hostgator shared web hosting). If yes then would it be same steps as mentioned on your site?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: jail server installation on shared web hosting
 

I think that you can't.
You need a server where you should have the privileges to install the new linux service as root, install the compilers/interpreters and use the new service as a non shared resource.

Best regards


 
Average of ratings: -
Picture of Aivar Annamaa
Re: jail server installation on shared web hosting
 
The cheapest way to get started is Amazon EC2, you can get 12 months for free -- http://aws.amazon.com/free/. When this time runs out, 5$/mo at https://www.digitalocean.com/pricing/ looks like a decent option.
 
Average of ratings: -
Picture of Theresa Wilson
VPL c++ compiler problems
 

Hello - We are hoping to use vpl in our data structures class, but I am having trouble getting c++ submissions to compile on the jail server.

Here is what I have in vpl_run.sh

#!/bin/sh
g++ -Wall -o vpl_execution *.cpp

 

Every time I try to run a cpp submission, I get the following compiler error:

g++: error trying to exec 'cc1plus': execvp: No such file or directory

 

I've been investigating and exploring on the jail server, and experimenting with python submissions to compile g++ programs, and I've finally run out of ideas.

Essentially, any time the g++ in /jail/bin is used to compile, the above error is produced. But /jail/bin/g++ is an exact copy of /bin/g++, correct? And /bin/g++ never produces this error.

My best guess is that something is off in the configuration of the jail server. That something isn't getting copied over when the jail server is started that needs to be copied over.

That, however, is as far as I got. Suggestions?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: VPL c++ compiler problems
 

Hello Theresa,
I am trying to replicate your problem with jail server 2.0.2 in Ubuntu 14.04 and VPL module 3.1
First, your script in "vpl_run.sh" is correct. It compile without problem a simple "Hello world" in C++. You can also point your VPL activity to http://demojail.dis.ulpgc.es and check it.
I have tested the activity with the lowest settable resource value without succes (no problem).
After googling a while, I think:
1) Your g++ installation is broken (but you tell me that run ok out of the jail)
2) The script, part of the deamon that replicates the filesystem in the jail, don't replicates something needed. What OS version are you using in your jail server?
Please, tell me the details of your execution enviroment to have more information.
1) Jail server version
2) Jail server OS version, hardware limits.
3) VPL module version

Best regards.
Juan Carlos

 
Average of ratings: -
Picture of Charlie Daly
Jail Server Problems
 


Hi Juan,

this looks really nice. I have been installing this using docker containers. Moodle and the module seem to work properly. When I use your test jail server, everything works. However, when I use my jail server (installed on docker), then when I attempt to run a program under test, I get the following message:

"Jail error: I can't execve: /home/p16708/vpl_run.sh (No such file or directory)"

I have tried installing two versions of the software:

vpl-jail-system-2.1.0.tar.gz and vpl-jail-system-2.0.3.tar.gz

Both versions fail with the same message.

I have tried this with both Java and Python exercises.

I am hoping you can help. Thank you very much,

Charlie

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Jail Server Problems
 

Hi Charlie,
the solution suggested by Aivar seems very good at this moment.
I haven't tested the vpl jail daemon as a Docker container. When I have spare time I' ll test it and I will say something about it.
Best regards.
Juan Carlos

 
Average of ratings: -
Picture of Ankit Ramtriya
Re: Ace editor
 

I am developing a moodle plug-in so how do I integrate ace editor in my moodle plug-in.

 
Average of ratings: -
Picture of Marcus Green
Re: Ace editor
Group Particularly helpful Moodlers

You are going to need to provide more information 

 
Average of ratings: -
Picture of Ankit Ramtriya
Re: Ace editor
 

I'm developing a plugin for moodle. this plug-in uses the ace editor for editing the code.so i need help that how can i use the ace editor in my plugin.

 
Average of ratings: -
Picture of Charlie Daly
Re: Jail Server Problems
 


Hi Juan,

I gave up on Docker and am using normal virtual machines and everything is working very nicely. VPL is a very impressive piece of work.


Thank You,

Charlie

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Jail Server Problems
 

Thanks Charlie,

I have tested VPL jail server on Docker and I found some incompatibilities that make impossible to use it. The main problem is that apparently Docker don't let to mount part of the file system to mimic the actual one (thing that VPL needs). One way to resolve this problem is to remove the chroot from the VPL jail server and work with file system under the Docker control. The problem is that this needs time to be programed and to learn more about the security implications of this change.


Best regards,

Juan Carlos


 
Average of ratings: -
Picture of Dipanjan Chakraborty
Re: New Virtual Programming Lab (VPL) module
 

Hi,

Can you please confirm if Moodle version 2.8 is supported?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Dipanjan,
I haven't tested VPL 3.1 on Moodle 2.8, but the release notes of Moodle 2.8 indicates that VPL 3.1 must run on this release. Beware that VPL 3.1 don't supports some new features of 2.7 and 2.8, specifically the new logging system (track of user actions) . See VPL 3.1 release notes. The lack of this features do not limit normal use of VPL. The next release of VPL will resolve this issues.
Best regards.
Juan Carlos Rodríguez

 
Average of ratings: -
Picture of Dipanjan Chakraborty
Re: New Virtual Programming Lab (VPL) module
 
Thanks!

 
Average of ratings: -
Picture of Kevin Wiliarty
Re: New Virtual Programming Lab (VPL) module
Group DevelopersGroup Testers

Hello,

I support an instructor who has a package of assignment evaluation files that she cannot currently use in the VPL because there are more than 100 of them. I can see in the code (forms/executionfiles.php) that there is a hard-coded limit of 100 execution files. I would be tempted to bump this for her, but wondered if you think there might be undesired consequences. If not, would it be a welcome change to add an admin setting? I could code it up and file a pull request on github.

Thanks for the great plugin!

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Kevin,
You can increase that limit, VPL 3.1 don't have other big limitations. The only problem will be that you will get an editor with so many files opened that will be difficult to manage. The file editor of VPL 3.1 is not thought for manage so many open files.
There is a workaround that can help you with task of sending so large number of files to the execution server:
1) Package your files  (tar, zip, gz) eg. pack.zip
2) Encode your file to base64 format
3) Rename your encode file to pack.zip.b64
4) Add the file to your activity (import or copy/paste)
5) Add code to your (run, debug,evaluate) script to uncompress your pack.zip before use.
Beware that the system will decode from base64 any file with extensión ".b64" (and remove the .b64 extensión)

The next VPL 3.2 will resolve this problem with an editor ready to handle a large number of file (including images and other binary files).

I attach images of the new editor in action

Best regards.




 
Average of ratings: -
Picture of Kevin Wiliarty
Re: New Virtual Programming Lab (VPL) module
Group DevelopersGroup Testers

Many, many thanks for the speedy and helpful reply! You have given me both immediate solutions and things to look forward to smile

 
Average of ratings: -
Picture of Nived Narayanan
Re: New Virtual Programming Lab (VPL) module
 

Hi.. 

First of all i'm very thank full to you and your team for making such a wonderful tool..


Well i use this tool to conduct some mini contest and C training.. 

I'm repeating the question the CSE Batch asked, how to hide test case, yes you are spot on with your reason of why not hiding the test case, but I want to hide the test cases from the users because, when a user clicks evaluate , they are displayed with the test case... and when we conduct a contest, the students simply print the required output with the print statement without building the code..


i.e Consider i given them to print the following series


*

**

***

****


They code the program like this according to the test case,


if ( input==1)

print *

else if (input==2)

print ** 

and so on..


Only if i could hide the test case, they would actually code the program..


So only if you could help us find a solution to this..

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Nived,
What you are asking may be a new feature of the testing program, but at this moment the solution that I can give you is this:
I have modified the default testing program "vpl_evaluate.cpp" to remove the detailed test output and I attach it with the default vpl_evaluate.sh script.
You can use this files in any VPL activity, go to the "execution files" option, add  "vpl_evaluate.cpp" and change "vpl_evaluate.sh".
If you use frecuently this evaluation it may be better to use the "based on" feature. You also can customize the output going to the line 1443 of "vpl_evaluate.cpp" and change the code as you wish.

Best regards.

 
Average of ratings:Useful (1)
Picture of Nived Narayanan
Re: New Virtual Programming Lab (VPL) module
 

Hey Juan.. 

Thanks for your response... 

But i have no idea on what to do with the files you have provided.. If you could explain a bit more it would be very grateful. Also, i'm working on 'C' and not on 'CPP' because the files you have given is for 'CPP' i believe...

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Other way,
please, restore the attached Moodle backup into your course. This backup contains an activity with the files, previously sent, appropriately installed.

Best regards.

 
Picture of Nived Narayanan
Re: New Virtual Programming Lab (VPL) module
 
Ok..ill go back and check it out ..


Well we had an contest for around 1300 students and we had 50 questions .. how can I get the overall grade sheet .. do I need to open each activity and note down the score one by one ? 

 
Average of ratings: -
Picture of Nived Narayanan
Re: New Virtual Programming Lab (VPL) module
 
Ok..ill go back and check it out ..


Well we had an contest for around 1300 students and we had 50 questions .. how can I get the overall grade sheet .. do I need to open each activity and note down the score one by one ? 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Really this question is not related with VPL, it is about the use of the grade book in Moodle. But I will try to answer
At the grade book 'course administration->grades->categories and items' in Moodle 2.8 (in previous versions of Moodle the menu names may differ)
1) Create a grade category
2) Add activities to the category

You also can select the Grade category in every VPL activity.

Best regards.

P.D.: Don't forget to activate the "Automatic Grade" in "Execution Options" in every VPL activity.

 
Average of ratings: -
Picture of Ryan Chan
Re: New Virtual Programming Lab (VPL) module
 

Hi,

I am a new user of VPL plugin. I installed the VPL plugin v3.1 (2014052912) on Moodle 2.6.3+.


When I try the VPL, I get 404 error, "connection fail: parsererror" and saying that there is some problem with http://moodle.hku.hk/mod/vpl/editor/ace9/mode-cases.js.


I can't find the mode-cases.js file in the VPL plugin package. What is the cause of the problem, and how to solve this issue?


Thanks for any advice.

Regards,

Ryan

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Ryan,
A detailed description of the situation where the problem appears (and a screenshot) would be appreciated. I can't replicate the problem then my answers are based on suppositions.
I suppose you are getting this message when you are trying to run code?
This message is saying that the response from your Moodle, to an AJAX request from the IDE, is malformed. May be that you has your Moodle server in debug mode and some debugging message is interfering with the response. Check your web server log looking for PHP messages related with VPL.

The message "'mode-cases.js' not found" is generated by JavaScript, but this do not means a problem. The only effect is that the file "vpl_evaluate.cases" is not highlighted. 'mode-cases.js' has not been made yet. All installations of VPL 3.1 generate this message.

Best regards.


 
Average of ratings: -
Picture of Ryan Chan
Re: New Virtual Programming Lab (VPL) module
 

Hi Juan Carlos,

Yes, I get the error message when I run the code using VPL plugin. My Moodle is not in debug mode.

The screen capture below shows the error message as mentioned.

VPL plugin error

In web server log, these are the error log message that I got.

  • Directory index forbidden by Options directive: /var/www/html/mod/vpl/editor/ace9/
  • File does not exist: /var/www/html/mod/vpl/editor/ace9/mode-cases.js, referer: /mod/vpl/forms/testcasesfile.php?id=568183&edit=3
  • File does not exist: /var/www/html/mod/vpl/editor/ace9/mode-cases.js, referer: /mod/vpl/forms/executionfiles.php?id=568183

Thanks for your advice!

Regards,

Ryan

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

The last two messages that you have found in your log file are about the lack of 'mode-cases.js' and, as I told, are harmless.
In your screenshot I see that you are editing the execution files.
I guess that you are getting this message when you click on save button. I suppose that may be some problem in the server side. To spot it, please, activate the debug mode (full)  in your Moodle server and send me again the log messages that you should find.

Best regards

 
Average of ratings: -
Picture of Peter Salhofer
Re: New Virtual Programming Lab (VPL) module
 

Hi Juan!

Since I cannot see a way how to start a new thread here, I have to reply to your latest entry.

Firstly, thank you for your great work. Two of my students also contributed by adding Scala-Support (however, I should probably send you my updated version of the execution script).

Everything is running fine, but apparently since the jail server was updated last time (it's now running version 2.0 I guess) I cannot run and evaluate programmes that need a network connection (the programme under test is supposed to read data from some URL). With the old version this problem was fixed by copying or mounting the etc/network stuff into the jail. Nevertheless now I get a connection time-out when running or evaluating a programme.

However, when I log into the jail server, run "chroot /jail" the network seems to be fine. I've also already added FIREWALL=0 to the config file an restarted the service.

Any hints on how to enable the network during evaluation?

BTW: When I stop the service I get lots of messages saying that /jail/etc/[something] (e.g. calendar ???) cannot be removed, since it's a directory. Should this make me worry in any sense?

Regards,

Peter


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Peter!
This is the original thread of the first post, at the "General plugins" forum, announcing the public availability of VPL in Moodle. VPL don't have its own forum. If you want to generate a separate thread you must post at the  "General plugins" forum. Please use the word "VPL" in the subject to track the post. I would prefer a own forum for VPL, leading to an better organization of questions and answers.
Thanks for your contribution to the Scala support in VPL.
To reproduce the network problem, please, send me your activity and the code needed to run the offending program.
About the messages starting or stoping the service please let me take a look to the log file /etc/vpl/vpl-jail-service.log.

Best regards,
Juan Carlos

 
Average of ratings:Useful (1)
Picture of Peter Salhofer
Re: New Virtual Programming Lab (VPL) module
 

Hi Juan Carlos!

Thanks for the fast reply! It turned out to be very helpful, since you've forced me to prepare a reproducible example. So I tried to come up with a python sample and figured out that it worked. Then I refactored the actual Scala sample and saw that the problem was not the network but some misleading "java.lang.OutOfMemoryError: unable to create new native thread", which doesn't indicate a memory issue but has to do with getting new threads from the operating system. As a consequence I increased the number of processes in the jail config file, but without any effect. More or less by accident, I figured out that one can set the number of processes per submission in the VPL-Moodle plugin. After increasing the number of processes there from 16 to 40, everything worked!

So I can only repeat myself and thank you for this great tool!

Here's my currently used scala_run script that we use instead of the default one:

. common_script.sh
check_program scala
check_program scalac
APP=${VPL_SUBFILE0%.*}
scalac $VPL_SUBFILE0
cat common_script.sh > vpl_execution
echo "scala -nocompdaemon -classpath ./ $APP" >> vpl_execution
chmod +x vpl_execution

Compared to your current default script it assumes that the scala code is an application like follows:

object MyApp extends App {
...
}

This is way more common than writing scripts. The file, however, has to have the same name as the object defined in it (in our case "MyApp.scala", which is the same as in Java). Then this file is compiled and the app started. Probably you might use this as a new default script!


Regards,

Peter

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Peter,
I will update the default run script of scala with your improved version.
I am still interested in resolve your problems with the messages appearing in the start/stop process of the service. If you find any problem, please, let me know.

Best regards,
Juan Carlos

 
Average of ratings: -
Picture of Peter Salhofer
Re: New Virtual Programming Lab (VPL) module
 

Hi Juan Carlos!

I assume that the problem with the folders that could not be deleted has had its source in some directories that we had added manually to the jail folder.

I've upgrade to the latest version of the Jail service and created a new and empty jail folder and now everything works perfectly fine.

Many thanks for your support!

Peter 

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

HI Peter,

This may be a lack of documentation.
The documentation may look like this:
Never add manually files or folders to the jail folder. To upgrade or install new software into your execution server, just upgrade/install normally your software and restart the service.

Best regards,
Juan Carlos

 
Average of ratings: -
Picture of Aivar Annamaa
VPL: Batch evaluation vs. single submission evaluation
 

Hi Carlos!

Sometimes I change VPL tests after the students have submitted their solutions and I try to reevaluate all submissions. With Java tasks, this process seems to iterate over all submissions, but when I check later, some submissions still show the previous evaluation result. When I evaluate those manually, everything goes fine.

I made a small test -- when my vpl_evaluate.sh is

#!/bin/bash

printf '#!/bin/bash\n' > vpl_execution
printf '. vpl_environment.sh\n' >> vpl_execution
printf 'echo "Grade :=>> 1000"\n' >> vpl_execution

chmod +x vpl_execution

then batch mode updates all grades.

But when I add java compilation:

#!/bin/bash

# compilation
PATH=$PATH:/usr/local/bin
javac -d . -encoding UTF-8 -cp .:/usr/share/java/akt/* *.java


printf '#!/bin/bash\n' > vpl_execution
printf '. vpl_environment.sh\n' >> vpl_execution
printf 'echo "Grade :=>> 1000"\n' >> vpl_execution

chmod +x vpl_execution

then some submissions are skipped. When I run the batch several times, then finally all grades will be updated, but it takes quite long time.

What could be the problem here? Is there a time limit for running vpl_evaluate.sh?


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: VPL: Batch evaluation vs. single submission evaluation
 

Hi Aivaar,
Thanks for your bug report and for your code to reproduce the problem.
How many students are you using?
What VPL version is showing this problem?

I will try to find and resolve this problem as soon as possible.

Best regards,
Juan Carlos

 
Average of ratings: -
Picture of Aivar Annamaa
Re: VPL: Batch evaluation vs. single submission evaluation
 

Actually, it turns out I can't reproduce this situation even myself -- I tried again the script that only echos constant grade and this time it didn't work for half of the students. Then I tried it again (with different constant to see where the grade was changed), and now all 45 students got updated. So it's very unpredictable. 

I did see connection error message 3 times during the batch processing, but it seems that those students were the ones who did get updated.

My Moodle Plugin version shows 3.1.1, but I think it was installed last year, not after 20th of Feb this year (http://vpl.dis.ulpgc.es/index.php/home/news/73-release-of-vpl311). So maybe I have old version.

Github says there is a branch called v3.1.2 -- can you predict when this will be released? If soon, then I'd rather wait for this version.

What about v3.2? Are there any new features coming?


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: VPL: Batch evaluation vs. single submission evaluation
 

Hello Aivar,
Our release planning is as follow:

  • v3.1.2 (Will be released in a few weeks)
  • Adds settings to use proy from Moodle server to execution server.
  • Adds settings to use ws or wss under administrator control
  • Adds HTML similarity support
  • I will also  try to resolve the problem you reported


  • Release V3.2  (Will be released in next months)
  • Adds support for binary files: images, zip, jar.
  • The editor adds support for files drag and drop
  • The editor adds support for .zip decompression
  • The editor changes to handle editions of hundreds of files
  • The submission view will highlight more languages
  • Update of Ace editor and noVNC client
  • Default script for php server.


Best regards.

 
Average of ratings: -
Picture of Edgar Merino
Re: New Virtual Programming Lab (VPL) module
 

Estimado Juan Carlos,

Instalè ya el servidor y el mòdulo vpl 3.1.1 en MOODle 2.8, y ya me servìa sin problemas, no se que pasò pero ya no recibo respuesta del servidor haber si me puede ayudar, de antemano el documento con las imàgenes esta en drive, gracias.


https://drive.google.com/file/d/0B9YV0wL2GLQAOUc3bEdjTHB2M2c/view?usp=sharing


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Edgar,
I have seen your pdf and I have found that your problem is that your vpl-jail-system is using a private network IP. You can use this type of IP but this limits the use of the system to networks that have access to the private one (commonly only the same private network).
Notice that from the VPL 3.0, the jail-system require a public IP.
I also have seen that you are using an old version of VPL jail system. It may be better that you upgrade your installation to VPL jail execution system 2.1
http://vpl.dis.ulpgc.es/releases/vpl-jail-system-2.1.0.tar.gz

Best regards.

P.D.. He respondido en inglés porque el foro es en inglés. Saludos.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
The development team of VPL for Moodle is conducting a survey about possible improvements of VPL.  This survey will take you less than 5 minutes. By filling this survey, you are helping the evolution of VPL in the best way.

Thanks for your participation
 
Average of ratings: -
Picture of Sonja Sperber
Re: New Virtual Programming Lab (VPL) module
 

Hi Juan Carlos,


we want to offer C - programming courses on our moodle plattform.

The students should be able to paste short C-Programs in a web editor

and be a able to compile it, update the source code etc.

So VPL seems to be a very good plugin. In order to achieve the

interactive programming tool like mentioned before I think one must 

install the moodle plugin as well as the execution server right ?

I could install the plugin without probs. Whe I tried to install execution server

like explained here:

http://vpl.dis.ulpgc.es/index.php/support/2014-09-27-15-06-22/40-how-to-install-vpl-jail-system

i ran into probs. When I ran  ./install-vpl-sh he ask me to remove apache, which I denied.

The installation process stopped but the deamon could not be started.      

Can you help me here to get the execution-server run ... ?


Moreover, is there step - by - step description that describes

the interplay between moodle plugin and Execution server, i.e. 

the configurations necessary to have an interactive programming tool

in Moodle ?

Thanks for your help!


Best regards,


Sonja


 


     

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hi Sonja,

By default the execution service is ready to run using ports 80 and 443. These ports are normally used by the web servers. If you are using apache (or web server) in this ports then change the configuration of the vpl-jail-server in order to use another unused ports (remember to change appropriately the URL to reach the service).
http://vpl.dis.ulpgc.es/index.php/support/2014-09-27-15-06-22/66-execution-server-configuration

Nevertheless, I must notice that it is very risky to use apache and the vpl-jail-server in the same machine. I think that the security could be a problem, but I am sure that the execution of external code can consume CPU (eg an infinite loop) and degrade the response rate of the web server.

I will try to brief you about the required connections of the vpl-jail-server daemon.
This daemon is charge of managing the execution of the code. The source files come from the moodle server as a XMLRPC request by http or https. When the code is running, the server also requires communication with the user's browser by Websocket technology (ws: or wsssmile.

Bets regards.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

If you don't have the possibility of use another dedicated machine as "execution (jail) server", you might use a virtualization software, as VirtualBox, to install there the "execution server". This solution is very versatile because you can easily set the limits of the resources dedicated to the "execution server", mainly CPUs and memory and also you get a more secure configuration.

By the way, I take this post to kindly ask all users of VPL to respond to the survey that we are conducting. It is about the use of VPL and possible improvements and it will take you less than 5 minutes. By filling this survey, you are helping the evolution of VPL in the best way.

https://docs.google.com/forms/d/1GWIkSi30DQVOAda7L0OvdB-mX6XvHUN53-t255Caq4U/viewform

Many thanks for considering my request.

Best regards.

 
Average of ratings: -
Picture of Sri Ram Manoj Kambhampati
How to make hidden test cases
 

Hello Juan Carlos

VPL is a good plugin to integrate programming based assignments into moodle. However, VPL doesn't seem to have a mechanism to hide the test cases that are failed. VPL is displaying the input and output of the test case for which the evaluation of the source code failed. At the time of examination, it is highly necessary not to disclose the test cases that have failed to evaluate. How do I deal with it. Do I need to make changes in the "vpl_evaluate.sh" file? If so, how can I do it?


Thanks

Sri Ram Manoj K

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: How to make hidden test cases
 

Hello Sri Ram Manoj,

I already have answered this question, see the following post

https://moodle.org/mod/forum/discuss.php?d=154988#p1207875

Please, let me know if this resolve your problem.


Best regards.


 
Average of ratings: -
Picture of rohit katariya
Re: New Virtual Programming Lab (VPL) module
 
I am installing vpl and moodle.
I have 2 ubuntu cloud VMs.
The installation page says we will need to install virtual box(which according to my understanding is required to run jail server and moodle on same machine).

But in my case, as I have 2 separate machines, I would not require installation of virtual box.

Am I right? would like to confirm before proceeding.
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Rohit,
If you have 2 machines then you don't need to use VirtualBox or another lightweight hypervisor.

The documentation that you refer here, is good but not the official one.

Best regards.

http://vpl.dis.ulpgc.es

 
Average of ratings:Useful (1)
Picture of rohit katariya
Re: New Virtual Programming Lab (VPL) module
 

Sir,

I was able to install jail server and moodle and they are communicating among them required, thanks for your help.

This is when I am logged in from my moodle server macahine itself.

I am struck at this error

Incorrect access detected, this server may be accessed only through "http://172.16.2.74/moodle" address, sorry.
Please notify server administrator.
This page should automatically redirect. If nothing is happening please use the continue link below.
Continue

172.16.2.74 is the private ip within the network of the VM.I have a public ip(within the academic network) in range 10.237.x.x  assigned to the machine. when I change the ip in var/www/html/moodle/conf.php, I am able to get moodle running without the above error but after this, I am unable to compile vpl actiivity as when I try to do this the moodle is not able to communicate to jail server(connection fail error).

Please suggest a sollution.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 
Hello Rohit,
the moodle message is saying that the IP/name you use to reach the Moodle server is not the same that the server has in "config.php".
Your server has more than one IP?
Are you using NAT inside the private network?
Beware that any 10.237.x.x IP is private.
If you want to use Moodle+VPL from internet, both your Moodle server and jail server must have a public IP.
Beware that PRIVATE IPs are all the following ranges: 10.x.x.x, 172.16.x.x-172.31.x.x and 192.168.x.x.
more detail at http://en.wikipedia.org/wiki/Private_network

If you want a better response, please describe in detail the networks of your machines.

Best regards
 
Average of ratings: -
Picture of rohit katariya
Re: New Virtual Programming Lab (VPL) module
 
yes sir I have 2 IPs.
The moodle is to run in our college campus intranet which has ip in range 10.x.x.x. For this I have been allotted 2 virtual machines one for installing moodle and other for execution server. yes these interface through NAT and have IPs in range 172.x.x.x. The above machine on which moodle is being installed has 2 IPs one is private ip in range 172.x.x.x and other in range 10.x.x.x which I am calling public(only in campus).
My jail server doesn't have a public ip, but it has private ip in the same range as the private ip of the moodle server. Will still require a public ip for the jail server?
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

The Moodle server and the jail server (both) MUST be reachable from the clients. The system will not work if you use a network architecture that allow only to the Moodle server connect to the jail server.
I think you have two easy options here:
1) take out of the NAT net your Moodle and jail machines, and uses 10.x.x.x IPs
2) Use NAT forwarding to access to your Moodle and jail server inside your 172.x.x.x net. You will use the exposed IP outside your NAT (one IP in 10.x.x.x) but your real IP inside your NAT will be one for moodle and one for the jail server in the net 127.x.x.x.
2.a) you must config your jail server to use ports different than Moodle (e.g. 8000 and 9000)
2.b) you must config the VPL plugin (module) to use as URL of jail service the exposed IP+port (e.g.  http://10.1.1.1:8000)
2.c) you must configure your NAT to forwarding ports 8000 and 9000 to your jail server ip and port (e.g. 172.1.1.100)
2.d) Remember to set in your config.php your exposed IP.

Best regards.

 
Average of ratings: -
Picture of rohit katariya
Re: New Virtual Programming Lab (VPL) module
 

Sir, I don't have the access to NAT box that the VMs use. can I do NAT forwarding from the machine with public IP  without need of an access to nat box.


is this what i am looking for ? Local Port Forwarding

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Sorry, but I think that no. That is for use with SSH and not at net level.

I am not an expert, but If your Moodle server has two IP, one at 10.x.x.x net and other at 172.x.x.x.x, then iptables at your Moodle server may be your solution. Using iptables for port forwarding will becomes your Moodle server into a NAT box. I don't know the load issues that can arise with this configuration.

I must say that I am not an expert configuring iptables.
Best regards.

 
Average of ratings: -
Picture of rohit katariya
Re: New Virtual Programming Lab (VPL) module
 

sir,

is it possible to have more than one questions in an activity or to group several activities together?

I am trying to create a programming test which will have around 5-10 questions for which these questions should appear as a group. 

Is there an option in which student cannot change the code given by the instructor and only fill in the required portion of the code.

Also is there an option to give sample test cases for students so that he sees only the correct output of the sample test cases when he presses evaluate.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Q. is it possible to have more than one questions in an activity or to group several activities together? I am trying to create a programming test which will have around 5-10 questions for which these questions should appear as a group.
A. No. VPL allows to create activities but not groups of activities. You can create a "Grade category".

Q. Is there an option in which student cannot change the code given by the instructor and only fill in the required portion of the code.
A. No. At this moment you can't.

Q. Also is there an option to give sample test cases for students so that he sees only the correct output of the sample test cases when he presses evaluate.
A. No. but you can see similar question and answer at this forum.

Best regards.

 
Average of ratings: -
Picture of rohit katariya
Re: New Virtual Programming Lab (VPL) module
 

Sir,

Thank you for your response.

I will need to make a lot of changes to gui according to my needs and would like to combine it with quiz module so that I can create a test like environment.

So, I was wondering if I can build a similar module myself according to my needs and use your execution server at the back-end. It would be helpful if you could share the api which I can use for communication between your execution server and the new module.

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

I will share the API of the execution server, but there is no document and at this moment. I can't dedicate time to write one. The API is really inside the code. I hope to get enough time, after the summer, to generate the document.

Best regards.

 
Average of ratings: -
Picture of Sri Ram Manoj Kambhampati
Navigation Panel Missing from a VPL Activity
 
I've ran into the trouble of missing navigation pane from vpl activities on moodle 2.8.5. I'm hosting moodle on my laptop with XAMPP. The version of my VPL Plugin is 3.1.2.

THe console of the web browser doesn't display anything.

I've made an attachment of how the activity it is looking.



Thanks

Sri Ram Manoj K


 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: Navigation Panel Missing from a VPL Activity
 

Hello Sri Ram Manoj Kambhampati,
I need more information to spot the problem, I haven't been able to reproduce it on Moodle 2.8.6 (the 2.8 version that is available). If you are so kind to send me a backup of the problematic activity, I will restore it at my Moodle and it will be easier to reproduce the problem. A file with the HTML that your browser receive will also help.

Best regards.

 
Average of ratings: -
Picture of Andrea Pruccoli
Re: New Virtual Programming Lab (VPL) module
 
Hi Juan.

I have created several VPL activities to run python programs, and all works fine (running, debugging, evalutaion).
But I have encountered odd conducts for what concernes submissions and grades assignment.

1) When student is editing his file, when he saves the file, by teacher side I can see that a submission has been added to the "Submissions list" section, and by clicking on it, the teacher can grade the file.
This happens every time a student saves his file. Is this normal? Can I prevent the student from doing a submission anytime he saves the file he is editing?

2) I've set the option "Maximum number of files" at 1, and after a student submits a file from the "Submission" section, by teacher side I see the submission. If the student tries to submit another file, by student side the submission succeeds, even though by teacher side I don't see the submission in the "Submissions list". But if the student modifies the file from the "Edit" section and saves it, as the point above. Then he is able to submit another file from the "Submission" section. Can I prevent the student from avoiding the "Maximum number of files" restriction? Moreover, shouldn't the student not be able to edit and save a file after he has submitted a file if I set the "Maximum number of files" at 1?

3) After a teacher evaluates and grades a submission of a student, the student can edit and save the file, and this create another submission (as pointed at point 1). But shouldn't the student not be able to edit and save a file after the teacher has graded his submission?

Thanks in advance,
Andrea
 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Andrea,
At this moment (v3.1.2) the way that VPL works is
1) The student can save all the versions they want until the due date.
2) The last version is the one that will be assessed by the teacher.
3) If the due date of the activity has not been reached then student can resubmit again the work, evaluated or not.

I will try now to answer every question
A1) This behavior is normal. VPL lacks of the concept of draft or final submission.
A2) The "Maximum number of files" is maximum number of files the student can upload every time.  If you don't want to keep all the versions you can change it at the plugin setting.
A3) Yes, the student can resubmit again the work. Really this is a bad behavior of VPL. We will change this in the next release.

All these questions are related to the expectation that VPL would have a similar behavior to the assignment module (task). We are asking help to the users of VPL to guide its development by answering a survey. We have asked about these features in the first question. You can find the survey at
https://docs.google.com/forms/d/1GWIkSi30DQVOAda7L0OvdB-mX6XvHUN53-t255Caq4U/viewform

We are sure that the way that VPL is used may be improved.

Best regards.

Juan Carlos
P.D.: If you find other odd behavior, please ask again.

 
Average of ratings:Useful (1)
Picture of Andrea Pruccoli
Re: New Virtual Programming Lab (VPL) module
 

Thanks for the fast reply, I'm looking forward the new release.


Best regards,

Andrea

 
Average of ratings: -
Picture of rohit katariya
Re: New Virtual Programming Lab (VPL) module
 

Sir, the documentation page says

"

Numbers: only numbers are written. Only numbers are checked out, the rest of the text is ignored. The real numbers are checked with tolerance

example:

output = 4

5 6.8

"


How can we set custom tolerance for real numbers?

 
Average of ratings: -
Picture of Juan Carlos Rodríguez-del-Pino
Re: New Virtual Programming Lab (VPL) module
 

Hello Rohit,
sorry, but the floating point numbers tolerance is fixed. I take note for a new enhance of next version of the automatic evaluation program of VPL.
If you really need to change it, you can modify the automatic evaluation program of VPL.
Best regards.


 
Average of ratings: -
Picture of rohit katariya
Re: New Virtual Programming Lab (VPL) module
 

Sir,

Can you please tell if there is a value of the predefined tolerance.

Regards,

-R


 
Average of ratings: -