[OJ-AP] Real time online judge

10 views
Skip to first unread message

Zhigang Sun

unread,
Apr 20, 2010, 2:23:37 AM4/20/10
to sunner-moodle-plugins
Hi, all

The online judge plugin has a big upgrade in svn. It is about judging submissions immediately after uploading. I've tested it in my product site for one day. It works smoothly.

If you'd like to have a try, use this file to overwrite mod/assignment/type/onlinejudge/assignment.class.php. If your moodle cron script is invoked by php-cli (in crontab, run with something like "/usr/bin/php MOODLE_PATH/admin/cron.php"), the above overwriting is all you need to do. Just wait for the cron to run once and all will be done. If your run moodle cron script through http, you need to run the following command in command line manually:

php MOODLE_PATH/admin/cron.php

The new version creates a daemon by forking the cron script to judge submissions immediately. To check whether the daemon is running, use "ps -FC php". If you see something like the following lines, it works.

UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
********** 19911     1  0 11194 23240   1 10:25 ?        00:00:45 /usr/bin/php /****************/moodle/admin/cron.php

If you never run cron through php-cli, the new version file will work as the old versions.

Another news about supporting more programming languages and Windows. I found a wonderful site: http://www.ideone.com . It provides a free web service which can compile, run uploaded code and return the results. It supports more than 40 kinds of languages. We are adding the feature that judge submissions through ideone.com. I believe this feature can make things easier and safer. Moreover, it should work well in Windows server.

--
哈尔滨工业大学(Harbin Institute of Technology)
孙志岗(Sun Zhigang)
http://sunner.cn

--
You received this message because you are subscribed to the Google Groups "Sunner Moodle Plugins" group.
To post to this group, send email to sunner-moo...@googlegroups.com.
To unsubscribe from this group, send email to sunner-moodle-pl...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sunner-moodle-plugins?hl=en.

Sunner Sun

unread,
Apr 20, 2010, 2:46:29 AM4/20/10
to Sunner Moodle Plugins
NOTICE:

Apply this upgrade on onlinejudge 1.1.1 only. Do NOT use it on older
versions.

On Apr 20, 2:23 pm, Zhigang Sun <sun...@gmail.com> wrote:
> Hi, all
>
> The online judge plugin has a big upgrade in svn. It is about judging
> submissions immediately after uploading. I've tested it in my product site
> for one day. It works smoothly.
>
> If you'd like to have a try, use this
> file<http://sunner-projects.googlecode.com/svn-history/r248/trunk/onlineju...>to
> overwrite mod/assignment/type/onlinejudge/assignment.class.php. If
> your
> moodle cron script is invoked by php-cli (in crontab, run with something
> like "/usr/bin/php MOODLE_PATH/admin/cron.php"), the above overwriting is
> all you need to do. Just wait for the cron to run once and all will be done.
> If your run moodle cron script through http, you need to run the following
> command in command line manually:
>
> php MOODLE_PATH/admin/cron.php
>
> The new version creates a daemon by forking the cron script to judge
> submissions immediately. To check whether the daemon is running, use "ps -FC
> php". If you see something like the following lines, it works.
>
> UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
>
> ********** 19911 1 0 11194 23240 1 10:25 ? 00:00:45
>
> > /usr/bin/php /****************/moodle/admin/cron.php
>
> If you never run cron through php-cli, the new version file will work as the
> old versions.
>
> Another news about supporting more programming languages and Windows. I
> found a wonderful site:http://www.ideone.com. It provides a free web
Reply all
Reply to author
Forward
0 new messages