tillmo / two_tiered_quiz

A multiple choice quiz with justifications for the answers, written in Django
GNU Affero General Public License v3.0
0 stars 0 forks source link

#14 implementation #110

Closed pramodbontha closed 3 years ago

pramodbontha commented 3 years ago

Added a new interface for admin using react and added Uploading a quiz feature using quiz parser.py Interface can be accessed through '/admin'. Users only with admin roles can only login into that interface.

pramodbontha commented 3 years ago

When I log into the admin interface, I cannot see any link to the quiz upload.

Please check with the front end url ' localhost:3000/admin' . I have created an admin panel in the front end.

tillmo commented 3 years ago

You have misunderstood me. You should not add specific code inspecting certain types of errors. The duplicate quiz error is just an example. You should output the error messages generated by the read_quiz function properly. Note that read_quiz calls read_quiz_aux, catches exceptions, prints them, and re-raises them. You probably need a new function that calls read_quiz_aux, catches exceptions, and returns the error message contained in the exception, but that does not re-raise the exception.

pramodbontha commented 3 years ago

As suggested instead re-raising exception I returned them after catching. @tillmo Could you please let me know if I have to remove the "Wrong Line" for every exception.

Thank you in advance.

tillmo commented 3 years ago

You have removed the "Wrong line" info. But you should show it! Sometimes, after "Wrong line", more info is shown. This should also be shown. By contrast, the text of the exception itself is not interesting.

tillmo commented 3 years ago

When I submit this file

quiz: Video 1-5aa
d: Syntax atomarer Sätze
q: Ist P(f(a),b) ein korrekter atomarer Satz?
j:k

I only get

NOT NULL constraint failed: QuizBoard_justifications.answer_id

On the master branch, I additionally get

Wrong line: j:k

and this is the line that should be shown, not the other one.