Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
402 changes: 178 additions & 224 deletions .idea/workspace.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Quizzer/static/base1.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px


.footer-distributed{
background-color: #292c2f;
background-color: #42f4d9;
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.12);
box-sizing: border-box;
width: 100%;
Expand Down
4 changes: 4 additions & 0 deletions Quizzer/static/quiz.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@

.btn-huge{
padding-top:40px;
padding-bottom:60px;

}

* {
-webkit-box-sizing: border-box;
Expand Down
7 changes: 6 additions & 1 deletion Quizzer/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<link rel="stylesheet" href="{% static 'base1.css' %}">
<link rel="stylesheet" href="{% static 'quiz.css' %}">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Cute+Font|Faster+One|Sarpanch" rel="stylesheet">
<title>
{% block title %}
Expand All @@ -23,6 +23,11 @@

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<style>
body
{
background-color: #ffffff;
background-image: url("https://www.transparenttextures.com/patterns/inspiration-geometry.png");
}
.btn-huge{
padding-top:40px;
padding-bottom:60px;
Expand Down
83 changes: 71 additions & 12 deletions Quizzer/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<style>
body{
<!--background-color: #ffffff;-->
<!--background-image: url("https://www.transparenttextures.com/patterns/inspiration-geometry.png");-->

<!--background-color: #ebebeb;-->
<!--background-image: url("https://www.transparenttextures.com/patterns/brick-wall-dark.png");-->


background-color: #ffffff;
background-image: url("https://www.transparenttextures.com/patterns/crissxcross.png");
background-attachment: fixed;
}
.btn-huge{
padding-top:40px;
padding-bottom:60px;
Expand Down Expand Up @@ -124,12 +136,13 @@ <h1 class="h3 mb-3 font-weight-normal">Sign In</h1>
<div class="container " style="background-color:; max-width:100%">


<div class="row" style="text-align: center;padding-top: 100px">
<h1 style="font-size: 70px;font-family:'Barrio', cursive;">Unlocking Knowledge at the speed of thought</h1>
<div class="row justify-content-center" style="text-align: center;padding-top: 100px">
<h1 style="font-size: 70px;font-family:'Barrio', cursive; margin">Wecome to QuizOholic</h1>

<div class="col-md justify-content-center"><h2 style="font-family:sarpanch;" class="text-muted" ><br>A Quizzing Platform To Hone Your Skills</h2></div>

</div>
<div class="row justify-content-center"><h2 style="font-family:sarpanch;" class="text-muted" ><br>A Quizzing Platform To Hone Your Skills</h2></div>


<div class="row" style="text-align: center;padding-top: 70px">
<div class="col-md justify-content-center" >
Expand All @@ -143,18 +156,19 @@ <h1 style="font-size: 70px;font-family:'Barrio', cursive;">Unlocking Knowledge
<hr class="style-five">

<div class="row" style="padding-top: 130px;padding-left: 100px">
<p class="tab retroshadow" style="font-size: 70px;font-weight:600;color:#273c75;line-height: 1.8">W H A T &nbsp; D O <br> Y O U &nbsp; <span style="color: #eb2f06">K N O W ? ? ?</span></p>
<p class="tab retroshadow" style="font-size: 50px;font-weight:600;color:#273c75;line-height: 1.8">AN INVESTMENT IN KNOWLEDGE PAYS THE
<br>BEST &nbsp;<span style="color: #eb2f06">INTEREST</span></p>
</div>
<div class="row" style="height: 200px;margin-top: 80px;margin-left: 30px">
<div class="col-md-6 rounded shadow-lg headshot headshot-1" style="background-color: #0c2461;padding-top: 50px;padding-left: 30px;border-style: dashed;border-color: white;border-width: thick">
<p class="tab" style="font-size: 20px;font-weight: 400; color: white;line-height: 1.8">T A K E &nbsp; P A R T &nbsp; I N &nbsp; Q U I Z &nbsp; A N D &nbsp; S H O W <br> O F F &nbsp; Y O U R &nbsp; S K I L L S</p>
<p class="tab" style="font-size: 20px;font-weight: 400; color: white;line-height: 1.8">L E T' S &nbsp;&nbsp; &nbsp;J U S T &nbsp;&nbsp; &nbsp; C O M E &nbsp; &nbsp; &nbsp; A N D &nbsp; S H O W <br> O F F &nbsp; Y O U R &nbsp; S K I L L S</p>
</div>
</div>
<br>
<br>
<hr class="style-two">
<div class="row" style="padding-top: 130px;padding-left: 200px;text-align: right">
<p class="tab hit-the-floor" style="font-size: 70px;font-weight:600;color:#273c75;line-height: 1.8">K N O W -&nbsp; I T - <span style="color: #eb2f06">A L L ? ? ?</span></p>
<p class="tab hit-the-floor" style="font-size: 50px;font-weight:600;color:#273c75;line-height: 1.8">K N O W -&nbsp; I T - <span style="color: #eb2f06">A L L ? ? ?</span></p>
</div>
<div class="row" style="height: 200px;margin-top: 80px;margin-left: 30pxs;max-width: 100">
<div class="col-md-6 rounded shadow-lg headshot headshot-1" style="background-color: #0c2461;padding-top: 50px;padding-left: 30px;margin-left: 500px;border-style: dashed;border-color: white;border-width: thick;">
Expand All @@ -165,16 +179,61 @@ <h1 style="font-size: 70px;font-family:'Barrio', cursive;">Unlocking Knowledge


<div>
<footer class="text-muted">
<div class="container text-center">
<p>&copy; Binary Compatible {% now "Y" %}</p>
<br>
</div>
</footer>
<!--<footer class="text-muted">-->
<!--<div class="container text-center">-->
<!--<p>&copy; Binary Compatible {% now "Y" %}</p>-->
<!--<br>-->
<!--</div>-->
<!--</footer>-->

</div>
</div>

<footer class="footer-distributed" style="background-color:#41f4d0;">

<div class="footer-left">

<h3>Company<span>logo</span></h3>

<p class="footer-links">

</p>

<p class="footer-company-name">Binary Compatible &copy; 2018</p>
</div>

<div class="footer-center">

<div>
<i class="fa fa-map-marker"></i>
<p><span>264,257 Tilak Hostel</span> MNNIT, Allahabd</p>
</div>

<div>
<i class="fa fa-phone"></i>
<p>+1 555 123456</p>
</div>

<div>
<i class="fa fa-envelope"></i>
<p><a href="mailto:support@company.com">support@company.com</a></p>
</div>

</div>

<div class="footer-right">

<p class="footer-company-about">
<span>About the company</span>
Our aim was to join quiz masters and quizzers
</p>


</div>

</footer>



<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
Expand Down
52 changes: 47 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,49 @@
# Quizzer
Quizzer
Introduction
Most of us don't generally test ourselves as much as we would like to do. There is uncertainity in not knowing. We tell ourselves when the moment arrives we will take everything seriously and ace the test. This is a very common problm among students. There is either a lack of available platforms or the market is filled with online platform that claim to be up to the mark. We tried to solve a common problem most of us face. When we were looking at all the problem statements of INNODEV 2018 the one called Ample samples intrigued us the most. The Idea of actually creating a platform for conducting professional level quizzes was very interesting.

## Introduction
Created a quizzing platform to be used in conducting online quizzes using DJANGO. The platform uses different Django apps to provide functionalities like User creation / authentication, Creating New Quizzes using CSV files, Conducting Quizzes and producing the overall score.
Problem statement - Ample Samples
The placements sessions are here and an overconfident Apurva thinks she is a know it all. Her friends want to help her but couldn’t as she doesn't like their preaching. So her friends thought of challenging her in a quiz related to their subject to break her overconfidence. The only problem is that they don't have a platform where they can conduct such quizzes. Help the friends design a quiz platform which can be easily used to conduct quizzes and their easy evaluation. Also her friends want the solution to be user friendly as Apurva wouldn't take the quiz if she faces any trouble in handling the platform. Use your imagination to help Apurva in taking the placement sessions seriously.

## Scope
This Project can be utilized in a wide range of Educational Institutes like Colleges, Schools, Coaching Institutes etc. It is still under development and I plan on keep working on it till it is ready to be used commercially.
All of us face these kind of problems. In most of the colleges or schools there is a lack of a local platform fo testing our skills. We tried to solve this problem in this project.

Our aim was to make the experience of quizzing as smooth as possible. From registration, login to creating and participating in quizzes. We tried to think of the problems faced by both the quiz-administrators and the students and then tried to solve them as much as was possible in the given amount of time.

Technologies and Tools
Language - Python 3.6
Backend Framework - Django 2.1
Database - POSTGRESQL
DBMS - Pgadmin
Version-control - Git and Github
JavaScript Library - jquery (primarily used for AJAX)
Style Libraries - Bootstrap
Scope
This Project can be utilized in a wide range of Educational Institutes like Colleges, Schools, Coaching Institutes etc. It is still under development and we plan to keep working on it till it is ready to be used commercially.Hopefully if it turns out to be good enough we will be able to support all the online quizzes held in our college at the local level.

The room for development is enourmous. We can first start by adding a code editor and an online judge. We can use webscraping to scrape the best quizzes from the net. ML can be implemented to predict quiz chices for students who are here to practice. Quiz-groups features can be added and some imitation of hackerearth's code arena can also be added.

The main reason behind choosing this project was that we can keep on working on it and improving it.

Instructions to run locally
Install Python and some dev tools for Python
$ sudo apt-get install python-pip python-dev build-essential
$ apt install Python3.6
use easy_install for older versions of ubuntu e.g -$ easy_install python3-pip
Install Pip
$ apt install python3-pip
Install other requirements given in requirements.txt file
$ pip install requirements.txt
Modify database engine,
Rename the database section in settings.py
add username and password and port accordingly
save changes
Sync db and make superuser
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py createsuperuser
Collect Static files
python manage.py collectstatic
Runserver
$ Python manage.py runserver
$ visit 127.0.0.1:8000
Done :-)
Binary file added innodev_submission.webm
Binary file not shown.
5 changes: 3 additions & 2 deletions quiz/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class QuizForm(forms.ModelForm):
class Meta:
model = Quiz
fields = ('Quiz_id', 'name', 'Test_Password', 'about', 'instructions', 'csv_file', 'positive', 'negative', 'duration')
fields = ('Quiz_id', 'name', 'Test_Password', 'about', 'instructions', 'csv_file', 'positive', 'negative', 'duration','tags')

widgets = {
'about': forms.Textarea(attrs={'class':'form-control col-8'}),
Expand All @@ -15,5 +15,6 @@ class Meta:
'negative' : forms.NumberInput(attrs = {'class':'form-control col-3'}),
'duration' : forms.TimeInput(attrs = {'class':'form-control col-3'}),
'Quiz_id': forms.TextInput(attrs={'class': 'form-control col-6'}),
'csv_file': forms.FileInput(attrs={'class': 'form-control col-5 btn btn-primary btn-sm'})
'csv_file': forms.FileInput(attrs={'class': 'form-control col-5 btn btn-primary btn-sm'}),
'tags':forms.TextInput(attrs={'class': 'form-control col-6','placeholder':'Separate tags with comma(,)'}),
}
19 changes: 19 additions & 0 deletions quiz/migrations/0009_auto_20181015_0845.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 2.0.2 on 2018-10-15 03:15

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('quiz', '0008_remove_answers_users_appeared'),
]

operations = [
migrations.AlterField(
model_name='quiz',
name='negative',
field=models.IntegerField(default=1, validators=[django.core.validators.MinValueValidator(1)]),
),
]
19 changes: 19 additions & 0 deletions quiz/migrations/0010_auto_20181015_0910.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 2.0.2 on 2018-10-15 03:40

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('quiz', '0009_auto_20181015_0845'),
]

operations = [
migrations.AlterField(
model_name='quiz',
name='negative',
field=models.IntegerField(default=1, validators=[django.core.validators.MaxValueValidator(100), django.core.validators.MinValueValidator(1)]),
),
]
24 changes: 24 additions & 0 deletions quiz/migrations/0011_auto_20181015_0926.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 2.0.2 on 2018-10-15 03:56

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('quiz', '0010_auto_20181015_0910'),
]

operations = [
migrations.AlterField(
model_name='quiz',
name='negative',
field=models.PositiveIntegerField(default=0, validators=[django.core.validators.MaxValueValidator(100), django.core.validators.MinValueValidator(1)]),
),
migrations.AlterField(
model_name='quiz',
name='positive',
field=models.PositiveIntegerField(default=3),
),
]
18 changes: 18 additions & 0 deletions quiz/migrations/0012_auto_20181015_0926.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.0.2 on 2018-10-15 03:56

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('quiz', '0011_auto_20181015_0926'),
]

operations = [
migrations.AlterField(
model_name='quiz',
name='negative',
field=models.PositiveIntegerField(default=0),
),
]
19 changes: 19 additions & 0 deletions quiz/migrations/0013_quiz_tags.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 2.0.2 on 2018-10-15 15:59

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('quiz', '0012_auto_20181015_0926'),
]

operations = [
migrations.AddField(
model_name='quiz',
name='tags',
field=models.TextField(default='aa', max_length=2000),
preserve_default=False,
),
]
8 changes: 5 additions & 3 deletions quiz/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from django.db import models
from django.contrib.auth.models import User
from datetime import timedelta
from django.core.validators import MaxValueValidator, MinValueValidator


class Quiz(models.Model):
name = models.CharField(max_length = 50)
Expand All @@ -10,10 +12,10 @@ class Quiz(models.Model):
quizmaster = models.ForeignKey(User, on_delete= models.CASCADE)
instructions = models.TextField(default=' ')
Quiz_id = models.CharField(max_length=50,default='')
positive = models.IntegerField(default=3)
negative = models.IntegerField(default=1)
positive = models.PositiveIntegerField(default=3)
negative = models.PositiveIntegerField(default=0)
duration = models.DurationField(default= timedelta())

tags=models.TextField(max_length=2000)

def __str__(self):
return self.name
Expand Down
Loading