Giter Site home page Giter Site logo

hit-moodle / moodle-local_onlinejudge Goto Github PK

View Code? Open in Web Editor NEW
120.0 120.0 59.0 3.39 MB

Online Judge plugin for Moodle 2.7-4.2.

Home Page: http://cms.hit.edu.cn

License: GNU General Public License v3.0

Shell 1.34% PHP 43.02% HTML 6.56% C 21.36% Makefile 1.50% Awk 1.43% Batchfile 0.05% CSS 15.80% Ruby 0.09% JavaScript 6.37% SCSS 2.49%
assignment-feedback icpc moodle moodle-plugin online-judge sphere-engine

moodle-local_onlinejudge's People

Contributors

dependabot[bot] avatar hzxie avatar janisz avatar keefo avatar ndrwnaguib avatar sunner avatar yuxiaoye1223 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-local_onlinejudge's Issues

extension_loaded('pcntl') broken on RHEL 6

This issue is reported by @trampgeek . His report:

There's a check in your judge install script:

if (!extension_loaded('pcntl') || !extension_loaded('posix')) {
cli_error('PHP pcntl and posix extension must be installed!');
}

On RHEL6, 'pcntl' is compiled into PHP and extension_loaded('pcntl') returns FALSE [which I admit seems odd but I just checked] even though all its function are in fact available. So I finished up just commenting that line out. You may be able to find a better work around than that :)

sandbox won't build

output

carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data uname -a
Linux li250-237 2.6.39.1-linode34 #1 SMP Tue Jun 21 10:29:24 EDT 2011 i686 GNU/Linux
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data cc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-        4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-        linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data make clean
make -C libsandbox clean
make[1]: Entering directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
rm -rf doc
rm -f src/platform.o src/sandbox.o src/symbols.o libsandbox.a libsandbox.so \
        libsandbox.so.0.2.18
make[1]: Leaving directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
rm -f *.o *_test detector 223 policy.c
rm -f sand
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data make
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o stdin_test testcase/stdin.c
make -C libsandbox libsandbox.a
make[1]: Entering directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread  -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/platform.o src/platform.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread  -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/sandbox.o src/sandbox.c
src/sandbox.c: In function '__sandbox_tracer':
src/sandbox.c:1030: warning: label 'next' defined but not used
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread  -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/symbols.o src/symbols.c
ar rcvs libsandbox.a src/platform.o src/sandbox.o src/symbols.o
a - src/platform.o
a - src/sandbox.o
a - src/symbols.o
make[1]: Leaving directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITHOUT_TSC_COUNTER -I ./libsandbox/src -c policy_print.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITHOUT_TSC_COUNTER -I ./libsandbox/src -c sand.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D         WITHOUT_TSC_COUNTER -I ./libsandbox/src  -o detector sand.o policy_print.o ./libsandbox/libsandbox.a
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o 223 223.c
./detect.sh
Detecting syscalls...
INIT_SYSCALLS:
ALLOWED_SYSCALLS:
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITHOUT_TSC_COUNTER -I ./libsandbox/src -c policy.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D W    ITHOUT_TSC_COUNTER -I ./libsandbox/src  -o sand sand.o policy.o ./libsandbox/libsandbox.a
./runtest.sh 1 stdin_test < /dev/null
make: *** [stdin] Error 255
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ ^C
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data ./runtest.sh 1 stdin_test <     /dev/null
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ ./runtest.sh 1 stdin_test < /dev/null
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ ./runtest.sh 1 stdin_test < /dev/null
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ ./runtest.sh 1 stdin_test
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data uname -a
Linux li250-237 2.6.39.1-linode34 #1 SMP Tue Jun 21 10:29:24 EDT 2011 i686 GNU/Linux
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data cc -v
    Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-    4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data make clean
make -C libsandbox clean
make[1]: Entering directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
rm -rf doc
rm -f src/platform.o src/sandbox.o src/symbols.o libsandbox.a libsandbox.so \
        libsandbox.so.0.2.18
make[1]: Leaving directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
rm -f *.o *_test detector 223 policy.c
rm -f sand
carl@li250-237:~/www/moodle/local/onlinejudge/judge/sandbox/sand$ sudo -u www-data make
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o stdin_test testcase/stdin.c
make -C libsandbox libsandbox.a
make[1]: Entering directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread  -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/platform.o src/platform.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread  -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/sandbox.o src/sandbox.c
src/sandbox.c: In function '__sandbox_tracer':
src/sandbox.c:1030: warning: label 'next' defined but not used
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread  -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/symbols.o src/symbols.c
ar rcvs libsandbox.a src/platform.o src/sandbox.o src/symbols.o
a - src/platform.o
a - src/sandbox.o
a - src/symbols.o
make[1]: Leaving directory `/home/carl/www/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITHOUT_TSC_COUNTER -I ./libsandbox/src -c policy_print.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITHOUT_TSC_COUNTER -I ./libsandbox/src -c sand.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITHOUT_TSC_COUNTER -I ./libsandbox/src  -o detector sand.o policy_print.o ./libsandbox/libsandbox.a
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o 223 223.c
./detect.sh
Detecting syscalls...
INIT_SYSCALLS:
ALLOWED_SYSCALLS:
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D     WITHOUT_TSC_COUNTER -I ./libsandbox/src -c policy.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITHOUT_TSC_COUNTER -I ./libsandbox/src  -o sand sand.o policy.o ./libsandbox/libsandbox.a
./runtest.sh 1 stdin_test < /dev/null
make: *** [stdin] Error 255

Some Suggestions

Hello, I am a student of University of Sao Paulo.

We used Moodle Online Judge Plugin in some tasks of Object-Oriented Programming classes.

To improve the activities I did a small change in your code. I added the following options for activities:
-Insert a preamble in a code;
-Insert a postamble in a code;

With this options the teacher can add some pieces of code in all tasks sent to the activity.
In University of Sao Paulo, we used this options to establish the main function for all students. So, we can evaluate if the student used correct programming techniques like heritage and polymorphism in Java. It isn't possible with only output comparision.

I have released these changes in a google code repository http://code.google.com/p/moodle-online-judge-changes/
However, I think it would be interesting if these changes were made ​​by you, who built the entire project. So I want to make this suggestion to you.

Another suggestion is a plug in to use the online judge as a question type of a quiz in moodle. That would be interesting why moodle add all activities to grade board, and several times we use your plugin for a non-evaluated activity and in actitivities with more than one exercise.

It is a great project, thanks.

judge后台进程停摆报警

在local插件的cron中检查judge后台进程多久没判题了。如果过久,就发email给管理员。发给谁在设置中设定。选人的界面参考网站设置中开课请求发给谁的那个设置

lib.php中增加onlinejudge_cron()函数,它完成相应功能。 浏览器访问admin/cron.php,或者命令行php admin/cli/cron.php可以触发此函数

Problem when upgrading onlinejudge

When upgrading moodle_local_onlinejudge to latest git version I get following error:

Debug info: ERROR: column "stdout" cannot be cast to type bytea
ALTER TABLE mdl_onlinejudge_tasks ALTER COLUMN stdout TYPE BYTEA
Stack trace:

line 400 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
line 232 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 573 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 88 of /lib/ddl/database_manager.php: call to pgsql_native_moodle_database->change_database_structure()
line 75 of /lib/ddl/database_manager.php: call to database_manager->execute_sql()
line 636 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
line 58 of /local/onlinejudge/db/upgrade.php: call to database_manager->change_field_type()
line 385 of /lib/upgradelib.php: call to xmldb_local_onlinejudge_upgrade()
line 1466 of /lib/upgradelib.php: call to upgrade_plugins()
line 317 of /admin/index.php: call to upgrade_noncore()

请求评测时报错“无效的语言ID:{$a}”

虚拟机下安装CentOS 5.5 ,php 5.3.3 moodle 2.1.1环境,在线评测设置的编程语言:C (gcc-4.3.4, ideone.com)。请求评测时报错:无效的语言ID:{$a}”。请问如何解决?谢谢!

文件上传问题

  我的平台如果安装moodle 2.1,在线评测的评测用例文件不能加载

当我改成moodle2.2时这个问题得到解决,但普通的作业文件又不能正常上传,.c文件,.txt文件可以,
但其它类型的如word,excel,ppt,压缩文件等都不能上传,点击上传的时候却弹出来下载的对话框。
现在被这个问题困惑,装2.1的测试用例文件上传不了,装2.2的学生作业又提交不了。

长时间显示 等待评测错误,如何解决

提交的程序一直显示等待评测,详细信息如下:

标准输出* 不可用
标准错误输出* 不可用
编译器输出 不可用
敏感信息* 不可用
信息 不可用
CPU使用时间 不可用
内存使用量 不可用

  • 只教师可见

在线评测 项目下,显示的状态是:
“在线评测已经评测了6个任务。现在等待队列中还有6个任务。”

ideone.com网站登录后,没有看到提交的程序

发往ideone.com的访问请求之间的时间间隔(秒)设为了15秒
语言是 pascal(fpc) fpc 2.2.0 ideone.com
应该怎么办?谢谢

在Windows下测试

现在还未在Windows下测试过。需要测试一下以确定是否好用

Not compatible with nginx

When run on nginx, moodle starts to send empty html back after I deployed onlinejudge. After I started using Apache 2.2 to serve moodle, and using nginx as a reverse proxy server, it works.

How to express '\n' in testcase of input?

include < stdio.h >

int main()
{
int i;
char c;
char c1[81],c2[81];
printf("input cipher code:");
for(i=0;(c=getchar())!='\n';i++)
{
c1[i]=c;
if((c>='A'&&c<='Z')||(c>='a'&&c<='z'))
{
if(c>='A'&&c<='Z')
c=(90+65)-c;
else c=122+97-c;
c2[i]=c;
}
else c2[i]=c;
}
c1[i]='\0';
c2[i]='\0';
printf("\ncipher code :%s", c1);
printf("\noriginal text:%s\n",c2);
return 0;
}

如何更改作业的反馈者?

作业的反馈者默认是管理员,有没有办法更改为该课程的教师?也许这不是oj作业的问题,但我只在使用oj作业时才用moodle。所以还是希望在此请教。

c语言程序本地评测出现“函数受限”错误提示,怎么办?

详细信息:
标准输出* 不可用
标准错误输出* 不可用
编译器输出 不可用
敏感信息* 不可用
信息 不可用
CPU使用时间 不可用
内存使用量 不可用

  • 只教师可见

程序代码:

include<stdio.h>

include<stdlib.h>

unsigned long fac(int a)
{
int i;
unsigned long long ans=1;
for(i=1;i<=a;i++)
ans*=i;
return ans;

}

int main()
{
int n;

scanf("%d",&n);

printf("%lu",fac(n));
system("pause");
return 0;

}

系统更新数据备份问题

老系统中的课程数据备份后在更新后的系统中不能正确还原,点击还原后的连接找不到数据,不知道应该注意什么问题才能保证正确的还原,直接把原来在moodledata中的数据拷贝下来,更新后再拷贝进来可以吗?

为judge_base增加is_available()方法

用来判断各个judge是否可用。可以用的,才会从get_language()返回。

sandbox只有在Linux下且judge/sandbox/sand/sand文件可执行时可用。

ideone只有在php soap扩建已安装时可用。

增加pascal本地评测语言

根据使用说明是只能在本地测试c 和c++ 的程序,能不能加上对于pascal语言的评测呢?又该怎样加呢?

在线评测系统安装问题 继续求助

安装以后出现了这个模块,在左侧导航栏出现了在线评测,但是课程活动中没有增加相应的内容,怎么办?

我确实是按照说明做的,安装了assignment type。
安装后提示的信息是

Judge daemon successfully created. PID = 3218

vc下编译运行通过,但gcc编译错误

include < stdio.h >

include < math.h >

int main()
{
double c,p,a,n;
a=1.09,n=10.0;
c=pow(a,n);
p=c;
printf("p=%f\n",p);
return 0;
}

onlinejudge 编译错误
/tmp/ccC9D9Ih.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld 返回 1

编程语言: C (本地运行)
编译器: gcc -m32 -D_MOODLE_ONLINE_JUDGE_ -Wall -static -o %DEST% %SOURCES% -lm
内存最多可用: 1MB
CPU使用时间上限: 1 秒

自动重新编译

如何让学生的代码重新提交 后能立即加入编译运行队列?

Judging fails with "Restricted Functions"

There seems to be some odd behaviour when using judged and sandbox combination.

After trying to judge a simple hello world example (hello.c) judging states "Restricted Functions". The file hello.c has the following lines:

# include

int
main(int argc, const char *argv[])
{
printf("hello world\n");
return 0;
}

When running the judged with:
$ sudo -u www-data php judged.php -v -n
it outputs the following lines when doing an evalution:

== TASK: 41 == Judging... Successfully judged: 8

System is running Ubuntu 10.04, Apache2 and PHP 5.3.2. Online judge version is cloned from the 063b303 commit.

Any tips how should I progress to gain more information?

Thanks in advance!

在线评测的运行时错误是怎么回事?

我用的是ideone在线评测,有的题目会出现莫名其妙的运行时错误,不知道是怎么回事。

答案:直接在ideone平台上查看了相关信息,只有一个运行状态re,仔细看了学生的程序,原来int main(void)主程序没有return 0 也会使ideone呈现运行时错误状态,然而却没有影响正确的运行结果。
丢掉return 0的main程序,直接用gcc或g++编译运行,没有错误。

Regarding Online Judge Usage

Thanks for your previous reply.
I logged in as a student and uploaded a sample code in c in Moodle .
But i did not see anything like onlinejudge assignment .
Can u please send the steps on how to use online judge plugin .
Also which moodle version will u recommend to use for Online judge plugin.
I am in spot of bother.
Please help me out.
I really need to work on this plugin!!

Setting proxy for plugin

my connection allows only port 80 and added to that how can I set the pxoxy for the judge because it is not able to send the code to ideom.com because of proxy and I am using the plugin in moodle 2.0 onlinejudge2, can anyone advise me on how I can set the proxy for the plugin or moodle as a whole?

在设置ideone用户和密码时做验证

clients / mod / assignment / type / onlinejudge / assignment.class.php 中的 form_validation()函数验证教师为作业设置的各种参数是否合法。现在这里对ideone的用户名和密码只校验是否存在,不校验是否有效。

需要在这里调用ideone api中的testFunction()方法,验证用户名和密码是否正确。如果不正确,通过设置errors[]数组提示用户修正。

有了此功能,就不需要用户输入两次密码了

在线评测系统安装问题

安装以后出现了这个模块,在左侧导航栏出现了在线评测,但是课程活动中没有增加相应的内容,怎么办?

我确实是按照说明做的,安装了assignment type。
安装后提示的信息是

Judge daemon successfully created. PID = 3218

在线判题作业的自动评分怎样成为最终评分?

我设置的在线判题作业评分正常,但moodle中的“成绩”列显示为"100/100";“状态”列显示为“更改”;“最终成绩”列始终为“-”,进行成绩报表,没有成绩。如何让“最终成绩”列有成绩?

pascal语言代码 显示等待评测,详细信息是下面的提示

一个最简单的pascal代码,直接在ideone网站可以运行正常。
代码是:
var a,b:integer;
begin
readln(a,b);
writeln(a+b);
end.

在一台服务器上得错误代码是:

检测到源代码错误,必须由程序员修复:The course you passed to $PAGE->set_cm does not correspond to the $cm.

到了另一台服务器上运行的结果,就变成了:

标准输出* 不可用
标准错误输出* 不可用
编译器输出 不可用
敏感信息* 不可用
信息 Error Fetching http headers
CPU使用时间 不可用
内存使用量 不可用

  • 只教师可见

java submissions always exceed memory limit

When I add a java assignment as a teacher and submit it as a student, I always get "Memory-Limit Exceed", even with the most basic "hello world" program. When I submit the same program to ideone directly it reports a memory usage of around 240MB. Although when adding the assignment I can only choose the maximum memory usage to be between 1MB and 64MB. Is there any way I can fix this, or am I doing anything wrong? This seems to be an issue with java programs. I made another assignment and can submit a c-program for example and get it accepted without any problems.

I hope this is the right place for such a question, I came here through the "Bug reports, feature requests, help wanted and other issues" link in readme.md. Any help is highly appreciated =)

ideone.com网站经常不能正常访问,导致评测结果是内部错误,系统的相应时间我已经设为15秒了,还是不行。急切需要pascal语言的本地测试功能。

pascal语言的程序提交评测后,经常会出现内部错误的结果,这时访问ideone.com也是很难访问,甚至上不了,急切需求pascal语言能够在本地服务器评测,希望开发这个插件的老师们能够加上这项功能,目前c语言可以在本地评测,pascal语言应该可以实现吧??急切盼望!!!!谢谢!!

运行时错误?

#include < stdio.h >
int main()
{
    int i;
    char c;
    char c1[81],c2[81];
    printf("input cipher code:");
    for(i=0;(c=getchar())!='\n';i++)
    {
        c1[i]=c;
        if((c>='A'&&c<='Z')||(c>='a'&&c<='z'))
        {
            if(c>='A'&&c<='Z')
                c=(90+65)-c;
            else c=122+97-c;
            c2[i]=c;
        }
        else c2[i]=c;
    }
    c1[i]='\0';
    c2[i]='\0';
    printf("\ncipher code  :%s", c1);
    printf("\noriginal text:%s\n",c2);
    return 0;
}

该程序本地VC下运行正确,上传后出现运行时错误,不知为什么?

实现renderer.php中的mystatistics()方法

主要是统计当前用户($USER)在oj中的所有表现,比如判过几次题、通过率多少、杯具过多少等等。如果你是oj的学生用户,你会知道该统计什么的。

Mainly to count all the performance of the current user ($USER) in oj, such as the number of questions, the rate of passing, the number of cups, and so on. If you are a student user of oj, you will know what the statistics are.

onlinejudge/admin/下两个php文件使用的简写

虽然php能够支持脚本简写(形如),但是这在php5.3.x版本中默认是禁用了的,而且不符合标准,php官方也不建议这么做。这里稍微困扰了我一下,然后发觉原来是这样的问题。因此建议你们能够把简写的地方补齐,即更改为

Judge is not sending

Hi,

the Judged, not sending the files to the ideone.com.
on average how long it takes to judge the activities?
could you help me?

While waiting for Judment, I did the translation for Portuguese-br, useful if I can pass.

练手专用:修改编译器参数位置

这是一个没啥技术含量的issue,主要用来熟悉流程,练练git啥的。

文件judge/sandbox/lib.php中大约40行左右的位置有4行编译器调用的代码,如下:

        'c' => 'gcc -D_MOODLE_ONLINE_JUDGE_ -Wall -static -o %DEST% %SOURCE% -lm',
        'c_warn2err' => 'gcc -D_MOODLE_ONLINE_JUDGE_ -Wall -Werror -static -o %DEST% %SOURCE% -lm',
        'cpp' => 'g++ -D_MOODLE_ONLINE_JUDGE_ -Wall -static -o %DEST% %SOURCE% -lm',
        'cpp_warn2err' => 'g++ -D_MOODLE_ONLINE_JUDGE_ -Wall -Werror -static -o %DEST% %SOURCE% -lm'

其中-lm参数挪到-static后面比较好。要做的就是这个

Sandbox refuses to make

After compling the local sandbox environment in an Ubuntu 11.04 (x86) in a virtual machine, I find that when make tries to run the tests libsandbox just keeps throwing status 8 (Internal error). Why could it happen? If more information about the system is needed just ask for it.
Thank you!

Unable to use online judge plugin

I have properly installed this Online-Judge plugin in Ubuntu 12.04. I am using moodle 2.3+. I am unable to find out :-

1). Where can a student upload his c/c++ code .
2) .From where will the sandbox tool run and evaluates this code.

I have installed sandbox using make command. But i am not not able to run sandbox. I have read all readme files but unable to get information.

I have referred this site for installing Online Judge:-

https://github.com/hit-moodle/moodle-local_onlinejudge

Please Help me out !!!!

在线评测测试用例来自于文件不能添加文件

管理测试用例页面打开之后,只有第一个测试用例里的输入文件出现添加按钮,但一直处于loading状态,输出文件和其它测试用例的输入/输出文件都有一个等待的标志在转动,点击唯一的一个添加按钮没有任何反应,网页的左下方显示网页上有错误,不知道是哪里出了问题,请各位帮助分析一下。
直接在输入/输出窗口中输入用例没有问题。今天布置的第一道用文件的在线评测题,才发现这个问题。

online judge 作业移动不了!

布置的onlinejudge作业,虽然显示有四向箭头(提示“移动”),但点击没有反应是什么原因?我是在win7的ie浏览器下使用的。其它按钮都起作用。

sandbox cannot make

[root@localhost cli]# sudo -u apache php judged.php
Judge daemon successfully created. PID = 15263

in CentOS, I would like to use sandbox judge engine, then cd MOODLE_PATH/local/onlinejudge/judge/sandbox/sand/ && make
[root@localhost sand]# make
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o stdin_test testcase/stdin.c
在包含自 /usr/include/features.h:352 的文件中,
从 /usr/include/stdio.h:28,
从 testcase/stdin.c:1:
/usr/include/gnu/stubs.h:7:27: 错误:gnu/stubs-32.h:没有那个文件或目录
make: *** [stdin_test] 错误 1

[root@localhost sand]# uname -a
Linux localhost 2.6.18-238.12.1.el5 #1 SMP Tue May 31 13:22:04 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

[root@localhost sand]# cc -v
使用内建 specs。
目标:x86_64-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
线程模型:posix
gcc 版本 4.1.2 20080704 (Red Hat 4.1.2-50)

[root@localhost sand]# make clean
make -C libsandbox clean
make[1]: Entering directory /usr/local/apache/htdocs/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox' rm -rf doc rm -f src/platform.o src/sandbox.o src/symbols.o libsandbox.a libsandbox.so \ libsandbox.so.0.2.18 make[1]: Leaving directory/usr/local/apache/htdocs/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
rm -f *.o *_test detector 223 policy.c
rm -f sand

[root@localhost sand]# make
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o stdin_test testcase/stdin.c
在包含自 /usr/include/features.h:352 的文件中,
从 /usr/include/stdio.h:28,
从 testcase/stdin.c:1:
/usr/include/gnu/stubs.h:7:27: 错误:gnu/stubs-32.h:没有那个文件或目录
make: *** [stdin_test] 错误 1

why?

sandbox错误:255

程序提交后显示:内部错误!sandbox错误255

uname -a

Linux localhost 2.6.18-238.12.1.el5 #1 SMP Tue May 31 13:22:04 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

cc -v

使用内建 specs。
目标:x86_64-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
线程模型:posix
gcc 版本 4.1.2 20080704 (Red Hat 4.1.2-50)

cd /usr/local/apache/htdocs/moodle

[root@localhost moodle]# cd local/onlinejudge
[root@localhost onlinejudge]# cd judge
[root@localhost judge]# cd sandbox
[root@localhost sandbox]# cd sand
[root@localhost sand]# uname -a
Linux localhost 2.6.18-238.12.1.el5 #1 SMP Tue May 31 13:22:04 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost sand]# cc -v
使用内建 specs。
目标:x86_64-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
线程模型:posix
gcc 版本 4.1.2 20080704 (Red Hat 4.1.2-50)
[root@localhost sand]# make clean
make -C libsandbox clean
make[1]: Entering directory /usr/local/apache/htdocs/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox' rm -rf doc rm -f src/platform.o src/sandbox.o src/symbols.o libsandbox.a libsandbox.so \ libsandbox.so.0.2.18 make[1]: Leaving directory/usr/local/apache/htdocs/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
rm -f *.o *_test detector 223 policy.c
rm -f sand
[root@localhost sand]# make
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o stdin_test testcase/stdin.c
make -C libsandbox libsandbox.a
make[1]: Entering directory /usr/local/apache/htdocs/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox' cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/platform.o src/platform.c cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/sandbox.o src/sandbox.c src/sandbox.c: In function ‘__sandbox_tracer’: src/sandbox.c:1030: 警告:标号 ‘next’ 定义后未使用 cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -shared -fPIC -pthread -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITH_NATIVE_MONITOR -D WITHOUT_TSC_COUNTER -I src -c -o src/symbols.o src/symbols.c ar rcvs libsandbox.a src/platform.o src/sandbox.o src/symbols.o a - src/platform.o a - src/sandbox.o a - src/symbols.o make[1]: Leaving directory/usr/local/apache/htdocs/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITHOUT_TSC_COUNTER -I ./libsandbox/src -c policy_print.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITHOUT_TSC_COUNTER -I ./libsandbox/src -c sand.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITHOUT_TSC_COUNTER -I ./libsandbox/src -o detector sand.o policy_print.o ./libsandbox/libsandbox.a
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o 223 223.c
./detect.sh
Detecting syscalls...
INIT_SYSCALLS: 122, 45, 45, 243, 45, 45,
ALLOWED_SYSCALLS: 197, 54, 192, 3, 91, 4, 252,
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITHOUT_TSC_COUNTER -I ./libsandbox/src -c policy.c
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 -D SANDBOX -D NDEBUG -D WITH_NATIVE_TRACER -D WITHOUT_TSC_COUNTER -I ./libsandbox/src -o sand sand.o policy.o ./libsandbox/libsandbox.a
./runtest.sh 1 stdin_test < /dev/null
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o stdout_test testcase/stdout.c
./runtest.sh 1 stdout_test > /dev/null
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o fork_test testcase/fork.c
./runtest.sh 2 fork_test
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o open_test testcase/open.c
./runtest.sh 2 open_test
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o memlimit_test testcase/memlimit.c
./runtest.sh 3 -l memory=1048576 memlimit_test
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o cpulimit_test testcase/cpulimit.c
./runtest.sh 5 -l cpu=1000 cpulimit_test
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o sigsegv_test testcase/sigsegv.c
./runtest.sh 6 sigsegv_test > /dev/null
cc -m32 -Wall -ansi -std=gnu99 -g0 -O3 --static -o return1_test testcase/return1.c
./runtest.sh 7 return1_test
All testcases are OK
make -C libsandbox clean
make[1]: Entering directory /usr/local/apache/htdocs/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox' rm -rf doc rm -f src/platform.o src/sandbox.o src/symbols.o libsandbox.a libsandbox.so \ libsandbox.so.0.2.18 make[1]: Leaving directory/usr/local/apache/htdocs/moodle/local/onlinejudge/judge/sandbox/sand/libsandbox'
rm -f *.o *_test detector 223 policy.c

ideone.com Exception - Error Fetching http headers

I am getting this error on Moodle 2.2. Where is the problem, at config of Moodle or at ideone\lib.php
== TASK: 3 ==
Judging...
Judged inner level exception handler: Exception - Error Fetching http headers De
bug:

  • line 184 of \local\onlinejudge\judge\ideone\lib.php: SoapFault thrown
  • line ? of unknownfile: call to SoapClient->__doRequest()
  • line 184 of \local\onlinejudge\judge\ideone\lib.php: call to SoapClient->__cal
    l()
  • line 184 of \local\onlinejudge\judge\ideone\lib.php: call to SoapClient->getSu
    bmissionStatus()
  • line 358 of \local\onlinejudge\judgelib.php: call to judge_ideone->judge()
  • line 171 of \local\onlinejudge\cli\judged.php: call to onlinejudge_judge()
  • line 120 of \local\onlinejudge\cli\judged.php: call to judge_all_unjudged()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.