Virtual Programming lab (VPL) with C#

Re: Virtual Programming lab (VPL) with C#

by Juan Carlos Rodríguez-del-Pino -
Number of replies: 2
Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Dave,
I have found the problem that generate the error in gcc.
Apparently, the behavior of execvp function (used by gcc) in Ubuntu is slightly different from RedHat. The execvp function may search for the program to execute using the directories in the PATH variable, but, in RedHat, if found an nonexistent dir, stops the search.
All the problems are around the PATH variable used. The PATH variable has the directories '/sbin', '/usr/sbin', etc. nonexistent in the jail.
A temporal workaround is to add the code

export PATH=/usr/bin:/usr/local/bin:/bin
to the ../moodle/mod/vpl /jail/default_scripts/common_script.sh file of the VPL plugin at your Moodle server.

I will try to give a better solution to the problem within few days.

I have to notice that this problem is only shown in jail servers installed on RedHat OS (and derived).

Best regards.
Juan Carlos


In reply to Juan Carlos Rodríguez-del-Pino

Re: Virtual Programming lab (VPL) with C#

by Dave Grinverd -

Hi Juan,
Writing the export path command in common_script.sh did the job!
It fixed all of the paths issues, so I removed all of the variables I configured in the run scripts.

Here are a few things that may help people:

1) The one thing that I did need, is what I wrote about PKG_CONFIG_PATH in order to run "-pkg:dotnet".
I don't know if it is also related to the RedHat OS(or some path issue), but writing this line in csharp_run.sh:
PKG_CONFIG_PATH="/usr/local/libpkgconfig"
worked for me.

2) In the file csharp_debug.sh, it uses "mdb" which isn't found.
From what I read in mono-project's site, it should be replaced by "mono --debug".
That made me able to debug from the activity in the moodle site.

My only concern is what to do when I update the VPL plugin.
Do I need to manually take my additions in the default scripts directory?
Or is there something better to do?

Any way, Thank you for your help and time!
I appreciate it very much!




In reply to Dave Grinverd

Re: Virtual Programming lab (VPL) with C#

by Juan Carlos Rodríguez-del-Pino -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Dave,
We are not expert users of many of the tools and programming languages that VPL support, and we are open to accept corrected, adapted or new script propounded by expert users. The use of "mono --debug" instead of mdb is clear. But we don't know if it must be used alone or under gdb control, can you answer this question? In the case of the use of PKG_CONFIG_PATH we think that this is an specific need of your installation because the way you install your mono.
If you need to use specific script to run, debug or evaluate code you can use the "based on" feature of VPL. This feature allow to take scripts (and more) from one activity (that may be hidden for students)  and use it in many activities.

Best regards.
Juan Carlos