Comments (5)
I havent done anything to allow multiple correct questions but that does sound like a useful feature!
from django_quiz.
Am 13.11.2015 um 20:00 schrieb Tom Walker:
I havent done anything to allow multiple correct questions but that
does sound like a useful feature!—
Reply to this email directly or view it on GitHub
#49 (comment).
May I request it as a feature then?
kind regards
from django_quiz.
I can offer a german translation in return. I want to make a trainig website for my kids, there I will need multiple correct answers.
from django_quiz.
@tomwalker @mayersre Hi, nice quiz app. Has anything been done with multiple correct answers? We have the same issue. It would be nice to allow both using radioselects for one correct and CheckboxSelectMultiple for multiple choices. cheers, Mykl
from django_quiz.
With a few code changes multiple answers will work,
in quiz.forms.QuestionForm change the field and the widget
from django.forms.widgets import CheckboxSelectMultiple
self.fields["answers"] = forms.MultipleChoiceField(choices=choice_list,
widget=CheckboxSelectMultiple)
in quiz.multichoice.models change the check_if_correct method to process a list and build a Q filter for it
def check_if_correct(self, guesses):
#
filterqs=models.Q()
# add a filter for each answer
for guess in guesses :
filterqs = filterqs | models.Q(id=guess)
answers = Answer.objects.filter(filterqs)
# One wrong answer makes the question fail
retval=False
for answer in answers :
if answer.correct is True:
retval=True
else:
return False
return retval
from django_quiz.
Related Issues (20)
- user friendly url
- User should not able to click submit without choosing option
- Provide an option to disable copy and paste
- OperationalError (no such table: quiz_quiz) while trying to start application HOT 1
- ValueError invalid literal for int() with base 10: '2,' HOT 1
- Restricting access to certain questions/categories
- Saved image im question does not work HOT 1
- Question navigation feature?
- ..
- AttributeError: 'Options' object has no attribute 'get_all_related_objects'
- Project running HOT 2
- string in template without translation HOT 2
- fr-FR locale HOT 1
- Project Documentation HOT 19
- Update integration tests to support Django 3 and drop Django 1 and Python 2.7 HOT 1
- randomization under categories
- multiple choice is not multiple
- Old UI of the admin panel
- Cannot modify the templates
- Steps to setup HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django_quiz.