On Tue, Nov 4, 2008 at 7:45 PM, "Sankarshan (সঙ্কর্ষণ)"
<[EMAIL PROTECTED]> wrote:
> Chirag Anand wrote:
>
>> We are hosting a programming competition in our college this weekend. We
>> have a RHEL 4 server in our college on which we are planning to upload the
>> code, compile the code there only and matching with the output. The problem
>> is, that we want everyone to do all this from their rooms, from where the
>> server is directly accessible. We dont people to go to labs and code. This
>> will increase participation. But i am not able to find a script that does
>> this, which can be run on the server through apache.
>

I understand that you might not want to create separate home dir's for
all students on one server as that would be too many. I'm sure there
should be some kind of solution there for network compilation of local
code. When I was in college, a person had made a small project for
this. However, if you are not able to find such a thing, something can
be cooked up using php and shell scripts.
I'm not good in php, but a simple solution that requires minimal
coding in php that I can think of is to use wordpress and cforms
plugin.
Step 1. Just create a page in wordpress, and create a simple form in
cforms to allow uploading of zip files. (All this is WYSIWYG so far)
Step 2. Cforms gives you the ability to "hook" in your functions to
work on uploaded files. You can create a simple hook to unzip the
uploaded file into a directory for the username given in the form or
the ip address of the PC from which it was uploaded.
Step 3. Then exec your shell script that runs gcc to compile it and
compares the output with the expected ones.

Regards
Shantanu
----------------------
I didn't do it, nobody saw me do it, U can't prove anything - Bart Simpson
http://blog.shantanugoel.com
http://tech.shantanugoel.com
_______________________________________________
ilugd mailinglist -- [email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/[email protected]/

Reply via email to