diff options
author | Prabhu Ramachandran | 2018-03-22 18:10:54 +0530 |
---|---|---|
committer | GitHub | 2018-03-22 18:10:54 +0530 |
commit | c49550b6793c0481fae08f04c794218513894cc4 (patch) | |
tree | 8a767d224ac6a1688cd3eb301b2ccac40413fc7e /yaksh/views.py | |
parent | 30be89eef46a248fe6f7ff26a923593ea8371fb1 (diff) | |
parent | 734b221a98745ccb6218f43923731323a265966a (diff) | |
download | online_test-c49550b6793c0481fae08f04c794218513894cc4.tar.gz online_test-c49550b6793c0481fae08f04c794218513894cc4.tar.bz2 online_test-c49550b6793c0481fae08f04c794218513894cc4.zip |
Merge branch 'master' into Grades
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 268e15f..1cb77fc 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -618,7 +618,7 @@ def show_question(request, question, paper, error_message=None, notification=Non if question.type == "code" else 'You have already attempted this question' ) - if question.type in ['mcc', 'mcq']: + if question.type in ['mcc', 'mcq', 'arrange']: test_cases = question.get_ordered_test_cases(paper) else: test_cases = question.get_test_cases() @@ -728,6 +728,9 @@ def check(request, q_id, attempt_num=None, questionpaper_id=None, elif current_question.type == 'mcc': user_answer = request.POST.getlist('answer') + elif current_question.type == 'arrange': + user_answer_ids = request.POST.get('answer').split(',') + user_answer = [int(ids) for ids in user_answer_ids] elif current_question.type == 'upload': # if time-up at upload question then the form is submitted without # validation |