django-lms icon indicating copy to clipboard operation
django-lms copied to clipboard

'EssayQuestion' object has no attribute 'get_choices'

Open y938 opened this issue 10 months ago • 1 comments

Describe the bug after taking essay quiz when i hit check button 'EssayQuestion' object has no attribute 'get_choices' error raise

To Reproduce Steps to reproduce the behavior:

  1. sign in as a student
  2. go to my courses and choose course
  3. click take a quiz
  4. click start essay quiz(created by admin)
  5. after answering the question click check
  6. error('EssayQuestion' object has no attribute 'get_choices')

Expected behavior check your answer and show your score

Desktop (please complete the following information):

  • OS: window
  • Browser : chrome

Capture

Additional context Adding the following code in quiz/model/EssayQuestion remove the error. but i don't think it's the right way

def get_choices(self):
        # Returning an empty list to signify no choices for essay questions
        return []

y938 avatar Apr 01 '24 09:04 y938

Thanks for this detailed issue.

We will look at it

adilmohak avatar Apr 01 '24 15:04 adilmohak