PyJudge icon indicating copy to clipboard operation
PyJudge copied to clipboard

Interface to add questions via website

Open theSage21 opened this issue 6 years ago • 4 comments

Questions are added via the file system right now. We need a mechanism to be able to add them via the web interface.

roadmap for this:

  • finish #117
  • finish #118
  • let anyone add questions. Each question has a "added by" field
  • let anyone create contests by selecting questions. Each contest has a "host"
  • Host has full control over contest settings like start/end time, title, questions to be included.

theSage21 avatar May 15 '19 14:05 theSage21

Can I work on this enhancement ?

rsvarma95 avatar May 25 '19 19:05 rsvarma95

sure sure. no need to ask please go ahead and open a PR :+1:

theSage21 avatar May 26 '19 03:05 theSage21

So when a user is going to upload the question, he will uploading three sets of files which are the input, output and statement. Now, the existing model for the questions are

class Question(Model):
    q_no = IntegerField(unique=True)
    author = ForeignKeyField(User)

    class Meta:
        database = db

Presently, the questions are being referenced from a folder. Should I continue with the same or use the database to store the entire contents of the file the user has uploaded ?

rsvarma95 avatar May 26 '19 06:05 rsvarma95

I'll say 2 files for I/o then one text field to capture statement.

Let's put everything in the database. Sqlite can handle up to 1tb easily

theSage21 avatar May 26 '19 07:05 theSage21