Sharif-Judge icon indicating copy to clipboard operation
Sharif-Judge copied to clipboard

Some Problems & Suggestion

Open atiabjobayer opened this issue 8 years ago • 18 comments

As I have worked a huge time with this project, I faced some problem and have some suggestions to enrich sharif judge. First, A large amount of programming contest is held with ACM ICPC Method. But SHJ doesn't support ICPC judgement system. Second, Students are able to view to see the problem description before the contest starts. It is harming the security of a programming contest Third, The reveal , that you used on your project is non-responsive. We cannot see it on small devices Fourth, There should be a clarification System. We have implemented an Instant Messaging system alternate of it. But this feature should exist in an online judge

Fifth, Users are not able to submit their codes from text-editor.

Dear @mjnaderi , Please review these problems. If you haven't enough time to fix them, please suggest me to do so.

Thanks

atiabjobayer avatar Apr 13 '16 08:04 atiabjobayer

It would be much better if you open an "Issue" for each issue you face. So we can discuss these enhancements separately.

Otherwise, this issue will become opened forever. You should not expect to someone working in all your problems together.

DiegoQueiroz avatar Apr 13 '16 11:04 DiegoQueiroz

  1. Could you please elaborate more on what is ICPC system?
  2. NO, user cannot see problem description before starting time. You must have set it up wrong.
  3. No many user of an online judge use small device I suppose. They're more likely to have access to a computer that they will be programming on
  4. IMO Sharif judge is more suited for a single class, not large scale contest thus clarification system may not be so relevant

truongan avatar Jul 06 '16 07:07 truongan

in the ICPC system, if anyone gets AC for all testcases then it gets Accepted verdict. but the SHJ the doesn't support this feature. :(

atiabjobayer avatar Jul 06 '16 17:07 atiabjobayer

As it is an online judging system then it should have a clarification system because if I arrange contests online, then I can't clarify my students in my class :)

atiabjobayer avatar Jul 06 '16 17:07 atiabjobayer

You can make problem that have only ONE big input that include all test cases. As for clarification, I always have my students use some other form of communication like a forum or even a facebook group. Clarification can be send in that channel

truongan avatar Jul 13 '16 01:07 truongan

@truongan , Actually I saw , you developed a lot of things in Sharif Judge. So, I think it is not hard for you to develop a clarification system. :') Actually I am not so expert to implement this feature. And if you can this thing, the project will be more awesome.

atiabjobayer avatar Jul 19 '16 07:07 atiabjobayer

@atiabjobayer I just don't see the point in aadding clarification into sharif-judge. I like sharif because it's lightweight and straightforward to use. If you really need an awesome and powerful online judge to host contenst, I suggest Dom-Judge instead.

truongan avatar Jul 20 '16 16:07 truongan

The documentation of DomJudge is so hard and it is a matter of sorrow that I was failed to install that on my server. Can You please give me any link of installation process( except official ) ? :')

atiabjobayer avatar Jul 20 '16 17:07 atiabjobayer

I agree with some points, particularly the fact that users should not be able to see the problem definition before the beginning of the assignment. That is not something we expect and should at least be left as an option. @truongan you said its already the case but it is not (see the code, they just cannot submit, by can see the problem)

Bramas avatar Aug 24 '16 14:08 Bramas

@Bramas: I was mistaken. In sharif judge user can see problem statement before assignment start time.

I DID, however, fix this problem myself in my fork a long time ago. Feel free to clone and give it a go https://github.com/truongan/Sharif-Judge

truongan avatar Aug 26 '16 03:08 truongan

I fixed it in my version too. I see that you've have done other small improvement, maybe it will inspire me :)

The improvements maybe be pull to the official repo but I don't know if @mjnaderi is still maintaining this repo?

Bramas avatar Aug 26 '16 09:08 Bramas

MJNaderi made another site named quera.ir based on SHJ. That's why he doesn't pay attention on it.

atiabjobayer avatar Aug 27 '16 12:08 atiabjobayer

@Bramas : I know that change can be pull in. In fact I still have a pull request awaiting approval for roughly a year now =)) That being said, I think we are on our own in imporving this peice of sotware now. It's the spirit of open source not to be rely too much on the original author anyway. If you guys have any idea I can do, i will implement it in my fork

truongan avatar Aug 28 '16 01:08 truongan

@truongan Please build a clarification system. it will make this a complete OJ.

And by the way, is it a good idea to implement a problem archieve ? @Bramas @DiegoQueiroz

atiabjobayer avatar Aug 28 '16 07:08 atiabjobayer

Hello there, it's been almost a year seems to be 👍
i'm Jotaro and i'm using this awesome projects for local competition. Thanks a lot to everyone here. I give you a lot of thumbs up from Japan. @atiabjobayer has said that the way score is only be get by accepted like ordinary competitive programming system. I had a quick solution to do this.

1:Changing Submissions View

In application/views/pages/submissions.twig there are some script to display final score. you can edit following

Line:138

<td style="font-weight: bold;">{{(submission.fullmark ?  submission.final_score : 0)}} </td>

Line:153

{{(submission.fullmark ?  "Accepted" : "Wrong Answer")}}

AC or WA is both ok. Do as you like.

Then this will change your view on the submission page. But it doesn't actually calculate internal parameters.

2:Changing Final Submission Script

In application/models/Scoreboard_model.php I did following.

Around Line 47 after else block I added this:

if($pi['score'] > $pre_score){
    $pre_score=0;
    $final_score = 0;
}

This will affect to the scoreboard. I mean if submission is not full-mark, regardless of reduction by delay, it will not count as a score and let it be 0.

Hope this will help you guys here. Peace

JotaroS avatar Apr 24 '17 07:04 JotaroS

@JotaroS glad to see that you thought about my point. The things you've said has been done already in my project. But now I'm facing another problem(my users said).

If you are informed about ICPC method, then you will know that the penalty of a problem is 0 until it is solved. That means until I solve the problem, the penalty will be 0. when I will get AC, then the penalty based on time and WA will be added.

but in SHJ , users are getting penalty before solving. Such as, an user submitted for a problem and got WA. And after a few minutes, the contest ended. In this situation, the penalty is added to his score and takes his position lower. but this thing is not allowed by ICPC.

I tried to solve this but I got totally confused by SHJ's penalty system. Would be better if you can solve this.

atiabjobayer avatar Apr 24 '17 15:04 atiabjobayer

@atiabjobayer OK, thanks for your reply. then maybe some of the code for manipulating database has to be changed. I'll tell you if I got my Idea.

JotaroS avatar Apr 26 '17 03:04 JotaroS

@atiabjobayer : The penalty is calcualated in Scoreboard_model.php:74 , you can have a look at it on my fork: https://github.com/truongan/wecode-judge/commit/2767fe2094010b7837cb48082c2b57ab2babbc1c

truongan avatar May 06 '17 08:05 truongan